In this article we will deploy CloudForms 4.2 on Red Hat Enterprise Virtualization (RHEV). We will also show how to configure CloudForms in order to properly manage a RHEV cluster and it’s hosts as well as virtual machines.Before you begin a RHEV cluster is needed. If you haven’t set one up, here
is a guide on how to build a basic two node RHEV cluster.
CloudForms is provided by Red Hat as a virtual applicance. Red Hat provides appliances for many infrastructure platforms such as RHEV, VMware, Hyper-V, OpenStack, AWS, GCE and Azure. In this case we will download the RHEV 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-softwareAdd Appliance into RHEV 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-220.127.116.11-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 RHEV-M management console. Under export domain and template, choose the import option.
We can provide our CFME template with a new name.
Once import completes the status will change to “OK”.Create CloudForms Virtual Machine
Under “Virtual Machines”, select “new” in the RHEV-M management console. For template choose the newly imported CFME template.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.
Start CFME VM from RHEV-M management console. Login as “root/smartvm” and run “appliance_console” to configure CloudForms.Configure static network settingsConfigure local databaseMake sure you create an internal databaseChoose a disk, this should be the 30GB disk we addedChoose “N” to run standalone database serverCreate database region and choose passwordRestart the CFME applianceBelow are the basic settings that should be configured
Configure RHEV for CloudForms
In order for CloudForms to report capacity & utilization we need to configure access from RHEV-M.Login to RHEV-M host using ssh as rootConnect to RHEV-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 --reloadEnsure 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 RHEV Provider in CloudFormsConnect to CloudForms management console
Using browser you can simply hit the IP of CloudForms appliance using https. Login with “admin/smartvm”.Add RHEV Provider
Under providers, choose “Infrastructure Providers” and “new”. Add the default credentials using IP or name of RHEV-M host. The user should be admin@internal for RHEV-M.Once that is complete, go to the “C& U Database” tab. Here you will enter the IP or name for the RHEV-M host and the superuser credentials you created above. In this example “cfme/redhat01”.Configure 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 RHEV infrastructure provider select host rhevh01.lab and configure.Configure RHEVH02
Under RHEV infrastructure provider select host rhevh02.lab and configure.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 & USet SmartProxy Affinity
Under “Zone: Default Zone” associate all hosts and datastores.Enable Capacity and Utilization Collection of RHEV Environment
Under “CFME:Region” enable collection for all clusters and datastores.
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.
In this article we installed and configured the CloudForms appliance on an existing RHEV cluster. We prepared RHEV-M for CloudForms data collection. Configured a new infrastructure provider for RHEV in CloudForms. Finally we enabled capacity and utilization for RHEV within CloudForms.Happy CloudForming!(c) 2017 Keith Tenzer