This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.Este contenido no está disponible en el idioma seleccionado.
Chapter 35. Deploying Red Hat CloudForms on OpenShift Container Platform
35.1. Overview Copiar enlaceEnlace copiado en el portapapeles!
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.
For more information on Red Hat Technology Preview features support scope, see https://access.redhat.com/support/offerings/techpreview/.
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.
35.2. Requirements Copiar enlaceEnlace copiado en el portapapeles!
35.2.1. Prerequisites Copiar enlaceEnlace copiado en el portapapeles!
- 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)
35.2.2. Cluster Sizing Copiar enlaceEnlace copiado en el portapapeles!
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.
35.2.3. Other Sizing Considerations Copiar enlaceEnlace copiado en el portapapeles!
- 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).
- RAM consumption will ramp up higher depending on appliance use; after providers are added, expect higher resource consumption.
35.2.4. Assumptions Copiar enlaceEnlace copiado en el portapapeles!
- You must meet or exceed the Cluster Sizing requirements.
- Your NFS server is on your master host.
- Your PV backing the NFS storage volume is mounted on /exports/.
NFS must export the following directories to back the PVs:
- /exports/miq-pv0[123]
If the required directories are not present during installation, they will be created using the recommended permissions per the upstream documentation:
-
UID/GID:
root
/root
-
Mode:
0775
If you are using a separate volume (/dev/vdX) for NFS storage, ensure it is mounted on /exports/ before running this role.
35.3. Role Variables Copiar enlaceEnlace copiado en el portapapeles!
Core variables in this role:
Name | Default Value | Description |
---|---|---|
|
|
|
Variables that you can override have defaults defined in /usr/share/ansible/openshift-ansible/roles/openshift_Cfme/defaults/main.yml.
35.4. Pre-flight Checks Copiar enlaceEnlace copiado en el portapapeles!
As documented in Prerequisites, you must already have your OpenShift Container Platform cluster up and running.
The CFME pod is fairly large (about 1.7 GB), so to save some spin-up time post-deployment, you can optionally begin pre-pulling the following to each of your nodes now:
docker pull registry.access.redhat.com/cloudforms45/cfme-openshift-app docker pull registry.access.redhat.com/cloudforms45/cfme-openshift-postgresql docker pull registry.access.redhat.com/cloudforms45/cfme-openshift-memcached
# docker pull registry.access.redhat.com/cloudforms45/cfme-openshift-app
# docker pull registry.access.redhat.com/cloudforms45/cfme-openshift-postgresql
# docker pull registry.access.redhat.com/cloudforms45/cfme-openshift-memcached
35.5. Running the Playbook Copiar enlaceEnlace copiado en el portapapeles!
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 toTrue
under the[OSEv3:vars]
section:[OSEv3:vars] openshift_cfme_install_app=True
[OSEv3:vars] openshift_cfme_install_app=True
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Run the following entrypoint playbook to install CFME using your existing inventory file:
ansible-playbook -v [-i /path/to/file] \ /usr/share/ansible/openshift-ansible/playbooks/byo/openshift-cfme/config.yml
# ansible-playbook -v [-i /path/to/file] \ /usr/share/ansible/openshift-ansible/playbooks/byo/openshift-cfme/config.yml
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
35.6. Verifying the Deployment Copiar enlaceEnlace copiado en el portapapeles!
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" }
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.
35.6.1. Describing the CFME Pod Copiar enlaceEnlace copiado en el portapapeles!
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
$ 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>
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.
35.6.2. Opening a Remote Shell to the CFME Pod Copiar enlaceEnlace copiado en el portapapeles!
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:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Note how the manageiq-0 pod says
0/1
under theREADY
column. After some time (depending on your network connection), you will be able tooc 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
$ oc rsh manageiq-0 journalctl -f -u appliance-initialize.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Watch until the output says:
Started Initialize Appliance Database
Started Initialize Appliance Database
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 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
$ oc rsh manageiq-0 bash -l
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 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 thelist-units
command to see what is running currently:systemctl list-units | grep appliance
# systemctl list-units | grep appliance
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 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 thejournalctl
command:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Most of this output is the initial database seeding process. This process can be time consuming.
At the bottom of the log, there is a special line from the
systemctl
service:Removed symlink /etc/systemd/system/multi-user.target.wants/appliance-initialize.service
Removed symlink /etc/systemd/system/multi-user.target.wants/appliance-initialize.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The
appliance-initialize
service is no longer marked as enabled. This indicates that the base application initialization is now complete.
Open a remote shell session to the manageiq pod, if you have not already:
oc rsh manageiq-0 bash -l
$ oc rsh manageiq-0 bash -l
Copy to Clipboard Copied! Toggle word wrap Toggle overflow From the
oc rsh
session, use theps
command to monitor for thehttpd
processes starting. You will see output similar to the following when that stage has completed:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Furthermore, you can find other related processes by just looking for ones with
MIQ
in their name:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Finally, still in the
oc rsh
session, test if the application is running correctly by requesting the application homepage. If the page is available, the page title will beManageIQ: Login
:curl -s -k https://localhost | grep -A2 '<title>'
# curl -s -k https://localhost | grep -A2 '<title>' <title> ManageIQ: Login </title>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
The -s
flag makes curl
operations silent and the -k
flag to ignore errors about untrusted certificates.
35.7. Manual Cleanup Copiar enlaceEnlace copiado en el portapapeles!
At this time, uninstallation and cleanup of CFME deployments on OpenShift Container Platform is still a manual process. You must follow these steps to fully remove CFME from your cluster:
Delete the project:
oc delete project cfme
$ oc delete project cfme
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Delete the PVs:
oc delete pv miq-pv01 oc delete pv miq-pv02 oc delete pv miq-pv03
$ oc delete pv miq-pv01 $ oc delete pv miq-pv02 $ oc delete pv miq-pv03
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Clean out the old PV data:
cd /exports/ find miq* -type f -delete find miq* -type d -delete
$ cd /exports/ $ find miq* -type f -delete $ find miq* -type d -delete
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Remove the NFS exports:
rm /etc/exports.d/openshift_cfme.exports exportfs -ar
$ rm /etc/exports.d/openshift_cfme.exports $ exportfs -ar
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Delete the cfme user:
oc delete user cfme
$ oc delete user cfme
Copy to Clipboard Copied! Toggle word wrap Toggle overflow NoteThe
oc delete project cfme
command will return quickly, however it will continue to operate in the background. Continue runningoc get project
after you have completed the other steps to monitor the pods and final project termination progress.