Commit Graph

2503 Commits

Author SHA1 Message Date
Rolf Neugebauer
bba8054bba cli: Add support for multiple backends for "moby run"
- Move HyperKit code into a separate file. It should be compilable
  on all supported OSes now.
- Add a (optional) subcommand to "moby run" to select a backend
  i.e., "moby run hyperkit [options] [prefix]"
- On macOS the default is "hyperkit" so that:
  "moby run [options] [prefix]"
  just works
- Add enough command line parsing to make it easy to add new
  backends to the run command
Update help messages.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-30 18:59:07 +01:00
Rolf Neugebauer
c00c80740d vendor: Update hyperkit go bindings
The updated bindings primarily allow compilation on non-darwin
operating systems.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-30 17:00:07 +01:00
Rolf Neugebauer
3cdbe913f3 cli: Move "run" flag processing into the run implmentation
While at it also fix up the HyperKit run help message.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-30 16:00:06 +01:00
Rolf Neugebauer
2e1571d77e cli: Move "build" flag processing into build.go
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-30 15:59:52 +01:00
Justin Cormack
94b54c0ec8 Merge pull request #1412 from rneugeba/ebpf
projects: Move non-working ebpf bits under projects
2017-03-29 19:21:59 +02:00
Rolf Neugebauer
209f317fd1 projects: Move non-working ebpf bits under projects
The ebpf packages were somewhat neglected during the restructuring of the
the repository and currently do not build. They were also a little awkward
to use. So move them to ./projects for now until it matures.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-29 17:36:25 +01:00
Rolf Neugebauer
ce90e6290c Merge pull request #1411 from rneugeba/cleanup
more repository cleanup
2017-03-29 16:52:32 +01:00
Justin Cormack
fd8b217efc Merge pull request #1410 from rneugeba/aws
projects: Move AWS bits to projects until they are usable again
2017-03-29 17:40:33 +02:00
Rolf Neugebauer
534fd2940f base: Remove mksh
It does not seem to be used by anything here anymore.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-29 16:38:57 +01:00
Rolf Neugebauer
a319b1b1ef base: Move guestfs to tools.
Guestfs is not really a base package and is only used
byt other images in the ./tools directory. Move it there.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-29 16:37:59 +01:00
Rolf Neugebauer
ee536158a2 projects: Move AWS bits to projects until they are usable again
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-29 16:28:21 +01:00
Justin Cormack
c1780a92e1 Merge pull request #1404 from ijc25/enable-printk-time
Enable CONFIG_PRINTK_TIME
2017-03-29 17:05:44 +02:00
Justin Cormack
9b2d560515 Merge pull request #1409 from rneugeba/build
Add logging to "moby build"
2017-03-29 16:50:13 +02:00
Rolf Neugebauer
1e25622cac moby: Create custom formatter for Info() log events
This formatter strips the prefix from Info() events to
make the default output of "moby build" more readable.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-29 13:43:27 +01:00
Justin Cormack
7d89d68b61 Merge pull request #1408 from samoht/reorg
mirageSDK: re-organise the file hierarchy
2017-03-29 14:05:19 +02:00
Thomas Gazagnaire
47b9f08b16 miragesdk: move files around
The new hiearchy is:
- pkg/{init,mirage-compile}: additional Moby packages
- src/sdk -> the begining of the MirageOS SDK for Moby
- src/dhcp-client -> the code for the MirageOS dhcp-client service

Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-03-29 13:39:20 +02:00
Thomas Gazagnaire
2497528665 miragesdk: first cut of a MirageSDK
Today the SDK only contains helper code to create secure Moby services based on
MirageOS. Today the SDK only defines the architecture and the communication
pipes between the privileged service and the calf; the proper communication
API will be specified after we have a few more use-cases.

Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-03-29 12:34:48 +02:00
Thomas Gazagnaire
e18e7ebeb8 miragesdk: minor cleanups
Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-03-29 12:34:41 +02:00
Rolf Neugebauer
1367bd2cde moby: Add informational output to build
This adds log.Info() to the main steps of the "moby build"
process. By default the Info() output is shown to the user
so it provides some idea of progress and what is happening.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-29 10:53:18 +01:00
Rolf Neugebauer
ddb1b410a6 moby: Add debug logging to "moby build" code
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-29 10:25:28 +01:00
Rolf Neugebauer
da3dc16642 moby: Add verbose and quiet flags to moby commandline
These set the log level to Debug and Error. The default
log level is set to Info.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-29 10:25:28 +01:00
Rolf Neugebauer
616b69559d moby: Switch to use logrus instead of default logger
logrus offers better control over log-levels.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-29 10:25:28 +01:00
Anil Madhavapeddy
16b09454a5 Merge pull request #1407 from avsm/miragesdk-readme
miragesdk: more tweaks to README markdown
2017-03-28 22:20:18 +01:00
Justin Cormack
38327f2cb2 Merge pull request #1373 from avsm/okernel
kernel: add build config for the experimental "split kernel"
2017-03-28 23:11:12 +02:00
Justin Cormack
5c1b1e6eb6 Merge pull request #1397 from justincormack/more-docs
Architecture overview
2017-03-28 23:10:12 +02:00
Anil Madhavapeddy
738683af14 miragesdk: more tweaks to README markdown
Signed-off-by: Anil Madhavapeddy <anil@docker.com>
2017-03-28 22:07:15 +01:00
Anil Madhavapeddy
6b017c5524 Merge pull request #1406 from avsm/miragesdk-readme
Add projects/miragesdk README
2017-03-28 22:05:27 +01:00
Anil Madhavapeddy
b198765bc7 projects: remove double word typo in README.md
Signed-off-by: Anil Madhavapeddy <anil@docker.com>
2017-03-28 19:13:17 +01:00
Anil Madhavapeddy
018d82f70a miragesdk: add a README explaining the background of the project
Also link it to the roadmap and why-dhcp docs, and include review
comments from @yomimono

