engineyard/ey-cloud-recipes — pull request #82 by mdolian (2013-03-07 22:17:40+00:00)
Title: added cookbook to set env vars for passenger and unicorn or any app serv...

Description of your patch
-------------
This cookbook will set env vars for any app control script that sources shared/config/env.custom
A ruby wrapper script is also written out to shared/bin/ruby_wrapper
It sources the env.custom file and calls out to ruby.
If the stack is nginx_passenger* then /etc/nginx/stack.conf is updated to include a passenger_ruby configuration pointing at the ruby_wrapper script.

Estimated risk
-------------
none, cookbooks are not enabled by default

Components involved
-------------
ruby, nginx, passenger, unicorn

Description of testing done
-------------
Booted up two test environments, one for passenger and one for unicorn and applied the new cookbook. I modified my todo application to print out an environment variable in the application layout. I deployed this app to both environments and ensured it was using the value of the environment variable I set in the cookbooks

QA Instructions
-------------
Boot up unicorn and/or passenger environment. Uncomment the require_recipe for the new cookbook, deploy an application that prints out an environment variable specified in the attributes, upload and apply cookbooks. http://github.com/mdolian/todo will print out one of the ruby GC example variables in the application layout.