Commit Graph

976 Commits

Author SHA1 Message Date
Tycho Andersen
8c96d38ca3 wireguard tools: use ORG pattern as in other makefiles
Signed-off-by: Tycho Andersen <tycho@docker.com>
2017-05-26 15:45:41 -06:00
Tycho Andersen
2b8756ac16 ima-namespacing utils: use ORG pattern as in other makefiles
Signed-off-by: Tycho Andersen <tycho@docker.com>
2017-05-26 15:43:59 -06:00
Tycho Andersen
a53e251908 wireguard: update kernel build
We were pointing to the old mobylinux docker hub repo. Let's update the
kernel build to be the new style one.

Note that I didn't bump the kernel version or update the patches at all. We
should do this soon, but for the purposes of our probational channel PoC,
I'm leaving wireguard at the old version for now.

Signed-off-by: Tycho Andersen <tycho@docker.com>
2017-05-26 15:35:32 -06:00
Tycho Andersen
ddf333685c wireguard project: s/kernel-wireguard/kernel
-wireguard is redundant, and with a standardized name, we can merge patches
"automatically", for our probational channel.

Signed-off-by: Tycho Andersen <tycho@docker.com>
2017-05-26 15:35:32 -06:00
Tycho Andersen
d6d9a696ad wireguard project: move to new-style init
Rather than re-build the whole init, let's just include the wireguard tools
in a tools repo.

This also moves *most* of the stuff to new linuxkit infrastructure, instead
of the legacy mobylinux. And checks an item off the TODO list.

Signed-off-by: Tycho Andersen <tycho@docker.com>
2017-05-26 15:35:31 -06:00
Tycho Andersen
26d0dc20ec ima-namespace: use images that actually exist
We have a linuxkit/{kernel-ima,ima-utils} now, let's use the images that
are uploaded there!

Signed-off-by: Tycho Andersen <tycho@docker.com>
2017-05-26 14:48:39 -06:00
Tycho Andersen
06d7157e3c ima-namespace: only build utils if it doesn't exist
Signed-off-by: Tycho Andersen <tycho@docker.com>
2017-05-26 14:31:38 -06:00
Tycho Andersen
4a69a57557 ima namespace project: account for new -output in moby tool
The moby tool requires us to specify outputs on invocation. Let's do that.

Signed-off-by: Tycho Andersen <tycho@docker.com>
2017-05-26 14:27:59 -06:00
Rolf Neugebauer
9bdfcb5b12 Update YAML files with new packages, config, and trust data
- Update to packages using the Alpine 3.6 base image
- Remove config for packages which now supply it
- Update/add trust section

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-05-26 16:23:55 +01:00
Justin Cormack
00737bd859 Remove outputs from the yaml files
The latest version of the `moby` tool now requires that the output formats
be specified in the CLI not in the yaml file.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-05-26 13:55:06 +01:00
Justin Cormack
8d97247d8c Merge pull request #1877 from tych0/real-kernel-config-impl
kernel-config project: add a real implementation of kernel configs
2017-05-24 16:16:33 +01:00
Rolf Neugebauer
ae5dfc6d7d Update all YAML files to use the new binfmt, dhcpcd and rngd packages
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-05-23 15:55:40 +01:00
Tycho Andersen
ef4bd01de8 kernel-config project: add draft of kernel configs
The kernel configs themselves are stored as diffs of what we want vs. each
version's defconfig.

Thus, things like e.g. CONFIG_DEVKMEM drop out after it was made
non-default. The implication of this is (I hope) that as upstream adopts
security features, our delta can shrink (or more realistically, only
include the next-next gen features).

Signed-off-by: Tycho Andersen <tycho@docker.com>
2017-05-22 17:51:09 -06:00
Tycho Andersen
d6269d8504 kernel-config project: add kcimport script
This is the script I used with [1] to generate the config diffs and
separate out the arch specific bits. Included mostly just so people can
play around with it if they want to generate their own diffs.

[1]: https://github.com/ulfalizer/Kconfiglib

Signed-off-by: Tycho Andersen <tycho@docker.com>
2017-05-22 16:58:50 -06:00
Tycho Andersen
8a140cefd8 projects: update list of kernels in kernel-config
Signed-off-by: Tycho Andersen <tycho@docker.com>
2017-05-22 16:58:50 -06:00
Tycho Andersen
ee4d74aca6 projects: be more clever about merging kernel config
In particular, let's start with a defconfig and edit it, rather than try to
generate the config entirely from our own diff.

Signed-off-by: Tycho Andersen <tycho@docker.com>
2017-05-22 16:58:50 -06:00
Tycho Andersen
e60f9d3946 projects: run check-kernel-config.sh at kernel build time
Signed-off-by: Tycho Andersen <tycho@docker.com>
2017-05-22 16:58:50 -06:00
Rolf Neugebauer
a6d834ddf0 Merge pull request #1865 from justincormack/go-compile
more Go compile fixes
2017-05-21 11:18:45 +01:00
Rolf Neugebauer
4377ae3209 Merge pull request #1861 from justincormack/containerd-build
Update containerd
2017-05-21 11:13:07 +01:00
Justin Cormack
e52bf2f745 Update sysctl and sysfs in yaml files
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-05-20 11:16:48 +01:00
Justin Cormack
702ad5d9d9 Update git hashes for sysctl
And remove all the config options as they are now in the label.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-05-19 22:05:15 +01:00
Justin Cormack
a3ea4646e5 Update containerd in yaml files
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-05-19 11:52:12 +01:00
Justin Cormack
ac31862c42 Merge pull request #1857 from tych0/add-ima-project
projects: add IMA namespacing project
2017-05-18 22:12:02 +01:00
Tycho Andersen
3fd6337a45 ima: use ima-utils package instead of new init
Signed-off-by: Tycho Andersen <tycho@docker.com>
2017-05-18 13:44:04 -06:00
Tycho Andersen
4b29c738e0 projects: add a blurb about ima namespacing
Signed-off-by: Tycho Andersen <tycho@docker.com>
2017-05-18 13:43:59 -06:00
Tycho Andersen
d80e880f28 projects: add IMA namespacing project
This is a project with a v1 of the IMA namespacing patches. See the readme
for details on use.

