-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from jbenet/hosh/download-vm-r2
Download VM r2
- Loading branch information
Showing
2 changed files
with
53 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
|
||
vm_image=QmW9on9UeKCVDb5dsTEZJQwQoH53gXUtVfWvSBhf2Thmyq/vms/opscode_ubuntu-14.04_chef-provisionerless.box | ||
|
||
download: | ||
$(IPFS_BIN_PATH)/ipfs get $(vm_image) | ||
ifeq (, $(shell which ipfs)) | ||
$(error "No ipfs in $(PATH). Add the binary to the PATH") | ||
endif | ||
|
||
download: | ||
ipfs get $(vm_image) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Downloading a VM | ||
|
||
## Quick Start | ||
|
||
We have already prepared a VM for you to try. | ||
|
||
To run this demo: | ||
|
||
1. Make sure ```ipfs``` is in your ```PATH``` | ||
|
||
```export PATH="${HOME}/ipfs/bin":${PATH}``` | ||
|
||
2. Make sure ipfs daemon is running: | ||
|
||
```ipfs daemon &``` | ||
|
||
3. Run ```make``` | ||
|
||
## Uploading Your Own VM | ||
|
||
In this example, we used one of the VirtualBox VMs prepared by Chef built | ||
from their Bento project, https://github.com/chef/bento | ||
|
||
1. Prepare your environment and get ```ipfs``` daemon running | ||
``` | ||
export PATH="${HOME}/ipfs/bin":${PATH} | ||
ipfs daemon & | ||
``` | ||
|
||
2. Download an image. For example: | ||
``` | ||
mkdir vms | ||
cd vms | ||
wget http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_ubuntu-14.04_chef-provisionerless.box | ||
``` | ||
|
||
3. Add and pin it to ```ipfs``` | ||
``` | ||
cd .. | ||
ipfs add -r vms | ||
ipfs pin -r {HASH}/vms | ||
``` | ||
|
||
4. To download it, you can then issue | ||
``` | ||
ipfs get {HASH}/vms/opscode_ubuntu-14.04_chef-provisionerless.box | ||
``` | ||
|