CloudForms Installation and Configuration Guide for Red Hat Virtualization

7 minute read

manageiq-logo-glyph

Overview

In this article we will deploy CloudForms 4.2 on Red Hat Enterprise Virtualization (RHV). We will also show how to configure CloudForms in order to properly manage a RHV cluster and it's hosts as well as virtual machines.

Before you begin a RHV cluster is needed. If you haven't set one up, here is a guide on how to build a basic two node RHV cluster.

Install CloudForms

CloudForms is provided by Red Hat as a virtual applicance. Red Hat provides appliances for many infrastructure platforms such as RHV, VMware, Hyper-V, OpenStack, AWS, GCE and Azure. In this case we will download the RHV virtual appliance.

Download Image

Image should be downloaded to the CFME appliance using your RHN login.

https://access.redhat.com/downloads/content/167/ver=/cf-me---4.2/4.2/x86_64/product-software

Add Appliance into RHV Export Domain

In order to import an appliance it needs to be copied to export domain or imported to export domain using CLI.

# cp cfme-rhevm-5.7.2.1-1.x86_64.rhevm.ova /usr/share/export/30621071-3dba-401d-9605-02a914b4069a

Once copied to export domain we need to extract the appliance and set permissions.

# cd /usr/share/export/30621071-3dba-401d-9605-02a914b4069a/
# tar xvf cfme-rhevm-5.3-15.x86_64.rhevm.ova
# chown -R 36:36 images/
# chown -R 36:36 master/

Import CFME Appliance as Template

Once the appliance is in the export domain we can import it as an appliance using the RHV-M management console. Under export domain and template, choose the import option.

rhevm_cfme_imported

rhevm_import_cfme

We can provide our CFME template with a new name.

cfme_import_2

Once import completes the status will change to "OK".

rhevm_cfme_import_complete

Create CloudForms Virtual Machine

Under "Virtual Machines", select "new" in the RHV-M management console. For template choose the newly imported CFME template.

cfme_new_vm

Add Additional Disk for CloudForms Database

Under CFME "Virtual Machine" Disks select "new" to add a new disk. I would recommend 30GB but this is based on how much data is to be collected and for how long.

cfme_db_disk

Configure Appliance

Start CFME VM from RHV-M management console. Login as "root/smartvm" and run "appliance_console" to configure CloudForms.

cfme_setup1

Configure static network settings

cfme_setup2

Configure local database

cfme_db_1

Make sure you create an internal database

cfme_db_2

Choose a disk, this should be the 30GB disk we added

cfme_db_3

Choose "N" to run standalone database server

cfme_db_4

Create database region and choose password

cfme_db_5

Restart the CFME appliance

cfme_db_6

Below are the basic settings that should be configured

cfme_db_7

Configure RHV for CloudForms

In order for CloudForms to report capacity & utilization we need to configure access from RHV-M.

Login to RHV-M host using ssh as root

Connect to RHV-M database

# su - postgres

As postgres user add a new role for CloudForms. As of this article CloudForms needs superuser but there is an RFE to enable read-only access in future.

$ psql -U postgres CREATE ROLE cfme LOGIN UNENCRYPTED PASSWORD 'redhat01' \
SUPERUSER VALID UNTIL 'infinity'; \q

 

Open firewall ports to allow communication to database

# firewall-cmd --add-port=5432/tcp --permanent
# firewall-cmd --reload

Ensure PostgreSQL is exposing port and listening to all interfaces

# vi /var/lib/pgsql/data/pg_hba.conf
host all all 0.0.0.0/0 md5
# vi /var/lib/pgsql/data/postgresql.conf
listen_addresses = '*'

Restart PostgreSQL database

# service postgresql reload

Configure RHV Provider in CloudForms

Connect to CloudForms management console

Using browser you can simply hit the IP of CloudForms appliance using https. Login with "admin/smartvm".

cfme_login

Add RHV Provider

Under providers, choose "Infrastructure Providers" and "new". Add the default credentials using IP or name of RHV-M host. The user should be admin@internal for RHV-M.

Once that is complete, go to the "C& U Database" tab. Here you will enter the IP or name for the RHV-M host and the superuser credentials you created above. In this example "cfme/redhat01".

cfme_add_rhev_providerConfigure Hypervisors

CloudForms requires access to hypervisors for certain capabilities like "smart state analysis". Ability to peer inside VM images in order to for example, check security vulnerabilities. In this environment there are two hypervisor hosts (rhevh01.lab and rhevh02.lab).

Configure RHEVH01

Under RHV infrastructure provider select host rhevh01.lab and configure.

cfme_rhev_hypervisor

Configure RHEVH02

Under RHV infrastructure provider select host rhevh02.lab and configure.

cfme_rhev_hypervisor2

Enable Capacity and Utilization

On upper far right in CloudForms management console under user, select "Configuration". Enable the Capacity and Utilization roles underthe "Server: EVM".

C & U

cfme_c+u

Set SmartProxy Affinity

Under "Zone: Default Zone" associate all hosts and datastores.

cmfe_c+u2

Enable Capacity and Utilization Collection of RHV Environment

Under "CFME:Region" enable collection for all clusters and datastores.

cfme_c+u4

At this point CloudForms is collecting capacity and utilization statistics and after a few hours you should start seeing data under VM. You can also use planning to forecast and model various growth scenarios.

Summary

In this article we installed and configured the CloudForms appliance on an existing RHV cluster. We prepared RHV-M for CloudForms data collection. Configured a new infrastructure provider for RHV in CloudForms. Finally we enabled capacity and utilization for RHV within CloudForms.

Happy CloudForming!

(c) 2017 Keith Tenzer