Signed-off-by: Tycho Andersen <tycho@docker.com>
2017-05-18 12:25:07 -06:00
Rolf Neugebauer
6bea56c185 Update all YAML files to use the new packages
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-05-18 18:55:22 +01:00
Justin Cormack
5eff65a688 Merge pull request #1818 from jadametz/fix-1817
Specifies root user in projects/kubernetes ssh_into_kubelet script
2017-05-13 10:21:56 +01:00
Jesse Adametz
547e2dca95 Specifies root user in projects/kubernetes ssh_into_kubelet script
Signed-off-by: Jesse Adametz <jesseadametz@gmail.com>
2017-05-12 15:17:26 -07:00
Justin Cormack
60500940ab Merge pull request #1816 from ijc25/swarmd
projects/swarmd: Updates
2017-05-12 23:06:21 +01:00
Jesse Adametz
2ece5ac28a Add rm flag to projects/kubernetes ssh script
Signed-off-by: Jesse Adametz <jesseadametz@gmail.com>
2017-05-12 14:25:18 -07:00
Ian Campbell
0fb3d1c6e9 Updated swarmd commit
Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-05-12 19:48:52 +01:00
Ian Campbell
a28d34f18c Modernise swarmd pkg build
Uses multi stage builds and the tree-sh as tag.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-05-12 19:48:01 +01:00
Ian Campbell
5eee4c0607 pkg/runc: WORKDIR as first item in second stage
Works around https://github.com/moby/moby/issues/33176 and fixes #1807.

Updated al users of linuxkit/runc:2649198589ef0020d99f613adaeda45ce0093a38 to
this new build.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-05-12 19:23:27 +01:00
Ian Campbell
1b31a0ea3b swarmd: Mount persistent disk on /var/lib/swarmd
Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-05-12 19:11:45 +01:00
Ian Campbell
14b0c00133 swarmd: Switch to oneshot DHCP
Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-05-12 19:11:45 +01:00
Ian Campbell
6c87493ec5 swarmd: Add metadata service
Also update other users of linuxkit/metadata to the newest build while I'm
here.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-05-12 19:10:49 +01:00
Ian Campbell
5b0f92fb9e swarmd: Update to latest images (from linuxkit.yml)
Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-05-12 19:02:25 +01:00
Ian Campbell
f5732b2cb5 swarmd: Add ntpd
Follows https://github.com/docker/moby/pull/1576

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-05-12 19:02:25 +01:00
Ian Campbell
8e90e67eea swarmd: host pid namespace for CNI access to /proc/PID/ns/net
Since containers are spawned by containerd (which is in the host PID namespace)
and not in the swarmd container's namespace.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-05-12 19:02:23 +01:00
Justin Cormack
6a5f8099a4 Remove extra files from init
fix #1807

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-05-12 15:36:13 +01:00
Magnus Skjegstad
1da0b14e23 logging: update example to use latest init/containerd
Signed-off-by: Magnus Skjegstad <magnus@skjegstad.com>
2017-05-11 21:08:23 +02:00
Magnus Skjegstad
37ddf42b5b logging: add log capture to onboot and service startup
Signed-off-by: Magnus Skjegstad <magnus@skjegstad.com>
2017-05-11 21:07:58 +02:00
Magnus Skjegstad
4a9a5afd03 logging: update init scripts to latest version with containerd
Signed-off-by: Magnus Skjegstad <magnus@skjegstad.com>
2017-05-11 20:59:55 +02:00
Justin Cormack
66d6d3a6e3 Update containers to use containerd
Now the issues seem fixed, switch over to containerd.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-05-11 11:25:06 +01:00
Justin Cormack
b14f8a2337 Update yaml files with new init
Note these are only the ones using the `containerd` based `init` as
the `runc` ones are still using an old one.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-05-10 11:39:29 +01:00
Rolf Neugebauer
477a56432b Merge pull request #1787 from tych0/kernel-config
projects: add a project that re-works how we manage kernel config
2017-05-09 20:56:53 +01:00
Tycho Andersen
1c10661069 collapse kernel build back into one file
Signed-off-by: Tycho Andersen <tycho@docker.com>
2017-05-09 11:13:32 -06:00
Justin Cormack
9ca3ba489a Update yaml files to new Docker CE
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-05-09 11:12:39 +01:00
Justin Cormack
61bbbf0808 Change containerd and runc to use multistage builds from new Alpine base
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-05-08 22:37:59 +01:00
Tycho Andersen
9cd2f434cf projects: remove unused configs from kernel-config
Signed-off-by: Tycho Andersen <tycho@docker.com>
2017-05-08 12:06:25 -06:00
Tycho Andersen
42b6b44fa9 projects: split kernel-config build into three phases
...and add straw man implementations of kernel_config.base and
kernel_config.x86 as examples.

First, splitting the build: to avoid duplication, we split the build into
three parts: a "source" stage, a "config" stage, and a "build" stage. The
"source" stage allows us to use a cached image, so we don't have to
re-download the kernel source every time. The "config" step applies our
patches and generates (and checks) the kernel config. I've left this as a
separate step for now so that we can build just an image with a config in
it, without having to ^C the build. However there's no real reason it needs
to be a separate step, assuming that this kernel config design is
acceptable. The third step is the actual kernel build.

Then there is kernel config management: the bulk of it occurs in
makeconfig.sh, with the idea being that we can specify base, arch, and
version specific config options as necessary.

The config files themselves are lists of options (both positive and
negative). We include the negative options, because we want to explicitly
turn off things that are on in the default config (e.g. CONFIG_USELIB), and
it seems cleaner to do things this way then to have some sort of negative
options list.

The options files are sorted with the default behavior of the "sort"
command, which ignores comment lines, meaning that negative options and
positive options are inline with each other. I don't have a strong opinion
on whether or not to group all negative options, or whether this default
behavior makes sense, so I just left it.

Finally, obviously the .base and .x86 files are incomplete. I mostly
selected a few options with interesting dependencies or special issues
(CONFIG_PANIC_ON_OOPS) with how we manage things, so as to demo how
everything would work. It's not really clear to me that there's a good way
to generate e.g. kernel_config.base, without a lot of painstaking work
(which I'm happy to do if we agree this is a good approach).

Signed-off-by: Tycho Andersen <tycho@docker.com>
2017-05-08 12:06:25 -06:00
Tycho Andersen
1e0021d969 projects: add kernel-config project
This is just a direct import of the current kernel/ directory, with a
slight splitting up of the dockerfiles to build a kernel-source and kernel
image.

Signed-off-by: Tycho Andersen <tycho@docker.com>
2017-05-08 12:06:25 -06:00
Rolf Neugebauer
423957cfef Update YAML files to new packages
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-05-08 16:49:39 +01:00
Rolf Neugebauer
21f1646ce2 Update YAML files with new package hashes
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-05-04 22:27:59 +01:00
Nathan Dautenhahn
f8f9ed9965 Spelling error: Dautenhan -> Dautenhahn
Signed-off-by: Nathan Dautenhahn <ndd@cis.upenn.edu>
2017-05-03 14:04:29 -04:00
Justin Cormack
3bd53067fb Update yaml files with new ca-certificates
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-05-03 16:43:24 +01:00
Ian Campbell
bb50dd9781 projects/kubernetes: Allow linuxkit to pick default backend
Drop `hyperkit` from the `linuxkit run` invocation, thus causing the linuxkit
tool to pick the platform's default backend (which is qemu on my Linux system,
which works better than hyperkit in this environment).

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-05-03 09:11:32 +01:00
Justin Cormack
dae0e4efae Fix typo "ndodev"
Not sure when this arrived but it was stopping anything running.
Appears not to be in the older test `init` containers.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-04-27 18:01:05 +01:00
Justin Cormack
713046e158 Update ca-certificates to be based on Alpine and use nested build
We were using Debian but Alpine more consistent. Use nested build.

