Commit Graph

4879 Commits

Author SHA1 Message Date
Ian Campbell
faecbffff2 kubernetes: Bump to v1.7.6
Also pickup Weave 2.0.6 and CNI 0.6.0. Note that the CNI plugins have moved to
a new directory.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-09-19 11:28:18 +01:00
Ian Campbell
50ddffb1a5 kubernetes: Autogenerate file with image cache digests
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-09-19 11:28:14 +01:00
Ian Campbell
605c4b6675 kubernetes: Move images for caches into separate file
Will be auto-generated.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-09-19 11:28:14 +01:00
Rolf Neugebauer
144765e8cf Merge pull request #2521 from zx2c4/wireguard-bump
wireguard: version bump
2017-09-19 08:09:04 +01:00
Jason A. Donenfeld
bd4775cf6f wireguard: version bump
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-09-19 03:43:14 +02:00
Justin Cormack
cf15ec36a6 Merge pull request #2500 from justincormack/shared-init
Convert rc.init and rc.shutdown to Go
2017-09-18 18:10:00 -07:00
Nick Jones
0556812b63
[OpenStack] Support specifying an SSH key name when creating an instance
This commit introduces a new option - `keyname` - to the OpenStack
runner, which allows the user to specify the name of a keypair they want
to associate with the instance at the time of creation.

Signed-off-by: Nick Jones <nick@dischord.org>
2017-09-18 21:36:04 +01:00
Justin Cormack
2010d999ca update hashes for init
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-09-18 11:53:02 -07:00
Justin Cormack
042cd763fe Add vendoring for rc.init
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-09-18 11:46:00 -07:00
Justin Cormack
bcfb760a1d Convert rc.init and rc.shutdown to Go
This removes more shell scripts to improve maintainability.

This now also works correctly in userspace, so it can be used for
running LinuxKit images in Docker and other such use cases.

It is a literal conversion of the shell scripts with a few small
tweaks.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-09-18 11:45:59 -07:00
Justin Cormack
f88ac735ba Merge pull request #2518 from ijc/kubernetes-cri
Kube project updates, including cri-containerd integration
2017-09-18 10:33:22 -07:00
Rolf Neugebauer
94419ad709 Merge pull request #2517 from rn/tests
Update/Unify tests
2017-09-18 15:17:56 +01:00
Ian Campbell
5ab6c03a08 kubernetes: Add yaml metadata
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-09-18 14:44:40 +01:00
Ian Campbell
7e19d38821 kubernetes: use a common base kube yml file
With the master tailoring for docker now being in docker-master.yml,
kube-master and kube-node are identical, so just use a single kube.yml.

The reference to kube-master.yml in README.md is obsolete, so just drop it.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-09-18 14:44:27 +01:00
Ian Campbell
1fa059bbd2 kubernetes: allow selection of runtime engine (docker vs cri-containerd)
Currently this is at build time

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-09-18 14:43:23 +01:00
Ian Campbell
445dcc0ac2 kubernetes: Add cri-containerd package
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-09-18 14:39:22 +01:00
Ian Campbell
80dff9fe99 kubernetes: update yml
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-09-18 14:37:39 +01:00
Ian Campbell
b6fbc82e41 kubernetes: Configuration of kubelet via file
This allows cri-containerd and docker based systems to pass the correct options
via composition of yml files, while keeping the kubelet service stanza common.

Since bind mounts are not conditional on the presence of the source we need to
create an empty file in the docker case.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-09-18 14:25:54 +01:00
Ian Campbell
b6d7f769be kubernetes: Link /etc/kubernetes to /var/lib/kubeadm
In some configurations /etc/kubernetes needs to be a valid host path.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-09-18 14:25:54 +01:00
Ian Campbell
1e15243b11 kubernetes: Enable net.ipv4.ip_forward
This doesn't seem to be necessary when using Docker Engine as the CRI backend,
but in general it is.

