tools: Add initial HyperKit/Moby InfraKit instance plugin

This is the first cut of a InfraKit instance plugin which
primarily allows one to manage Moby instances (though, other Linux's
may work too).

It's very rough on the edges and needs work and update to handle
templates and better configuration etc.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
This commit is contained in:
Rolf Neugebauer
2017-02-27 09:51:53 -08:00
parent a397c8e1e4
commit 2bcaea5322
231 changed files with 125977 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
## Hyperkit/Moby Infrakit plugin
This is a Hyper/Kit Moby instance plugin for infrakit. The instance
plugin is capable to start/manage several hyperkit instances with with
different configurations and Moby configurations.
The plugin keeps state in a local directory (default `./vms`) where
each instance keeps some state in a sub-directory. The VM state
directory can be specified at the kernel command line using the
`--vm-dir` option.
The plugin also needs to know where the kernel and `initrd` images are
located. The `--vm-lib` command line argument to the plugin specifies
the directory. Inside the VM library directory every kernel/initrd configuration should be stored in a sub-directory. The sub-directory name is used in the instance configuration.
## Building
```sh
make
```
(you need a working docker installation...testing on Docker for Mac)
## Quickstart
To play round with the plugin, simply follow the [infrakit tutorial](https://github.com/docker/infrakit/blob/master/docs/tutorial.md) and replace the file instance plugin with:
```
./build/infrakit-instance-hyperkit --vm-lib ./vmlib
```
where `./vmlib` contains a sub-directory named `default` with a `vmlinuz64` and `initrd.img` image.
Instead of the `cattle.json` in the infrakit tutorial, use `hyperkit.json` in this directory.