# README
= Workshop Operator
== Overview
This is an https://coreos.com/operators/[Kubernetes Operator^] to install the infrastructure for running workshops on OpenShift.
[IMPORTANT]
This operator has been tested on OpenShift Container Platform 4.x with N preconfigured users (user1, user2, ..., userN).
== Deploy the Operator
[IMPORTANT]
Please use an OpenShift user with cluster-admin privileges
=== Run it from your local environment
Perform the following tasks:
[source,bash]
oc new-project workshop-infra make install make run ENABLE_WEBHOOKS=false
=== Deploy it on OpenShift
Perform the following tasks:
[source,bash]
To deploy:
oc new-project workshop-infra oc apply -f https://raw.githubusercontent.com/stakater/workshop-operator/main/deploy/workshop_operator.yaml
To delete:
oc delete -f https://raw.githubusercontent.com/stakater/workshop-operator/main/deploy/workshop_operator.yaml
== Install the Workshop Infrastructure
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 https://github.com/stakater/workshop-operator/tree/main/config/samples[CR]
For instance, to deploy the Workshop Infrastruture for the Cloud-Native Workshop, please execute the following command:
[source,bash]
To create:
oc apply -n workshop-infra -f config/samples/workshop_v1_cloud_native_workshop.yaml
To delete:
oc delete -n workshop-infra -f config/samples/workshop_v1_cloud_native_workshop.yaml
== Development
=== Build and Push the Operator Image