Publish vagrant cloud from local box
- Dominant language
- Ruby
- Stars
- 27.2k
- Forks
- 4.4k
- Avg merge
- 1m
- Merged PRs (30d)
- 1
Description
Predefination:
`local box`: box in vagrant local repository
`local box file`: local box file dump with `vagrant package|repackage`
`cloud box`: box in vagrant cloud
It seems that there is no way to publish `cloud box` from my `local box`. The only way is to publish from `local box file`.
Imagine the situation, I want to build a new box(e.g. my/centos8) based on `centos/8`, that's what I do:
1. Run a VM with box `centos/8`
2. ssh to VM, and, install bundles of tools.
3. Package the VM snapshot with `vagrant package`, we will get a `local box file`: `package.box`
4. `vagrant cloud create my/centos8` to create a new vagrant cloud box.
5. `vagrant cloud publish` to publish box from `package.box` to vagrant cloud.
It's all seems pretty good enough. Let's go on.
And then, how If I want to reuse `my/centos8`. Of course It's a good idea to use the version following from `cloud box`, so
1. use `vagrant box add my/centos8` to add box from `cloud box` to `local box`. Will be a long time....
2. use `my/centos8` to run a VM
But, why should I have to download from` cloud box`(cost me so much time), because I already have a local one. So, it's clever to use the `local box file` :`package.box`, so I can do
1. use `vagrant box add my/centos8 ./package.box` to add box from `local box file`.
2. use `my/centos8` to run a VM
What is the problem? I add a box from `local box file`, and I publish a version to `cloud box`. There is no way to build relationship with the `local box` and the `cloud box`. So, if I want to follow the `cloud box` version? I have to download from `cloud box` again, and remove the `local box`(version 0) I have already added from `local box file`, which is absolutely the same with `cloud box`.
Think what it's done with docker? There is no such wierd situation.
Contributor guide
Research direction
Start by tracing the `vagrant cloud publish`, `vagrant box add`, and `vagrant package` command paths described in the issue. Done should allow a local box to be published to Vagrant Cloud without downloading an equivalent cloud box, while preserving the relationship needed to follow cloud versions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- cli, cloud, devops
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100