Currently extract the hash in a nasty way but this can be fixed later
when we switch over hashing method.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-04-26 15:24:26 +01:00
Justin Cormack
98159fd13f Merge pull request #1708 from rneugeba/binfmt
Move binfmt to a multi-stage build
2017-04-26 12:19:09 +01:00
Rolf Neugebauer
115b09faad Merge pull request #1704 from ijc25/fix-unique-fallback-hostname
Switch fallback hostname to linuxkit-* from moby-*
2017-04-26 09:54:19 +01:00
Tiago Pires
60c632dc35 Use linuxkit on boot scripts instead of moby
Fixes #1711

Signed-off-by: Tiago Pires <tandrepires@gmail.com>
2017-04-25 23:13:51 +01:00
Rolf Neugebauer
cb732e7f80 YAML: Update files to use the new binfmt package
Checked that /proc/sys/fs/binfmt_misc/status is enabled for
architectures specified.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-25 15:55:10 +01:00
Ian Campbell
20cfa2af2c Switch fallback hostname to linuxkit-* from moby-*
This was missed when things were renamed.

The intention with this code was (apparently) to provide a (pseudo)unique
hostname in the case where something more specific was not provided (e.g. by
DHCP). Make this a little clearer by using '(none)' rather than 'linuxkit' as
the default, in the normal case this will be overwritten by something more
specific and if it isn't we will change it to something somewhat unique derived
from the MAC address (as before). nb: '(none)' is already used by Debian so I
think it is a safe choice as the sentinel value.

The use of both CONFIG_DEFAULT_HOSTNAME and the explicit /etc/hostname from
mkimage.sh is likely to be redundant in some cases, but neither seems to
completely cover all cases so keep both.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-04-25 14:09:38 +01:00
Rolf Neugebauer
77941b7216 demo: Rename ./project/demo to ./project/etcd
With redis-os and README documentation moved elsewhere,
the demo directory only contains the etcd demo setup.
Rename it.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-25 13:17:05 +01:00
Rolf Neugebauer
db6d3d7ed2 docs: Consolidate mac tips & tricks in ./docs/mac.md
We had serveral files with instructions, in particular for
networking, for macOS/Docker for Mac. Let's have just one place.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-25 13:17:04 +01:00
Rolf Neugebauer
855f8f2722 demo: Move redis example to ./examples
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-25 13:17:04 +01:00
Theo Koulouris
f1508901f4 Updated okernel README.md
Signed-off-by: Theo Koulouris <theo.koulouris@hpe.com>
2017-04-20 15:52:27 +01:00
Theo Koulouris
19e0433637 Updated references to 'linuxkit', added 'examples' subdirectory, improved build files
Signed-off-by: Theo Koulouris <theo.koulouris@hpe.com>
2017-04-20 15:26:00 +01:00
Rolf Neugebauer
fc1e7e4ca5 Merge pull request #1663 from technolo-g/k8s_shell_to_ash
Migrate the Kubernetes shell to ash
2017-04-20 08:58:59 -05:00
Rolf Neugebauer
be47b771d0 Merge pull request #1669 from rneugeba/demo-up
Update DockerCon 2017 demo files
2017-04-19 18:37:35 -05:00
Rolf Neugebauer
722ab1848d demo: Update READMEs
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2017-04-19 18:09:07 -05:00
Rolf Neugebauer
ff1279d9b0 demo: Use redis instead of nginx
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-19 14:58:27 -05:00
Rolf Neugebauer
238436616d demo: Add prometheus server configuration
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-19 14:58:27 -05:00
Rolf Neugebauer
c854d58ca4 demo: Update etcd
- Add prometheus node monitor
- Make the hyperkit VMs slightly bigger
- Add GCP upload
- Use env vars in infrakit startup script

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-19 14:58:27 -05:00
Rolf Neugebauer
846c96384f demo: Update nginx build
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-19 14:36:09 -05:00
Mindy Preston
f74d9eaa7d typo fixes
Signed-off-by: Mindy Preston <mindy.preston@docker.com>
2017-04-19 13:52:18 -05:00
Matt Bajor
7686c1a153 Migrate the Kubernetes shell to ash
The Kubernetes images have been migrated to Alpine Linux which
does not include bash by default.

Signed-off-by: Matt Bajor <matt@notevenremotelydorky.com>
2017-04-18 19:34:06 -05:00
Magnus Skjegstad
0511fdb431 Add logging project
Adds a logging daemon that collects logs in a ring buffer in a runc container.
The tools logwrite and logread can be used to read/write logs. The logging
daemon can be sent open file descriptors that will be read and included
in the logs.

Modifies init to start the daemon and use logwrite to capture logs from runc.

