- Tested on Ubuntu 12.04 LTS 64bit
- You should have root or nopasswd sudo access
base.packages
:['wget', 'curl', 'htop']
-- these packages will get automatically installed to the host
node.users.deployer.user
: deployernode.users.deployer.shell
: /bin/bash
Creates node.users.deployer.user
user with node.users.deployer.shell
.
You can allow different users to login using key based auth by storing ssh public keys
in the deployer_authorized_keys
data bag, one json file per user:
// data_bags/deployer_authorized_keys/user-name.json
{
"id": "user-name",
"key": "ssh-rsa AAAAB3..."
}
node.rails.application.db.name
:node.rails.application.name
node.rails.application.db.username
:node.rails.application.name
node.rails.application.db.password
: 'change-me'
- Installs postgresql client
- Installs postgresql ruby bindings
- Installs postgresql server.
- Creates database
node.rails.application.db.name
- Creates
node.rails.application.db.username
withnode.rails.application.db.password
- Grants full access on
node.rails.application.db.name
tonode.rails.application.db.username
node.ruby.version
: ruby-1.9.3-p194node.ruby.bundler_version
: 1.2.4
- Installs
node.ruby.version
as default using rbenv. - Installs
node.ruby.bundler_version
.
node.rails.application.unicorn.version
: 4.6.2
- Installs nginx
node.rails.application.name
: nilnode.rails.application.root_prefix
: /var/wwwnode.rails.application.domain
: example.comnode.rails.application.environment
: productionnode.rails.application.packages
: []node.rails.application.unicorn.workers
: 2node.rails.application.unicorn.timeout
: 60node.rails.application.db.type
: postgresnode.rails.application.db.password
: 'change-me'
- Creates
/var/www/#{node.rails.application.name}
as application root - Creates
releases
,shared/sockets
,shared/log
,shared/pids
,shared/config
folders inside application root, requried for capistrano - Nginx configuration files
/etc/nginx/sites-include/#{node.rails.application.name}.conf
/etc/nginx/sites-available/#{node.rails.application.name}.conf
- Creates
unicorn
:- configuration at
/var/www/#{node.rails.application.name}/shared/config/unicorn.rb
- init script at
/etc/init.d/unicorn_#{node.rails.application.name}
- configuration at
- Installs
node.rails.application.packages
packages - Creates
/var/www/#{node.rails.application.name}/shared/config/database.yml
logentries.account_key
: nillogentries.hostname
: node.fqdnlogentries.logs
: {}
- Installs packages
logentries
andlogentries-daemon
- Registers the node in logentries
- Follows all logs from
logentries.logs
elasticsearch.version
: 0.20.6
- Downloads and installs ElasticSearch deb-package of the specified version
script/bootstrap
- develop
rake foodcritic
- configure iptables
- sshd config
- setup logrotate
- crontab https://github.com/fs/sliceconfig/blob/master/config/etc/crontab
- motd https://github.com/fs/sliceconfig/blob/master/config/etc/motd