Using Artifactory 6.x ?
JFrog Artifactory 6.x User Guide
Have a question? Want to report an issue? Contact JFrog support
- Distribution and sharing of Vagrant boxes within your organization.
- Calculation of Metadata for Vagrant boxes hosted in Artifactory's local repositories
- Extensive security features that give you fine-grained access control over boxes.
- Support for flexible repository layouts that allow you to organize your boxes and assign access privileges according to projects or development teams.
- Smart searches for boxes.
To create a local Vagrant repository to host your Vagrant boxes, create a new Local Repository and set Vagrant as the Package Type.
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:
- ATLAS_TOKEN - A
Base64 encoded string of the user credentials (formatted
- VAGRANT_SERVER_URL - The base URL for the Artifactory server.
Getting the ATLAS_TOKEN directly from Artifactory
You can use the following command to get the ATLAS_TOKEN string directly from Artifactory:
$ curl -uadmin:password "http://localhost:8080/artifactory/api/vagrant/auth"
Watch the Screencast