Table of content.
Vagrant boxes built with these packer templates are available at: https://app.vagrantup.com/p0bailey/
Ubuntu, Debian and Centos Packer templates with custom scripts to bake Vagrant boxes and upload them into Vagrant cloud.
Supported builds:
Distribution | Debian | Ubuntu | CentOS | Misc |
---|---|---|---|---|
9 | 18.04 | 7.6 | k8 (Kubernetes + Docker) |
-
Terraform - www.terraform.io
-
Packer - www.packer.io
-
Vagrant - www.vagrantup.com
-
Virtualbox - https://www.virtualbox.org/
git clone https://github.com/p0bailey/packer-templates.git
Workflow
make virtualbox
make vagrant_up
make vagrant_upload
Makefile Menu
virtualbox build virtualbox image
vagrant_up starts the vagrant box
vagrant_upload Publish and release a new Vagrant Box on Vagrant Cloud
vagrant_clean stops and removes vagrant box
vagrant_stop_all stop all Vagrant machines
vagrant_status outputs status Vagrant environments for this user
Example Vagrantfile to consume Vagrant Boxes built from this repository.
# -*- mode: ruby -*-
# vi: set ft=ruby :
IP_ADDR = "192.168.56.55"
HOSTNAME = "server-vagrant"
BOX_NAME = "p0bailey/box_name"
CPUS = "2"
MEMORY = "1024"
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.define "box" do |box|
box.vm.box = "BOX_NAME"
box.vm.network :private_network, ip: "IP_ADDR"
box.vm.hostname = "HOSTNAME"
box.ssh.insert_key = false
box.vm.provider "virtualbox" do |v|
v.customize [ "modifyvm", :id, "--cpus", "CPUS" ]
v.customize [ "modifyvm", :id, "--memory", "MEMORY" ]
end
end
end
Centos - http://centos.serverspace.co.uk/centos
Ubuntu - http://releases.ubuntu.com/
Debian - http://cdimage.debian.org/debian-cd
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
Phillip Bailey [email protected]
N/A