Questo contenuto non è disponibile nella lingua selezionata.
Chapter 4. Installing and configuring automation hub on Red Hat OpenShift Container Platform web console
You can use these instructions to install the automation hub operator on Red Hat OpenShift Container Platform, specify custom resources, and deploy Ansible Automation Platform with an external database.
When an instance of automation hub is removed, the PVCs are not automatically deleted. This can cause issues during migration if the new deployment has the same name as the previous one. Therefore, it is recommended that you manually remove old PVCs before deploying a new automation hub instance in the same namespace. See Finding and deleting PVCs for more information.
4.1. Prerequisites Copia collegamentoCollegamento copiato negli appunti!
- You have installed the Red Hat Ansible Automation Platform operator in Operator Hub.
4.2. Installing the automation hub operator Copia collegamentoCollegamento copiato negli appunti!
-
Navigate to
. - Locate the Automation hub entry, then click .
4.2.1. Storage options for Ansible Automation Platform Operator installation on Red Hat OpenShift Container Platform Copia collegamentoCollegamento copiato negli appunti!
If you are using file-based storage and your installation scenario includes automation hub, ensure that you change the ReadWriteOnce default storage option for Ansible Automation Platform Operator to ReadWriteMany.
Automation hub requires ReadWriteMany file-based storage, Azure Blob storage, or Amazon S3-compliant storage for operation so that multiple pods can access shared content, such as collections.
In addition, OpenShift Data Foundation provides a ReadWriteMany or S3-compliant implementation. Also, you can set up NFS storage configuration to support ReadWriteMany. This, however, introduces the NFS server as a potential, single point of failure.
4.2.1.1. Provisioning OCP storage with ReadWriteMany access mode Copia collegamentoCollegamento copiato negli appunti!
To ensure successful installation of Ansible Automation Platform Operator, you must provision your storage type for automation hub initially to ReadWriteMany access mode.
Procedure
- Click Provisioning to update the access mode.
-
In the first step, update the
accessModesfrom the defaultReadWriteOncetoReadWriteMany. - Complete the additional steps in this section to create the persistent volume claim (PVC).
4.2.2. Configure your automation hub operator route options Copia collegamentoCollegamento copiato negli appunti!
The Red Hat Ansible Automation Platform operator installation form allows you to further configure your automation hub operator route options under Advanced configuration.
- Click .
- Under Ingress type, click the drop-down menu and select Route.
- Under Route DNS host, enter a common host name that the route answers to.
- Under Route TLS termination mechanism, click the drop-down menu and select Edge or Passthrough.
- Under Route TLS credential secret, click the drop-down menu and select a secret from the list.
4.2.3. Configure the Ingress type for your automation hub operator Copia collegamentoCollegamento copiato negli appunti!
The Red Hat Ansible Automation Platform operator installation form allows you to further configure your automation hub operator Ingress under Advanced configuration.
Procedure
- Click .
- Under Ingress type, click the drop-down menu and select Ingress.
- Under Ingress annotations, enter any annotations to add to the ingress.
- Under Ingress TLS secret, click the drop-down menu and select a secret from the list.
After you have configured your automation hub operator, click at the bottom of the form view. Red Hat OpenShift Container Platform will now create the pods. This may take a few minutes.
You can view the progress by navigating to
Verification
Verify that the following operator pods provided by the Ansible Automation Platform Operator installation from automation hub are running:
| Operator manager controllers | automation controller | automation hub |
|---|---|---|
| The operator manager controllers for each of the 3 operators, include the following:
| After deploying automation controller, you will see the addition of these pods:
| After deploying automation hub, you will see the addition of these pods:
|
A missing pod can indicate the need for a pull secret. Pull secrets are required for protected or private image registries. See Using image pull secrets for more information. You can diagnose this issue further by running oc describe pod <pod-name> to see if there is an ImagePullBackOff error on that pod.
Once you have configured your automation hub operator, click at the bottom of the form view. Red Hat OpenShift Container Platform will now create the pods. This may take a few minutes.
-
View progress by navigating to
and locating the newly created instance.
4.3. Accessing the automation hub user interface Copia collegamentoCollegamento copiato negli appunti!
You can access the automation hub interface once all pods have successfully launched.
-
Navigate to
. - Under Location, click on the URL for your automation hub instance.
The automation hub user interface launches where you can sign in with the administrator credentials specified during the operator configuration process.
If you did not specify an administrator password during configuration, one was automatically created for you. To locate this password, go to your project, select
4.4. Configuring an external database for automation hub on Red Hat Ansible Automation Platform operator Copia collegamentoCollegamento copiato negli appunti!
For users who prefer to deploy Ansible Automation Platform with an external database, they can do so by configuring a secret with instance credentials and connection information, then applying it to their cluster using the oc create command.
By default, the Red Hat Ansible Automation Platform operator automatically creates and configures a managed PostgreSQL pod in the same namespace as your Ansible Automation Platform deployment.
You can choose to use an external database instead if you prefer to use a dedicated node to ensure dedicated resources or to manually manage backups, upgrades, or performance tweaks.
The same external database (PostgreSQL instance) can be used for both automation hub and automation controller as long as the database names are different. In other words, you can have multiple databases with different names inside a single PostgreSQL instance.
The following section outlines the steps to configure an external database for your automation hub on a Ansible Automation Platform operator.
Prerequisite
The external database must be a PostgreSQL database that is the version supported by the current release of Ansible Automation Platform.
Ansible Automation Platform 2.0 and 2.1 supports PostgreSQL 12.
Procedure
The external postgres instance credentials and connection information will need to be stored in a secret, which will then be set on the automation hub spec.
Create a
postgres_configuration_secret.yaml file, following the template below:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 1
- Namespace to create the secret in. This should be the same namespace you wish to deploy to.
- 2
- The resolvable hostname for your database node.
- 3
- External port defaults to
5432. - 4
- Value for variable
passwordshould not contain single or double quotes (', ") or backslashes (\) to avoid any issues during deployment, backup or restoration. - 5
- The variable
sslmodeis valid forexternaldatabases only. The allowed values are:prefer,disable,allow,require,verify-ca, andverify-full.
Apply
external-postgres-configuration-secret.ymlto your cluster using theoc createcommand.oc create -f external-postgres-configuration-secret.yml
$ oc create -f external-postgres-configuration-secret.ymlCopy to Clipboard Copied! Toggle word wrap Toggle overflow When creating your
AutomationHubcustom resource object, specify the secret on your spec, following the example below:Copy to Clipboard Copied! Toggle word wrap Toggle overflow
4.5. Finding and deleting PVCs Copia collegamentoCollegamento copiato negli appunti!
A persistent volume claim (PVC) is a storage volume used to store data that automation hub and automation controller applications use. These PVCs are independent from the applications and remain even when the application is deleted. If you are confident that you no longer need a PVC, or have backed it up elsewhere, you can manually delete them.
Procedure
List the existing PVCs in your deployment namespace:
oc get pvc -n <namespace>
oc get pvc -n <namespace>Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Identify the PVC associated with your previous deployment by comparing the old deployment name and the PVC name.
Delete the old PVC:
oc delete pvc -n <namespace> <pvc-name>
oc delete pvc -n <namespace> <pvc-name>Copy to Clipboard Copied! Toggle word wrap Toggle overflow - For more information on running operators on OpenShift Container Platform, navigate to the OpenShift Container Platform product documentation and click the Operators - Working with Operators in OpenShift Container Platform guide.