Skip to content

Latest commit

 

History

History
38 lines (25 loc) · 1.21 KB

File metadata and controls

38 lines (25 loc) · 1.21 KB

Vagrant Support

Packer build templates are provided to build Vagrant boxes locally or to build and publish a Vagrant box on Vagrant Cloud.

Setup

  • Install Vagrant.
  • Run packer build alpine.json to build the OVA.
  • Import the generated OVA into VirtualBox.

Local Vagrant box

From the vagrant directory run packer build vagrant.json

You can then use vagrant commands to add, init, and run the box.

Vagrant Cloud

Prerequisites

  • You will need a Vagrant Cloud account.
  • You will need to generate an authentication token.
  • You will need to create a Box entry on Vagrant Cloud that will host the published box versions.

Building and Publishing

  • Set the environment variable ATLAS_TOKEN to your Vagrant Cloud access token.
  • Edit vagrant-cloud.json and update box_tag to match your Vagrant Cloud account name and box name.
  • Edit box_version and set a unique version number.
  • From the vagrant directory run packer build vagrant-cloud.json.

The published box is available with the following commands:

vagrant init <box_tag> \
  --box-version <box_version>
vagrant up