Packer templates that simplify the creation of fully patched, minimally-sized and Ansible ready Vagrant boxes.
To build the boxes you need the following prerequisites.
- Packer
- Virtualbox (if you want to build boxes for the virtualbox provider)
- libvirt + qemu (if you want to build Boxes for the libvirt Provider)
To build the Boxes you need to run packer build, on the corresponding Template (Json Files)like this:
packer build -parallel=false alpine-3.7-x86_64.json
the option -parallel=false
is needed because you cannot run the qemu/libvirt and virtualbox provider in parallel.
If you only want to build either the qemu
or virtualbox
box you need to add the option -only <PROVIDER>
to the packer build command like this:
packer build -only=qemu alpine-3.7-x86_64.json
or
packer build -only=virtualbox-iso alpine-3.7-x86_64.json
If you i.e. want to build boxes with more RAM, without compression or bigger Disk size you can pass a Variable file to the packer build command by giving it the option -var-file=<PATH>
.
Example Variable files can be found in ./vars/
packer build -var-file=./vars/development.json
Alternatively you can set a Variable directly on the commandline by passing the -var 'key=value'
option.
packer build -var compression_level=6 -var disk_size=10000 alpine-3.7-x86_64.json
You can either use the prebuilt Boxes over here: KeboardInterrupt's Boxes on Vagrant Cloud, upload them to your own account on Vagrant Cloud or use the boxes you built locally.
vagrant box add ./alpine.3.7.0-x86_64-virtualbox.box