Commit Graph

4605 Commits

Author SHA1 Message Date
Justin Cormack
9ec58e12bb Merge pull request #2443 from djs55/fix-metadata
init: mkdir /etc/ssl/certs as required by the metadata package
2017-08-22 13:31:24 +01:00
Justin Cormack
3656a7b03e Merge pull request #2448 from justincormack/dockerup
Update Docker CE image to 17.06.1
2017-08-22 13:29:14 +01:00
Justin Cormack
1c4e8c3ae2 Update Docker CE image to 17.06.1
Bug fix update.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-08-22 10:54:26 +01:00
Rolf Neugebauer
329cdb7c7f Merge pull request #2445 from rn/kconfig
Kernel config improvements
2017-08-21 22:18:28 +01:00
Rolf Neugebauer
1d8790fb76 docs: Update kernel docs
- Update section on how to change the kernel config
- Reword kernel module section. It was messy
- General tidying up:
  - empty lines around quoted areas
  - two empty line above and one empty line below section headings
  - Limit line length.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-21 20:43:30 +01:00
Rolf Neugebauer
c3b9972b32 scripts: Add script to split kernel config files
This script is slightly modified from the ChromiumOS splitconfig

It takes a number of kernel config files and prints the common
on specific kernel config options to seperate files.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-21 20:43:30 +01:00
Rolf Neugebauer
119cc56fcf kernel: Align arm64 4.4 kernel config with 4.9
Note, vhost vsock is disabled on arm64 because it failed to compile.
'vhost_vq_init_access' was not defined, but with a quick check
I could not find where it was supposed to be defined.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-21 20:43:30 +01:00
Rolf Neugebauer
86deeaff90 kernel: Bring 4.4 x86_64 kernel config more in line with 4.9
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-21 20:43:30 +01:00
Rolf Neugebauer
ba2e6a5bb8 kernel: Add a Dockerfile to make it easier to configure kernels
The new Dockerfile.kconfig can be used, via the 'kconfig' make target
to build a 'linuxkit/kconfig' images. This images contains the patched
source and default kernel configs for all supported kernels.

It's useful to updating the kernel config files.

While at it, also update the alpine base.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-21 20:43:30 +01:00
Justin Cormack
6f1e4add2e Merge pull request #2444 from justincormack/cni-persistence
Kubernetes improvements
2017-08-21 20:03:30 +01:00
Justin Cormack
4fec826d22 Update kube hashes
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-08-21 17:57:08 +01:00
Justin Cormack
c857b91e64 Update Kubernetes to 1.7.4
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-08-21 17:54:21 +01:00
David Scott
da86df1ad6 init: add /etc/ssl/certs as required by the metadata package
The metadata package has binds
  - /dev
  - /var
  - /sys
  - /etc/resolv.conf
  - /etc/ssl/certs

but unfortunately `/etc/ssl/certs` doesn't exist and this causes the
following commands:

  cd blueprints/docker-for-mac # easy example
  moby build -name docker-for-mac base.yml docker-17.06-ce.yml
  linuxkit run hyperkit -networking=vpnkit -vsock-ports=2376 -disk size=500M docker-for-mac

to produce the following error on the VM console:

  container_linux.go:265: starting container process caused "process_linux.go:348: container init caused \"rootfs_linux.go:57: mounting \\\"/etc/ssl/certs\\\" to rootfs \\\"/containers/onboot/000-metadata/rootfs\\\" at \\\"/etc/ssl/certs\\\" caused \\\"stat /etc/ssl/certs: no such file or directory\\\"\""
  2017/08/21 16:39:40 Error creating 000-metadata: exit status 1

This patch creates /etc/ssl/certs in the `init` package. The metadata package
will now say things like

  2017/08/21 16:44:39 No metadata/userdata found. Bye

Signed-off-by: David Scott <dave.scott@docker.com>
2017-08-21 17:46:29 +01:00
Justin Cormack
498d5a1966 Merge pull request #2442 from justincormack/tools-additions
Add some more tools to base image and only clone containerd once
2017-08-21 17:00:23 +01:00
Justin Cormack
6264912489 Restrict kubernetes to amd64
- currently no arm64 binary downloads available

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-08-21 16:07:49 +01:00
Justin Cormack
1597ddb72f Update weave yaml to k8s 1.7
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-08-21 15:58:13 +01:00
Justin Cormack
ea87b6df79 Use standard LinuxKit base image to build Kubernetes container
- now has everything we need in it.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-08-21 15:51:26 +01:00
Justin Cormack
424203cd9c Move Kubernetes CNI paths to /var so they persist
Currently they will be on a read only partition so broken;
previously this would have been a non persistent read write partition
in an initramfs but this no longer works.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-08-21 15:46:18 +01:00
Justin Cormack
0cda27d4ef Update hashes
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-08-21 15:40:17 +01:00
Justin Cormack
90f905a799 Move containerd clone to tools/alpine
As discussed before, as we use this in three places, cloning in
base makes more sense.

Update base image.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-08-21 15:16:09 +01:00
Justin Cormack
2acb7151fb Merge pull request #2441 from justincormack/kubernetes-mkdir
Use new runtime mkdir instead of mkdir container
2017-08-21 13:35:15 +01:00
Justin Cormack
92d31d733d Add ebtables, socat, libc6-compat to alpine base
These are needed by Kubernetes which is currently not using the standard abse image.

