Today’s guide will be concentrate on the installation and configuration of ManageIQ / CloudForms on both OpenStack and KVM virtualization environment. ManageIQ is the upstream project to Red Hat CloudForms – It is an infrastructure management platform designed to allow IT departments to control users’ self-service abilities to provision, manage, and ensure compliance across Virtualized and private cloud environments.

This guide is for simple setup with small Virtualized Infrastructure. You may need to consult official documentations for HA setups which can scale out as your infrastructure grows. In my setup, I’ll do installation of Primary Database Virtual Management (VMDB) instance which also function as CloudForms Appliance.

The ManageIQ/CloudForms appliance is a virtual machine image that runs on a Red Hat Enterprise Linux-based operating system. Here are the setup steps to follow.

Step 1: Download CloudForms / ManageIQ Appliance

You’ll start with the download of CloudForms / ManageIQ appliance for your environment as a virtual machine image template.

Red Hat CloudForms

If you’re going with Red Hat CloudForms management engine appliance, obtain the Appliance by:

  1. Go to access.redhat.com and log in to the Red Hat Customer Portal using your customer account details.
  2. Click Downloads in the menu bar.
  3. Click A-Z to sort the product downloads alphabetically.
  4. Click Red Hat CloudForms to access the product download page.
  5. From the list of installers and images, click the Download Now link for CFME OpenStack Virtual Appliance.

See below screenshots.

ManageIQ

Visit ManageIQ Downloads page and pull the latest image Template for OpenStack / KVM environment.

curl -O -L http://releases.manageiq.org/manageiq-openstack-hammer-11.qc2

Confirm file format:

# ManageIQ
$ file manageiq-openstack-hammer-11.qc2 
manageiq-openstack-hammer-11.qc2: QEMU QCOW Image (v2), 70866960384 bytes
$  du -sh manageiq-openstack-hammer-11.qc2 
2.1G    manageiq-openstack-hammer-11.qc2

# RedHat CloudForms
$ file ~/Downloads/cfme-rhevm-5.10.8.0-1.x86_64.qcow2
/home/jmutai/Downloads/cfme-rhevm-5.10.8.0-1.x86_64.qcow2: QEMU QCOW2 Image (v2), 42949672960 bytes
$ du -sh ~/Downloads/cfme-rhevm-5.10.8.0-1.x86_64.qcow2
1.2G /home/jmutai/Downloads/cfme-rhevm-5.10.8.0-1.x86_64.qcow2

Step 2: Upload ManageIQ / CloudForms Appliance on OpenStack

Upload ManageIQ / CloudForms Management Engine to OpenStack:

# ManageIQ 
openstack image create --container-format=bare \
   --disk-format qcow2 \
   --file manageiq-openstack-hammer-11.qc2 \
   manageiq


# CloudForms
openstack image create --container-format=bare \
   --disk-format qcow2 \
   --file cfme-rhevm-5.10.8.0-1.x86_64.qcow2 \
   cloudforms

Pull updated list of VM images available on Glance.

$ openstack image list
+--------------------------------------+-----------+--------+
| ID                                   | Name      | Status |
+--------------------------------------+-----------+--------+
| b8d75f31-fb6b-428b-8b83-f3904b0bd114 | CentOS-7  | active |
| fbcf16a0-c7cc-42c1-b836-a39bc34c9666 | Cirros    | active |
| d900bcad-047a-4d01-bcbc-42426bb4315d | CoreOS    | active |
| f0ac705b-ee73-4de8-95f7-4e06569f0f5c | Debian-10 | active |
| 01e6f07b-ca99-439d-9cd0-ab28c2573abf | Fedora-30 | active |
| 7bd462ad-cc11-4d89-8b85-9aab0cfe114b | Ubuntu-18 | active |
| 3a56d733-de76-490a-9dac-1419219b5803 | manageiq  | active |
| 6b3dc49b-a53f-4cfc-98e0-9eb6925219de | rhel-7    | active |
| 965cb833-b97e-4488-9bc6-84495b9a9b7b | rhel-8    | active |
+--------------------------------------+-----------+--------+

Step 3: Create Cinder Volume for CloudForms/ManageIQ VMDB

For Database instance, a secondary raw disk is required to store Database data. Use the following table as a guideline to calculate minimum requirements for your database:

I’ll add a 10GB secondary disk for DB appliance.

