brandondunne/cruisecontrol.rb — pull request #1 by abutcher (2014-03-13 01:27:31+00:00)
Title: 193-openshift

What I've done here:

* The data root for Openshift would be File.join(ENV['OPENSHIFT_DATA_DIR'], ".cruise") which ends up being /var/lib/{{gear_uuid}}/app-root/data/.cruise/. This is the standard place to keep things you don't want Openshift to mess with.
* The data root above needs to be created for a single kick creation so I make that in the db migration if it doesn't exist already.
* Loading `config/site_config.rb` doesn't seem to play nice so I move the `site_config.rb` file to `DATA_ROOT/site_config` so that it loads.

After a first push (which will fail) you will need to ssh into the application and run a `bundle install` from `app-root/runtime/repo` after your first push. Then you can `ctl_app start` to finish the initial deployment. If you feel like skirting that issue (or you have a need for this app to work out of the box), you'll need to keep your vendor/cache in git so that `bundle install --deployment` will find everything it is looking for. I thought about adding that to this pull request but it seems dirty to me so I'll leave that in your hands.

Cheers! Sorry it took me so long to send this!