This repository is aimed to provide examples of how to do several "solution based" demos with Managed OpenShift. Managed OpenShift is a version of OpenShift where the creation and management of the cluster itself is taken care of by the cloud provider and Red Hat, so the demos here are more designed around what is possible to be built on top of the cluster when management of it is removed.
This is an ever growing repo which will be added to when I have time! If you find bugs, please open an issue and I will do my best to resolve it swiftly. If you have suggestions or would like to contribute, please feel free to make a PR.
Thanks!
-
Deploying S3 Buckets from OpenShift using the ACK (AWS Controllers for Kubernetes) Operators
1.1 Before your demo
1.2 During your demo
-
Deploying an App with Service Mesh
2.1 Before your demo
2.2 During your demo
-
Forwarding logs to AWS CloudWatch from a ROSA cluster
3.1 Before your demo
3.2 During your demo
-
Forwarding metrics to AWS CloudWatch from a ROSA cluster
4.1 Before your demo
4.2 During your demo
-
WIP 6 Deploying RHACM onto a Managed OpenShift Cluster using the command line or via GitOps
-
Demonstrating developer productivity via Source2Image
9.1 Before your demo
9.2 During your demo
-
WIP 10 Demonstrating the power of S2I to enable developers using dev spaces
10.1 Before your demo
10.2 During your demo
This demo only works on ROSA
- Run
./create_demo.sh install_demo1
from the root of the repo
-
Install ACK controller via console
-
Run the following commands:
aws s3 ls | grep hello-hcp
cat deploy-s3-buckets-with-ack/bucket.yaml
oc apply -f deploy-s3-buckets-with-ack/bucket.yaml
aws s3 ls | grep hello-hcp
oc delete bucket hello-hcp-bucket
aws s3 ls | grep hello-hcp
Install service mesh by following the instructions in the openshift-service-mesh
folder
- Go to the openshift service mesh folder here
- Run
oc apply -f .
- Go to the gitops folder here and install gitops
oc apply -f gitops/
Deploy the hello application
oc new-project hello
oc new-app https://github.com/andyrepton/hello
Create a service mesh role using the example here:
oc apply -f ../deploying-an-app-with-service-mesh/servicemeshroll.yaml
This demo only works on ROSA
- Run
../create_demo.sh install_demo3
-
Go to OpenShift Operators -> Cluster Logging Operator.
-
Change project to OpenShift Logging
-
Show that the OpenShift Logging Operator is installed already, explaining that this takes time to set up so you've already done that bit
-
Run the following commands:
$ oc project openshift-logging
# Explain what the logforwarder is and how it works:
$ cat ../forward-logs-to-aws-cloudwatch/logforwarder.yaml
# Apply the forwarded:
$ oc apply -f ../forward-logs-to-aws-cloudwatch/logforwarder.yaml
# Show that logs have arrived:
$ aws logs describe-log-groups --log-group-name-prefix poc-andyr
# Get the name of a log stream:
$ aws logs describe-log-streams --log-group-name poc-andyr.audit | jq -r '.logStreams[0].logStreamName'
# Read the log using the output of the above command:
$ aws logs get-log-events --log-group-name poc-andyr.audit --log-stream-name $LOG_STREAM_NAME_HERE_FROM_LAST_STEP
This demo only works on ROSA
- Ensure you are logged into AWS!
- Run
./create_demo.sh install_demo2
-
Explain the need for metrics in AWS.
-
Show the empty dashboard in AWS (the setup script will spit out the dashboard link)
oc apply -f forward-metrics-to-aws-cloudwatch/cloud-watch.yaml
oc get pods -n amazon-cloudwatch
cat forward-metrics-to-aws-cloudwatch/dashboard.json
cat forward-metrics-to-aws-cloudwatch/dashboard.json | pbcopy
- Paste into your dashboard: Actions -> View/Edit Source and then paste
Important! Remember that it'll take about 3.5 minutes from your deployment of the cloud watch agent until metrics start arriving, so perhaps move onto demo 3 during this time
Install the operator by running
oc apply -f ../openshift-gitops/gitops-install.yaml
cd rhacm
oc apply -f .
Wait for the CRD to be installed, then run again (first run will lack the multi-cluster-hub CRD)
- Go to the gitops folder here and install gitops
- Create the application file in the gitops folder:
oc apply -f gitops/
WIP 7 Deploying OpenShift Service Mesh onto a Managed OpenShift Cluster using the command line or via GitOps
Please see the ./openshift-service-mesh folder
8 Deploying OpenShift Interconnect (Skupper) onto a Managed OpenShift Cluster using the command line or via GitOps
cd rh-interconnect
oc apply -f .
Skupper will be installed in the openshift-operators namespace
- Go to the gitops folder here and install gitops
- Create the application file in the gitops folder:
oc apply -f gitops/
- Make sure you have a cluster available
-
Log onto your console
-
Open up the developer view and click "Add"
-
Paste the following URL: https://github.com/andyrepton/hello
-
Show the OpenShift Builds and show that it creates a valid route
The key here is that the repository does not have a Dockerfile, nor does it need one. Your developers can write their code and deploy onto OpenShift quickly and easily
- Make sure you have a cluster available
- Install dev spaces (coming to this repo soon)
- ?
11 Deploying OpenShift Dev Spaces onto a Managed OpenShift Cluster using the command line or via GitOps
cd openshift-devspaces
oc apply -f .
Dev Spaces will be installed in the openshift-operators namespace
- Go to the gitops folder here and install gitops
- Create the application file in the gitops folder:
cd openshift-devspaces
oc apply -f gitops/