Preparing vagrant Maverick box

In this section we download one of existing box, run it, update and install software in it, and then repack it into new box. The later will be used for BornAgain compilation.

  • Download mavericks box

Download from to ~/scg/deployment/vagrant/orig_boxes
Other boxes can be downloaded from (search "osx" keyword)

  • Software update in the box

vagrant box add mavericks /Users/scg/deployment/vagrant/orig_boxes/
cd ~/scg/development/deployment/vagrant/projects/mavericks
vagrant init; vagrant up; vagrant ssh
softwareupdate --install --all # password vagrant

  • Updating the box second time

vagrant reload; vagrant ssh
softwareupdate --install --all # password vagrant

  • Updating homebrew, installing third party software for BornAgain

vagrant reload; vagrant ssh
sudo chown root /usr/local/bin/brew # not sure about it, it started to require it at some point
sudo brew update # type 'agree' to accept XCode license agreement
sudo brew install git cmake fftw gsl python homebrew/python/matplotlib numpy boost boost-python qt5 libtiff
Validate with 'brew doctor' that everything was installed correctly

  • Modifying authorized_keys in the box with the key from server

copy from <scgmini>/.ssh/ to <mavericks-dev>/.ssh/authorized_keys
copy from <scgmini>/.ssh/id_rsa to <mavericks-dev>/.ssh/id_rsa

this is required because we use ssh to send dmg installer from the box back to the build server

  • Remove energy saving

From scgmini monitor, run Virtualbox from Launchpad, then attach to running box

Turning off energy saving (set timeout to "Never") in the system preferences
Probably this can be done from command line too

  • Setting up second python installation

It will be used during BornAgain compilation instead of Python from /usr/local

Install it by "bash"

  • Packaging box into new box

vagrant package --output
vagrant destroy
mv ~/deployment/vagrant/orig_boxes/.
vagrant remove box mavericks
rm -r -f ~/deployment/vagrant/projects/mavericks

Using BornAgain mavericks box

  • Preparing new box for the first time

mkdir ~/deployment/vagrant/projects/mavericks-dev; cd ~/deployment/vagrant/projects/mavericks-dev
vagrant box add mavericks-dev /Users/scg/deployment/vagrant/orig_boxes/

  • Linking Vagrant files from BornAgain repository

These files contains virtual machine tunings and build recipy. BornAgain repository is in /Users/scg/development/BornAgain/BornAgain. Create links to the configuration in 'mavericks-dev' directory.

cd ~/deployment/vagrant/projects/mavericks-dev
ln -s ~/development/BornAgain/BornAgain/dev-tools/deployment/mavericks-dev/Vagrantfile .
ln -s ~/development/BornAgain/BornAgain/dev-tools/deployment/mavericks-dev/ .

  • Running box

cd ~/deployment/vagrant/projects/mavericks-dev
vagrant up
vagrant ssh


  • Discussion about nfs and Mavericks

  • Discussion and ssh configuration

  • Known Issues of OS X on Virtualbox

  • Vagrant files of other peoples