• Stars
    star
    165
  • Rank 228,906 (Top 5 %)
  • Language
  • License
    MIT License
  • Created over 11 years ago
  • Updated over 10 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Sample Ansible Playbook for Rack applications that installs Nginx, Passenger, Ruby 2.0.0 (or 1.9.3), Bundler, and git. It also demonstrates how to deploy a basic Rack application using Ansible.

mazer-rackham

Sample Ansible Playbook for Rack applications that installs Nginx, Passenger, and Ruby 2.0.0 (or 1.9.3). It also demonstrates how to deploy a basic Rack application from a git repository.

Specifically, it does the following:

  • Upgrades packages
  • Installs a few crucial programs like git, NTP, and Vim
  • Creates a deploy user that the application files will belong to
  • Adds an SSH public key to the deploy user's Authorized Keys file
  • Reconfigures OpenSSH to only allow access via SSH keys
  • Installs Ruby 2.0.0 (or 1.9.3)
  • Installs Bundler
  • Installs Nginx + Passenger
  • Sets up and enables an Nginx vhost
  • Creates all necessary application directories
  • Uses git to checkout the latest revision of the imgur-display codebase
  • Creates required symlinks
  • Uses bundler to install all Gem dependencies

Running this playbook 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, this playbook will deploy your own application! It's my hope that this will be helpful to anyone who needs to set up a similar server using Ansible.

This playbook will run on Ubuntu 12.04 LTS and higher, and also works on Debian 7.

Enjoy!

Testing this playbook with Vagrant

  • Install Ansible
    • This playbook frequently uses new Ansible features, so installing the development version is recommended. The two commands below will get you up and running quickly; run them from the directory of your choice (e.g. ~/github).
    • git clone [email protected]:ansible/ansible.git
    • source ansible/hacking/env-setup
  • Download and install Vagrant
  • Copy or rename Vagrantfile.example to Vagrantfile
  • Copy or rename ansible_hosts.example to ansible_hosts
  • Comment out the user: root line from imgur-display-setup.yml and uncomment the two lines below Vagrant setup
  • Run vagrant up in a terminal from within this folder
  • When the Ansible provisioning completes, visit http://localhost:8080/ in your host machine's browser to view the running Rack app
  • Run vagrant halt to shutdown the VM
  • Run vagrant destroy to delete the VM's data

More Repositories

1

spotify-export

A simple Ruby utility that uses Spotify's Web API to export a playlist as plain text
Ruby
293
star
2

ansible-go

Ansible role that installs Go (http://golang.org/). The latest stable release that has been compiled for x86 64-bit Linux systems is installed by default, and different platforms and versions are supported by modifying the role variables.
Shell
168
star
3

docker-chrome-pulseaudio

Run Google Chrome inside an isolated Docker container on your Linux desktop! See its sights via X11 forwarding! Hear its sounds through the magic of PulseAudio and SSH tunnels!
Shell
157
star
4

ansible-shadowsocks

Ansible role that installs the Shadowsocks secure SOCKS 5 proxy (http://shadowsocks.org)
59
star
5

salt-rack

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
57
star
6

ansible-ufw

Ansible role that installs and configures ufw, AKA The Uncomplicated Firewall (https://launchpad.net/ufw)
31
star
7

actually-automatic

Get notified whenever Apple releases a new iOS or macOS update or Rapid Security Response.
Ruby
12
star
8

ansible-mumble-server

Ansible role that installs and configures Murmur, the server component of the Mumble voice chat software (http://mumble.sourceforge.net/)
8
star
9

ansible-ruby-common

Ansible role that compiles and installs Ruby (https://www.ruby-lang.org) and Bundler (http://bundler.io). This role is generic enough to support any version of Ruby, and it is best used in conjunction with another role that supplies the required variables and that depends on this common base.
6
star
10

the-red-button

The Red Button enables you to quickly put a series of web applications into maintenance mode.
Ruby
4
star
11

ansible-ruby-2.1

Ansible role that compiles and installs Ruby 2.1 (https://www.ruby-lang.org) and Bundler (http://bundler.io).
4
star
12

Flock

Java
2
star
13

ansible-nitter

A simple Ansible playbook that sets up and configures a fully functional Nitter server.
Jinja
2
star
14

surespot-ios

ios surespot client
Objective-C
2
star
15

ansible-rtorrent

Ansible role that installs rTorrent (http://libtorrent.rakshasa.no), Screen, and a dedicated torrent user
2
star
16

ansible-rainy

Ansible role that sets up the Rainy open source synchronization server (http://dynalon.github.io/Rainy/#!index.md). Rainy works with Tomboy and Tomdroid and lets you access, organize, and edit your notes across devices.
1
star