Recipe "DNA and genesis of a Vagrant Box ("VBubuntu") ready for hosting a SMW"

From SMW CindyKate - Main
Component 998878
Jump to: navigation, search


This recipe explains the steps for creating a VirtualBox .ova on the way towards the Vagrant Box mentioned.

Use Hashicorp Packer to build a VirtualBox .ova file already containing a maximum of setup, provisioning and configuration in view of its purpose of hosting a SMW system

Packer Template "template.json"

Packer Template Key "builders" (Array)


Packer Template Key "provisioners" (Array)




git clone [email protected]:dataspects/dataspectsStandardSMWHostingUbuntuVagrantBoxPackerFactory.git
cd dataspectsStandardSMWHostingUbuntuVagrantBoxPackerFactory
packer validate template.json
PACKER_CACHE_DIR=~/packer_cache/ ./

This creates a .ova at OUTPUT_DIRECTORY.

Import .ova into VirtualBox

  1. VM VirtualBox Manager > Ctrl+I
  2. Run VBoxManage list vms to get the corresponding VMID

Apply some manual finishing to the VirtualBox VM (notably aspects that somehow fail to run within the Packer build context)


This is pragmatic behaviour. Of course these aspects shall be solved and moved into the Packer build context.

  • sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade
  • Some PEAR/PECL package insstallations

Convert VirtualBox VM into Vagrant Box

vagrant package --base VMID --output ~/

Add dataspectsStandardSMWHostingUbuntuVBVM for local testing

  1. Create a folder named vagrant_test_dataspectsStandardSMWHostingUbuntuVagrantBox
  2. Run vagrant box add --name dataspectsStandardSMWHostingUbuntuVagrantBox ~/
  3. Run vagrant_test_dataspectsStandardSMWHostingUbuntuVagrantBox$ vagrant init and edit Vagrantfile to use dataspectsStandardSMWHostingUbuntuVagrantBox
  4. Run vagrant_test_dataspectsStandardSMWHostingUbuntuVagrantBox$ vagrant up

Make available at

  1. Upload to /srv/ftp
  2. Create box and/or release version at