Signed-off-by: Magnus Skjegstad <magnus@skjegstad.com>
2017-04-16 21:08:57 +02:00
Ilya Dmitrichenko
e5faae5c6e Remove tini, it is not needed in host PID namespace
Signed-off-by: Ilya Dmitrichenko <errordeveloper@gmail.com>
2017-04-16 10:42:37 -05:00
Ilya Dmitrichenko
81e8c39203 Rebase Kubernetes images on Apline
Signed-off-by: Ilya Dmitrichenko <errordeveloper@gmail.com>
2017-04-16 10:31:11 -05:00
Ilya Dmitrichenko
37f2375c37 Rename images
Signed-off-by: Ilya Dmitrichenko <errordeveloper@gmail.com>
2017-04-16 07:13:38 -05:00
Rolf Neugebauer
5c1340b13d demo: Remove sysctl container from nginx sample
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-15 17:51:15 -05:00
Rolf Neugebauer
8eb39e6b9e demo: Rename intro into my-nginx
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-15 17:15:11 -05:00
Rolf Neugebauer
cbbd9b44ee demo: add a env file for setting up the environment for the demo
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-15 17:13:32 -05:00
Rolf Neugebauer
f69bab3451 demo: Clean up the etcd directory, update docs
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-15 11:05:20 -05:00
Rolf Neugebauer
49ab5bc719 demo: Minor tweak to the demo setup
- Specify the specific version of nginx
- Reduce memory for etcd cluster nodes

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-15 09:34:37 -05:00
Rolf Neugebauer
38863774e6 demo: Update to use containerd
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-14 19:20:13 -05:00
Rolf Neugebauer
e374cb3543 demo: Update etcd demo to use linuxkit
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-14 11:57:24 -05:00
Rolf Neugebauer
8462e34d6e demo: Update README
latest DfM has all the bits you need...

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-14 11:57:24 -05:00
Rolf Neugebauer
d526707240 demo: Switch intro to use linuxkit
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-14 11:57:24 -05:00
Justin Cormack
72c3f9cfa2 More renames to LinuxKit
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-04-14 11:47:24 -05:00
Thomas Gazagnaire
94583013aa miragesdk: simplify the build by using multi-stage Dockerfile
Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-04-14 17:05:36 +02:00
Justin Cormack
ea39f0b87d Merge pull request #1614 from riyazdf/ineffassign-bump
Bump go-compile with ineffassign
2017-04-14 07:30:10 -05:00
Jose Carlos Venegas Munoz
b485f729e8 clear-containers: Add script to launch base OS and kernel
This commit adds the script qemu.sh that will be used in a
docker container (created with Dockerfile).

This script will crate qemu instance to lauch a Clear Container
base OS with a kernel generated with moby.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2017-04-14 09:26:10 +00:00
Jose Carlos Venegas Munoz
f2569c0e75 clear-containers: Enable kernel security options used by moby
Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2017-04-14 09:26:10 +00:00
Jose Carlos Venegas Munoz
844f058689 clear-containers: enable PAGE POISONING ZERO
Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2017-04-14 09:26:04 +00:00
Jose Carlos Venegas Munoz
2b1fb70f35 projects: Add Clear Containers intial support
Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2017-04-14 09:23:37 +00:00
Riyaz Faizullabhoy
9609010ea8 Also update ymls
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-04-13 09:17:14 -07:00
Rolf Neugebauer
85d6492d5d kernel: Use linuxkit images for compilingi/packaging the kernel
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-12 21:28:17 +01:00
Rolf Neugebauer
36749ea5c4 build: Switch using c-compile from linuxkit hub org
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-12 21:28:17 +01:00
Justin Cormack
c5c6c26b3f Merge pull request #1610 from samoht/sdk-roadmp
miragesdk: update roadmap
2017-04-12 19:40:47 +01:00
Thomas Gazagnaire
1e83a9f9b4 miragesdk: update roadmap
Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-04-12 17:47:42 +02:00
Rolf Neugebauer
a1ce71cd0a Update YAML files with new metadata package
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-12 16:20:41 +01:00
Justin Cormack
45c2921c7c Merge pull request #1606 from rneugeba/meta2
Improve/Fix metadata package and use it
2017-04-12 15:55:54 +01:00
Justin Cormack
c01d0e2777 Merge pull request #1587 from errordeveloper/kubernetes
Kubernetes with Weave CNI networking
2017-04-12 15:50:04 +01:00
Rolf Neugebauer
0cd867d315 demo: Update etcd YAML to new metadata package
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-12 15:42:48 +01:00
Thomas Gazagnaire
238879f2d4 miragesdk: add temporary auto-gen files
The capnp compiler is not yet available in alpine.

Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-04-12 16:29:49 +02:00
Thomas Gazagnaire
a0546bba88 miragesdk: use cap-n-proto instead of custom binary protocol for calf/priv API
Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-04-12 16:29:49 +02:00
Ilya Dmitrichenko
385f1a6634 Use LinuxKit
Signed-off-by: Ilya Dmitrichenko <errordeveloper@gmail.com>
2017-04-12 15:08:16 +01:00
Ilya Dmitrichenko
340e97ae53 Kubernetes with Weave CNI networking
For the time being I've decided to exploit shared mounts to make
`/opt/cni` and `/etc/cni` work as expected. We need these directories
to appear writable on the host, and allow Weave Net pod to bind-mount
out them in order to install plugin binaries, and allow for vanilla
CNI plugins to be also accessible to kubelet.

Signed-off-by: Ilya Dmitrichenko <errordeveloper@gmail.com>
2017-04-12 15:02:03 +01:00
Thomas Gazagnaire
0a18bf3a00 miragesdk: update to latest base init
Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-04-12 15:56:29 +02:00
Justin Cormack
e4213f1582 Merge pull request #1602 from justincormack/slash-rshared
Make / rshared
2017-04-12 13:39:31 +01:00
Thomas Gazagnaire
2cc09805c9 Merge pull request #1543 from samoht/mac
miragesdk: do not generate a random mac
2017-04-12 14:29:19 +02:00
Justin Cormack
3c326bebdf Make / rshared
Previously only `/var` was `rshared` but some people need to share
mounts in `/opt` etc so let us make everything `rshared` for now.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-04-12 13:10:46 +01:00
Rolf Neugebauer
b0629176ab examples: Don't use a file section if you don't need it
Exception is ./moby.yaml where it serves as an example.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-12 12:26:30 +01:00
Rolf Neugebauer
a59e24b4fa example: Don't use the full @sha25t version of images
The sha1 tag should be sufficient to uniquely identify the image
and the sha256 versions are just very long...

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-12 12:24:02 +01:00
Thomas Gazagnaire
dc4ff8accd miragesdk: update DHCP client example to use latest images
Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-04-12 12:09:30 +02:00
Thomas Gazagnaire
2b0009ee06 miragesdk: be a bit less verbose in debug mode
It's not very interesting to see the forwarded stdout/stderr messages as
they will end-up being printed anyway.

Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-04-12 12:08:32 +02:00
Thomas Gazagnaire
b18d50b5e4 miragesdk: rebase init pkg to catch up with upstream changes
Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-04-12 12:06:50 +02:00
Thomas Gazagnaire
396ffabc41 miragesdk: tune down some debug code
Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-04-12 11:04:33 +02:00
Thomas Gazagnaire
df9833ed68 miragesdk: add missing Sdk.Net files
Probably my inconscient which refused to show the world these hacks.

Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-04-12 11:04:16 +02:00
Thomas Gazagnaire
abe96b0447 miragesdk: use the interface's MAC address instead of using a random one
The priv container populate the `/mac` key on startup, that the calf can
then read.

