How to install ManageIQ / CloudForms on OpenStack and KVM

Today’s guide will focus on how to install ManageIQ / CloudForms on OpenStack and KVM virtualized environments. ManageIQ is an upstream project of Red Hat CloudForms-an infrastructure management platform designed to allow IT departments to control users’ self-service capabilities to provide, manage and ensure compliance across virtualized and private cloud environments.

This guide is for simple setup of a small virtualization infrastructure. You may want to consult the official documentation for HA setup, which can be expanded as your infrastructure grows. In my setup, I will install a master database virtual management (VMDB) instance that can also be used as a CloudForms Appliance.

ManageIQ / CloudForms appliances are virtual machine images running on Red Hat Enterprise Linux-based operating systems. Here are the setup steps.

Step 1: Download CloudForms / ManageIQ Appliance

You first need to download the CloudForms / ManageIQ appliance for your environment as a virtual machine image template.

Red Hat CloudForms

If you want to use the Red Hat CloudForms Management Engine device, obtain the device by:

  1. Go to access.redhat.com and log in to the Red Hat Customer Portal using your customer account details.
  2. Please click Download In the menu bar.
  3. Please click A-Z Sort product downloads alphabetically.
  4. Please click Red Hat CloudForms Go to the product download page.
  5. In the list of installers and images, click Download now Link CFME OpenStack Virtual Appliance.

See the screenshot below.

How to install ManageIQ / CloudForms on OpenStack and KVM

ManageIQ

Visit the ManageIQ download page and extract the latest image templates for the OpenStack / KVM environment.

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

Confirm the 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 in OpenStack

Upload the 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 an 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 a database instance, a secondary raw disk is required to store the database data. Use the following table as a guideline to calculate the minimum requirements for your database:

How to install ManageIQ / CloudForms on OpenStack and KVM

I will add a 10GB secondary disk for the database device.

$ 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 secondary VM

Create a VM from a downloaded OpenStack or KVM template. The creation of my VM was done in an OpenStack environment using the openstack command management tool.

We will first create a flavor that works with CloudForms – 8GB RAM 4vcps with 80GB disk space. Taste 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 a template and add flavor.

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 the OpenStack Horizon dashboard.

Project> Calculation> Instance> Launch Instance

How to install ManageIQ / CloudForms on OpenStack and KVM

Verify VM creation by running:

$ 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 instances created via ssh. If you don’t use SSH keys, the default login is 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 the original 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 device

Run the Appliance_console command to configure CloudForms / ManageIQ.

# appliance_console

1-Set the host name

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 the local database

Move Configuration database > Create internal database > Select database disk

Choose ñ Run worker and database on the same node at the same time.

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 area 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 the CloudForms server process

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 the following.

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: Visit the CloudForms / ManageIQ dashboard

You may need a floating IP address from a public network to access the ManageIQ dashboard. For instructions, see the following guide.

How to assign a floating IP address to an instance in OpenStack

Use the IP or hostname to browse to the CloudForms device https.

How to install ManageIQ / CloudForms on OpenStack and KVM

use”administrator/smartvm“.

How to install ManageIQ / CloudForms on OpenStack and KVM

Change administrator user password below Admin> Configure

How to install ManageIQ / CloudForms on OpenStack and KVM

Access Control> User> Administrator> Configuration> Edit User Change stored password

How to install ManageIQ / CloudForms on OpenStack and KVM

Set a new password.

How to install ManageIQ / CloudForms on OpenStack and KVM

Step 7: Add users and providers

Add users to CloudForms and configure access control for your team. When you’re done, review the guide on adding other providers.

More about automation:

Best books to learn Docker and Ansible automation

Best books to learn about OpenStack Cloud Platform

How to set up a Chef Infra server on CentOS 8 / RHEL 8

How to export and import Docker images / containers

Sidebar