Skip to content

Latest commit

 

History

History
 
 

ocp4_workload_pipelines

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

ocp4_workload_pipelines - Deploy OpenShift Pipelines to an OpenShift Cluster

Role overview

  • This role installs OpenShift Pipelines (backed by Tekton) into an OpenShift Cluster. It consists of the following tasks files:

    • Tasks: pre_workload.yml - Sets up an environment for the workload deployment.

      • Debug task will print out: pre_workload Tasks completed successfully.

    • Tasks: workload.yml - Used to deploy OpenShift Pipelines

      • This role creates a namespace (project) and deploys the operator. It will then create the Pipelines Install object that deploys the controllers etc.

      • Debug task will print out: workload Tasks completed successfully.

    • Tasks: post_workload.yml - Used to configure the workload after deployment

      • This role doesn’t do anything here

      • Debug task will print out: post_workload Tasks completed successfully.

    • Tasks: remove_workload.yml - Used to delete the workload

      • This role removes OpenShift Pipelines

      • Debug task will print out: remove_workload Tasks completed successfully.

Review the defaults variable file

  • This file ./defaults/main.yml contains all the variables you need to define to control the deployment of your workload.

  • The variable ocp_username is mandatory to assign the workload to the correct OpenShift user.

  • A variable silent=True can be passed to suppress debug messages.

Deploy a Workload with the ocp-workload config [Mostly for testing]

Create a file workload_vars.yaml with your variables:

cloud_provider: none
env_type: ocp-workloads
target_host: bastion.dev4.openshift.opentlc.com

ocp_workloads:
- ocp4_workload_pipelines

#become_override: false

# If the ocp-workload supports it, you should specify the OCP user:
ocp_username: system:admin

# Usually the ocp-workloads want a GUID also:
guid: changeme

From the Agnosticd/ansible directory run the playbook:

ansible-playbook main.yml -e @workload_vars.yml -e ACTION="create"

To Delete an environment

From the Agnosticd/ansible directory run the playbook:

ansible-playbook main.yml -e @workload_vars.yml -e ACTION="remove"