CloudForms Installation and Configuration Guide for Red Hat Enterprise Virtualization

manageiq-logo-glyph

Overview

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.

Install CloudForms

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 ImageImage 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 DomainIn 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 TemplateOnce 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.rhevm_cfme_importedrhevm_import_cfmeWe can provide our CFME template with a new name.cfme_import_2Once import completes the status will change to “OK”.rhevm_cfme_import_completeCreate CloudForms Virtual MachineUnder “Virtual Machines”, select “new” in the RHEV-M management console. For template choose the newly imported CFME template.cfme_new_vmAdd Additional Disk for CloudForms DatabaseUnder 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 RHEV-M management console. Login as “root/smartvm” and run “appliance_console” to configure CloudForms.cfme_setup1Configure static network settingscfme_setup2Configure local databasecfme_db_1Make sure you create an internal databasecfme_db_2Choose a disk, this should be the 30GB disk we addedcfme_db_3Choose “N” to run standalone database servercfme_db_4Create database region and choose passwordcfme_db_5Restart the CFME appliancecfme_db_6Below are the basic settings that should be configuredcfme_db_7

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 --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 RHEV Provider in CloudForms

Connect to CloudForms management consoleUsing browser you can simply hit the IP of CloudForms appliance using https. Login with “admin/smartvm”.cfme_loginAdd RHEV ProviderUnder 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”.cfme_add_rhev_providerConfigure HypervisorsCloudForms 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 RHEVH01Under RHEV infrastructure provider select host rhevh01.lab and configure.cfme_rhev_hypervisorConfigure RHEVH02Under RHEV infrastructure provider select host rhevh02.lab and configure.cfme_rhev_hypervisor2Enable Capacity and UtilizationOn upper far right in CloudForms management console under user, select “Configuration”. Enable the Capacity and Utilization roles underthe “Server: EVM”.C & Ucfme_c+uSet SmartProxy AffinityUnder “Zone: Default Zone” associate all hosts and datastores.cmfe_c+u2Enable Capacity and Utilization Collection of RHEV EnvironmentUnder “CFME:Region” enable collection for all clusters and datastores.cfme_c+u4At 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 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 
, , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: