arttuladhar
10/8/2019 - 4:53 AM

OpenShift Demo

Demo 1 - Building nginx WebServer

oc login -u developer -p any
oc new-project demo1
oc new-app --name=nginx --docker-image=bitnami/nginx
oc status
oc get pods
oc describe pod <podname>
oc get svc
oc describe service nginx
oc port-forward <podname> 4040:8080
curl -s http://localhost:4040

Demo 2 - Building MySQL

oc new-app --docker-image=mysql:latest \
  --name=mysql-ocp -e MYSQL_USER=user -e MYSQL_PASSWORD=password \
  -e MYSQL_DATABASE=mydb -e MYSQL_ROOT_PASSWORD=password