The sysctl container must be writeable to allow the
/etc/sysctl.d/01-kubernetes.conf mount point to be created. See #2503.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-09-18 14:25:54 +01:00
Ian Campbell
825e43f7c4 kubernetes: bind /run with rshared,rbind
Depending on the configuration/components used the system can expect to be able
to share `/var/run/netns` (=`/run/netns` via symlink) bind mounts with other
system level containers, which requires exposing those to the host.

This doesn't appear to be needed when using Docker engine but it is with
cri-containerd.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-09-18 14:25:54 +01:00
Ian Campbell
9397b9480a kubernetes: populate host CNI paths by binding from kubernetes service.
Kubernetes assumes (for now) that various paths are valid at the host level to
be mounted into containers, including /opt/cni and /etc/cni.

We cannot (easily) use symlinks here because the weave.yml mounts /opt and /etc
rather than /opt/cni and /etc/cni (this seems likely to be common pattern). So
if /etc/cni were a symlink to the persistent disk (under /var/lib) then it will
be dangling link within the weave container.

So add bind mounts to the runtime configuration of the kubernetes image. This
also means we must create the target mount points in the yml.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-09-18 14:25:54 +01:00
Ian Campbell
07e4f515a4 kubernetes: add basic cni plugins dynamically
This avoids a slightly tricky sequence of nested bind mounts by just unpacking
a tarball on boot (with a stamp so it only happens once).

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-09-18 14:25:54 +01:00
Ian Campbell
1074b4a8d4 kubernetes: point kubelet at /var/lib/cni directly
Still need the /opt bind to host for weave.yaml but no need for etc any longer.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-09-18 14:25:25 +01:00
Rolf Neugebauer
a65b91c0c9 tests: Add a build test for the LCOW blueprint
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-09-18 13:51:17 +01:00
Rolf Neugebauer
40afebb2c9 tests: Update kernel namespace tests
- Extract common portions from the YAML file
  This makes kernel/init/runc updates easier as only one
  files needs changing
- Rename test-ns.yml to test.yml to make it more in line
  with the other tests
- Use '-name' in the moby build
- Simplify cleanup

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-09-18 13:51:17 +01:00
Rolf Neugebauer
3ed9803ac3 tests: Minor tweaks to the platform tests
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-09-18 13:51:16 +01:00
Rolf Neugebauer
a9538a57d4 tests: Tidy up the format_mount tests
- Consistently use env variables
- Use simpler cleanup code

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-09-18 13:51:16 +01:00
Rolf Neugebauer
59a085efc0 tests: Clean-up and fix extend tests
- Consistently use env variables for names
- Make sure temporary files are removed (the 'create'
  images were left behind)

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-09-18 13:51:16 +01:00
Rolf Neugebauer
4541e8511a tests: Unify test YAML files to test.yml
While at it also unify the clean-up code and other bits in test.sh

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-09-18 13:51:16 +01:00
Rolf Neugebauer
6842f10351 tests: Clean up build tests
Build tests don't need the 'find' nor 'rm -r' as they don't
create directories.

There is no need to delete the 'test.yml' file in
the output tests.

Consistently use NAME as the name argument

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-09-18 13:51:16 +01:00
Rolf Neugebauer
27839280f7 build: Update rtf to the latest version
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-09-18 13:51:16 +01:00
Ian Campbell
35542e493c kubernetes: drop /rootfs from kubelet container
Since 424203cd9c we can use /var/lib/cni/{etc,opt} directly.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-09-18 12:24:59 +01:00
Ian Campbell
67fa0ad662 kubernetes: allow users to add kubelet options by overriding the command
For example to tell kubelet to use cri-containerd:

    command: ["/usr/bin/kubelet.sh", "--container-runtime=remote", "--container-runtime-endpoint=unix:///var/run/cri-containerd.sock"]

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-09-18 12:24:59 +01:00
Ian Campbell
32e53cf769 kubernetes: Add boot.sh options to preserve state dir and to set MAC
Not having to redo the kubeadm-init.sh step massively speeds up the test/dev
cycle. Having the same MAC (and hence same IP) is useful there too since you
don't need to figure out the mac on each boot.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-09-18 12:24:59 +01:00
Ian Campbell
b6725a1b11 kubernetes: give more resources to worker nodes.
The sock-shop demo[0] requires around 5G of images on a worker node and 3G of
RAM (if there is only one worker node and therefore everything runs on that
node).

