From these efforts, we are extracting an open source project that will enable quicker development of subscription based online web applications. We call this project "Ignition". It is currently under development and hosted on gitHub. The project is based on RoR, MongoDB, and Openshift. If you sign up for an Openshift account and follow the instructions in the README file, you should be able to get an instance of the application scaffold up and running in about 5-10 minutes.
One of the common issues with open source projects is how to manage configuration data that should be kept private. These data elements include items such as API keys, server names, and other elements that are specific to your installation and should not be stored in a public source code repository. A common approach in the RoR community is to store this information in a YAML file such as the config/application.yml file that is available to all RoR based applications. This file is not checked into your repository, but an example application.yml file is often stored there, so developers know what configuration variables are required for your application to operate correctly. The one inconvenience with this approach is the need to create this application.yml.
Openshift just released a new feature that enables us to create a single application.yml that can be used on any Openshft Gear (i.e. server) installation. This feature called "Custom Environment Variables" was just introduced in the September 2013 Openshift Blog. The feature allows us to dynamically create environment variables on an Openshift cloud server, which will be made available to the application running on the platform.
We use this new feature by creating an application.yml that uses environment variable placeholders. In our example, we need to specify configuration variables for an email server and for login credentials associated with the initial administrative user. These configuration variables and the corresponding environment variable placeholders are shown in the example file below. We setup separate sets of variables for development versus production. You can do the same thing for the test environment, but we left it out of the example for brevity.
To insure that the environment variables are set properly in the Openshift Gear (i.e. server), we use the Openshift command line utility rhc. The rhc command is described in the Openshift User Manual or you can use rhc --help. The rhc command allows us to set environment variables on the Openshift Gear individually on the command line or read them from a file. The general usage for setting environment variables on the command line is: