packer-post-processor-vagrant-cloud-standalone

command module
v0.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 15, 2018 License: MPL-2.0 Imports: 16 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

vagrant-cloud-standalone

Build Status GitHub release License

Packer post-processor plugin for uploading artifacts to Vagrant Cloud from the input filepath.

Description

This post-processor is a fork of core Packer's vagrant-cloud plugin (source code).

While original vagrant-cloud plugin requires artifact produced from the previous vagrant post-processor involving entire build stage, forked version vagrant-cloud-standalone just uploads artifact to Vagrant Cloud directly by input filepath, hence standalone.

It can be useful to split Packer build/deploy stage if you prefer to divide CI/CD or when artifact was already produced before.

Installation

Packer supports pluggable mechanism. Please read the following documentation to understand how to install this plugin:

https://www.packer.io/docs/extend/plugins.html

You can download binary built for your architecture from Github Releases.

Usage

Here is a simple example of vagrant_deploy.json:

{
  "variables": {
    "description": "Packer template for deploying a .box artifact to Vagrant CLoud",
    "cloud_token": "{{ env `VAGRANT_CLOUD_TOKEN` }}"
  },
  "builders": [
    {
      "type": "file",
      "content": "Do nothing, Packer just requires at least one builder to be present",
      "target": "/dev/null"
    }
  ],
  "post-processors": [
    {
      "type": "vagrant-cloud-standalone",
      "access_token": "{{user `cloud_token`}}",
      "box_tag": "ubuntu/xenial64",
      "provider": "virtualbox",
      "version": "20180130.0.0",
      "artifact": "builds/ubuntu-xenial_v20180130.0.0.box"
    }
  ]
}

It will verify the box, create new Version, Provider, Upload the provided .box and then Release new version in Vagrant Cloud.

Configuration

Configuration is the same as original Packer's vagrant-cloud.

A few settings were added to allow uploading .box artifact from the local file path:

  • provider (string)
    • Box type, Vagrant provider like virtualbox, vmware, hyperv etc.
  • artifact (string)
    • Path to artifact file .box. to deploy.

Documentation

Overview

vagrant_plugin_standalone post-processor is a fork of core Packer's 'vagrant-cloud' (https://www.packer.io/docs/post-processors/vagrant-cloud.html) plugin.

While original plugin requires artifact produced from the previous `vagrant` post-processor involving entire build stage, forked version `vagrant-cloud-standalone` just uploads .box artifact to Vagrant Cloud (vagrantcloud.com) directly by input filepath, hence standalone.

It can be useful to split Packer build/deploy stage if you prefer to divide CI/CD or when artifact was already produced before.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL