Re: [vagrant-up] Vagrant Cloud Upload Large Files

2018-05-17 Thread Mário Costa
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=

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

provider=virtualbox
version=0.0.1
name=windows-10-1709-base-winrm
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.



On Thu, May 17, 2018 at 4:01 AM, Jordan Borean  wrote:

> 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
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/vagrant-up/a7c4a13c-ef89-4943-a3df-fec5d0f87dfe%40googlegroups.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vagrant-up/CALGGjJZK9K5ApUz4iAZu%2BfMtU7oac3m_-yjPHArH1fYB_Lk_2g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [vagrant-up] Vagrant Cloud Upload Large Files

2018-05-16 Thread Jordan Borean
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

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vagrant-up/a7c4a13c-ef89-4943-a3df-fec5d0f87dfe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [vagrant-up] Vagrant Cloud Upload Large Files

2018-05-15 Thread Mário Costa
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 ...

On Tue, May 15, 2018 at 7:18 AM, Jordan Borean  wrote:

> 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
>
> --
> 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+unsubscr...@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.
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vagrant-up/CALGGjJZ1eB2MyY%3DxhpGT%3Dh5YaEd8TJH7LZEUnsVzfULnQ3_42g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.