Sample Rack application Salt States that will install Nginx, Passenger, Ruby 1.9.3 + the Falcon Patch, Bundler, and git. They also demonstrate how to deploy a sample Rack application using Salt.
Scheme Shell
Latest commit 2dff451 Jul 9, 2013 @jlund Bumping Passenger to 4.0.8
Permalink
Failed to load latest commit information.
pillar Bumping Passenger to 4.0.8 Jul 9, 2013
salt Initial commit Jun 11, 2013
LICENSE Initial commit Jun 11, 2013
README.md Initial commit Jun 11, 2013
cloudinit-template.sh Initial commit Jun 11, 2013

README.md

salt-rack

Sample Rack application Salt States that will install Nginx, Passenger, Ruby 1.9.3 + the Falcon patch. They also demonstrate how to deploy a sample Rack application using git.

Specifically, these states do the following:

  • Install a few crucial packages like git and NTP
  • Create a deploy user that the application files will belong to
  • Add an SSH public key to the deploy user's Authorized Keys file
  • Reconfigure OpenSSH to only allow access via SSH keys
  • Install Ruby 1.9.3 + the Falcon patch
  • Install Bundler
  • Install Nginx + Passenger
  • Set up and enable an Nginx vhost
  • Create all necessary application directories
  • Use git to checkout the latest revision of the imgur-display codebase
  • Create required symlinks
  • Use bundler to install all Gem dependencies

Running these states will leave you with a fully-functional Rack application server that is ready to show you a random picture from imgur. With some incredibly minor adjustments, these states will deploy your own application! It's my hope that they will be helpful to anyone who needs to set up a similar server using Salt.

A cloudinit template is also included that you can use to automatically provision Salt on a new Ubuntu server.

These states were tested on Ubuntu 12.04.2 LTS but should also work on Debian 7.

Enjoy!