First, fork and clone the repo. Then copy Vagrantfile.example
and rename it to just Vagrantfile
$ cp Vagrantfile.example Vagrantfile
After installing Vagrant and VirtualBox run command
$ vagrant up
to launch an Ubuntu 14.04 machine with all required dependencies installed.
This machine is provisioned using Ansible. The playbook.yml
file defines the following roles (located in roles/
folder):
- ubuntu_packages
- vagrant
- ruby: installs Ruby version 2.3.1
- nodejs
- postgres: installs PostgreSQL 9.5
- imagemagick
You can learn more about Ansible on its official documentation pages.
The first time the process might take a while. After it finishes provisioning you can login to the Vagrant machine issuing vagrant ssh
command.
Don't forget to configure your local database.yml
file. After that you'd only need to run:
bundle install
rake db:schema:load
- and
rake db:seed
to start using Ready Responder
When running rails server inside the vagrant machine (the guest) you'd need to bind
the server IP to 0.0.0.0
otherwise it won't send any data to the host (your computer).
Launch the web server with command:
$ rails server -b 0.0.0.0
Ansible is a configuration management tool that can be used for many things including: configuration of systems, deploying software and orchestration.
One of the key features of Ansible is that it does not requires you to install agents on machines. It works by using OpenSSH.
One of the ways of working Ansible is by using roles which are a way to reuse defined structures of tasks, variables and more.
You can see more in Ansible roles documentation page.
This Vagrant + Ansible setup defines the following list of roles:
ubuntu_packages
: takes care of installing development dependencies (curl, git, build-essential, libs, and moar) and other software.vagrant
: adds a line to machine.profile
so that anytime you log in to the vagrant machine, you're automatically cd-ed to/vagrant
folderruby
: install RVM, bundler and Ruby version 2.3.1nodejs
: configures Nodesource nodejs repositories and installs latest NodeJSpostgres
: installs and configures PostgreSQL 9.5imagemagick
: install Image Magick and its libraries