Skip to content

Latest commit

 

History

History
39 lines (25 loc) · 1.97 KB

README.adoc

File metadata and controls

39 lines (25 loc) · 1.97 KB
badge
badge

Purpose

To provide reusable automation to run ansible plays and roles against OpenShift 4 clusters

Note
This will always pull the latest stable OpenShift 4 CLI tools

Requirements

You will need an OpenShift 4 cluster deployed with access to the kubeconfig

Roles

  • Add any addition modules to requirements.txt with openshift listed

Deploy-Operator

  1. Create repository secret in GitHub Settings > Secrets called KUBECONFIG that contains kubeconfig details

  2. Update ansible playbook called main.yaml to ensure vars are set

    1. ansible_python_interpreter: /usr/bin/python3

    2. OPERATOR-NAME: web-terminal put operator to install here

    3. NAMESPACE: openshift-operators put namespace to install operator at here

install_operator

  1. Create repository secret in GitHub Settings > Secrets called KUBECONFIG that contains kubeconfig details for the OCP4 cluster.

  2. Update ansible playbook called main.yaml to ensure the operators that you wanted installed are in the `role, formated as: `

    • {name: OPERATOR_NAME, namespace: OPERATOR_NAMESPACE}

    • {name: openshift-gitops-operator, namespace: openshift-operators} `

Workflow

Once the main branch is pushed with updates to main.yaml the workflow will trigger the actions that will run ansible-playbook.

This is intended to simulate running Ansible playbooks to engineer, operate, or manage OpenShift 4 clusters on a bastion host. The playbook is intended to run locally on runner and use either oc, kubectl, or other modules that interact with OpenShift APIs or any APIs.