[talk] Vagrant Cloud boxes for BSDs

Steven Kreuzer skreuzer at exit2shell.com
Wed Jul 12 09:51:03 EDT 2017

Hi Jim-

> On Jul 11, 2017, at 9:19 PM, James E Keenan <jkeenan at pobox.com> wrote:
> What I would like to do with these boxes is:
> * Install one each week.
> * Configure as necessary to be able to test Perl 5 blead.  This would require using 'pkg' to install perl, git, vim, certain perl libraries, etc., in an automated way.
> * Generate smoke test reports of perl 5 blead on FreeBSD-12.0-CURRENT.
> * Discard boxes after, say, 4 weeks.
> Has anyone experience with something like this?  What have you learned from that experience?

The use case you described is one of the areas that vagrant really shines. For FreeBSD you would just need to create a Vagrantfile that looks something like this: 

# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|
  config.vm.box = "freebsd/FreeBSD-12.0-CURRENT"
  config.vm.base_mac = "080027D14C66"
  config.ssh.shell = "sh"
  config.vm.synced_folder ".", "/vagrant", disabled: true
  config.vm.provision "shell", inline: <<-SHELL
	pkg -y install perl5 git vim-lite

After the file has been created, just do `vagrant up` which will download the base image, provision a new VM for it and boot that VM up.
Once its up and running you can make use of the config.vm.provision functionality to perform any post install configuration such as installing
packages and whatnot. After that its just `vagrant ssh` to connect to the box and once you are done with you can discard it with `vagrant destroy`

More information about the talk mailing list