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

OpenShift Essentials (8 Part Series)

1) How to manage Users & Project in Openshift? 2) How to create route in OpenShift? 3 ... 6 3) How to scale an application in OpenShift? 4) How to use Persistent Storage in OpenShift? 5) How to deploy application using Source to Image (S2I) in OpenShift? 6) How to monitor application using probes in OpenShift? 7) How to limit resources using Quotas & Limit Ranges in OpenShift? 8) How to deploy an application using Templates in OpenShift?

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

Step 3: Update permissions

setenforce 0

Step 4: List templates

oc get templates -n openshift

Step 5: Describe php template

oc describe template cakephp-mysql-persistent -n openshift

Step 6: Deploy php application

oc new-app cakephp-mysql-persistent --name cakephp -l app=demo
oc get pods --watch

Step 7: List route

oc get route

Step 8: Access application

From browser, Browse http://<ROUTE_URL>

Discussion

markdown guide