Commit Graph

4177 Commits

Author SHA1 Message Date
Jason A. Donenfeld
ec7dadcddd wireguard: add to getty and sshd
People really want to play around with this, so adding them here makes
it possible. Just as iproute2 is part of these, so should
wireguard-tools.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-07-20 23:50:13 +02:00
Rolf Neugebauer
c76096e4d5 Merge pull request #2259 from ijc/apk-in-login-packages
Add apk to login (sshd & getty) containers
2017-07-20 16:50:58 +01:00
Rolf Neugebauer
3ca12fa014 Merge pull request #2249 from zx2c4/default-wireguard
Add wireguard to core of LinuxKit
2017-07-20 16:50:48 +01:00
Jason A. Donenfeld
332c4edf62 wireguard: move documentation into docs/
Now that this isn't a project, we move the last remains into the right
place.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-07-20 16:51:53 +02:00
Jason A. Donenfeld
a09a2a4b22 wireguard: integrate tools into alpine
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-07-20 16:51:53 +02:00
Jason A. Donenfeld
e24cc5c77f wireguard: add into default kernel
This integrates the WireGuard module directly into the kernel build
system.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-07-20 16:51:18 +02:00
Ian Campbell
d01aa72670 Update ymls
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-07-20 15:08:27 +01:00
Ian Campbell
c48acd5d9d sshd+getty: Add apk to these containers
Since these are the user login containers, having the ability to add packages
is useful (e.g. I quite often find I want strace).

Doing this requires that we not share `/var` with the login containers since we
want the apk database therein. Previously it was thought that the containers
might need some parts of `/var` for `ctr` to work (e.g. `/var/lib/containerd`)
but this is not the case now (if it ever was) based on my testing.

Fixes #2206.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-07-20 15:08:27 +01:00
Justin Cormack
5545f3085a Merge pull request #2258 from ijc/containerd-v1.0.0-alpha1
Containerd v1.0.0 alpha1
2017-07-20 15:07:24 +01:00
Ian Campbell
19207bb81b Update yml and moby version
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-07-20 14:13:20 +01:00
Ian Campbell
b3db1a887c Update to containerd v1.0.0-alpha1
This is actually containerd#1141 rebased onto v1.0.0-alpha1.

The `dist` command has been integreated into `ctr` and so is removed, including
from the getty and sshd bind mounts and the test which uses it is updated..

There is no change to the version of runc vendored by containerd, so this is
unchanged.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-07-20 14:10:51 +01:00
Ian Campbell
ddb9efbffb alpine: Include xfsprogs-extra
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-07-20 14:10:51 +01:00
Rolf Neugebauer
c1eacd07b7 Merge pull request #2256 from djs55/secrets
metadata: avoid printing large chunks of configuration json to the console
2017-07-20 13:17:50 +01:00
Rolf Neugebauer
ccb03c465b Merge pull request #2257 from rn/lcow-merge
LCOW: Use master of the main opengcs repo again
2017-07-20 12:12:40 +01:00
David Scott
13ff6d5d94 Update to linuxkit/metadata:428093dd1c4178e8ba1952af44b46c0fd16f8e79
Signed-off-by: David Scott <dave.scott@docker.com>
2017-07-20 11:24:18 +01:00
Rolf Neugebauer
d1b19a98f0 blueprints: Update LCOW to latest hash
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-07-20 11:11:29 +01:00
David Scott
5bf6526380 metadata: avoid printing large chunks of configuration json to the console
If the configuration .json has contents like:

{
  "etc": {
    "ssl": {
      "certs": {
        "ca-certificates.crt": {
          "perm": "0644",
          "content": "large amount of certificate text"
        }
      }
    }
  },
...
}

then we print a warning because the node "ssl" has no "perm".
Previously the warning would include the contents of "ssl", which
would be large (and in theory could include secret information).

This patch modifies the warning print to only print the key and
not the value.

Without this patch, I see on the console:

2017/07/20 10:03:04 CDROM: Probe succeeded
2017/07/20 10:03:04 No permission provided ssl:map[certs:map[ca-certificates.crt:map[perm:0644 content:large amount of certificate text]]]
 - 000-metadata

With this patch, I see on the console:

2017/07/20 09:54:18 CDROM: Probe succeeded
2017/07/20 09:54:18 No permission provided ssl
 - 000-metadata

