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