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

Enabling hot deployment for Java applications


Every time you make a change and push it to the OpenShift application gear, OpenShift stops your gear (that is, all the cartridges), copies the source code from your application Git repo to app-root/runtime/repo, performs a build, prepares the artifact, and finally starts your gear (that is, all the cartridges). This process takes time and does not suit rapid development. To enable rapid development and faster deployment, OpenShift supports hot deployment. Hot deployment means that you can deploy your changes without the need to restart all the application cartridges.

Note

This recipe will work with all the four supported Java cartridges (Apache Tomcat 6, Apache Tomcat 7, JBoss AS7, and JBoss EAP).

How to do it…

Perform the following steps to enable hot deployment:

  1. Open a new command-line terminal, and navigate to the directory where you want to create the application. To create a new JBoss EAP application, execute the following command. If you already...