Question

I've created a custom Vagrant box by installing additional software on a base box. I now want to distribute this box. I've packaged the custom box using vagrant package.

In following the steps for box creation, I am stuck at the "create provider" stage. The step asks me to name a provider and state its URL. After choosing "virtualbox" as the provider, I'm not sure what it is expecting as a URL. The .box file is on my local machine and I simply want to upload it to Vagrant Cloud where it may be downloaded for use by others. (image below)

Please view the image below

So my question is: Does Vagrant Cloud provide hosting space for the files or is it simply redirecting to the actual hosting site? In other words, is the URL step expecting me to provide link to a VM already uploaded to some hosting site (Git, AWS etc)?

If Vagrant Cloud does provide hosting space, can someone point me to the next step in the process? Specifically, what URL is it expecting?

Thanks

Was it helpful?

Solution

I just recently run in to this very same issue and asked the same question from the support. At the time of the writing Vagrant Cloud Beta does not offer box file hosting (this is expected to change very soon). Instead you have to save the box-file somewhere in the internet and provide the url to that location. Note the file can't be behind authentication.

Update 28th May 2014

The following note has appeared to Vagrant Cloud Beta Help-section:

A core part of this service will be hosting of actual box files. This is being tested internally at the time of the beta launch, and will likely be a paid feature due to high bandwidth costs.

The privacy issue is still unaddressed in the Private Boxes-documentation.

Update 30th May 2014

HashiCorp has announced yesterday the end of Beta and a bunch of new features including box hosting. See their announcement for the details: Vagrant Cloud: Organizations, Box Hosting and the end of Beta.

OTHER TIPS

From Atlas Documentation:

Creating Boxes with the API

This example uses the Boxes API to upload boxes with curl. To get started, you'll need to get an access token.

Then, prepare the upload:

$ curl 'https://atlas.hashicorp.com/api/v1/box/USERNAME/BOX_NAME/version/VERSION/provider/PROVIDER_NAME/upload?access_token=ACCESS_TOKEN'

This should return something like this:

{
  "upload_path": "https://binstore.hashicorp.com/630e42d9-2364-2412-4121-18266770468e",
  "token": "630e42d9-2364-2412-4121-18266770468e"
}

Then, upload your box with the following command, with the filename in this case being foo.box:

$ curl -X PUT --upload-file foo.box https://binstore.hashicorp.com/630e42d9-2364-2412-4121-18266770468e

When the upload finishes, you can verify it worked by making this request and matching the hosted_token it returns to the previously retrieved upload token.

$ curl 'https://atlas.hashicorp.com/api/v1/box/USERNAME/BOX_NAME/version/VERSION_NUMBER/provider/PROVIDER_NAME?access_token=ACCESS_TOKEN'

Your box should then be available for download.

Vagrant Cloud does NOT offer box file hosting (at least not at this stage). Even if it will in future, I doubt that hosting will be free.

Now user can only version vagrant boxes and publish them on Vagrant Cloud using and point to self-hosted URLs.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top