Also add more fine-grained control over read/write delete capabilities attached
to the routes, e.g. the calf can read /mac but not write to it.

Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-04-12 11:04:16 +02:00
Thomas Gazagnaire
0d7e584e32 miragesdk: remove dead-code and code repetition
Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-04-12 11:04:16 +02:00
Thomas Gazagnaire
95d362ab7e miragesdk: clean error handling for Sdk.Ctl.Client
Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-04-12 11:04:16 +02:00
Thomas Gazagnaire
703657a54f miragesdk: update Dockerfiles
Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-04-12 11:04:16 +02:00
Justin Cormack
f47bc385c6 Merge pull request #1588 from rneugeba/meta-up
demo: Switch etcd to use metadata
2017-04-11 20:08:16 +01:00
Rolf Neugebauer
049993fc3d demo: Switch etcd to use metadata
Also add more services.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-11 19:10:32 +01:00
Justin Cormack
25f8036bc4 Merge pull request #1585 from errordeveloper/kubernetes
Basic multi-node Kubernetes cluster
2017-04-11 16:17:31 +01:00
Ilya Dmitrichenko
52ba02b9c8 Basic multi-node support
Signed-off-by: Ilya Dmitrichenko <errordeveloper@gmail.com>
2017-04-11 15:42:57 +01:00
Justin Cormack
2c7628c101 Support dhcpcd in one shot mode as well
This is needed for cloud environments that want to get their metadata in
the onboot phase over the network.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-04-11 14:58:57 +01:00
Ilya Dmitrichenko
89b8021f62 Create /var/lib/kubelet at runtime, after /var is mounted
Signed-off-by: Ilya Dmitrichenko <errordeveloper@gmail.com>
2017-04-11 13:59:38 +01:00
Ilya Dmitrichenko
7bcca5cf7f Sync with examples/doecker.yml
Signed-off-by: Ilya Dmitrichenko <errordeveloper@gmail.com>
2017-04-11 13:59:37 +01:00
Ilya Dmitrichenko
73a29022ce Cache Kubernetes images, update image names, add boot-master.sh
Signed-off-by: Ilya Dmitrichenko <errordeveloper@gmail.com>
2017-04-11 13:59:30 +01:00
Justin Cormack
64933fa292 Merge pull request #1572 from errordeveloper/kubernetes
Working single-node Kubernetes setup
2017-04-11 09:56:35 +01:00
Ilya Dmitrichenko
85b54d5717 Fix shared mounts – working single-node Kubernetes setup
Signed-off-by: Ilya Dmitrichenko <errordeveloper@gmail.com>
2017-04-11 09:43:07 +01:00
Riyaz Faizullabhoy
5f90faeafa init: update main moby example and tests
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-04-10 11:59:23 -07:00
Ilya Dmitrichenko
91c4278c77 Use new modular init containers, flatten kubelet image
Signed-off-by: Ilya Dmitrichenko <errordeveloper@gmail.com>
2017-04-10 17:43:12 +01:00
Justin Cormack
84034a0370 Merge pull request #1570 from justincormack/containerd-toml-default
Use the real default containerd toml config
2017-04-10 17:32:36 +01:00
Justin Cormack
bc23fde1c2 Use the real default containerd toml config
Rather than an empty one.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-04-10 16:25:13 +01:00
Rolf Neugebauer
34af633552 infrakit: rename the Moby property to kernel+initrd
The infrakit plugin is not specific to Moby and should be able
to boot other Linux systems as long as a kernel image and
initial RAM disk are supplied. Reflect this in the property
passed to the plugin.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-10 16:12:08 +01:00
Justin Cormack
bd5780e46d Merge pull request #1565 from justincormack/var-rework-again
Rework how /var is mounted
2017-04-10 14:27:40 +01:00
Rolf Neugebauer
29ad037125 demo: Remove jq and sfdisk from etcd image
They are no longer needed as the mounting happens in the
mount container.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-10 11:41:17 +01:00
Justin Cormack
9ee52aa966 Rework how /var is mounted
Instead of mounting a new filesystem, revert to doing a `rw` bind.

However do not make `/` `rshared`, just `/var` as that is where we expect
filesystems to be mounted for persistence. Also only make the actual
container rootfs writeable, not the whole directory.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-04-10 11:28:00 +01:00
Justin Cormack
ce70127028 Merge pull request #1561 from riyazdf/landlock-makefile-dockerfile
Landlock: kernel build materials and example yml
2017-04-10 10:48:37 +01:00
Rolf Neugebauer
baab60ea87 demo: Update etcd to use the new mount container
Rolling updates still work

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-09 20:50:10 +01:00
Riyaz Faizullabhoy
3aead78f36 landlock: example yml
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-04-09 12:09:06 -07:00
Riyaz Faizullabhoy
b95ca1b358 landlock: gitignore for kernel build
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-04-09 12:08:53 -07:00
Riyaz Faizullabhoy
f89bd06edb landlock: Makefile with kernel-landlock name
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-04-09 12:07:10 -07:00
Riyaz Faizullabhoy
1e9495e609 landlock: Dockerfile
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-04-09 12:06:48 -07:00
Mickaël Salaün
296a0f4560 landlock: Backport patches from the sixth series
Backport from Linux v4.11-rc3-812-gc6bf33827b7d to Linux 4.9.20:
https://github.com/landlock-lsm/linux/commits/landlock-v6-linux-v4.9.20

Do not include documentation nor tests.

See built documentation here:
https://landlock-lsm.github.io/linux-doc/landlock-v6/security/landlock/index.html

Signed-off-by: Mickaël Salaün <mic@digikod.net>
Link: https://lkml.kernel.org/r/20170328234650.19695-1-mic@digikod.net
2017-04-09 19:45:24 +02:00
Mickaël Salaün
792238f5cb landlock: Add kernel_config{,.debug}
Based on kernel_config{,.debug} from commit
724561bf69

Enable Landlock and userland sandbox example:
* CONFIG_SECURITY_LANDLOCK=y
* CONFIG_SAMPLES=y

