Chapter 5. Creating Template Directories for Language Cartridges

Use the $cartridge_name/template/ or $cartridge_name/template.git/ directory to provide a basic example of an application written in the language or framework your cartridge packages. Welcome the application developer to your cartridge and inform them that the cartridge is operating correctly.
If you provide a $cartridge_name/template.git/ directory, OpenShift Enterprise copies the directory for the application developer.
If you provide a $cartridge_name/template/ directory, OpenShift Enterprise uses it to create a Git repository for the application developer. Ensure that your setup and install scripts account for the path change from template to template.git.
Create .gitignore files in empty directories to ensure the directories are retained when OpenShift Enterprise builds the Git repository.

Example 5.1. Ruby Template Directory

A Ruby 1.8 cartridge with Passenger support has a template/public/ directory and a config.ru file to define the web application.
+- template
|  +- config.ru
|  +- public
|  |  +- .gitignore
|  .openshift
|  +- markers
|  |- ...

5.1. Marker Files

The $cartridge_name/template/.openshift/markers/ directory contains example marker files for application developers. These files set conditions for various stages of a cartridge's life cycle. You can add marker files as required to enable application developers to control aspects of your cartridge.

Example 5.2. Ruby 1.8 Marker Files

Marker Action
force_clean_build OpenShift Enterprise removes previous output from the bundle install --deployment command and reinstalls all gems according to the current Gemfile and Gemfile.lock files.
hot_deploy OpenShift Enterprise serves new application code without restarting the application's web server.
disable_auto_scaling OpenShift Enterprise does not automatically scale a scalable application.