Shift low level readme content into each workshop subdir.
This commit is contained in:
68
README.org
68
README.org
@ -30,71 +30,3 @@ npm install
|
||||
# Build and export the site
|
||||
npm run build && npm run export
|
||||
#+end_src
|
||||
|
||||
|
||||
** 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
|
||||
|
||||
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
|
||||
kind: HelmChartRepository
|
||||
metadata:
|
||||
name: redhat-cop
|
||||
spec:
|
||||
connectionConfig:
|
||||
url: 'https://redhat-cop.github.io/helm-charts'
|
||||
name: Red Hat Community
|
||||
EOF
|
||||
#+end_src
|
||||
|
||||
|
||||
*** Install web terminal operator
|
||||
|
||||
So our workshop participants don't need to install ~oc~ locally.
|
||||
|
||||
#+begin_src bash
|
||||
cat << EOF | oc apply --filename -
|
||||
apiVersion: operators.coreos.com/v1alpha1
|
||||
kind: Subscription
|
||||
metadata:
|
||||
name: web-terminal
|
||||
namespace: openshift-operators
|
||||
spec:
|
||||
channel: fast
|
||||
installPlanApproval: Automatic
|
||||
name: web-terminal
|
||||
source: redhat-operators
|
||||
sourceNamespace: openshift-marketplace
|
||||
EOF
|
||||
#+end_src
|
||||
|
||||
|
||||
*** 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
|
||||
cat << EOF > operatorgroup.yaml
|
||||
apiVersion: operators.coreos.com/v1
|
||||
kind: OperatorGroup
|
||||
metadata:
|
||||
name: grafana-og
|
||||
spec:
|
||||
targetNamespaces:
|
||||
- user$user
|
||||
upgradeStrategy: Default
|
||||
EOF
|
||||
|
||||
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
|
||||
|
||||
100
data/app-delivery/README.org
Normal file
100
data/app-delivery/README.org
Normal file
@ -0,0 +1,100 @@
|
||||
#+TITLE: OpenShift Workshops
|
||||
#+AUTHOR: James Blair
|
||||
#+DATE: <2023-12-04 Mon>
|
||||
|
||||
This repository contains a basic [[https://nextjs.org/][nextjs]] frontend designed to be exported as a static site and served via [[https://pages.github.com/][github pages]].
|
||||
|
||||
The frontend is used to serve workshop instructions for several workshops.
|
||||
|
||||
** Local development
|
||||
|
||||
To set up a local development environment run the following:
|
||||
|
||||
#+begin_src bash
|
||||
# Install dependencies
|
||||
npm install
|
||||
|
||||
# Build and serve the site
|
||||
npm run build && npm run serve
|
||||
#+end_src
|
||||
|
||||
|
||||
** Exporting static site
|
||||
|
||||
To export the site to static html to serve for example via github pages, run:
|
||||
|
||||
#+begin_src bash
|
||||
# Install dependencies
|
||||
npm install
|
||||
|
||||
# Build and export the site
|
||||
npm run build && npm run export
|
||||
#+end_src
|
||||
|
||||
|
||||
** 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
|
||||
|
||||
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
|
||||
kind: HelmChartRepository
|
||||
metadata:
|
||||
name: redhat-cop
|
||||
spec:
|
||||
connectionConfig:
|
||||
url: 'https://redhat-cop.github.io/helm-charts'
|
||||
name: Red Hat Community
|
||||
EOF
|
||||
#+end_src
|
||||
|
||||
|
||||
*** Install web terminal operator
|
||||
|
||||
So our workshop participants don't need to install ~oc~ locally.
|
||||
|
||||
#+begin_src bash
|
||||
cat << EOF | oc apply --filename -
|
||||
apiVersion: operators.coreos.com/v1alpha1
|
||||
kind: Subscription
|
||||
metadata:
|
||||
name: web-terminal
|
||||
namespace: openshift-operators
|
||||
spec:
|
||||
channel: fast
|
||||
installPlanApproval: Automatic
|
||||
name: web-terminal
|
||||
source: redhat-operators
|
||||
sourceNamespace: openshift-marketplace
|
||||
EOF
|
||||
#+end_src
|
||||
|
||||
|
||||
*** 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
|
||||
cat << EOF > operatorgroup.yaml
|
||||
apiVersion: operators.coreos.com/v1
|
||||
kind: OperatorGroup
|
||||
metadata:
|
||||
name: grafana-og
|
||||
spec:
|
||||
targetNamespaces:
|
||||
- user$user
|
||||
upgradeStrategy: Default
|
||||
EOF
|
||||
|
||||
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
|
||||
Reference in New Issue
Block a user