Tidy up cluster setup instructions.
This commit is contained in:
28
README.org
28
README.org
@ -29,7 +29,7 @@ To export the site to static html to serve for example via github pages, run:
|
|||||||
npm install
|
npm install
|
||||||
|
|
||||||
# Build and export the site
|
# Build and export the site
|
||||||
npm run build && npm export
|
npm run build && npm run export
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
|
||||||
@ -39,7 +39,10 @@ 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
|
||||||
|
|
||||||
#+begin_src yaml
|
Required so the Gitea helm chart will be available for all users.
|
||||||
|
|
||||||
|
#+begin_src bash
|
||||||
|
cat << EOF | oc apply --filename -
|
||||||
apiVersion: helm.openshift.io/v1beta1
|
apiVersion: helm.openshift.io/v1beta1
|
||||||
kind: HelmChartRepository
|
kind: HelmChartRepository
|
||||||
metadata:
|
metadata:
|
||||||
@ -48,12 +51,16 @@ spec:
|
|||||||
connectionConfig:
|
connectionConfig:
|
||||||
url: 'https://redhat-cop.github.io/helm-charts'
|
url: 'https://redhat-cop.github.io/helm-charts'
|
||||||
name: Red Hat Community
|
name: Red Hat Community
|
||||||
|
EOF
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
|
||||||
*** Install web terminal operator
|
*** Install web terminal operator
|
||||||
|
|
||||||
#+begin_src yaml
|
So our workshop participants don't need to install ~oc~ locally.
|
||||||
|
|
||||||
|
#+begin_src bash
|
||||||
|
cat << EOF | oc apply --filename -
|
||||||
apiVersion: operators.coreos.com/v1alpha1
|
apiVersion: operators.coreos.com/v1alpha1
|
||||||
kind: Subscription
|
kind: Subscription
|
||||||
metadata:
|
metadata:
|
||||||
@ -65,23 +72,30 @@ spec:
|
|||||||
name: web-terminal
|
name: web-terminal
|
||||||
source: redhat-operators
|
source: redhat-operators
|
||||||
sourceNamespace: openshift-marketplace
|
sourceNamespace: openshift-marketplace
|
||||||
#startingCSV: web-terminal.v1.8.0-0.1692219820.p
|
EOF
|
||||||
#+end_src
|
#+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.
|
||||||
|
|
||||||
#+begin_src bash
|
#+begin_src bash
|
||||||
cat << EOF > operatorgroup.yaml
|
cat << EOF > operatorgroup.yaml
|
||||||
apiVersion: operators.coreos.com/v1
|
apiVersion: operators.coreos.com/v1
|
||||||
kind: OperatorGroup
|
kind: OperatorGroup
|
||||||
metadata:
|
metadata:
|
||||||
name: grafana-og
|
name: grafana-og
|
||||||
namespace: userX
|
|
||||||
spec:
|
spec:
|
||||||
targetNamespaces:
|
targetNamespaces:
|
||||||
- userX
|
- user$user
|
||||||
upgradeStrategy: Default
|
upgradeStrategy: Default
|
||||||
EOF
|
EOF
|
||||||
for user in $(seq 1 30); do oc apply ...; done
|
|
||||||
|
for user in $(seq 1 30); do
|
||||||
|
export user=${user}
|
||||||
|
oc new-project user"${user}"
|
||||||
|
envsubst < operatorgroup.yaml | oc create --filename - --namespace user"${user}"
|
||||||
|
oc adm policy add-role-to-user --namespace user"${user}" admin user"${user}"
|
||||||
|
done
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|||||||
Reference in New Issue
Block a user