Set of roles and recipes for bootstrapping typical Ruby on Rails website. It uses nginx, unicorn and Percona. Has been tested with Ubuntu 12.10 (see Vagrantfile).
- You should be able to login as
root
to the target system. - Ruby 1.9.3 (will be installed automatically)
All configuration stored in JSON files (one file per node). See http://matschaffer.github.io/knife-solo/ for details.
chef
will create user (node[:application][:user][:name]
) which will be an owner of app directory. unicorn
also will be started by this user. This user should be used when deploying with capistrano
.
Set if you need to permanently redirect users from some subdomains to the main domain. The most common case
if you need to redirect them from www.exacmple.com
to example.com
.
This option can be used if you need to protect the website using HTTP Basic Auth. Simply remove it if you don't need it.
If you'd like to do passwordless deploys (using SSH public keys), you may wish to add public keys of users which should have such ability to the data_bags/authorized_keys/
folder. These keys should be also added to the node configuration under the node[:authorization][:ssh]
.
How to provision vagrant VM:
bundle install
vagrant up
knife solo bootstrap vagrant@localhost nodes/application.json.sample -p 2200 -i ~/.vagrant.d/insecure_private_key
Cookbook prepares directories for capistrano deployments and does initiall app configuration (database.yml
, unicorn.rb
).
Installs nginx
and configures it to use unicorn
as upstream.
Install Percona server.
Install Postfix which will be accepting mails from local processess.