Skip to content

Instantly share code, notes, and snippets.

@tsisodia10
Created September 22, 2023 19:15
Show Gist options
  • Save tsisodia10/b536eb1f374231bc83ecdcb617413f6a to your computer and use it in GitHub Desktop.
Save tsisodia10/b536eb1f374231bc83ecdcb617413f6a to your computer and use it in GitHub Desktop.

Ansible Platform Operator Installation

  • To run Red Hat OpenShift Container Platform clusters on Amazon Web Services with ReadWriteMany access mode, you must add NFS or other storage.

Steps -

  1. Create PV (to install ansible operator these are the pre-reqs)
apiVersion: v1
kind: PersistentVolume
metadata:
  name: ansible-pv 
spec:
  capacity:
    storage: 10Gi 
  accessModes:
  - ReadWriteMany 
  nfs: 
    path: /tmp 
    server: 172.17.0.2 
  persistentVolumeReclaimPolicy: Retain 
  1. Create PVC
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: ansible-pvc
spec:
  accessModes:
    - ReadWriteMany 
  resources:
    requests:
      storage: 10Gi 
  volumeName: ansible-pv
  storageClassName: ""

Reference link to add Persistent Volume and Persistent Volume Claim - https://docs.openshift.com/container-platform/4.9/storage/persistent_storage/persistent-storage-nfs.html

  1. Navigate to OperatorHub and Install Ansible PLatform Operator

Screenshot 2023-09-22 at 3 12 40 PM

  1. Create an Automation Controller CR
apiVersion: automationcontroller.ansible.com/v1beta1
kind: AutomationController
metadata:
  name: ansible-controller
  namespace: ansible
spec:
  postgres_keepalives_count: 5
  postgres_keepalives_idle: 5
  create_preload_data: true
  route_tls_termination_mechanism: Edge
  garbage_collect_secrets: false
  ingress_type: Route
  loadbalancer_port: 80
  no_log: true
  image_pull_policy: IfNotPresent
  projects_storage_size: 8Gi
  auto_upgrade: true
  task_privileged: false
  postgres_keepalives: true
  postgres_keepalives_interval: 5
  ipv6_disabled: false
  projects_storage_access_mode: ReadWriteMany
  set_self_labels: true
  projects_persistence: false
  replicas: 1
  admin_user: admin
  loadbalancer_protocol: http

This will create postgres, controller-task and controller-web instances and you can route to Ansible Platform.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment