9.2. Default Scaling Build Life Cycle
On the head gear, where the web proxy runs, the build phase for a scalable application is the same as the default build phase for a non-scaling application. The deploy phase for scalable applications is different.
Deploy Phase
- OpenShift Enterprise starts the secondary cartridges on the application's head gear.
- OpenShift Enterprise runs the web proxy's
deploy
hook on the head gear. - The web proxy runs deployment steps on the application's secondary gears. For example, the default web proxy, HAProxy, preforms the following steps:
- It stops the secondary gears.
- It synchronizes the code and build artifacts from the head gear to the secondary gears.
- It runs the primary cartridge's
control update-configuration
command on the secondary gears. - It starts all the secondary cartridges on the secondary gears.
- It runs the primary cartridge's
control deploy
command on the secondary gears. - It runs the
deploy
user action hook, if present, on the secondary gears. - It starts the primary cartridge on the secondary gears. The application is now running on the secondary gears.
- It runs the primary cartridge's
control post-deploy
command on the secondary gears. - It runs the
post-deploy
user action hook, if present, on the secondary gears.
- OpenShift Enterprise runs the primary cartridge's
control deploy
command on the head gear. - OpenShift Enterprise runs the
deploy
user action hook, if present, on the head gear. - OpenShift Enterprise starts the primary cartridge on the head gear.
- OpenShift Enterprise runs the primary cartridge's
control post-deploy
command on the head gear. - OpenShift Enterprise runs the
post-deploy
user action hook, if present, on the head gear.
The build is now complete, and the scaled application is running.