12 May 2015

Today a friend remarked on his interest to learn Vagrant, and lack of time to do so. It occurred to me that the script I’ve been building to quickly knock up and down Vagrant VMs could be a handy aid along the shortest path for developers to begin their journey into this amazing toolset.

So without further ado, the shortest path I know of for a busy dev to start playing with Vagrant:

  • Install VirtualBox and Vagrant

    …or for Homebrew Cask users, the even easier brew cask install virtualbox vagrant

  • Run the following from CLI:

    vagrant box add bento/centos-7.1 --provider virtualbox
    vagrant box add bento/debian-8.2 --provider virtualbox

    …or pick some other box you like here.

  • Download the script below, stick it in your PATH, make it executable
  • Execute without args for the well-written help

    …or run quick-vagrant.sh -c to spin up your first box…

  • Enjoy :)

I also made the script a bit like a cheat sheet for Vagrant commands – if you search it for ‘vagrant’, you’ll see the first time any command is used, there’s a comment describing what it does. Or, here’s a more neatly formatted cheat sheet.

If you find this helpful getting up to speed, please pass it along to your busy developer friends! If you’d like to suggest improvements to the script, feel free to contact me.