Tracking and rolling back application deployments
When you deploy the source code using git push
, OpenShift executes a new build, creates a deployment, deploys it to the respective server, and then starts your application container. By default, it will only track the last deployment of your application, which means you can't roll back to a previous deployment. In this recipe, you will learn how to configure your application to track multiple deployments and roll back to a particular deployment.
Getting ready
To step through this recipe, you will need to have rhc installed on your machine.
How to do it…
Perform the following steps to learn how to configure applications to track multiple deployments and roll back to a previous version:
Create a new PHP 5.4 application just like we created in the Creating an OpenShift application using the rhc command-line client recipe, as follows:
$ rhc create-app–-app myapp php-5.4
To enable an OpenShift application to track 10 deployments (for instance), you...