Vagrant Baseboxes with SaltStack on VagrantUp.com
This repository contains packer templates used to build ek9 vagrant baseboxes with SaltStack. This is a customized and maintained fork of packer-templates by kaorimatz.
This is a list of built baseboxes:
- ek9/alpine-3-salt-x86_64 - Alpine Linux 3.7.0; SaltStack 2018.3-r0
- ek9/archlinux-salt-x86_64 - latest Arch Linux; SaltStack 2017.7.4 (Nitrogen)
- ek9/centos-7-salt-x86_64 - CentOS 7.4; SaltStack 2017.7.4 (Nitrogen)
- ek9/debian-8-salt-amd64 - Debian 8.10; SaltStack 2017.7.4 (Nitrogen)
- ek9/debian-9-salt-amd64 - Debian 9.4; SaltStack 2017.7.4 (Nitrogen)
- ek9/openbsd-6-salt-amd64 - OpenBSD 6.2; SaltStack 2017.7.1 (Nitrogen)
Quickly initialize and get basebox running with Vagrant:
$ vagrant init ek9/alpine-3-salt-x86_64
$ vagrant up
-
VirtualBox Guest Modules are NOT compatible with Alpine Linux. To make various vagrant features work (i.e. private networking or synced folders) you are required to use vagrant-alpine plugin. To install the plugin,run:
$ vagrant plugin install vagrant-alpine
-
In order to use Synced Folders, you are required to use either NFS or rsync. Make sure vagrant-alpine plugin is installed if you plan to use NFS. To switch default
/vagrant
share to NFS, add this toVagrantfile
:config.vm.synced_folder ".", "/vagrant", type: "NFS"
Alternatively, you can disable the default
/vagrant
share:config.vm.synced_folder ".", "/vagrant", disabled: true
$ vagrant init ek9/archlinux-salt-x86_64
$ vagrant up
$ vagrant init ek9/centos-7-salt-x86_64
$ vagrant up
$ vagrant init ek9/debian-8-salt-amd64
$ vagrant up
$ vagrant init ek9/openbsd-6-salt-amd64
$ vagrant up
In order to manually build the boxes, clone this repository:
$ git clone https://github.com/ek9/vagrant-baseboxes-salt && cd vagrant-baseboxes-salt
To build a machine, you will have to pass template file to use to packer build
command:
alpine-3-salt-x86_64.json
used to build Alpine Linux 3.5.0.archlinux-x86_64.json
used to build Arch Linux.centos-7-x86_64.json
used to build CentOS 7 series.debian-8-amd64.json
used to build Debian 8 series.debian-9-amd64.json
used to build Debian 9 series.openbsd-6-amd64.json
used to build OpenBSD 6 series.
When building, you can build a box for the following providers (via -only=
argument):
virtualbox-iso
used to build VirtualBox based images.vmware-iso
used to build VMWare based images.qemu
used to build QEMU based images.
Additionally, you can specify a variable file (via -var-file file
) which can
be used to customize some of the build variables:
vars/release.json
- release specific variablesvars/development.json
- development specific variables (for testing)
To build a specific VM, use this command:
$ bin/packer build -var-file vars/release.json -only=virtualbox-iso template.json
Once the box is built you will see a .box
file in the main directory which
you can add to vagrant under custom-name
and initialize:
$ vagrant box add custom-name template.box
$ vagrant init custom-name
$ vagrant up
Copyright (c) 2017-2018 ek9. This work is licensed under MIT LICENSE.
Original code from kaorimatz/packer-templates that is part of this repository is Copyright (c) 2014 Satoshi Matsumoto.