Skip to content

Development: Vagrant

Rafael Petersen edited this page Mar 1, 2018 · 7 revisions

Install vagrant

Download and install from https://www.vagrantup.com/downloads.html

Use 1.7.1. 1.7.2 results in: "Shared folders that Chef requires are missing on the virtual machine". See https://github.com/mitchellh/vagrant/issues/5200

There is a known issue on 1.8.1 that can be averted by patching vagrant Patch for Ubuntu 16.04 vagrant 1.8.1

Dependencies

sudo apt-get install redir
sudo apt-get install lxc

Install plugins for vagrant

vagrant plugin install vagrant-lxc
vagrant plugin install vagrant-vbguest
vagrant plugin install vagrant-librarian-chef
vagrant plugin install vagrant-omnibus

Download chef cookbooks

We use librarian-chef to download the cookbooks needed and install them locally. Run:

bundle install
rbenv rehash
librarian-chef install

Create the VM (~30mins):

vagrant up

Log into the VM

vagrant ssh
cd vagrant/

From now on you can setup the application as you normally would (e.g. bundle exec rake db:create, etc.).