Skip to content

Provisioning scripts to setup a Vagrant box with Ruby, Puma, and PgSQL

License

Notifications You must be signed in to change notification settings

ychaker/vagrant-ruby-pgsql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vagrant Box Provisioning for a Ruby/PostgreSQL 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

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/python-node.box
vagrant box add --name python-node pkg/python-node.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                            
python-node     (virtualbox, 0)
ubuntu/trusty64 (virtualbox, 14.04)

Use Vagrant Box

About

Provisioning scripts to setup a Vagrant box with Ruby, Puma, and PgSQL

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published