Book Image

OpenShift Cookbook

By : Shekhar Gulati
Book Image

OpenShift Cookbook

By: Shekhar Gulati

Overview of this book

Table of Contents (19 chapters)
OpenShift Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Running OpenShift on a Virtual Machine
Index

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:

  1. 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
    
  2. To enable an OpenShift application to track 10 deployments (for instance), you...