github.com/StackPointCloud/packer@v0.10.2-0.20180716202532-b28098e0f79b/website/source/docs/post-processors/vagrant-cloud.html.md (about)

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