OpenShift: Deployment Using CLI -II

Install an application from source code using oc new-app.

To install an application’s source code in a GitHub repository into OpenShift, use oc CLI tool and enter the following command in a terminal window:

$ oc new-app https://github.com/openshift/ruby-hello-world.git#beta4

Expose the service.
$ oc expose svc/ruby-hello-world

Get URL to access from externally:

http://ruby-hello-world-khemnathdevops-dev.apps.sandbox-m3.1530.p1.openshiftapps.com/

Check App pod status from OpenShift console:

Delete the application using the oc CLI:

1. Run the following command in the terminal window on your local machine to delete all the resources associated with the Ruby application deployed above.

[root@localhost openshift]# oc get deployments
NAME READY UP-TO-DATE AVAILABLE AGE
ruby-hello-world 1/1 1 1 15m
workspacec874d0a7d1d94c4b 0/0 0 0 14d
$ oc delete all -l app=ruby-hello-world

--

--