Signed-off-by: Anil Madhavapeddy <anil@docker.com>
2017-03-28 19:13:17 +01:00
Ian Campbell
656a598559 Enable CONFIG_PRINTK_TIME
This adds a timestamp to the start of the kernel command line. Like this (from
a random system I have lying around, line truncated by me):
[    0.000000] tsc: Detected 2665.038 MHz processor
[    0.000021] Calibrating delay loop (skipped), value calculated using tim...
[    0.000023] pid_max: default: 32768 minimum: 301
[    0.000041] ACPI: Core revision 20160831
[    0.003782] ACPI: 2 ACPI AML tables successfully acquired and loaded

This would be handy in relation to #1403.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-03-28 14:54:13 +01:00
Rolf Neugebauer
af3b4a1d24 Merge pull request #1400 from rneugeba/init
Fix console handling
2017-03-28 14:44:58 +01:00
Anil Madhavapeddy
306aa1781d okernel: Make README more Markdown friendly
Signed-off-by: Anil Madhavapeddy <anil@docker.com>
2017-03-28 14:32:06 +01:00
Anil Madhavapeddy
85b37697ac kernel: add build config for the experimental "split kernel"
The aim of the split kernel is to introduce a level of intra-kernel
protection into the kernel so that, amongst other things, it can
offer lifetime guarantees over kernel code and data integrity.

These patches only wire in the kernel build from a 4.11-rc3 snapshot.
The userspace tools will follow shortly.  Instructions came via
https://github.com/linux-okernel/linux-okernel (linux-okernel branch)
and via @edwards-n and @t-koulouris.

The build can be done via `cd projects/okernel && make`.

Signed-off-by: Anil Madhavapeddy <anil@docker.com>
2017-03-28 14:32:06 +01:00
Justin Cormack
05339fe60c Architecture overview
- also some tweaks in README.

fix #1394

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-03-28 15:29:34 +02:00
Rolf Neugebauer
a0a1710233 Merge pull request #1401 from rneugeba/kern-up
kernel: Update to 4.9.18/4.10.6/4.4.57
2017-03-28 14:28:27 +01:00
Justin Cormack
4a86053e3a Merge pull request #1395 from samoht/mirage
More progress on the Mirage SDK
2017-03-28 15:04:17 +02:00
Rolf Neugebauer
94613a3cd6 kernel: Update to 4.9.18/4.10.6/4.4.57
For 4.9.18 and 4.10.6 cherry-picked the VMBus leak fix
from Linus' tree instead of char-misc.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-28 13:43:21 +01:00
Thomas Gazagnaire
4e04b01928 miragesdk: re-org source code
Split the bits which can be re-used in other services (e.g. init dance
and the server-side of the control path). `main.ml` now only contains what
is specific to the DHCP logic (+ the /caf directory).

Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-03-28 14:42:02 +02:00
Rolf Neugebauer
273ff3a5b5 Merge pull request #1399 from samoht/typo
Fix typo in `moby run`
2017-03-28 12:01:47 +02:00
Rolf Neugebauer
7c254e1805 init: update yaml files with new init image
Also add tty0 as a console to default moby image

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-28 10:53:44 +01:00
Rolf Neugebauer
f854ed0fad init: Enable tty? as console
Enable tty0 and friends as console and start getty on them.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-28 10:46:58 +01:00
Thomas Gazagnaire
2ed0f4438b miragesdk: update TODO list
Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-03-28 11:11:17 +02:00
Thomas Gazagnaire
b5daec4831 miragesdk: use a custom BPF filter to allow the calf to get a DHCP lease
Plus a few more minor improvements:

- compile with jbuilder.
- start working on the control path.

Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-03-28 11:09:55 +02:00
Thomas Gazagnaire
549fdeb743 miragesdk: add strace in the init image
Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-03-28 11:09:50 +02:00
Thomas Gazagnaire
844ec5a578 miragesdk: remove dhccpd in the init container
Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-03-28 11:09:50 +02:00
Thomas Gazagnaire
c67e74c35a miragesdk: fork pkg/init to experiment with removal of dhcpcd
Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-03-28 11:09:50 +02:00
Thomas Gazagnaire
a02544ceef Fix typo in moby run
Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-03-28 11:08:28 +02:00
Justin Cormack
33aec98f0e Merge pull request #1396 from yomimono/why-dhcp
more documentation on why & what we're doing with dhcp
2017-03-27 19:00:12 +01:00
Justin Cormack
0425c0b562 Merge pull request #1392 from justincormack/kernel-nosyslinux
Remove syslinux from kernel build deps
2017-03-27 18:57:57 +01:00
Mindy Preston
ec87a338db more documentation on why & what we're doing with dhcp
Signed-off-by: Mindy Preston <mindy.preston@docker.com>
2017-03-27 11:55:51 -05:00