Signed-off-by: David Scott <dave.scott@docker.com>
2017-07-20 11:10:59 +01:00
Rolf Neugebauer
c28a472ba2 pkg/init-lcow: Use main opengcs repository again
My patches have been merged.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-07-20 11:02:05 +01:00
Justin Cormack
de11ea12ac Merge pull request #2254 from riyazdf/wireguard-video
sig-security: add youtube video and forum link
2017-07-20 08:40:49 +01:00
Justin Cormack
82caa88c59 Merge pull request #2253 from tych0/wireguard-overhead-correction
correct the calculation of wireguard header overhead
2017-07-20 08:40:26 +01:00
Riyaz Faizullabhoy
fca8e6f6b2 sig-security: add youtube video and forum link
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-07-19 16:49:23 -07:00
Tycho Andersen
b247cf5a68 correct the calculation of wireguard header overhead
Thanks to Jason Donenfeld for the correction.

Signed-off-by: Tycho Andersen <tycho@docker.com>
2017-07-19 17:29:27 -06:00
Justin Cormack
4fb767a480 Merge pull request #2248 from tych0/sig-security-2017-07-19
sig-security: add notes from 2017-07-19
2017-07-19 20:00:46 +01:00
Tycho Andersen
c420e3285d sig-security: add notes from 2017-07-19
Signed-off-by: Tycho Andersen <tycho@docker.com>
2017-07-19 11:58:41 -06:00
Rolf Neugebauer
83f079eb8b Merge pull request #2247 from zx2c4/update-wireguard
wireguard: update to latest snapshot
2017-07-19 16:25:06 +01:00
Rolf Neugebauer
6059865a23 Merge pull request #2246 from ijc/refresh-go-compile
Update to latest alpine base for go-compile
2017-07-19 15:47:52 +01:00
Jason A. Donenfeld
0441a379af wireguard: update links
WireGuard moved from .io to .com.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-07-19 16:27:59 +02:00
Rolf Neugebauer
35e274c7d8 Merge pull request #2245 from rn/lcow-init
Additional LCOW fixes
2017-07-19 15:27:01 +01:00
Justin Cormack
4c63a0ddf6 Merge pull request #2239 from ijc/kubernetes
kubernetes: modernise image-cache build, shrink size by 100M each
2017-07-19 15:15:58 +01:00
Jason A. Donenfeld
6e0da8877b wireguard: update to latest snapshot
It's slightly embarrassing that this old snapshot was kept around here
rotting for so long, but thankfully something is finally being done
about it.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-07-19 16:15:15 +02:00
Ian Campbell
a24819f2e5 Update to latest alpine base for go-compile
I noticed that running the runes in docs/vendoring.md made a bunch of files
which are omitted by modern vndr come back, presumably due to the old version
of vndr referenced there. So update the go-compile package to the current
version everywhere.

Also correct the use of `make` variable syntax (`$(PWD)`) where shell syntax
command substitution for `pwd` was desired.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-07-19 14:40:24 +01:00
Rolf Neugebauer
4e4ab770c7 blueprint: Update LCOW YAML blueprint
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-07-19 14:20:33 +01:00
Rolf Neugebauer
7eb81ba38c pkg/init-lcow: Include fix for rootfs permissions
Update the git commit to point at a branch with the joint
networking and rootfs permission fixes at:
https://github.com/rn/opengcs/tree/net+rootfs

This is includes the patches from PRs:
https://github.com/Microsoft/opengcs/pull/63
https://github.com/Microsoft/opengcs/pull/70

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-07-19 12:20:52 +01:00
Ian Campbell
5e93077a17 kubernetes: update image cache hashes
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-07-19 11:00:30 +01:00
Ian Campbell
27d96c2f99 kubernetes: just use the docker images as a base
Since we just want the client we don't need dind.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-07-19 10:57:50 +01:00
Rolf Neugebauer
9ba7fee7e6 pkg/init-lcow: Use our own init
The sample init script from opengcs is quite basic (and doesn't
set up several mounts and symlinks). Use the relevant portion
from rc.init from the LinuxKit init package instead.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-07-19 10:40:49 +01:00
Ian Campbell
87a6e19770 kubernetes: add "show-tags" target to image-cache
Apart from adding the recursive target itself this required:

- Unescaping the @ in the image names, this was confusing `make` into always
  rebuilding and wasn't necessary (I had previously thought I had seen oddities
  due to these being interpreted by the `patsubst`, but I think that was just the
  colons.
