My skeleton cookbook for provisioning rails apps
This cookbook makes your favorite breakfast sandwich.
- Ubuntu 14.04 LTS
- Chef 12.2.0
- database_sl
- rvm_sl
- phussionpassenger
Depends on data bag users
and data bag item deployer
.
# data_bags/users/deployer.json.sample
{
"id": "deployer",
"home": "/home/deployer",
"password": "abcdefghijklmnopqrstuvwxyz0123456789",
"shell": "/bin/bash"
}
Generate new password with:
openssl passwd -1 "theplaintextpassword"
See attributes/default.rb
for default values.
node['rubystack']['application']
- The application namenode['rubystack']['rails_env']
- The rails environmentnode['rubystack']['deployer']['username']
- The deployer user namenode['rubystack']['deployer']['password']
- The deployer user password
See attributes/database.rb
for default values.
node['rubystack']['db']['name']
- The database namenode['rubystack']['db']['hostname']
- The hostname of the databasenode['rubystack']['db']['username']
- The username of the databasenode['rubystack']['db']['password']
- The password of the database
See attributes/webserver.rb
for default values.
node['rubystack']['webserver']['name']
- The server namenode['rubystack']['webserver']['document_root']
- The document root of the virtualhost
Just include rubystack
in your node run_list
:
{
"name":"my_node",
"run_list": [
"recipe[rubystack]"
]
}
knife cookbook site share "rubystack" "Applications"
- Fork the repository on Github
- Create a named feature branch (like
add_component_x
) - Write your change
- Write tests for your change (if applicable)
- Run the tests, ensuring they all pass
- Submit a Pull Request using Github
Authors
: David Saenz Tagarro