$ openstack volume  create --size 10 manageiq-vmdb
+---------------------+--------------------------------------+
| Field               | Value                                |
+---------------------+--------------------------------------+
| attachments         | []                                   |
| availability_zone   | nova                                 |
| bootable            | false                                |
| consistencygroup_id | None                                 |
| created_at          | 2019-09-10T12:54:29.000000           |
| description         | None                                 |
| encrypted           | False                                |
| id                  | 000c39d8-127a-4d9a-b9ef-db2d78a74e06 |
| migration_status    | None                                 |
| multiattach         | False                                |
| name                | manageiq-vmdb                        |
| properties          |                                      |
| replication_status  | None                                 |
| size                | 10                                   |
| snapshot_id         | None                                 |
| source_volid        | None                                 |
| status              | creating                             |
| type                | None                                 |
| updated_at          | None                                 |
| user_id             | 336acbb7421f47f8be4891eabf0c9cc8     |
+---------------------+--------------------------------------+

$ openstack volume  list
+--------------------------------------+---------------------+----------------+------+--------------------------------------------+
| ID                                   | Name                | Status         | Size | Attached to                                |
+--------------------------------------+---------------------+----------------+------+--------------------------------------------+
| 000c39d8-127a-4d9a-b9ef-db2d78a74e06 | manageiq-vmdb       | available      |   10 |                                            |
+--------------------------------------+---------------------+----------------+------+--------------------------------------------+

Step 4: Create VMDB and Worker VMs

Create VMs from the OpenStack or KVM templates downloaded. My VMs creation is done on OpenStack environment using openstack command management tool.

We’ll first create a flavor for use with CloudForms – 8GB of RAM, 4vcps and 80GB disk space. The flavor is named m1.cfme.

$ openstack flavor create  --ram 8192  --vcpus  4   --disk 80    m1.cfme
+----------------------------+---------+
| Field                      | Value   |
+----------------------------+---------+
| OS-FLV-DISABLED:disabled   | False   |
| OS-FLV-EXT-DATA:ephemeral  | 0       |
| disk                       | 80      |
| id                         | 5       |
| name                       | m1.cfme |
| os-flavor-access:is_public | True    |
| properties                 |         |
| ram                        | 8192    |
| rxtx_factor                | 1.0     |
| swap                       |         |
| vcpus                      | 4       |
+----------------------------+---------+

Create a virtual machine from template and flavor added.

IMAGE="manageiq"
FLAVOR="m1.cfme"
SG_ID="7fffea2a-b756-473a-a13a-219dd0f1913a"
NETWORK="private"
SSH_KEY="jmutai"

openstack server create \
  --image ${IMAGE} \
  --flavor ${FLAVOR} \
  --security-group ${SG_ID} \
  --key-name ${SSH_KEY} \
  --network ${NETWORK} \
  manageiq

VM creation can also be done on OpenStack Horizon dashboard.

Project > Compute > Instances > Launch Instance

Verify VM creation by running the command below:

$ openstack server list
+--------------------------------------+-------------------+---------+-----------------------------------+-----------+-----------+
| ID                                   | Name              | Status  | Networks                          | Image     | Flavor    |
+--------------------------------------+-------------------+---------+-----------------------------------+-----------+-----------+
| 2d492aea-b830-413f-bb9a-ded0a3f787df | manageiq          | ACTIVE  | private=10.10.1.109               | manageiq  | m1.cfme   |
+--------------------------------------+-------------------+---------+-----------------------------------+-----------+-----------+

Attach Cinder Volume to the instance:

$ openstack volume list
$ openstack server list
$ openstack server add volume manageiq manageiq-vmdb

$ openstack volume list
+--------------------------------------+---------------------+----------------+------+--------------------------------------------+
| ID                                   | Name                | Status         | Size | Attached to                                |
+--------------------------------------+---------------------+----------------+------+--------------------------------------------+
| 3809ef59-1f7b-471b-90dc-d93be3e90c03 | manageiq-vmdb       | in-use         |   10 | Attached to manageiq on /dev/vdb           |
+--------------------------------------+---------------------+----------------+------+--------------------------------------------+

Step 5: Configure ManageIQ / CloudForms

Access the instance created through ssh. If you didn’t use SSH key, the default logins are root/smartvm.

$ ssh [email protected]
Warning: Permanently added '10.10.1.88' (ECDSA) to the list of known hosts.
Enter passphrase for key '/home/centos/.ssh/id_rsa': 
Welcome to the Appliance Console

For a menu, please type: appliance_console

Confirm there is a raw block device.

