Deploying Vagrant Boxes
Deploying a package using the UI
To deploy a Vagrant box to Artifactory, select the repository to which you want to deploy your Vagrant box and click Deploy..
The Deploy dialog is displayed with your selected repository as the Target Repository and a default Target path.
You can add properties you wish to attach to your box as parameters to the target path.
For example, to upload the box precise64-virtualbox-1.0.0.box, and specify that its name is precise64, with a provider of virtualbox and the version is 1.0.0, you would enter:
Set Me Up
You can also select your repository and click Set Me Up to view the cURL command you can use to upload your box.
Be careful with spaces
Make sure you don't enter any superfluous spaces in the Target Path specification.
Once you have deployed your Vagrant box, and Artifactory has recalculated the repository index, your repository should be organized as displayed below:
Deploying a package using Matrix Parameters
You can also deploy Vagrant boxes to Artifactory with an explicit URL using Matrix Parameters.
The URL is built similarly to the Target Path format as follows:
For example, to upload the box precise64-virtualbox-1.0.0.box, and specify that it's name is precise64, with a provider of virtualbox and the version is 1.0.0, you would enter:
Setting the Target Path
The Target Path can be anywhere in the repository, but it has to contain the 3 mandatory matrix parameters: box_name, box_provider and box_version and the file name must end with .box. The format is as follows:
|The value to assign to the |
The value to assign to the box
The value to assign to the
Provisioning Vagrant Boxes
Vagrant boxes are available through the following URL:
Specifying the path to the box
With Vagrant client commands, make sure you don't specify the path to a box in the command. The path should be specified using properties.
For example, to provision a Vagrant box called precise64 from a repository called vagrant-local, you would construct it's name in the following manner:
You can select the repository from which you want to provision your box, and click Set Me Up to get the specific URL for the selected repository.
You can also, optionally, pass parameters to specify a specific box version or provider. For example:
In addition, boxes can be provisioned using properties; this is useful when you want to download the latest box tagged by a specific property.
The properties query parameter value should comply with Using Properties in Deployment and Resolution.
The following example downloads a box with
It uses an optional "path" property ( in addition to the mandatory properties) to specify the path where the box is stored in Artifactory. We will use this property for resolution of the box.
Note the format for resolution of multiple properties: key1+=value1;key2+=value2....
Authenticated Access to Servers
If you need to access a secured Artifactory server that requires a username and password, you need to specify 2 environment variables:
It can be generated by any user from Artifactory with the following command:
It is not related to the user's access token, API key or encrypted password
It is only used for downloading Vagrant boxes from private repositories in Artifactory
The token will change if the user's password changes
For more details on the ATLAS_TOKEN, please refer to the Vagrant documentation.
- VAGRANT_SERVER_URL - The base URL for the Artifactory server.
Both environment variables are required
When using Artifactory with authenticated access (i.e. anonymous access is disabled), both of these environment variables are required. If either of them is not set, the Vagrant client will not be able to access Artifactory and a 401 error message will be generated.
Watch the Screencast