Install, configure Ansible Automation Plaform and launch a migration
Prerequisites
Skip this step if you run the ansible-playbooks deployment method. |
In the bastion:
cat << EOF | oc apply -f -
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: nfs
provisioner: kubernetes.io/no-provisioner
reclaimPolicy: Delete
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: nfs-pv1
spec:
accessModes:
- ReadWriteOnce
- ReadWriteMany
capacity:
storage: 10Gi
nfs:
path: /nfs/aap
server: 172.18.0.13
persistentVolumeReclaimPolicy: Delete
storageClassName: nfs
volumeMode: Filesystem
EOF
Install Ansible Execution Platform
In the bastion:
Create the ansible-automation-platform namespace:
oc new-project ansible-automation-platform
Create the OperatorGroup:
cat << EOF | oc apply -f -
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
name: ansible-automation-platform-operator
namespace: ansible-automation-platform
spec:
targetNamespaces:
- ansible-automation-platform
EOF
Confirm the OperatorGroup is installed in the namespace:
oc get operatorgroup -n ansible-automation-platform
Subscribe to the ansible-automation-platform-operator Operator:
cat << EOF| oc apply -f -
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: ansible-automation-platform
namespace: ansible-automation-platform
spec:
channel: 'stable-2.5'
installPlanApproval: Automatic
name: ansible-automation-platform-operator
source: redhat-operators
sourceNamespace: openshift-marketplace
EOF
Confirm that the ansible-automation-platform-operator Operator is running. Repeat this command until you see the desired output:
oc get clusterserviceversion -n ansible-automation-platform -o custom-columns=Name:.metadata.name,Phase:.status.phase
Name Phase aap-operator.v2.5.0-0.1739248042 Succeeded
Create a CR of the Ansible Automation Platform:
cat << EOF | oc apply -f -
apiVersion: aap.ansible.com/v1alpha1
kind: AnsibleAutomationPlatform
metadata:
name: aap-for-rhoso-migrations
namespace: ansible-automation-platform
spec:
# Platform
image_pull_policy: IfNotPresent
# Components
controller:
disabled: false
eda:
disabled: false
hub:
disabled: false
## Modify to contain your RWM storage class name
storage_type: file
file_storage_storage_class: nfs
file_storage_size: 10Gi
## uncomment if using S3 storage for Content pod
# storage_type: S3
# object_storage_s3_secret: example-galaxy-object-storage
## uncomment if using Azure storage for Content pod
# storage_type: azure
# object_storage_azure_secret: azure-secret-name
lightspeed:
disabled: true
EOF
Confirm that the Ansible Automation Platform pods are running. This could take around 10 min:
oc get pods -n ansible-automation-platform
NAME READY STATUS RESTARTS AGE aap-for-rhoso-migrations-controller-migration-4.6.8-kls8d 0/1 Completed 0 8m23s aap-for-rhoso-migrations-controller-task-78d76d4596-mn8vc 4/4 Running 0 9m7s aap-for-rhoso-migrations-controller-web-86f9d988-cvc8h 3/3 Running 0 9m9s aap-for-rhoso-migrations-eda-activation-worker-59fd79b5c9-d6vcb 1/1 Running 0 9m32s aap-for-rhoso-migrations-eda-activation-worker-59fd79b5c9-hdg92 1/1 Running 0 9m32s aap-for-rhoso-migrations-eda-api-864755bcc8-sk87f 3/3 Running 0 9m34s aap-for-rhoso-migrations-eda-default-worker-7d54fdb44c-9ngrc 1/1 Running 0 9m33s aap-for-rhoso-migrations-eda-default-worker-7d54fdb44c-dn8xm 1/1 Running 0 9m33s aap-for-rhoso-migrations-eda-event-stream-674db468c7-c9xxd 2/2 Running 0 9m29s aap-for-rhoso-migrations-eda-scheduler-99dccf864-n7nzc 1/1 Running 0 9m31s aap-for-rhoso-migrations-eda-scheduler-99dccf864-skzdj 1/1 Running 0 9m31s aap-for-rhoso-migrations-gateway-d9894b76f-dcfn4 2/2 Running 0 11m aap-for-rhoso-migrations-hub-api-668b966979-vb8lq 1/1 Running 0 9m1s aap-for-rhoso-migrations-hub-content-745c569598-47vs9 1/1 Running 0 9m16s aap-for-rhoso-migrations-hub-content-745c569598-cdnc4 1/1 Running 0 9m16s aap-for-rhoso-migrations-hub-redis-655c475d7c-p5ftl 1/1 Running 0 9m25s aap-for-rhoso-migrations-hub-web-57d489786-d5wbt 1/1 Running 0 9m30s aap-for-rhoso-migrations-hub-worker-878857467-g687h 1/1 Running 0 9m11s aap-for-rhoso-migrations-postgres-15-0 1/1 Running 0 12m aap-for-rhoso-migrations-redis-0 1/1 Running 0 12m aap-gateway-operator-controller-manager-55fd699d8b-ddz9z 2/2 Running 0 66m ansible-lightspeed-operator-controller-manager-7cdf859495-hlnct 2/2 Running 0 66m automation-controller-operator-controller-manager-6c5989994dg8m 2/2 Running 0 66m automation-hub-operator-controller-manager-85dfcfdfb9-c8fjw 2/2 Running 0 66m eda-server-operator-controller-manager-d489994c8-x8f4m 2/2 Running 0 66m resource-operator-controller-manager-58d495d4b5-ck42z 2/2 Running 0 66m
Get the secret to access AAP dashboard:
oc get secret/aap-for-rhoso-migrations-admin-password -o jsonpath={.data.password} -n ansible-automation-platform | base64 --decode ; echo
Get the route to access AAP dashboard:
oc get routes -n ansible-automation-platform
The URL of your AAP dashboard is:
aap-for-rhoso-migrations-ansible-automation-platform.apps.cluster-my-guid.dynamic.redhatworkshops.io
Navigate that URL with your browser and finish the Ansible Automation Platform by subscribing the AAP.