Skip to content

Instantly share code, notes, and snippets.

@jbenet
Last active August 29, 2015 14:16
Show Gist options
  • Save jbenet/cfd72a6caea4299f7d1a to your computer and use it in GitHub Desktop.
Save jbenet/cfd72a6caea4299f7d1a to your computer and use it in GitHub Desktop.

VMs/Containers Demos

short ones

Deploying container images with IPFS in 5 seconds.

  1. Make a container
  2. Start the container elsewhere.
  3. boom it works. lazily.

Where did the publish step go? We didn't need it. :) But you can do it for tags, as those are useful:

Publishing container tags with IPFS in 5 seconds.

  1. Make a container.
  2. Tag it.
  3. Start a container elsewhere.

Start a container in 20 machines in 5 seconds.

  1. make a container.
  2. start the containers with swarm or fleet
  3. (they share download with each other!)

Writable containers with IPFS in 5 seconds.

  1. Start a container.
  2. Write to it.
  3. Shut it down.
  4. Elsewhere, start the container.
  5. boom changes.

Boot a VM with PXE in 5 seconds.

  1. Start astralboot
  2. Boot the vm.

Boot a VM with a (good, old-fashioned) ISO in 5 seconds.

  1. Mount ipfs
  2. boot from mount

Download a VM in 5 seconds.

  1. ipfs get the vm.

long one

[ Deploying Infrastructure with IPFS ]

In deployments, we often see lots of machines needing to fetch the same data with as little latency and bandwidth consumption as possible.

This can happen in many ways:

  • new updates trigger many machines to fetch images all at once
  • new replicas come up over time
  • large datasets need to be moved around for computation
  • or even fetching images + containers to your dev machines

In all these scenarios we typically see network topologies that operate mostly in a small, very fast local network, and a slower pipe out to the internet. This can be many machines in the same datacenter retrieving something from S3 or the broader internet, or even developers fetching images into their dev machines at their office's ISP.

There have been many systems developed for this, perhaps most notably twitter's murder, a specialized version of bittorrent for machine deployment.

ipfs is a version controlled, peer-to-peer file system. So it can be used like twitter's storm, but it also has versioning, tagging, and signature verification, much like git. So it's even better for organizing and authenticating the data. It also supports end-to-end encryption, so it's perfect for deployments across the wide internet.

Let's check it out! I'm going to walk you through a few of the things you can do with ipfs.

Let's start with simple VMs. Suppose we have a small hypervisor linux with ipfs installed.

Let's fetch a vm. `ipfs cat >mymv.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment