Chapter 3. Managing Red Hat CloudForms with OpenShift
This section includes common tasks to manage your Red Hat CloudForms deployment from OpenShift.
3.1. Configuring Custom SSL Certificates for CloudForms
By default, the route that is deployed as part of the template uses edge termination and the certificates that OpenShift is installed with. It is possible to change this in the OpenShift UI with the following steps:
- Navigate to → .
- Click on the route named httpd, then select → .
- Scroll down to the Certificates section. Here you can upload or paste the required certificate files.
- Click Save.
3.2. Scaling CloudForms Appliances
StatefulSets in OpenShift manage the deployment and scaling of a set of pods (in this case, CloudForms appliances). StatefulSets ensure ordering that applications will come up by providing unique identities for pods.
Each new replica (server) consumes a physical volume. Before scaling, ensure you have enough physical volumes available to scale.
The following example shows scaling using StatefulSets:
Example: Scaling to two replicas
$ oc scale statefulset cloudforms --replicas=2 statefulset "cloudforms" scaled $ oc get pods NAME READY STATUS RESTARTS AGE cloudforms-0 1/1 Running 0 34m cloudforms-1 1/1 Running 0 5m memcached-1-mzeer 1/1 Running 0 1h postgresql-1-dufgp 1/1 Running 0 1h
The newly created replicas will join the existing CloudForms region. Each new pod is numbered in the order it is deployed, starting with 0 and increasing sequentially. For example, replicas in a StatefulSet will be numbered cloudforms-0 cloudforms-1, and so on.
3.3. Creating a Backup
Create a persistent volume for backups using the PV backup template (cfme-pv-backup-example.yaml) in case you need to restore to a previous version.
Create the persistent volume for the backup:
$ oc create -f cfme-pv-backup-example.yaml
Create the backup persistent volume claim (PVC):
$ oc create -f cfme-backup-pvc.yaml
Verify the persistent volume claim was created:
$ oc get pvc
Back up secrets, such as database encryption keys and credentials.
ImportantBe careful to back up secrets in a secure location.
$ oc get secret -o yaml --export=true > secrets.yaml $ oc get pvc -o yaml --export=true > pvc.yaml
Initiate the database backup:
$ oc create -f cfme-backup-job.yaml
This step creates a container, and connects to the database pod, pg_basebackup.
3.4. Restoring to a Backup
You can restore to a database backup created in Section 3.3, “Creating a Backup” using the restore template, cfme-restore-job.yaml.
The restore job will look for cfme-backup and cfme-postgresql PVs by default, and the latest successful backup will be restored by default. If existing data is found on the cfme-postgresql volume, it will be renamed and left on the volume.
You must perform a database restore on an offline environment. All pods must be scaled down to 0, and not running.
Shut down all pods:
$ oc stop all pods
To initiate the database restore, create the restore template:
$ oc create -f cfme-restore-job.yaml
After the restore job is complete, you can scale the pods back up.
3.5. Uninstalling Red Hat CloudForms from a Project
If no longer needed, you can uninstall the Red Hat CloudForms pod from your project. Note the following commands do not remove SCC permissions, or the project itself.
Use this procedure if only Red Hat CloudForms exists in the project.
Inside the project, run the following as a regular user:
$ oc delete all --all
Wait approximately 30 seconds for the command to process, then run:
$ oc delete pvc --all

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.