Signed-off-by: Mickaël Salaün <mic@digikod.net>
2017-04-09 19:45:24 +02:00
Mickaël Salaün
c6b3c62b83 landlock: Link to project
Signed-off-by: Mickaël Salaün <mic@digikod.net>
2017-04-09 19:45:24 +02:00
Rolf Neugebauer
733e8f3307 config: Remove unused binfmt container
A few YAML files include the binfmt container, where it's not really
needed. Remove it to make the samples simpler.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-09 10:09:00 +01:00
Riyaz Faizullabhoy
9effac329a landlock: start project, add roadmap doc
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-04-08 20:05:39 -07:00
Justin Cormack
fb5d6a8fad Add an (empty) config file for containerd
It needs one now.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-04-08 21:38:31 +01:00
Rolf Neugebauer
875cb565e3 demo: Update etcd README
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-08 20:38:53 +01:00
Rolf Neugebauer
31a4156686 demo: Add formatting and mounting to etcd image
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-08 20:38:53 +01:00
Rolf Neugebauer
a3d20abdb6 demo: Add a disk to the etcd image
etcd works better with a persistent storage. So configure a
disk and add the formatting container to the image.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-08 20:38:53 +01:00
Rolf Neugebauer
6407cf360b demo: Update YAML files to new init section layout
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-08 20:37:17 +01:00
Rolf Neugebauer
b5dd0315e2 demo: Make sure the infrakit 'cli' directory exists
Otherwise there is a warning on first use.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-08 20:32:25 +01:00
Justin Cormack
eb22d6909f system → onboot daemon → services
As suggested by @shykes these are clearer

- onboot for things that are run at boot time to completion
- services for persistent services

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-04-08 16:56:47 +01:00
Ilya Dmitrichenko
54835a1d67 Fix typo
Signed-off-by: Ilya Dmitrichenko <errordeveloper@gmail.com>
2017-04-08 05:53:31 +01:00
Ilya Dmitrichenko
12d6e38b48 Use directory: true instead fo writing a dummy file
Signed-off-by: Ilya Dmitrichenko <errordeveloper@gmail.com>
2017-04-08 05:53:22 +01:00
Rolf Neugebauer
4520daa753 demo: Updated docs and added socat forwarding container
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-07 15:43:03 +01:00
Rolf Neugebauer
57f41c4b5a demo: Update YAMLS files
New init for RO filesystem, updated DHCPD

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-07 15:43:03 +01:00
Rolf Neugebauer
f718d4195f demo: Add URL to modified VPNKit
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-07 15:43:03 +01:00
Rolf Neugebauer
f0961b8897 demo: Add a dockerfile to run etcdctl agains the local cluster
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-07 15:43:03 +01:00
Rolf Neugebauer
c660ca5ac4 demo: Create a cluster of 5 etcd daemons
Also tweak the shell script a little and give the local and GCP
infrakit group different names.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-07 15:43:03 +01:00
Rolf Neugebauer
9878cabd1e demo: Add script to start infrakit
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-07 15:43:02 +01:00
Justin Cormack
d9faecdee9 Make init accept a list of images not just a single one.
fix #1527

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-04-07 14:25:28 +01:00
Thomas Gazagnaire
81debfcd74 miragesdk: update README with moby build/run instructions
Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-04-07 12:13:06 +02:00
Thomas Gazagnaire
914d27bed9 miragesdk: remove CAP_SYS_PTRACE
Since https://github.com/opencontainers/runc/pull/774 we don't need this anymore.

Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-04-07 12:10:35 +02:00
Thomas Gazagnaire
d289de6416 miragesdk: update to latest runc
Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-04-07 12:10:35 +02: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
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
Ilya Dmitrichenko
961acc4c21 Working Kubernetes master
Signed-off-by: Ilya Dmitrichenko <errordeveloper@gmail.com>
2017-04-07 10:09:10 +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
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
Ilya Dmitrichenko
e68e42c0fa WIP Kubernetes
Signed-off-by: Ilya Dmitrichenko <errordeveloper@gmail.com>
2017-04-06 17:57:48 +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
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
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
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
6917f6d23a Merge pull request #1488 from t-koulouris/master
[WIP] Support launching containers in outer-kernel mode for moby-okernel demo
2017-04-06 11:48:06 +01:00
Rolf Neugebauer
fdee4a099c demo: Fix JSON file
This was corrupted broken by a previous commit.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-06 11:32:26 +01:00
Ian Campbell
2b54e18f9f Drop unnecessary use of start-stop-daemon with containerd.
Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-04-06 09:34:38 +01:00
Ian Campbell
8270bdfe33 Use exec in a couple of places to avoid needless lingering /bin/sh processes
```
$ apk -U add procps
$ ps xf
    1 ?        Ss     0:05 /sbin/init
  357 ?        Ss     0:00 /bin/sh /etc/init.d/containerd
  359 ?        Sl     0:00  \_ /usr/bin/containerd
  360 ?        Ss     0:00 /bin/sh /etc/init.d/containers
  432 ?        Sl     0:00  \_ /usr/bin/runc run --bundle /containers/daemon/swa
  466 ?        Ssl    0:00  |   \_ /usr/bin/swarmd --containerd-addr=/run/contai
  427 ?        Sl     0:00  \_ /usr/bin/runc run --bundle /containers/daemon/dhc
  457 ?        Ss     0:00  |   \_ bin/sh /usr/local/bin/start_dhcpcd.sh
  474 ?        S      0:00  |       \_ /sbin/dhcpcd --nobackground
  429 ?        Sl     0:00  \_ /usr/bin/runc run --bundle /containers/daemon/rng
  576 ?        Ss     0:00      \_ /bin/tini /usr/sbin/rngd -f
  580 ?        S      0:00          \_ /usr/sbin/rngd -f
```

becomes

```
$ ps xf
    1 ?        Ss     0:06 /sbin/init
  358 ?        Ss     0:00 /bin/sh /etc/init.d/containers
  426 ?        Sl     0:00  \_ /usr/bin/runc run --bundle /containers/daemon/dhc
  458 ?        Ss     0:00  |   \_ /sbin/dhcpcd --nobackground
  431 ?        Sl     0:00  \_ /usr/bin/runc run --bundle /containers/daemon/swa
  460 ?        Ssl    0:00  |   \_ /usr/bin/swarmd --containerd-addr=/run/contai
  428 ?        Sl     0:00  \_ /usr/bin/runc run --bundle /containers/daemon/rng
  574 ?        Ss     0:00      \_ /bin/tini /usr/sbin/rngd -f
  578 ?        S      0:00          \_ /usr/sbin/rngd -f
  356 ?        Ssl    0:00 /usr/bin/containerd

```

