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.
What you need to do:
- clone and setup repo
- setup vagrant box
- package vagrant box
- add vagrant box to list
- use vagrant box
- Command line tools for Xcode
- Brew
- Cask (brew utility to install apps/binaries like VirtualBox)
- Vagrant
- VirtualBox
- Ansible
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!
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).
All you need to do here is load the Vagrant box:
vagrant up --provision
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
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 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