A Collection of OpenShift demos
- A Collection of OpenShift demos
- Installing OpenShift CLI v4.x
- Installing OpenShift CLI v3.11
- OpenShift Project Creation
- OpenShift User Creation
- Update users password
- Remove user from OpenShift
- OpenShift Scalability
- Enabling monitoring for user-defined projects
- OpenShift Autoscaling
- Source to Image builds
- Source to Image builds, with webhook triggers for builds
- Build from template for two tier -- App Server and Backend
- Python (Django) - PostgreSQL Backend
- ConfigMaps
- Persistent Storage Using NFS - OCS
- Pipelines
- Operators
- Code Ready Workspaces
- Resource Quotas and Limits
- Machine Learning
- Red Hat Service mesh
- K-Native
- Authors
Installing OpenShift CLI v4.x
##Linux
curl -OL https://mirror.openshift.com/pub/openshift-v4/clients/ocp/latest/openshift-client-linux.tar.gz
tar -zxvf openshift-client-linux.tar.gz
mv oc /usr/local/bin
mv kubectl /usr/local/bin
chmod +x /usr/local/bin/oc
chmod +x /usr/local/bin/kubectl
oc version
kubectl version
##MAC
curl -OL https://mirror.openshift.com/pub/openshift-v4/clients/ocp/latest/openshift-client-mac-$VERSION.tar.gz
tar -zxvf openshift-client-mac-$VERSION.tar.gz
sudo mv oc /usr/local/bin
sudo mv kubectl /usr/local/bin
chmod +x /usr/local/bin/oc
chmod +x /usr/local/bin/kubectl
oc version
kubectl version
Installing OpenShift CLI v3.11
##Linux
curl -OL https://github.com/openshift/origin/releases/download/v3.11.0/openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit.tar.gz
tar -zxvf openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit.tar.gz
sudo mv openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit/oc /usr/local/bin
chmod +x /usr/local/bin/oc
oc version
##MAC
curl -OL https://github.com/openshift/origin/releases/download/v3.11.0/openshift-origin-client-tools-v3.11.0-0cbc58b-mac.zip
unzip openshift-origin-client-tools-v3.11.0-0cbc58b-mac.zip
sudo mv openshift-origin-client-tools-v3.11.0-0cbc58b-mac/oc /usr/local/bin
chmod +x /usr/local/bin/oc
oc version
OpenShift Project Creation
oc new-project "example-project" \
--description="Example Description" \
--display-name="example-project"
OpenShift User Creation
oc create user sample-user
Update users password
htpasswd </path/to/users.htpasswd> sample-user
Remove user from OpenShift
htpasswd -D </path/to/users.htpasswd> sample-user
OpenShift Scalability
oc new-app https://github.com/sclorg/nodejs-ex
oc get pods | grep nodejs
oc expose svc/nodejs-ex
oc scale dc nodejs-ex --replicas=3
oc get pods | grep nodejs
oc scale dc nodejs-ex --replicas=1
oc get pods | grep nodejs
oc delete all --selector app=nodejs-ex
OpenShift Autoscaling
oc new-app https://github.com/sclorg/nodejs-ex
oc get pods | grep nodejs
oc expose svc/nodejs-ex
oc autoscale dc/nodejs-ex --min 1 --max 5 --cpu-percent=10
oc set resources dc/nodejs-ex --requests=cpu=200m,memory=256Mi --limits=cpu=400m,memory=512Mi
run siege
siege -r 3000 -c 50 http://urlendpoint
Source to Image builds
Source to Image builds, with webhook triggers for builds
Source-to-Image Builders with web hooks
Build from template for two tier -- App Server and Backend
Python (Django) - PostgreSQL Backend
ConfigMaps
Persistent Storage Using NFS - OCS
Pipelines
The following is a list of the pipeline samples available in container-pipelines repository:
- Basic Tomcat - Builds a Java Application like Ticket Monster and deploys it to Tomcat
- Basic Spring Boot - Builds a Spring Boot application and deploys using an Embedded Servlet jar file
- Blue Green Spring Boot - Build a Spring Boot application and deploys it using a blue-green deployment
- Secure Spring Boot - Build a Spring Boot app and deploy with a pipeline that includes code coverage reports, dependency scanning, sonarqube analysis
- Cross Cluster Promotion Pipeline - A declarative syntax pipeline that demonstrates promoting a microservice between clusters (i.e. a Non-Production to a Production cluster)
Link: https://github.com/redhat-cop/container-pipelines
Operators
Code Ready Workspaces
Download Red Hat CodeReady Workspaces
Operator Installer - 1.0.0
oc login https://master.youropenshift.com:8443
tar -zxvf codeready-workspaces-<version>-operator-installer.tar.gz
cd codeready-workspaces-operator-installer/
#optional: Modify config.yaml
./deploy.sh --deploy config.yaml --project=your-project
Resource Quotas and Limits
Machine Learning
MLFlow Tracking Server Operator
mlflow-example
Red Hat Service mesh
Service Mesh Deployment On OCP4
Deploying Istio bookinfo app on OpenShift 4.2
K-Native
Deploy Serverless Applications on Openshift 4.2
Deploying Secure Istio bookinfo app on OpenShift 4
Knative CLI Demo On OpenShift 4.2
Knative Tutorial
Compile Driver
Knative + Kafka + Quarkus demo.
Videos
Knative + Kafka + Quarkus demo.
Knative + Kafka + Quarkus demo.
Authors
- Tosin Akinosho - Initial work - tosin2013