Specifically these are gone:
  357 ?        Ss     0:00 /bin/sh /etc/init.d/containerd
  457 ?        Ss     0:00  |   \_ bin/sh /usr/local/bin/start_dhcpcd.sh

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-04-06 09:34:38 +01:00
Rolf Neugebauer
df5c858d38 demo: Use IP addresses as Logical IDs in etcd infrakit config
Instead of specifying the number of instances, provide a list
of IP addresses for instances. These are passed to the instance
plugin as LogicalID.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-05 18:01:52 +01:00
Rolf Neugebauer
dd58bd75eb Merge pull request #1495 from rneugeba/demo-up
Update demo project
2017-04-05 11:12:28 +01:00
Rolf Neugebauer
a131ee823b demo: Update YAML files to include DHCP
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-05 11:08:48 +01:00
Rolf Neugebauer
1cb8dfc222 demo: Remove infrakit example.
This is superseded by the etcd infrakit setup now in place.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-05 11:07:39 +01:00
Ian Campbell
f01d77930c swarmd: Switch to DHCPD container
Follows on from #1316, copies stanza from moby.yml but also picks up update
from #1493.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-04-05 10:39:04 +01:00
Justin Cormack
a97db7b406 Merge pull request #1487 from rneugeba/ik
Update InfraKit
2017-04-04 17:22:44 +01:00
Theo Koulouris
f6c85a9980 build file fixes for okernel
Signed-off-by: Theo Koulouris <theo.koulouris@hpe.com>
2017-04-04 16:44:26 +01:00
Rolf Neugebauer
411a8b2f94 demo: Update etcd README to new InfraKit version
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-04 16:27:15 +01:00
Ian Campbell
8859a7c0a6 swarmd: use standard init
In #1485 I was still using a local mobylinux/init containing #1436, even though
I had included the necessary files in the swarmd container.

Switch to the current standard init package and drop the unnecessary bind.

Also `git add .gitignore` which I forgot last time too.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-04-04 16:23:25 +01:00
Justin Cormack
08e62e0ebd Merge pull request #1485 from ijc25/swarmd
Initial swarmkit package
2017-04-04 16:09:34 +01:00
Ian Campbell
6a0bd7d035 Initial swarmkit package
This is based on https://github.com/docker/swarmkit/pull/1965 which adds a
direct containerd executor to swarmkit. It is very much a work in progress.

With a suitable moby image (such as projects/swarmd/swarmd.yml) something like
this should work:

runc exec swarmd swarmctl service create --image docker.io/library/nginx:alpine --name nginx
runc exec swarmd swarmctl service ls

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-04-04 16:00:03 +01:00
Rolf Neugebauer
fc84079db3 demo: Initial etcd cluster setup with InfraKit
This just sets up the initial cluster via bootstrap.