# lsblk
 NAME                           MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
 vda                            252:0    0   80G  0 disk 
 ├─vda1                         252:1    0    1G  0 part /boot
 ├─vda2                         252:2    0   42G  0 part 
 │ ├─vg_system-lv_os            253:0    0 10.5G  0 lvm  /
 │ ├─vg_system-lv_swap          253:1    0    6G  0 lvm  [SWAP]
 │ ├─vg_system-lv_home          253:3    0    1G  0 lvm  /home
 │ ├─vg_system-lv_tmp           253:4    0    1G  0 lvm  /tmp
 │ ├─vg_system-lv_var_log_audit 253:5    0  512M  0 lvm  /var/log/audit
 │ ├─vg_system-lv_var_log       253:6    0   11G  0 lvm  /var/log
 │ └─vg_system-lv_var           253:7    0   12G  0 lvm  /var
 ├─vda3                         252:3    0   10G  0 part /var/www/miq_tmp
 ├─vda4                         252:4    0    1K  0 part 
 └─vda5                         252:5    0   13G  0 part 
   └─vg_data-lv_pg              253:2    0   13G  0 lvm  /var/opt/rh/rh-postgresql95/lib/pgsql
 vdb                            252:16   0   10G  0 disk 

Configure ManageIQ / CloudForms Appliance

Run the appliance_console command to configure CloudForms/ManageIQ.

# appliance_console

1 – Set hostname

Advanced Setting
 1) Configure Network
 2) Set Timezone
 3) Set Date and Time
 4) Create Database Backup
 5) Create Database Dump
 6) Restore Database From Backup
 7) Configure Database
 8) Configure Database Replication
 9) Logfile Configuration
 10) Configure Application Database Failover Monitor
 11) Configure External Authentication (httpd)
 12) Update External Authentication Options
 13) Generate Custom Encryption Key
 14) Stop EVM Server Processes
 15) Start EVM Server Processes
 16) Restart Appliance
 17) Shut Down Appliance
 18) Summary Information
 19) Quit

 Choose the advanced setting: 1
 Network Configuration
 1) Set DHCP Network Configuration
 2) Set IPv4 Static Network Configuration
 3) Set IPv6 Static Network Configuration
 4) Test Network Configuration
 5) Set Hostname
 Choose the network configuration: 5

Hostname Configuration
 Enter the new hostname: |cfme.computingforgeeks.com| cfme.computingforgeeks.com

2 – Configure Local database

Move to Configure Database > Create Internal Database > Choose database disk

Choose N to run both worker and database on same node.

Should this appliance run as a standalone database server?

NOTE:
* The ManageIQ application will not be running.
* This is required when using highly available database deployments.
* CAUTION: This is not reversible.

? (Y/N): |N| N

Provide database region number and database password

Each database region number must be unique.
Enter the database region number: 1
Enter the database password on localhost: ********
Enter the database password again: ********
Create region starting
Create region complete
Database reset successfully
Start the server processes via 'Start EVM Server Processes'.

3 – Start CloudForms server processes

Advanced Setting

1) Configure Network
2) Set Timezone
3) Set Date and Time
4) Create Database Backup
5) Create Database Dump
6) Restore Database From Backup
7) Configure Database
8) Configure Database Replication
9) Logfile Configuration
10) Configure Application Database Failover Monitor
11) Configure External Authentication (httpd)
12) Update External Authentication Options
13) Generate Custom Encryption Key
14) Stop EVM Server Processes
15) Start EVM Server Processes
16) Restart Appliance
17) Shut Down Appliance
18) Summary Information
19) Quit

Choose the advanced setting: 15

Start EVM Server Processes
Start ManageIQ? (Y/N): y
Starting ManageIQ Server...

The basic settings configured should look similar to below.

Hostname:                cfme.computingforgeeks.com
IPv4 Address:            10.10.1.88/255.255.255.0
IPv4 Gateway:            10.10.1.1
Primary DNS:             213.133.98.98
Secondary DNS:           8.8.8.8
Search Order:            openstacklocal
MAC Address:             fa:16:3e:6b:38:e5
Timezone:                America/New_York
Local Database Server:   running (primary)
ManageIQ Server:         running
ManageIQ Database:       localhost
Database/Region:         vmdb_production / 1
External Auth:           not configured
ManageIQ Version:        hammer-11

Step 6: Access CloudForms / ManageIQ Dashboard

You may need a floating IP address from public network to access ManageIQ dashboard. Refer to below guide for how to.

How To Assign a Floating IP Address to an Instance in OpenStack

Browse to the IP or hostname of CloudForms appliance using https.

Login with “admin/smartvm”.

Change admin user password under Administrator > Configuration

Access Control > Users > Administrator > Configuration > Edit user > Change stored password

Set new password.

Step 7: Add users & providers

Add users to CloudForms and configure Access control for your team. When done, check guides on adding different Providers.

More on automation:

Best Books To learn Docker and Ansible Automation

Best books for Learning OpenStack Cloud Platform

How To Setup Chef Infra Server on CentOS 8 / RHEL 8

How To Export and Import Docker Images / Containers