github.com/ttysteale/packer@v0.8.2-0.20150708160520-e5f8ea386ed8/website/source/docs/post-processors/vagrant-cloud.html.markdown (about) 1 --- 2 layout: "docs" 3 page_title: "Vagrant Cloud Post-Processor" 4 description: |- 5 The Packer Vagrant Cloud post-processor receives a Vagrant box from the `vagrant` post-processor and pushes it to Vagrant Cloud. Vagrant Cloud hosts and serves boxes to Vagrant, allowing you to version and distribute boxes to an organization in a simple way. 6 --- 7 8 # Vagrant Cloud Post-Processor 9 10 ~> Vagrant Cloud has been superseded by Atlas. Please use the [Atlas post-processor](/docs/post-processors/atlas.html) instead. Learn more about [Atlas](https://atlas.hashicorp.com/). 11 12 Type: `vagrant-cloud` 13 14 The Packer Vagrant Cloud post-processor receives a Vagrant box from the `vagrant` 15 post-processor and pushes it to Vagrant Cloud. [Vagrant Cloud](https://vagrantcloud.com) 16 hosts and serves boxes to Vagrant, allowing you to version and distribute 17 boxes to an organization in a simple way. 18 19 You'll need to be familiar with Vagrant Cloud, have an upgraded account 20 to enable box hosting, and be distributing your box via the [shorthand name](http://docs.vagrantup.com/v2/cli/box.html) 21 configuration. 22 23 ## Workflow 24 25 It's important to understand the workflow that using this post-processor 26 enforces in order to take full advantage of Vagrant and Vagrant Cloud. 27 28 The use of this processor assume that you currently distribute, or plan 29 to distribute, boxes via Vagrant Cloud. It also assumes you create Vagrant 30 Boxes and deliver them to your team in some fashion. 31 32 Here is an example workflow: 33 34 1. You use Packer to build a Vagrant Box for the `virtualbox` provider 35 2. The `vagrant-cloud` post-processor is configured to point to the box `hashicorp/foobar` on Vagrant Cloud 36 via the `box_tag` configuration 37 2. The post-processor receives the box from the `vagrant` post-processor 38 3. It then creates the configured version, or verifies the existence of it, on Vagrant Cloud 39 4. A provider matching the name of the Vagrant provider is then created 40 5. The box is uploaded to Vagrant Cloud 41 6. The upload is verified 42 7. The version is released and available to users of the box 43 44 45 ## Configuration 46 47 The configuration allows you to specify the target box that you have 48 access to on Vagrant Cloud, as well as authentication and version information. 49 50 ### Required: 51 52 * `access_token` (string) - Your access token for the Vagrant Cloud API. 53 This can be generated on your [tokens page](https://vagrantcloud.com/account/tokens). 54 55 * `box_tag` (string) - The shorthand tag for your box that maps to 56 Vagrant Cloud, i.e `hashicorp/precise64` for `vagrantcloud.com/hashicorp/precise64` 57 58 * `version` (string) - The version number, typically incrementing a previous version. 59 The version string is validated based on [Semantic Versioning](http://semver.org/). The string must match 60 a pattern that could be semver, and doesn't validate that the version comes after 61 your previous versions. 62 63 64 ### Optional: 65 66 * `no_release` (string) - If set to true, does not release the version 67 on Vagrant Cloud, making it active. You can manually release the version 68 via the API or Web UI. Defaults to false. 69 70 * `vagrant_cloud_url` (string) - Override the base URL for Vagrant Cloud. This 71 is useful if you're using Vagrant Private Cloud in your own network. Defaults 72 to `https://vagrantcloud.com/api/v1` 73 74 * `version_description` (string) - Optionally markdown text used as a full-length 75 and in-depth description of the version, typically for denoting changes introduced 76 77 * `box_download_url` (string) - Optional URL for a self-hosted box. If this is set 78 the box will not be uploaded to the Vagrant Cloud. 79 80 ## Use with Vagrant Post-Processor 81 82 You'll need to use the Vagrant post-processor before using this post-processor. 83 An example configuration is below. Note the use of a doubly-nested array, which 84 ensures that the Vagrant Cloud post-processor is run after the Vagrant 85 post-processor. 86 87 ```javascript 88 { 89 "variables": { 90 "version": "", 91 "cloud_token": "" 92 }, 93 "builders": [{ 94 // ... 95 }], 96 "post-processors": [ 97 [ 98 { 99 "type": "vagrant", 100 "include": ["image.iso"], 101 "vagrantfile_template": "vagrantfile.tpl", 102 "output": "proxycore_{{.Provider}}.box" 103 }, 104 { 105 "type": "vagrant-cloud", 106 "box_tag": "hashicorp/precise64", 107 "access_token": "{{user `cloud_token`}}", 108 "version": "{{user `version`}}" 109 } 110 ] 111 ] 112 } 113 ```