An OpenShift Workload is simply a workload that is applied to an existing, running, OpenShift cluster. For example if you wish to deploy 3Scale, Prometheus, or a MicroService application you can define it as a Workload then simply and consistently deploy it with a single command to your OpenShift cluster.
This document assumes more than a passing familiarity with OpenShift but if you just want to "copy and hack" an existing Workload take a look at the OpenShift 3Scale workload.
Other OpenShift Workloads here. OpenShift Workloads all begin
ocp-workload-
and follow the traditional structure of an Ansible Role.
When creating a workload that installs an operator into a cluster you need to be aware of the fact that operators change quite frequently. To prevent your workload from breaking when a new release of the operator is released into the online catalog it is highly recommended to create an operator catalog snapshot.
OpenShift Workloads are deployed by applying an Ansible role to an existing, running, cluster.
New and existing workloads can be deployed, and developed, on any OpenShift
cluster including locally on your laptop (oc cluster
and Minishift
).
Each Workload Role includes a detailed README.adoc
and they are applied by
invoking the ocp-workload
config.which is actually a Playbook and will apply
the workload in the value ocp_workload
. For example:
ansible-playbook -i localhost, -c local ./configs/ocp-workloads/ocp-workload.yml \
-e ocp_workload=ocp-workload-3scale-multitenant \
-e ACTION=create \
-e subdomain_base=$SUBDOMAIN_BASE \
-e admin_username=$ADM_USERNAME