Also sort it.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-08-21 13:34:02 +01:00
Justin Cormack
534026e3ea Use new runtime mkdir instead of mkdir container
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-08-21 12:01:18 +01:00
Rolf Neugebauer
79109df372 Merge pull request #2440 from rn/kbuild
Improvements to the kernel build
2017-08-20 22:28:50 +01:00
Rolf Neugebauer
ffcf5db6ee kernel: Use local kernel source if available
The kernel build currently downloads the source tar ball every
time, which is a little tedious when experimenting with kernel
configs or when compiling the kernel multiple times.

This commit adds a new 'fetch' make target which downloads the
kernel sources into ./sources. Then in the Dockerfile we add
the directory and only download the source if it is not present.

The tarballs signature is till checked on each build.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-20 11:41:59 +01:00
Rolf Neugebauer
9362de0adb kernel: Verify kernel config
Since we supply a full .config file we can check that after
make defconfig/oldconfig it hasn't changed. This should catch
cases where a config option has changed between releases.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-20 11:05:35 +01:00
Rolf Neugebauer
72ed2b3a06 kernel: Rename kernel_config-4.x.x to kernel_config-4.x.x-x86_64
Consistently arch suffixes for kernel config.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-20 10:46:28 +01:00
Justin Cormack
ca35c06723 Merge pull request #2439 from martencassel/patch-1
Fix typo in docs/faq.md
2017-08-19 22:07:03 +01:00
Rolf Neugebauer
f0609113d8 Merge pull request #2438 from justincormack/packet-metadata
Add Packet metadata and bonding support
2017-08-19 20:59:35 +01:00
marten
c09dc5190a Fix typo in faq
Signed-off-by: Marten <mcpop28@hotmail.com>
2017-08-19 21:46:46 +02:00
Justin Cormack
3e494f7762 Update hashes for metadata
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-08-19 19:30:04 +01:00
Justin Cormack
ada924b527 Update packet example
- use one shot dhcp
- add a one shot rngd as needs entropy
- add metadata
- remove ssh key from host as we have in metadata

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-08-19 19:27:37 +01:00
Justin Cormack
a808808ce1 Add vendoring needed for netlink, packet
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-08-19 19:25:21 +01:00
Justin Cormack
92451cf2e4 Add packet metadata support, with bonding
Use the packet metadata to set up bonding, also get ssh keys and hostname.

This does not yet do anything with disk metadata.

Userdata is not used if it has been used for ipxe, but is otherwise available.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-08-19 19:25:14 +01:00
Justin Cormack
d01438acd4 Merge pull request #2436 from rn/kern-up
Update Kernel to 4.9.44/4.4.83
2017-08-18 22:35:04 +01:00
Rolf Neugebauer
efe8292e25 Update YAML files to new kernels
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-18 18:08:33 +01:00
Rolf Neugebauer
5898bc9f0d kernel: Update to 4.9.44/4.4.83
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-18 18:08:32 +01:00
Rolf Neugebauer
6f14a2acda Merge pull request #2435 from rn/karm64
Converge arm64 and x86 kernel configs
2017-08-18 17:56:59 +01:00
Justin Cormack
9506d45d49 Merge pull request #2413 from justincormack/runtime-config
Add a runtime config
2017-08-18 17:45:10 +01:00
Justin Cormack
b1acdbce2f Add a wireguard example and test
This uses the new features

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-08-18 15:51:57 +01:00
Justin Cormack
86c1d9fb46 Add moby tool version with runtime support
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-08-18 15:51:57 +01:00
Rolf Neugebauer
516b11d262 kernel: Set DEFAULT_MMAP_MIN_ADDR to 65536/32768
This is a recommended security measure to protect the low portion
of virtual memory. On x86_64 the recommended value is 65536 while
for arm it shouldn't be higher than 32768.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-18 15:18:38 +01:00
Rolf Neugebauer
edf74c249a kernel: Enable CONFIG_ENABLE_MUST_CHECK
This is a compile time option enabling __must_check annotations
for return values.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-18 15:18:38 +01:00
Rolf Neugebauer
3e5ba03cdc kernel: Enable Ethernet Team driver support
While at it also disable an un-used NIC vendor (Netronome).

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-18 15:18:38 +01:00
Rolf Neugebauer
ec7c2fe82d kernel: Align arm64 kernel config more with x86
The resulting kernel boots fine on qemu and on Cavium Thunder,
though the latter still has some issues.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-18 15:18:38 +01:00
Justin Cormack
99a9860335 Merge pull request #2432 from rn/p6
cmd: Use the main packet.net API repo again
2017-08-18 11:52:32 +01:00
Rolf Neugebauer
c6ab35f721 cmd: Use the main packet.net API repo again
The local changes were merged, so switching back to the original
repository. A minor change in API was needed.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-18 10:21:36 +01:00
Justin Cormack
32c685d166 Merge pull request #2430 from tych0/sig-security-2017-08-16-notes
add notes from security sig yesterday
2017-08-17 16:41:34 +01:00
Justin Cormack
6d54339091 Merge pull request #2429 from justincormack/optional-metadata
Allow specifying a set of metadata providers
2017-08-17 16:41:20 +01:00
Rolf Neugebauer
e28d960635 Merge pull request #2428 from justincormack/packet-fork
Vendor fork correctly
2017-08-17 15:36:43 +01:00