Skip to content

Commit

Permalink
Merge pull request #13 from jbenet/hosh/download-vm-r2
Browse files Browse the repository at this point in the history
Download VM r2
  • Loading branch information
jbenet committed Mar 18, 2015
2 parents 8f4b607 + f538f6c commit 5cdb428
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 2 deletions.
7 changes: 5 additions & 2 deletions 001-download-vm/Makefile
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)
48 changes: 48 additions & 0 deletions 001-download-vm/README.md
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
```

0 comments on commit 5cdb428

Please sign in to comment.