Commit Graph

2889 Commits

Author SHA1 Message Date
Justin Cormack
fb92dc250f Merge pull request #1529 from rneugeba/hk-infra
Update Hyperkit bindings and demo
2017-04-07 11:06:53 +01:00
Justin Cormack
79cc710fa7 Merge pull request #1531 from samoht/runc
update runc to version ac50e77bbb440dcab354a328c79754e2502b79ca
2017-04-07 10:58:23 +01:00
Rolf Neugebauer
93a9a827b6 demo: Update documentation
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-07 10:52:40 +01:00
Rolf Neugebauer
01e39a16ac demo: Tweak etcd start script
Try joining a new cluster initially. If that fails try to join
an existing cluster.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-07 10:52:40 +01:00
Rolf Neugebauer
17e4aa3e58 demo: Increase memory of etcd VMs to 1G
512MB is too small to install etcd via apk in the RAM disk.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-07 10:52:40 +01:00
Rolf Neugebauer
cc16ceb578 cli: Add option to the IP address for HyperKit VM
Note: This currently requires a custom version of VPNKit.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-07 10:52:40 +01:00
Rolf Neugebauer
971db3c0c3 infrakit: Add LogicalID -> IP -> UUID mapping
If the LogicalID passed in is a IP address, turn this into
a UUID and pass it to HyperKit. This will cause  VPNKit to
assign the IP address the VM.

Note: This currently requires a custom version of VPNKit

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-07 10:52:40 +01:00
Rolf Neugebauer
569a5a4ba8 vendor: Update the HyperKit go bindings
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-07 10:52:40 +01:00
Thomas Gazagnaire
226d394d15 update runc to version ac50e77bbb440dcab354a328c79754e2502b79ca
Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-04-07 11:46:34 +02:00
Justin Cormack
f4127faec3 Merge pull request #1526 from samoht/runc-calf
miragesdk: start the calf using runc
2017-04-07 10:42:58 +01:00
Justin Cormack
5b91cc4a32 Merge pull request #1528 from errordeveloper/kubernetes
Working Kubernetes master
2017-04-07 10:41:56 +01:00
Justin Cormack
2407afbbe0 Merge pull request #1530 from ijc25/create-directories-from-yaml
Support creating of directories in files section
2017-04-07 10:28:23 +01:00
Ilya Dmitrichenko
961acc4c21 Working Kubernetes master
Signed-off-by: Ilya Dmitrichenko <errordeveloper@gmail.com>
2017-04-07 10:09:10 +01:00
Ian Campbell
bca0b2ea69 Support creating of directories in files section
e.g.
    files:
     - path: etc/docker/daemon.json
       contents: '{"debug": true}'
     - path: var/lib/mydaemon
       directory: true

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-04-07 09:55:18 +01:00
Thomas Gazagnaire
a60ac17233 miragesdk: start the calf using runc
`nested runc` unfortunately needs a lot of caps/privileged. The removal of `readonly: true` is also a bit unfortunate.

Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-04-06 19:39:21 +02:00
Justin Cormack
dbb67e969b Merge pull request #1298 from riyazdf/readonly-rootfs
Remount rootfs as read-only after init, /var and /containers mounted as rw
2017-04-06 18:35:44 +01:00
Thomas Gazagnaire
05089f9249 Merge pull request #1469 from samoht/system-handlers
mirage-sdk: add system handlers
2017-04-06 19:28:36 +02:00
Justin Cormack
0511e13bd4 Merge pull request #1523 from rneugeba/demo-cloud
Update demo files/config/docs
2017-04-06 18:10:27 +01:00
Justin Cormack
ed650cc3ad Merge pull request #1525 from justincormack/oldscripts
Remove some obsolete scripts
2017-04-06 18:09:49 +01:00
Justin Cormack
e1c395f0ed Merge pull request #1524 from errordeveloper/kubernetes
WIP Kubernetes
2017-04-06 18:08:04 +01:00
Ilya Dmitrichenko
e68e42c0fa WIP Kubernetes
Signed-off-by: Ilya Dmitrichenko <errordeveloper@gmail.com>
2017-04-06 17:57:48 +01:00
Justin Cormack
c3031e22a3 Remove some obsolete scripts
- one was old for installing in d4m no longer relevant
- the other is relaced by `docker run hyperkit`

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-04-06 17:57:16 +01:00
Rolf Neugebauer
dca2b4d223 demo: Add files/instructions for a GCP based etcd cluster
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-06 17:44:19 +01:00
Riyaz Faizullabhoy
8ba64546eb Remount rootfs as read-only after init, /var and /containers mounted as
read-write

Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-04-06 09:30:46 -07:00
Justin Cormack
dc1818147c Merge pull request #1522 from dave-tucker/gce-gcp
Use GCP everywhere for consistency
2017-04-06 17:27:15 +01:00
Rolf Neugebauer
2bd75a621d demo: Switch etcd bootstrap from discovery service to static IPs
This makes the configuration simpler but requires us to be able
to set IP addresses on instances.

This also, for simplicity, reduces the number of nodes to 3.

