This is an Kubernetes Operator to install the infrastructure for running OpenShift Workshops.
Important
|
This operator has been tested on OpenShift Container Platform 4.2 with N preconfigured users (user1, user2, …, userN). |
Important
|
Please use an OpenShift user with cluster-admin privileges |
Perform the following tasks:
cd openshift-workshop-operator
export OPERATOR_NAME=openshift-workshop-operator
oc create -f deploy/crds/openshift_v1alpha1_workshop_crd.yaml
oc new-project workshop-infra
operator-sdk up local --namespace=workshop-infra
Perform the following tasks:
cd openshift-workshop-operator
oc login
oc new-project workshop-infra #(1)
oc apply -n workshop-infra -f deploy/service_account.yaml #(2)
oc apply -n workshop-infra -f deploy/cluster_role.yaml #(3)
oc apply -n workshop-infra -f deploy/cluster_role_binding.yaml #(4)
oc apply -n workshop-infra -f deploy/crds/openshift_v1alpha1_workshop_crd.yaml #(5)
oc apply -n workshop-infra -f deploy/operator.yaml #(6)
-
creates of the project/namespace for the operator to run in and to host some components like Etherpad and Gogs
-
creates of the Service Account for the operator
-
creates of the Cluster Role for the operator
-
grants the Cluster Role to the Service Account
-
creates of the Custom Resource Definition called "Workshop"
-
deploys the operator
The Workshop Infrastructure is deployed by creating a Custom Resource based on the WorkShop Custom Resource Definition. There is examples of custom resources (CR) in crds
For instance, to deploy the Workshop Infrastruture for the Cloud-Native Workshop, please execute the following command:
oc create -n workshop-infra -f deploy/crds/cloud_native_workshop_cr.yaml