- Making the recursive rules silent (prepending an @), those command lines are
  not especially enlightening and they obscure the output in the show-tags case.

With this the output is like:

    $ make --no-print-directory -C image-cache/ show-tags
    linuxkitprojects/kubernetes-image-cache-common:94a0715c6b3604e909bc0da74260dc7f1142d90d-dirty
    linuxkitprojects/kubernetes-image-cache-control-plane:94a0715c6b3604e909bc0da74260dc7f1142d90d-dirty

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-07-19 09:51:36 +01:00
Ian Campbell
ee7d785b84 kubernetes: minimise size of image cache images
The total size of the images in the common and control-plane cache is 251M and
528M respectively.

This changes drops the size of the cache images from 353M to 274M and from 630M
to 530M, reducing the overhead from ~100M to ~20M.

The initrd images shrink from 273M to 246M and from 416M to 363M (the initrd's
are compressed).

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-07-19 09:51:36 +01:00
Ian Campbell
58227545b2 kubernetes: Only explictly include *.tar in images
No need to have Dockerfile etc.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-07-19 09:51:36 +01:00
Ian Campbell
4b030f2fc6 kubernetes: use digests for cached images
This ensures rebuilds will always get the same things.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-07-19 09:51:36 +01:00
Ian Campbell
56a8d2468a kubernetes: modernise image cache builds
This updates the build of the two image caches to use the `pkg/package.mk`
infrastructure, albeit in a slightly (ok, very) atypical way.

In order to share the bulk of the build code (including the `Dockerfile` and
the `Makefile` machinery to download the images) we arrange for the necessary
bits to be copied at build time into distinct subdirectories and for the
`pkg/package.mk` to be aware of this possibility.

Since pkg/package.mk is only set up to build a single package we use a single
`image-cache/Makefile` to drive the whole process and recurse into
`Makefile.pkg` to build individual packages.

One particular subtlety is that the package hash is based on the `image-cache`
directory (which is in `git`) rather than the generated subdirectories (which
are not in `git`). Since all the generators (and their inputs) are in the
`image-cache` directory this is what we want. This means that the two images
are given the same tag, but this is deliberate and desirable.

The generated directories are completely temporary to avoid picking up stale
versions of images when versions are updated. Images are hardlinked into place.

The images are moved to the linuxkitprojects org. Using a dev tag for now, will
update once everything is in place.

Also use "tag" rather than "build" where appropriate in the Makefile.

There is no point in the .dockerignore now, but add a .gitignore.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-07-19 09:51:32 +01:00
Ian Campbell
0d8c4789a1 kubernetes: update clean rule
The kernel has been -kernel rather than -bzImage for some time. Likewise the
disk moved the state dir.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-07-19 09:33:54 +01:00
Rolf Neugebauer
118816b4c3 Merge pull request #2231 from samoht/dhcp-split
[WIP] Split the DHCP client into three components communicating via RPCs
2017-07-18 20:05:02 +01:00
Rolf Neugebauer
c073b0ebd6 Merge pull request #2242 from rn/lcow-net
Fix networking in LCOW
2017-07-18 20:02:47 +01:00
Avi Deitcher
0f725c366e Merge pull request #2241 from deitch/fix-getty-background
flag in init and background only if not in init
2017-07-18 21:39:53 +03:00
Rolf Neugebauer
6295d0e425 Merge pull request #2240 from justincormack/authorsup
Update AUTHORS
2017-07-18 18:16:10 +01:00
Justin Cormack
09e9357499 Merge pull request #2235 from justincormack/use-library-docker
Use the upstream dind package to run docker
2017-07-18 17:27:45 +01:00
Rolf Neugebauer
26a324c35c blueprint: Update lcow blueprint
This should enable networking in LCOW containers.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-07-18 15:55:27 +01:00
Avi Deitcher
03244e3776 Change hash for getty in examples
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2017-07-18 17:47:36 +03:00
Rolf Neugebauer
4ff7916e10 pkg/init-lcow: Temporarily use a branch of my dev tree
The branch has fixes to the networking setup (see
https://github.com/Microsoft/opengcs/issues/56 and
https://github.com/Microsoft/opengcs/pull/63)

Also remove runc from the package as the hard-coded runc
path has been removed (see
https://github.com/Microsoft/opengcs/pull/58)

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-07-18 15:44:20 +01:00