Vagrant Cloud Upload Large Files

67 views
Skip to first unread message

Jordan Borean

unread,
May 15, 2018, 2:18:14 AM5/15/18
to Vagrant
Hi

Sorry if this isn't the right area to ask this but I upload some large vagrant boxes to Vagrant Cloud on a somewhat regular basis and was wondering if there was a way to upload the box in smaller chunks instead of one big go. I find that I regularly get failures when uploading and that could mean I need to start from the beginning again. This means that I have potentially wasted 5GB of bandwidth for nothing.

Thanks

Jordan

Mário Costa

unread,
May 15, 2018, 5:43:08 AM5/15/18
to vagra...@googlegroups.com
Had that problem in the past, and could only upload using aws and a mv.
To uploaded to S3 with chunks with a tool that I don’t remember now ...

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/062d3be4-8968-4639-9776-15e00f9c2207%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jordan Borean

unread,
May 16, 2018, 11:01:44 PM5/16/18
to Vagrant
Thanks Mário

I suppose beggars can't be choosers considering they are storing my boxes for free. I'll look into storing them on S3 and sharing the URL instead of uploading directly, that may be better for me in the end.

Thanks

Jordan

Mário Costa

unread,
May 17, 2018, 5:20:06 AM5/17/18
to vagra...@googlegroups.com
No problem,

I've did that for a while, but having the box in the vagrant cloud allows the users to just do vagrant up from a Vagrantfile, without additional commands.

I've used this script to upload the box from a ubuntu vm.

#!/bin/bash
export VAGRANT_CLOUD_TOKEN=<add token>

# Goto https://app.vagrantup.com/settings/security and generate a token.

provider=virtualbox
version=0.0.1
name=windows-10-1709-base-winrm
username=<your-username>

# GET /api/v1/box/:username/:name/version/:version/provider/:provider/upload
# Prepare the provider for upload/get an upload URL
response=$(curl \
  --header "Authorization: Bearer $VAGRANT_CLOUD_TOKEN" \
  https://app.vagrantup.com/api/v1/box/$username/$name/version/$version/provider/virtualbox/upload)

# Requires the jq command
upload_path=$(echo $response | jq .upload_path -r)

curl \
  $upload_path \
  --request PUT \
  --upload-file windows-10-1709-base-winrm.box

you can check here the original script, https://www.vagrantup.com/docs/vagrant-cloud/api.html#upload-a-provider, I've just modified the "jq . upload_path -r" as it is required in ubuntu.



--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages