-
This role installs OpenShift Serverless (backed by KNative) 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 Serverless
-
This role creates a namespace (project) and deploys the operator. It will then create the KNativeServing 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 Serverless
-
Debug task will print out:
remove_workload Tasks completed successfully.
-
-
-
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.
TARGET_HOST="bastion.ocp43.openshift.opentlc.com"
OCP_USERNAME="wkulhane-redhat.com"
WORKLOAD="ocp4_workload_serverless"
GUID=1001
# a TARGET_HOST is specified in the command line, without using an inventory file
ansible-playbook -i ${TARGET_HOST}, ./configs/ocp-workloads/ocp-workload.yml \
-e"ansible_ssh_private_key_file=~/.ssh/keytoyourhost.pem" \
-e"ansible_user=ec2-user" \
-e"ocp_username=${OCP_USERNAME}" \
-e"ocp_workload=${WORKLOAD}" \
-e"silent=False" \
-e"guid=${GUID}" \
-e"ACTION=create"
TARGET_HOST="bastion.ocp43.openshift.opentlc.com"
OCP_USERNAME="wulhane-redhat.com"
WORKLOAD="ocp4_workload_serverless"
GUID=1002
# a TARGET_HOST is specified in the command line, without using an inventory file
ansible-playbook -i ${TARGET_HOST}, ./configs/ocp-workloads/ocp-workload.yml \
-e"ansible_ssh_private_key_file=~/.ssh/keytoyourhost.pem" \
-e"ansible_user=ec2-user" \
-e"ocp_username=${OCP_USERNAME}" \
-e"ocp_workload=${WORKLOAD}" \
-e"guid=${GUID}" \
-e"ACTION=remove"