github.com/askholme/packer@v0.7.2-0.20140924152349-70d9566a6852/website/source/docs/post-processors/vagrant-cloud.html.markdown (about)

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