Use the Sprinkle tool to automate the setup of an application server on Linux.
Sprinkle uses "packages" which are things to install. They can be installed from source or from a package manager. Package installation scripts are in the "packages" directory and if they require a static or generated configuration file, those can be found in the "assets" directory.
- apt package manager
- iptables
- memcached
- nginx
- redis
- ruby
- mysql
- git
- (broken) copy ssh config and sshd config files
- (broken) add deploy user
sprinkle -s install.rb -t
setup: the memcache package right now as a deploy:deploy user and group, so you will have to adduser deploy
on the box
or change that as necessary. cp config.example.rb config.rb
and customize with your settings.
gem install sprinkle
cp deploy.example.rb deploy.rb
and customize.sprinkle -c -s install.rb
sprinkle --help
- Sprinkle Documentation
- Thoughtbot Sprinkle scripts
- Example nginx config
- sprinkle scripts
- Tristan Dunn sprinkle linode setup
- Passenger stack video and site
- Unicorn and rails detailed deployment guide
- Sprinkle another Rails Nginx unicorn postgres stack
- Nginx+Unicorn configuration for multi-app servers
On Ubuntu 10.04.4 LTS and Bundler 1.0.22 I was getting:
/usr/lib/ruby/gems/1.8/gems/bundler-1.0.22/bin/bundle:14: uninitialized constant Bundler (NameError)
Following SSH security practices, I disabled root logins via SSH after supplying my local public key to the remote server, and use public key-based authentication. Some of the ssh config file edits look like this:
vim /etc/ssh/sshd_config
PermitRootLogin no
PasswordAuthentication no
UsePAM no
sudo /etc/init.d/ssh restart
You may need to run Sprinkle as connected via SSH as root if you aren't seeing any output, check this issue.