It does *not* manage state changes correctly afterwards. If one
node crashes (get's killed) it InfraKit will start a new node,
but the new node does not join the cluster (and the old node
is not removed, either).

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-04 15:37:41 +01:00
Rolf Neugebauer
4b3422f76c demo: WIP for a local etcd setup
- Script to set up a DfM etcd for bootstrapping a cluser
- Custom/local etcd package for moby
  derived from the official image with script to start etcd
- YAML file to create a etcd moby image
- README with current instructions

This has a bunch of stuff, including the discovery URL hard coded.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-04 13:46:19 +01:00
Rolf Neugebauer
218ec6d3d5 demo: Dummy infrakit demo using nginx
This will change to something more distributed...

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-04 13:45:32 +01:00
Rolf Neugebauer
5122afffb1 demo: Add simplest YAML for introducing moby
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-04 13:45:03 +01:00
Justin Cormack
01fba0f3f5 Merge pull request #1479 from justincormack/command
Revert Command->Args but remove from yaml where not needed
2017-04-04 10:49:32 +01:00
Justin Cormack
57c75741e9 Revert Command->Args but remove from yaml where not needed
In the riddler change I changed "command" in the yaml to "args"
but did not change the files. In fact we basically used the
default command everywhere so this did not actually break.

Remove the unnecessary "command" lines to simplify yaml.

Revert the command to args change for now as I think I prefer
command, but its easier to switch now. Need to think if the
entrypoint/command distinction matters before finalizing.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-04-04 09:51:17 +01:00
Thomas Gazagnaire
2dbcf99030 miragesdk: do not force the creation of pipes when linking with the SDK
Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-04-04 10:06:59 +02:00
Thomas Gazagnaire
4944652d37 miragesdk: improve dev README
Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-04-04 10:05:22 +02:00
Justin Cormack
065af9707c Replace riddler with code that constructs config.json directly
Generated largely from the specified config; small parts taken from `docker image inspect`,
such as the command line.

Renamed some of the yaml keys to match the OCI spec rather than Docker Compose as
we decided they are more readable, no more underscores.

Add some extra functionality
- tmpfs specification
- fully general mount specification
- no new privileges can be specified now

For nostalgic reasons, using engine-api to talk to the docker cli as
we only need an old API version, and it is nice and easy to vendor...

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-04-03 23:28:55 +01:00
Thomas Gazagnaire
76b33742ac Merge pull request #1448 from samoht/i-got-an-ip
miragesdk: put the DHCP lease info into the host filesystem
2017-04-02 18:32:51 +02:00
Rolf Neugebauer
63c89507e7 docs: Move ebpf.md to projects
This was missed when moving the ebpf stuff into a project.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-02 13:09:29 +01:00
Thomas Gazagnaire
e3939e03c0 miragesdk: fix the build after the switch from mirage tool to jbuilder
Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-04-02 13:17:26 +02:00
Thomas Gazagnaire
e976a6c4aa miragesdk: ship Git the init image (to debug)
Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-04-02 13:17:26 +02:00
Thomas Gazagnaire
1495dabccb miragesdk: allow the command run by the privileged container to be overwritten
Use a file (that we can drop easily into the rootfs) instead of passing the full
command on the CLI (as config.json needs to be edited otherwise).

Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-04-02 13:17:25 +02:00
Thomas Gazagnaire
8d3cea1980 miragesdk: do not use inotify in the privileged container
The inotify bindings that we are using is a bit sensitive to init
conditions, and it seems to not like being run inside in a container.

See https://github.com/samoht/irmin-watcher/issues/10

Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-04-02 13:17:25 +02:00
Thomas Gazagnaire
dfb078825b miragesdk: simplify the build of the calf binary
For now, use jbuilder to build the calf as well, this gives us a bit
more control than the mirage tool. We will switch back to the mirage
tool later on if we want to use more fancy backends (such as KVM).

Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-04-02 13:17:25 +02:00
Thomas Gazagnaire
6500becfea miragesdk: do not die brutally when the calf terminates
Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-03-30 19:57:36 +02:00
Thomas Gazagnaire
0f0b721b19 miragesdk: better computation of the image tag
Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-03-30 19:57:03 +02:00
Thomas Gazagnaire
5223c08d05 miragesdk: fix the compilation of the calf
Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-03-30 19:22:41 +02:00
Thomas Gazagnaire
725a6e8070 miragesdk: update the dhcp-client example with latest image
Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-03-30 18:36:30 +02:00
Thomas Gazagnaire
d4db6c65a1 miragesdk: fix compilation of the dhcp-client image
Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-03-30 18:35:52 +02:00
Thomas Gazagnaire
faa9e1811d miragesdk: implement a simple binary RPCs for the control plane
The protocol allows the client to send concurrent RPCs to the server.
The server replies by keeping the client ID, and the client keeps a
dispatch table of queries to route the retries. By doing things like
that, the server has a strong control over resource allocation, so
a bad client cannot exhaust all the server memory.

Also add some simple tests for the serialization + wire protocol which
are all passing. Proper concurrency/resource exhaustion usage will be
added later.

Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-03-30 17:22:16 +02:00
Thomas Gazagnaire
a61171e87e miragesdk: add tests for control plane messages
Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-03-30 17:22:16 +02:00
Thomas Gazagnaire
3520ee928b Merge pull request #1413 from samoht/tests
Add tests for the MirageSDK and start the new control plane protocol
2017-03-30 13:48:13 +02:00
Thomas Gazagnaire
c582aafe45 miragesdk: add tests for stdout/stderr pipes
And the tests pass!

Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-03-30 13:40:57 +02:00
Thomas Gazagnaire
2b48442fee miragesdk: update .gitignore
Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-03-30 13:40:57 +02:00
Thomas Gazagnaire
9db898ceaf miragesdk: enable all warnings when compiling the projects
Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-03-30 13:40:57 +02:00
Thomas Gazagnaire
b5a3d4b2aa miragesdk: rework the control plane protocol
Previously, the control plane was using HTTP client/server, that various people
found way too complex to run in a privileged container (for very good reasons).

So switching to a simpler binary protocol, using c-like structures. Will
probably switch to an other serialization protocol later (eg. protobuf
or cap-n-proto).

Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-03-30 13:40:57 +02:00
Rolf Neugebauer
5592b58549 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
2c49714ef9 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
Thomas Gazagnaire
df71c0f299 miragesdk: add mimimal tests for the SDK
Very minimal so far, but the plan is to add much more of them.

Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-03-29 15:41:23 +02:00
Thomas Gazagnaire
c06454273b miragesdk: add a dev-clean target
Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-03-29 14:28:19 +02:00
Thomas Gazagnaire
ec988eb93b miragesdk: fix dev target
Paths have changed since 47b9f08b16

Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-03-29 14:27:38 +02:00
Thomas Gazagnaire
7d08325c7a 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
d008e859c6 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
13d110e2c7 miragesdk: minor cleanups
Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-03-29 12:34:41 +02:00
Anil Madhavapeddy
df33c8a4d3 Merge pull request #1407 from avsm/miragesdk-readme
miragesdk: more tweaks to README markdown
2017-03-28 22:20:18 +01:00
Justin Cormack
e85b432f19 Merge pull request #1373 from avsm/okernel
kernel: add build config for the experimental "split kernel"
2017-03-28 23:11:12 +02:00
Anil Madhavapeddy
5c9d5315e5 miragesdk: more tweaks to README markdown
Signed-off-by: Anil Madhavapeddy <anil@docker.com>
2017-03-28 22:07:15 +01:00
Anil Madhavapeddy
3de5c415ef 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
ab72dbb0e4 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
Anil Madhavapeddy
c3d4049180 okernel: Make README more Markdown friendly
Signed-off-by: Anil Madhavapeddy <anil@docker.com>
2017-03-28 14:32:06 +01:00
Anil Madhavapeddy
bb49cab9c2 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
Thomas Gazagnaire
56085a3e6c 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
Thomas Gazagnaire
7fa21377b5 miragesdk: update TODO list
Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-03-28 11:11:17 +02:00
Thomas Gazagnaire
1bee082c6c 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
b0f758a20d 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
18635ed2e1 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
ebdf371421 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
Mindy Preston
46e650ede4 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
Rolf Neugebauer
e9fbe43b34 Rename .yaml to .yml
docker-compose and other utilities use the .yml extension.
For consistency rename all .yaml to .yml

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-27 09:53:26 +02:00
Riyaz Faizullabhoy
60816eaa48 wireguard: more details in roadmap
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-03-22 14:18:42 -07:00
Justin Cormack
7c4768bb54 Merge pull request #1353 from tych0/selinux
projects: add selinux project
2017-03-21 18:43:18 +00:00
Tycho Andersen
7c873da17b selinux: include libselinux-utils as well
This adds things like getenforce and setenforce.

Signed-off-by: Tycho Andersen <tycho@docker.com>
2017-03-21 12:11:00 -06:00
Tycho Andersen
ae423e428b selinux: add readme
Signed-off-by: Tycho Andersen <tycho@docker.com>
2017-03-21 12:08:14 -06:00
Tycho Andersen
a8bab0bddb projects: add selinux project
Signed-off-by: Tycho Andersen <tycho@docker.com>
2017-03-21 11:42:11 -06:00
Riyaz Faizullabhoy
cc7d80be13 wireguard: include Dockerfile and kernel debug config for build
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-03-21 09:59:40 -07:00
Thomas Gazagnaire
ad357c21b8 mirageSDK: rename README.md into roadmap.md
Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-03-20 15:00:47 +01:00
Justin Cormack
569652fd36 Initial overview of the okernel project
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-03-19 14:22:53 +00:00
Justin Cormack
9854394dda fix typo security->secure
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-03-19 13:50:21 +00:00
Justin Cormack
ecea479443 Add Summary page for projects
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-03-19 11:56:42 +00:00
Justin Cormack
f4bf27e044 Merge pull request #1322 from samoht/mirage
[RFC] Very early draft of using a MirageOS unikernel as a system container
2017-03-17 21:56:56 +00:00
Thomas Gazagnaire
30be4647ad Restructure the mirage/dhcp container into the new project structure
Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-03-17 17:43:20 +01:00
Riyaz Faizullabhoy
4caa2d24b4 project: KSPP
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-03-17 16:39:46 +00:00
Riyaz Faizullabhoy
8b8a544ce8 Keep WireGuard configuration local to projects subdir
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-03-17 15:49:22 +00:00