Overview

Deploying Red Hat CloudForms on OpenShift Container Platform is a Technology Preview feature
only.
Technology Preview features are not
supported with Red Hat production service level agreements (SLAs), might not be
functionally complete, and Red Hat does not recommend to use them for
production. These features provide early access to upcoming product features,
enabling customers to test functionality and provide feedback during the
development process.

The OpenShift Container Platform installer includes an Ansible role and playbook for
deploying Red Hat CloudForms 4.5 (CloudForms Management Engine 5.8, or CFME) on
OpenShift Container Platform. This deployment must be run on a dedicated OpenShift Container Platform
cluster, meaning that no applications or infrastructure other than those
required for the CFME deployment should be running on it.

This role is based on the work in the upstream
manageiq/manageiq-pods
project. For additional details on configurations specific to ManageIQ (MIQ),
such as optional post-installation tasks, see the project’s
upstream documentation.

The terms CFME and MIQ are interchangeable in this deployment.

Requirements

Prerequisites

A running OpenShift Container Platform 3.6 cluster

NFS or other compatible persistent volume storage provider

A cluster-admin user (created by this role, if required)

Cluster Sizing

In order to avoid random deployment failures due to insufficient resources, the
following minimum cluster size is recommended:

Type

Size

CPUs

Memory

Masters

1+

8

12 GB

Nodes

2+

4

8 GB

Persistent Volume (PV) Storage

25 GB

N/A

N/A

CFME has hard requirements for memory. CFME will not install if your
infrastructure does not meet or exceed the requirements given above.

Other Sizing Considerations

Recommendations assume CFME will be the only application running on this OpenShift Container Platform cluster.

Alternatively, you can provision an infrastructure node to run registry, router, metrics, and/or logging pods.

Each CFME application pod will consume at least 3 GB of RAM on initial deployment (a blank deployment without providers).

Running the Playbook

Do not re-run the entrypoint playbook multiple times in a row without cleaning
up after previous runs if some of the CFME steps have ran. This is a known
issue. Further instructions are provided in
Manual Clean-up.

To run the playbook to deploy CFME:

In your existing inventory file, set the openshift_cfme_install_app parameter
to True under the [OSEv3:vars] section:

[OSEv3:vars]
openshift_cfme_install_app=True

Run the following entrypoint playbook to install CFME using your existing
inventory file:

Verifying the Deployment

After the installation completes, the playbook shows the following information:

TASK [openshift_cfme : Status update] *********************************************************
ok: [cfme-node.example.com] => {
"msg": "CFME has been deployed. Note that there will be a delay before it is fully initialized.\n"
}

This will take several minutes (possibly 10 or more), depending on your network
connection.

Describing the CFME Pod

To gain further insight into the deployment process during initialization, use
the oc describe command to view details about the CFME pod:

$ oc describe pod manageiq-0

Readiness probes will take a while to become Healthy in this output. The
initial health probes will not happen for at least eight minutes depending on
how long it takes you to pull down the large images. CFME is a large application
so it may take a considerable amount of time for it to deploy and be marked as
Healthy.

You can find which node the application is running on by checking the oc
describe output, as well:

Successfully assigned manageiq-0 to <host|ip>

You can run a docker pull command on the node to monitor the progress of the
image pull:

The output above demonstrates the case where the image has been successfully
pulled already. If the image is not completely pulled already, then you will see
multiple progress bars detailing each image layer download status.

Opening a Remote Shell to the CFME Pod

You can use the oc rsh command to open a remote shell session to the CFME pod,
allowing for additional inspection and progress monitoring techniques.

On your master node, switch to the cfme project (or whatever you named it if
you overrode the openshift_cfme_project variable), and check on the pod
states:

Note how the manageiq-0 pod says 0/1 under the READY column. After some
time (depending on your network connection), you will be able to oc rsh into
the pod to find out more of what is happening in real time:

Verify that the CFME pod has completed deploying and initializing. You can do
this one of two ways:

For a simple verification, run the following command after the pod has entered a
ready state:

$ oc rsh manageiq-0 journalctl -f -u appliance-initialize.service

Watch until the output says:

Started Initialize Appliance Database

At this point, you have verified that the CFME pod has completed deploying and
initializing successfully.

For a more detailed verification, including a fuller explanation on the initialization process and more interactive inspection techniques:

Open a remote shell session to the manageiq pod:

$ oc rsh manageiq-0 bash -l

The oc rsh command opens a shell in your pod. In this case, it is the pod
called manageiq-0. Systemd is managing the services in this pod, so you can
use the list-units command to see what is running currently:

# systemctl list-units | grep appliance

If you see the appliance-initialize service running, this indicates that the
basic setup is still in progress.

You can monitor the appliance-initialize process with the journalctl
command:

The oc delete project cfme command will return quickly, however it will
continue to operate in the background. Continue running oc get project after
you have completed the other steps to monitor the pods and final project
termination progress.