ek9 / vagrant-baseboxes-salt

Vagrant baseboxes with SaltStack built with packer

Home Page:https://app.vagrantup.com/ek9

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vagrant-baseboxes-salt

Travis

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.

Baseboxes

This is a list of built baseboxes:

Usage

Quickly initialize and get basebox running with Vagrant:

Alpine Linux

$ vagrant init ek9/alpine-3-salt-x86_64
$ vagrant up

Limitations

  • 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 to Vagrantfile:

      config.vm.synced_folder ".", "/vagrant", type: "NFS"
    

    Alternatively, you can disable the default /vagrant share:

      config.vm.synced_folder ".", "/vagrant", disabled: true
    

Arch Linux

$ vagrant init ek9/archlinux-salt-x86_64
$ vagrant up

CentOS

$ vagrant init ek9/centos-7-salt-x86_64
$ vagrant up

Debian

$ vagrant init ek9/debian-8-salt-amd64
$ vagrant up

OpenBSD

$ vagrant init ek9/openbsd-6-salt-amd64
$ vagrant up

Building

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 variables
  • vars/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

Credits

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.

About

Vagrant baseboxes with SaltStack built with packer

https://app.vagrantup.com/ek9

License:MIT License


Languages

Language:Ruby 50.7%Language:Shell 49.3%