Awesome
Chemical-Analytics-Platform Virtual Machine
Scripts to create a Vagrant box using packer and ansible.
For available software inside Virtual machine see https://github.com/NLeSC/Chemical-Analytics-Platform/wiki
Usage
Requirements:
- VirtualBox, https://www.virtualbox.org
- Vagrant, https://www.vagrantup.com
Start virtual machine with
vagrant init nlesc/chemical-analytics-platform
vagrant up
Build
Requirements:
- VirtualBox, https://www.virtualbox.org/
- Vagrant, https://www.vagrantup.com/
- Packer, https://packer.io
- Enough disk space (15Gb)
- Make sure temporary directory (/tmp by default on Linux) has enough space. Use TMPDIR environment variable to overwrite default location
packer build -force packer.json
The build will produce 2 files:
- packer_virtualbox-iso_virtualbox.box, Vagrant box, ca be used as base for a Vagrant virtual machine
- output-virtualbox-iso/cap.ova, Open Virtualization Format Archive, can be imported into VirtualBox as a virtual machine
Test
Add box to Vagrant with
vagrant box remove --force --all nlesc/chemical-analytics-platform
vagrant box add --name nlesc/chemical-analytics-platform packer_virtualbox-iso_virtualbox.box
Then use steps described at Usage chapter in a new directory.
Push
Requirements:
- Atlas account, https://atlas.hashicorp.com
Publish box on https://atlas.hashicorp.com/nlesc/boxes/chemical-analytics-platform using the following steps:
- Create a new version
- Create a new provider
- Choose
virtualbox
as provider - Choose Upload
- Press
Continue to upload
- Upload the
packer_virtualbox-iso_virtualbox.box
file generated byvagrant package
- Edit version
- Press
Release version
Extending
The ova file produced during build can be used as as starting point in a another packer image build project using the 'virtualbox-ovf' packer builder.
To give another project also self upgrade capabilities add it's upgrade script to
/etc/vagrant_upgrade.d
directory.