This repository is a working example and template that can be used to bootstrap a server and deploy a basic rails applicaiton using chef and capistrano
This was developed for a talk Cooking with Chef
- VirtualBox
- Vagrant
- Ruby >= 1.9.3
- Bundler Gem
- Git
- Clone Repo.
git clone https://github.com/danshultz/chef-solo-rails
cd chef-solo-rails
bundle install
vagrant up
- Add your a new user databag to
chef/data_bags/users
like dshultz.json - Edit
chef/cookbooks/baseline/recipes/default.rb
to include your ssh key for the deploy user cap chef deploy:cold AS=vagrant
(password is vagrant) ***
*** This is required the first time a "deploy" is executed, each subsequent provision
can simply use cap chef deploy
- Make sure to update the rails configuration details in config/deploy/dev.rb
- run
cap chef deploy
to make sure the updated rails app configurations are in place if you haven't done so - Update any necessary configurations in config/recipes/application.rb for your rails app
- run
cap app deploy:cold
to deploy your application for the first time - Review your deployed application at http://192.168.24.100