The script does not make assumption about specific IP addresses,
but does assume that the nodes have IP addresses such as:
a.b.c.200, a.b.c.201, and a.b.c.202.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-06 17:22:56 +01:00
Dave Tucker
1b485eff4c moby: Add gcp platform to usage in moby run
Signed-off-by: Dave Tucker <dt@docker.com>
2017-04-06 17:10:04 +01:00
Dave Tucker
df1c66dd04 moby: Replace references to GCE with GCP
Signed-off-by: Dave Tucker <dt@docker.com>
2017-04-06 17:00:53 +01:00
Dave Tucker
bf7ab9f04c tools: rename mkimage-gce to mkimage-gcp
Also removes `mobyplatform` from the cmdline as this is no longer used

Signed-off-by: Dave Tucker <dt@docker.com>
2017-04-06 16:59:57 +01:00
Thomas Gazagnaire
bb536803be miragesdk: use the latest image dhcp-client image
Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-04-06 17:44:25 +02:00
Thomas Gazagnaire
f44e2ffbcb miragesdk: cleaner errors
Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-04-06 17:44:25 +02:00
Thomas Gazagnaire
fd447ee082 miragesdk: really allow to configure the DB path with the CLI
Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-04-06 17:44:24 +02:00
Thomas Gazagnaire
4437c4a23b miragesdk: add a config.json file for the calf
Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-04-06 17:44:24 +02:00
Thomas Gazagnaire
f5306b23ef miragesdk: fix the fork/exec init code and add a test
Make all the low-level init code synchronous to avoid weird blocks on `close`.
Also move the net and ctl file descriptor at the beginning of the fd space for
the calf.

The SDK also allow to spamn multiple exec calves, which will all have the same
fd map:

- 0: stdin  = /dev/null
- 1: stdout = pipe to parent stdout
- 2: stderr = pipe to parent stderr
- 3: net    = socketpair to parent "net" pipe
- 4: ctl    = socketpair to parent "ctl" pipe

Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-04-06 17:44:24 +02:00
Thomas Gazagnaire
3cec2b1f5e miragesdk: refactor the SDK
Expose a non-unix dependent flow-like API, so it is easier to test/use in a
unikernel.

Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-04-06 17:44:24 +02:00
Thomas Gazagnaire
a07952d4e6 miragesdk: shell out to ifconfig and ip to set the IP and routes
This forces us to bind mount /lib but will be replaced by calling the proper
bindings later on.

Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-04-06 17:44:24 +02:00
Thomas Gazagnaire
0938ae44f6 miragesdk: fail early on short read/write returning 0
Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-04-06 17:44:24 +02:00
Thomas Gazagnaire
25d3e42204 miragesdk: update init image
Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-04-06 17:44:24 +02:00
Justin Cormack
485452d9bd Merge pull request #1460 from justincormack/automount
Add a formatting container and persistent disk support for docker
2017-04-06 16:08:20 +01:00
Justin Cormack
3675eb17a5 Merge pull request #1518 from justincormack/dhcpcd-cleanup
Clean up dhcpcd container
2017-04-06 15:43:56 +01:00
Justin Cormack
008def2ed4 Merge pull request #1516 from justincormack/more-oci
Add more OCI features
2017-04-06 15:42:56 +01:00
Justin Cormack
0a030dc219 Clean up dhcpcd container
It is not necessary to bring up `eth0`, the program does it fine.

This means we can remove shell script, clean up build.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-04-06 15:32:22 +01:00
Justin Cormack
40cc6d8110 Merge pull request #1517 from samoht/make-qemu
Really fix `make qemu`
2017-04-06 15:14:22 +01:00
Thomas Gazagnaire
7f0761c5f1 Really fix make qemu
Previously, the cmdline file was never sent in the build context which
caused the script to pick the default options.

Also, when mulitple options are specified (not the default) the right
escaping needs to be used.

Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-04-06 16:05:35 +02:00
Justin Cormack
3244898919 Add more OCI features
- masked paths
- readonly paths
- allow attaching to existing namespaces, eg if bind mounted by a system container

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-04-06 15:05:08 +01:00
Justin Cormack
cf7b952995 Add persistent drive support to Docker container
This works and runs containers now, if you eg `runc exec` into it.
Needs a few tweaks for rlimits, but will pull and run containers.

Will integrate better with ssh/dev containers to make more usable.

For a simple test use
```
./bin/moby build examples/docker.yml
./bin/moby run hyperkit -disk-size 100 docker

```

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-04-06 14:25:42 +01:00
Justin Cormack
8bcb2c9e0e Add a formatting container
This is based on the code we used for Docker Editions, and
will format an external drive, to be used for example for
`/var` for Docker image persistence.

It does not `mount` the drive yet, as splitting format and mount
gives better modularity.

Example yaml fragment:
```
  - name: format
    image: "mobylinux/format:097d4f22b20f976b1f89d8f0b8a5d074d35b856c"
    binds:
     - /dev:/dev
    capabilities:
     - CAP_SYS_ADMIN
     - CAP_MKNOD
```

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-04-06 13:19:46 +01:00
Justin Cormack
3223897232 Merge pull request #1514 from rneugeba/cli-up
Improvements to the CLI
2017-04-06 13:01:58 +01:00
Justin Cormack
4a1b8a3e32 Merge pull request #1515 from samoht/make-qemu
Fix `make qemu`
2017-04-06 12:30:19 +01:00
Rolf Neugebauer
3e53aab4ce cli: Add a 'version' version
Pass version and git commit hash from the Makefile
into main.go. Add a 'version' subcommand to print
the information.

While at it also tweak the help output to only print the
command name and not the entire path.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-06 12:29:52 +01:00