Since the master is more than happy with the 4G disk and 1G RAM it is given
today split the settings into master and node specific and bump only the
latter.

KUBE_PORT_BASE is unused and was already removed in 54ddde0d43 but
accidentally reintroduced (by me) in 62aa9248a4, whack it again.

[0] https://microservices-demo.github.io/microservices-demo

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-09-18 12:24:59 +01:00
Rolf Neugebauer
ac18bbfda0 Merge pull request #2514 from matjohn2/zfs-depmod-fix
Ensure depmod is run on ZFS module builds (fixes ZFS modprobe)
2017-09-18 11:31:15 +01:00
Matt Johnson
fdc1c0edc8 Enable modprobe zfs by running depmod on the new kernel build.
Depmod in the zfs makefiles will never run as `/boot/` and relevant map files dont exist in our build environments.
Included style suggestions by @rn

Signed-off-by: Matt Johnson <matjohn2@cisco.com>
2017-09-18 08:55:17 +01:00
Rolf Neugebauer
cf2d88bb83 Merge pull request #2515 from eyz/open-vm-tools-poweroff
added support for guest shut down in pkg/open-vm-tools
2017-09-17 22:02:50 +01:00
Isaac Rodman
38452aa742 added poweroff.sh for pkg/open-vm-tools to allow shutdown from hypervisor
Signed-off-by: Isaac Rodman <isaac@eyz.us>
2017-09-16 10:39:23 -07:00
Rolf Neugebauer
6845f602dc Merge pull request #2506 from eyz/master
new pkg/modprobe from linuxkit/alpine base onto scratch
2017-09-16 17:21:15 +01:00
Rolf Neugebauer
d38ea16f4a Merge pull request #2513 from rn/lcow-kernel
Update 4.12.13 kernel patches and use it for LCOW
2017-09-15 21:41:44 +01:00
Isaac Rodman
0cce316caa pkg/modprobe from linuxkit/alpine base, using established multistage build onto scratch pattern
Signed-off-by: Isaac Rodman <isaac@eyz.us>
2017-09-15 12:38:40 -07:00
Justin Cormack
9d55b197c0 Merge pull request #2483 from zx2c4/custom-wg-script
wireguard: use custom wg-quick
2017-09-15 09:51:54 -07:00
Rolf Neugebauer
f547ac7259 blueprint: Update LCOW blueprint
- Use the new 4.12.13 kernel as it now seems to work
- Update LCOW to latest rev of OpenGCS

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-09-15 14:50:23 +01:00
Rolf Neugebauer
adb92ca672 pkg/init-lcow: Update to the latest version
This includes fixes to the intermittent on pull as well as
other fixes.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-09-15 14:47:12 +01:00
Rolf Neugebauer
7ba00c001b kernel: Update 4.12.x kernel patches
These are the recommended patches for 4.12 for Hyper-V sockets
and LCOW. Based on: https://github.com/Microsoft/opengcs/pull/138

This also includes a cherry-pick from upstream which fixes the
ext4/nvdimm/pax failures we have seen since 4.11.2.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-09-15 14:46:25 +01:00
Jason A. Donenfeld
8f3847e985 wireguard: use custom wg-quick
This removes things we do not need and expects the interface to
already be created.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-09-15 01:01:55 +02:00
Rolf Neugebauer
0968be802f Merge pull request #2508 from rn/kern-up
kernel update to 4.12.13/4.9.50/4.4.88
2017-09-14 20:54:11 +01:00
Rolf Neugebauer
2d20ef1014 Update YAML files to new kernels
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-09-14 17:21:01 +01:00