Begin working on exercise 7.

This commit is contained in:
2024-07-25 18:47:23 +12:00
parent c65aa7803a
commit ca517645fe
8 changed files with 78 additions and 8 deletions

View File

@ -7,11 +7,11 @@ This repository contains a basic [[https://nextjs.org/][nextjs]] frontend design
The frontend is used to serve workshop instructions for several workshops.
** Setting up a cluster for the workshop
* Setting up a cluster for the workshop
The workshop expects an OpenShift 4.14 cluster with a few pre-requisites.
*** Add redhat-cop helm chart repository
** Add redhat-cop helm chart repository
Required so the Gitea helm chart will be available for all users.
@ -29,7 +29,7 @@ EOF
#+end_src
*** Install web terminal operator
** Install web terminal operator
So our workshop participants don't need to install ~oc~ locally.
@ -50,7 +50,7 @@ EOF
#+end_src
*** Create an operatorgroup for each user
** Create an operatorgroup for each user
We want each user to be able to install the same operator so we can pre-create namespaces and seed them with OperatorGroups to reduce complexity.
@ -73,3 +73,34 @@ for user in $(seq 1 30); do
oc adm policy add-role-to-user --namespace user"${user}" admin user"${user}"
done
#+end_src
** Install openshift gitops operator
Each user will deploy their own argocd instance so we need to install the openshift gitops operator for all namespaces.
#+begin_src bash
cat << EOF | oc apply --filename -
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: openshift-gitops-operator
namespace: openshift-gitops-operator
spec:
channel: latest
installPlanApproval: Automatic
name: openshift-gitops-operator
source: redhat-operators
sourceNamespace: openshift-marketplace
startingCSV: openshift-gitops-operator.v1.13.0
EOF
#+end_src
** Scale cluster worker nodes
We are going to have ~25 workshop attendees all deploying applications, let's ensure the cluster has enough capacity to handle it!
#+begin_src bash
oc scale machineset cluster-xxz98-mk8x7-worker-ap-southeast-1b -n openshift-machine-api --replicas 10
#+end_src