Home

Awesome

Vagrant Baseline

Core: Dev sandbox with batteries included


Check Baseline for command-line support

The idea is to provide a simple dev box with tools.

Sometimes you want to play with a project, which leads you to install a lot of stuff on your computer and the filesystem gets messy. Your computer turn out to be slow booting up, because it is loading a database that you never use. Maybe you want to try out a language but it requires you to install all the libraries and compilers.

Now you can mess up all the files in your dev box, and discard when you think it is to messy.

Table of contents

Requirements

If you don't know what a base box is, relax. Vagrant will download one for you on the first time you run the commands. It is around 350Mb. If you don't know how to update a base box, take a look on the Vagrantfile. There is a link were you can find a updated box.

At first, the setup will download the required packages and it will take a while depending of your connection. It builds a cache on your local machine, under ~/.vagrant.d/cache/apt/precise, so on the next build the bootstrap time becomes much smaller.

The cache is only directed to the .deb packages. It still compiles some packages from scratch. (e.g: ruby, redis)

Installation

Check Baseline for command line commands

Current environments

You can combine any of those names on the provision_name, but it must be a valid hostname

NameProvidesExtra information
clojurelein latest stable versionincludes java 7
couchdb1.3.1 + erlang R15Bport: 5984 listen on: 127.0.0.1
dockerlatest from docker.io
dotssetup dot files
elixir0.11.2includes latest erlang
erlanglatest from erlang-solutions.com
go1.5.2
gradle1.9
groovy2.2.1
haskellhaskell-platform from ubuntu's repo
ioLatest io deb from io website
java7 + maven 3.1.1 + ant 1.9.2
lua5.2 + luarocks
mongolatest from 10_gen repoport: 27017
nodejslatest from ppa:chris.lea
postgresql9.3 + devel packageusername: postgres password: postgres
prologlatest from ppa:swi-prolog/stable
python2.7 + pip and virtualenv
rabbitmqlatest from official apt repoport: 5672
racket5.02 (January 2014)
redis2.8.2 (from ppa:chris.lea)port: 6379
rubyrbenv + ruby 2.0
ruby193rbenv + ruby 1.9.3
rust0.8
scala2.10.3 + sbt 0.13.0includes java 7
smlsmlnj 110.76
zeromq4.0.3

Extending an already booted box

Baseline commes with a command to provision more of the supported environment from inside the box. Use the provision command to do so.

vagrant ssh
vagrant@vagrant $ provision redis lua

Using your own dotfiles

By default the manifest privison my own dotfiles (http://github.com/bltavares/dot-files) when you ask for it. You can change puppet/config.yaml to point to your dotfiles and have it loaded up.

baseline up redis dots

There a minor considerations to use your own dotfiles:

touch $HOME/.baseline_dotfiles

After making sure you have all the requirements in place, change on the file puppet/config.yaml to point to your repo.

Setting ZSH as the default shell

To set zsh as the default shell for your user, change the option under puppet/config.yaml.

Working with multiple VMs

Vagrant's configuration allows you to either use a single vm environments or use multiple. Sometimes you want to try out some other stack while still keeping the current one you are using. Or test networking with different stacks. Toggling the enviroment variable use_default_box, baseline will allow you to bootstrap multiple machines or a single machine.

host_name=dots-nodejs use_default_box=false vagrant up
host_name=dots-nodejs use_default_box=false vagrant ssh
host_name=mongo use_default_box=false vagrant up
host_name=mongo use_default_box=false vagrant destroy
host_name=dots-nodejs use_default_box=false vagrant destroy

Extending with your own puppet scripts

Sometimes you will want to try out some different modules that are not currently in the project, or will want to set up a webserver for the project you are writing and have it configured and deployed with your project. Or maybe you just want to have some packages installed, or removed.

You can achieve that extending the project using the puppet/custom folder. There is an example file to guide you in the path to extend your vagrant machine.

Debugging

When building puppet scripts, a verbose output can help. In those cases we provide the DEBUG variable to increase the output, show debug messages and create dependency graphs

DEBUG=1 host_name=redis vagrant up