Giter Club home page Giter Club logo

packer-boxes's Introduction

Jeff Geerling's Vagrant Box Packer Builds

Validate Packer JSON files

This project contains the Packer build configurations for all of Jeff Geerling's (geerlingguy's) Vagrant Boxes. Each box builds a minimal base box for use with VirtualBox. Available boxes include:

All of these boxes are available as public, free Vagrant boxes and can be used with the command:

vagrant init geerlingguy/[box name here]

You can also fork this repository and customize a build configuration with your own Ansible roles and playbooks to build a fully custom Vagrant box using Packer. For one such example, see the Drupal VM Packer Build.

Requirements

The following software must be installed/present on your local machine before you can use Packer to build any of these Vagrant boxes:

Usage

Make sure all the required software (listed above) is installed, then cd into one of the box directories and run:

$ packer build -var 'version=1.2.0' box-config.json

After a few minutes, Packer should tell you the box was generated successfully, and the box was uploaded to Vagrant Cloud.

Note: This configuration includes a post-processor that pushes the built box to Vagrant Cloud (which requires a VAGRANT_CLOUD_TOKEN environment variable to be set); remove the vagrant-cloud post-processor from the Packer template to build the box locally and not push it to Vagrant Cloud. You don't need to specify a version variable either, if not using the vagrant-cloud post-processor.

Building all the boxes

Whenever VirtualBox is updated, it's best to re-build all the base boxes so they have the latest guest additions.

Assuming you have Ansible and Packer installed already, and you have a VAGRANT_CLOUD_TOKEN available in your environment, you can run the playbook to build and push updated versions for all the boxes:

ansible-playbook build-boxes.yml

You can also build and push just one box:

ansible-playbook build-boxes.yml -e "{'boxes':['debian10']}"

Testing built boxes

There's an included Vagrantfile that allows quick testing of the built Vagrant boxes. From the same box directory, run the following command after building the box:

$ vagrant up

Test that the box works correctly, then tear it down with:

$ vagrant destroy -f

License

MIT

Author

These configurations are maintained by Jeff Geerling, author of Ansible for DevOps.

packer-boxes's People

Contributors

geerlingguy avatar splashx avatar basictheprogram avatar mkinney avatar flxpeters avatar acikogun avatar rjhornsby avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.