Skip to content

ychaker/vagrant-rails-pgsql-redis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vagrant Box Provisioning for a Rails/PostgreSQL/Redis Environment

Stack

With this provision, you get the following stack:

  • Update apt packages
  • Basic packages (eg. curl, git, imagemagick, npm, nodejs, redis-server, etc)
  • Ruby (version can be specified under provisioning/group_vars/all/config.yml)
  • Vim
  • PostgreSQL
  • Nginx
  • Puma
  • PhantomJS
  • Redis

PS: This whole README assumes a Mac OS X setup. Please feel free to contribute if you would like to add support for other platforms.

Getting started

What you need to do:

  • clone and setup repo
  • setup vagrant box
  • package vagrant box
  • add vagrant box to list
  • use vagrant box

Prerequisites

Once you have brew installed you can just run the following commands:

brew cask install virtualbox
brew cask install vagrant
brew install ansible

and voila!

Repo setup

git clone [insert repo here]
cd [repo name]
cp vagrant.rb.example vagrant.rb
mkdir pkg

If you need to, change the settings in vagrant.rb to suit your needs (eg. memory allocation).

Setup Vagrant Box

All you need to do here is load the Vagrant box:

vagrant up --provision

Package & Add Vagrant Box

vagrant package --output pkg/[name-of-box].box
vagrant box add --name [name-of-box] pkg/[name-of-box].box

Example:

vagrant package --output pkg/rails-pgsql-redis.box
vagrant box add --name rails-pgsql-redis pkg/rails-pgsql-redis.box

Double check

To make sure all worked properly you can list the local boxes you have:

$ vagrant box list
[name-of-box]   (virtualbox, 0)
ubuntu/trusty64 (virtualbox, 14.04)

Example:

$ vagrant box list
rails-pgsql-redis   (virtualbox, 0)
ubuntu/trusty64     (virtualbox, 14.04)

Use Vagrant Box

Use the box by pointing to it in you Varantfile. You an update an existing Vagrantfile by changing this line:

config.vm.box = "ubuntu/trusty64"

to point to the box, or by initializing a new Vagrant setup by running the init command:

vagrant init ychaker/rails-pgsql-redis; vagrant up --provider virtualbox

About

A Vagrant box for a Rails + PostgreSQL + Redis

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages