DEV Community

loading...
Cover image for How to deploy an application using Templates in OpenShift?

How to deploy an application using Templates in OpenShift?

sagarjadhv23 profile image Sagar Jadhav Originally published at developersthought.in ・1 min read

Objective

  • Create project my-project
  • Deploy PHP Application using Templates

Step 1: Set up Openshift environment

Go to Katacoda.com & click on start scenario

Step 2: Create project my-project

oc new-project my-project
Enter fullscreen mode Exit fullscreen mode

Step 3: Update permissions

setenforce 0
Enter fullscreen mode Exit fullscreen mode

Step 4: List templates

oc get templates -n openshift
Enter fullscreen mode Exit fullscreen mode

Step 5: Describe php template

oc describe template cakephp-mysql-persistent -n openshift
Enter fullscreen mode Exit fullscreen mode

Step 6: Deploy php application

oc new-app cakephp-mysql-persistent --name cakephp -l app=demo
Enter fullscreen mode Exit fullscreen mode
oc get pods --watch
Enter fullscreen mode Exit fullscreen mode

Step 7: List route

oc get route
Enter fullscreen mode Exit fullscreen mode

Step 8: Access application

From browser, Browse http://<ROUTE_URL>
Enter fullscreen mode Exit fullscreen mode

Discussion (0)

pic
Editor guide