Table of Contents generated with DocToc
This repository is for maintaining my personal Vagrant Box Templates using Packer.
-
All builds are based on the VirtualBox provider.
-
You can find my collection of builds here
NOTE: All builds are base builds and follow the Vagrant guidelines of how a Vagrant box should be built.
The following distros are available:
- Centos
- 6
- 7
- Debian
- Jessie
- Stretch
- Wheezy
- Fedora
- 22
- 23
- 24
- 25
- OpenSuse
- 13.2
- 42.1
- RedHat
- 7
- Ubuntu
- Precise
- Trusty
- Utopic
- Vivid
- Wily
- Xenial
- Yakkety
- Zesty
To build a Vagrant box with Packer for Virtualbox:
Choose which distro you are interested in building.
NOTE: This example we will have chosen Ubuntu Xenial
cd Ubuntu/xenial64
packer build template.json
Now watch your build kick off and run through the building process. Once it has completed you will be ready to test it out.
Once your build has completed you are ready to test it out.
cd Ubuntu/xenial64
vagrant box add xenial64 xenial-server-x86_64.box
cd ~
mkdir -p packer/vagrant/xenial64
cd packer/vagrant/xenial64
vagrant init xenial64
vagrant up
vagrant ssh
Now do some basic tests to validate all is good.
vagrant destroy -f
Included in each distro is a cleanup script called cleanup.sh
to clean up the
build folder when you are complete.
#!/bin/bash
rm *.box
rm -rf packer_cache
To cleanup:
cd Ubuntu/xenial64
./cleanup.sh
MIT
Larry Smith Jr.
- @mrlesmithjr
- EverythingShouldBeVirtual
- mrlesmithjr [at] gmail.com