Commit Graph

6880 Commits

Author SHA1 Message Date
Ian Campbell
896cfaab63 Rename some variables following rename of PkgSrc to Pkg
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-09 11:24:03 +01:00
Nick Jones
6deabe8a2f
[OpenStack] Metadata service support
This commit adds support for retrieving instance metadata on OpenStack
public clouds.

Signed-off-by: Nick Jones <nick@dischord.org>
2017-10-08 17:08:00 +01:00
Ian Campbell
4cdc90e221 Build fields default to false, rename accordingly
Added some test cases for the boolean fields because I kept getting confused.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-06 17:43:38 +01:00
Ian Campbell
a9b0c6f889 Pass argumements to NewFromCLI as varargs
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-06 17:42:05 +01:00
Rolf Neugebauer
690913d0bb Merge pull request #2573 from rn/nfs
tools/alpine: Add nfs-utils
2017-10-06 16:51:01 +01:00
Ian Campbell
7748b59d5d Add missing file
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-06 15:56:33 +01:00
Ian Campbell
784c24817f Couple of documentation nits.
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-06 14:55:49 +01:00
Rolf Neugebauer
267017f484 Merge pull request #2568 from zx2c4/wireguard-bump
kernel/wireguard: version bump
2017-10-06 14:39:02 +01:00
Rolf Neugebauer
9e6051494c Merge pull request #2566 from rn/up
Update kernels to 4.13.5/4.9.53/4.4.90 and also wireguard tools
2017-10-06 14:37:14 +01:00
Rolf Neugebauer
cac4168e26 tools/alpine: Add nfs-utils
New package is at: linuxkit/alpine:3fb44354a34b05134fbf585a00217cd2f8c8f0bf

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-10-06 13:32:45 +00:00
Ian Campbell
52d1bc6395 More specific error message when docker not installed
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-06 14:14:50 +01:00
Ian Campbell
3141ca0bef Embed scripts/push-manifest.sh into linuxkit tool
This is a bit gross, but hopefully this script will be written in go sooner
rather than later and in the meantime this avoids the need to install yet
another tool on user's systems (and get it into brew etc).

Checkin the result of `go:generate` for now. Once there are no more users of
push-manifest.sh it can be moved alongside the go code (if it hasn't been
rewritten in go along the way).

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-06 14:02:51 +01:00
Ian Campbell
c84c997383 Rename pkgsrc to pkglib
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-06 13:38:37 +01:00
Ian Campbell
ba60937754 Implement package build, push and show-tag in linuxkit tool
This implements the proposal in #2564 and converts a handful of representative
or especially interesting (from a build PoV) packages to use it.

For now those pkg/* affected get a stub-`Makefile`, once all packages are
converted then `pkg/Makefile` can be adjusted and those stubs can be removed.

For now only `pkg/package.mk`'s functionality is implemented. In particular:

- `push-manifest.sh` remains a separate script, to enable calling it on systems
  with just the LinuxKit tools installed arrange to install it under a less
  generic name.
- `kernel` and `tools/alpine` do not use `pkg/package.mk` and those cases are
  not yet fully considered/covered.

I have updated the documentation assuming that the existing uses of
`pkg/package.mk` will be removed quite soon in a follow up PR rather than
trying to document the situation which results after just this commit.

Due to `cmd/linuxkit` now gaining a library the build needs adjusting slightly to
allow both `make bin/linuxkit` and `go build` to work.

`go vet` has forced me to write some rather asinine comments for things that
are rather obvious from the name.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-06 12:59:25 +01:00
Ian Campbell
f8b80b6f00 pkg: correct tagging forced release
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-06 12:56:33 +01:00
Rolf Neugebauer
28303f6858 Update YAML files with new getty/ip/sshd hashes
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-10-06 11:16:10 +01:00
Rolf Neugebauer
d8283fc769 pkg: Update alpine base for getty/ip/sshd
These packages include the wireguard tools which need to be
updated due to the wireguard kernel bump in:
43db718f14 ("wireguard: version bump").

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-10-06 11:16:10 +01:00
Rolf Neugebauer
cf136c2149 wg
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-10-06 11:16:10 +01:00
Rolf Neugebauer
d3b9d06924 Update YAML files with new kernel tags
In particular also fix the wireguard test whose kernel
tag hasn't been updated for quite some time...

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-10-06 11:15:34 +01:00
Jason A. Donenfeld
c14e9e205b kernel/wireguard: version bump
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-10-06 03:42:57 +02:00
Rolf Neugebauer
06b09fb6a8 kernel: Update kernel to 4.13.5/4.9.53/4.4.90
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-10-05 12:01:12 +01:00
Rolf Neugebauer
ec06cfe69c kernel: Delete accidentally commit temporary files
Introduced with: fb98564e ("Add squashfs support to the kernel config")

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-10-05 11:56:52 +01:00
Rolf Neugebauer
074541f79c Merge pull request #2551 from zx2c4/wireguard-bump
wireguard: version bump
2017-10-05 11:51:58 +01:00
Rolf Neugebauer
13d7bae0fe Merge pull request #2560 from justincormack/squashfs
Add squashfs support to the kernel config
2017-10-04 22:40:28 +01:00
Ian Campbell
657225e8b8 Merge pull request #2565 from djs55/kubeadm.yaml
kubernetes: add optional support for a kubeadm.yaml
2017-10-04 18:03:39 +01:00
Rolf Neugebauer
1aee0c3d30 Update Image strings before writing them out
If the YAML file contains:
  - path: etc/linuxkit.yml
    metadata: yaml
in the fil section, the image was build with content trust,
then the linuxkit.yml file image contains fully qualified
image references (including the sha256).

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-10-04 17:59:02 +01:00
Rolf Neugebauer
ad83cb8928 Use containerd reference.Spec in place of the Image string
Instead of passing the image name as string use the a reference
to a containerd reference.Spec. This allows us, for example,
to update the reference in place when verifying content trust
with more specific information, such as the sha256

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-10-04 17:37:22 +01:00
Rolf Neugebauer
d9b79548a5 Add a containerd reference.Spec for the Image name
When constructing a Moby structure from a YAML also
extract a containerd reference.Spec for each image
and the kernel.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-10-04 17:26:42 +01:00
Rolf Neugebauer
1713f59e4f Turn Images into references
We want to modify some of the content of the Image structure
and thus have to pass them by reference.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-10-04 17:26:42 +01:00
Justin Cormack
e73a7b0315 Add a "tar-kernel-initrd" output format
This is a tarball of the kernel, initrd and cmdline files, suitable for
sending to the mkimage images that expect this format.

Note you can't currently stream this output format using `-o` will clean this
up in future commits.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-10-04 17:01:13 +01:00
David Scott
cecb5a65b7 kubernetes: add optional support for a kubeadm.yaml
Unfortunately some options (such as enabling dynamic registration of
initializers) can only be enabled by a `--config foo.yaml` argument.
Furthermore some command-line options (such as the kubernetes version)
cannot be used in combination with the config file.

This patch checks for a supplied  /etc/kubeadm/kubeadm.yaml and uses
it if it exists, otherwise it falls back to the original command-line.
Note it is safe to use the `--skip-*` options in combination with the
`--config` option.

Signed-off-by: David Scott <dave.scott@docker.com>
2017-10-04 16:24:16 +01:00
Rolf Neugebauer
e8a5728ca3 Vendor containerd
The next commit will start using some components of containerd
so vendor the latest version.

The latest vndr also removed some un-needed files previously vendored.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-10-04 14:17:02 +01:00
Justin Cormack
be3ffe5bf6 Merge pull request #2563 from ijc/kubernetes
kubernetes: easier support for single master, plus slight robustness improvement
2017-10-04 14:08:25 +01:00
Ian Campbell
8d69ed14f4 kubernetes: Update yml
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-04 12:22:17 +01:00
Ian Campbell
4386cbcdf9 kubernetes: bookend kubeadm-init with stamp files.
It is possible to get rebooted halfway through the init process, after key
files like `/etc/kubernetes/kubelet.conf` have been created but before full
cluster setup is complete or networking is applied.

Right now the idempotency of kubeadm (or backing out from this half-way state
and resuming the initialisation) is not something I have investigated. By
dropped stamps before and after at least the situation will be somewhat
detectable/diagnosable so the user can e.g. nuke their persistent disk and
start again.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-04 12:17:14 +01:00
Ian Campbell
164c4a30f5 kubernetes: support untainting master via metadata
If a stamp file is present in the metadata then untaint.

This is useful for dev environments where you only want to start a single vm.

The construction of the metadata becomes a little more complex to produce
correct json syntax now that there are two (independent) possible options.

Likewise the kubelet.sh script now takes the presence of /var/config/kubeadm
(rather than /var/config/kubeadm/init) as the signal to use the more structured
setup, since we may now have /var/config/kubeadm/untaint-master but not
/var/config/kubeadm/init so would otherwise end up passing the contents of
`/var/config/userdata` (something like `{ "kubeadm": { "untaint-master": "" }
}`) to `kubeadm` and confusing it enormously.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-04 11:28:48 +01:00
Ian Campbell
77f0c75b9d Merge pull request #2559 from ijc/kubernetes
kubernetes: bump to v1.8.0
2017-10-03 16:43:19 +01:00
Justin Cormack
61ff1e5bba Merge pull request #157 from justincormack/no-hyperkit
Remove the hyperkit option
2017-10-03 15:58:59 +01:00
Justin Cormack
aca26f00c2 Remove the hyperkit option
We are going to phase out the LinuxKit build option, in favour of keeping Docker
or a native Linux build option for CI use cases, as it is faster. So the
hyperkit option that only worked in one very limited use case is not needed.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-10-03 15:55:02 +01:00
Ian Campbell
eb0fde3a10 kubernetes: update yml
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-03 15:18:21 +01:00
Justin Cormack
fb98564ecc Add squashfs support to the kernel config
This is a useful read only filesystem for images that is efficient and
small as it supports compression.

For many use cases, when you are writing to media, it makes more sense than
using an initramfs as it does not require RAM, and it is more suitable for
disk media than ISO.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-10-03 15:09:27 +01:00
Ian Campbell
c0a3656eb3 kubernetes: update to kub dns 1.14.5
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-03 15:08:43 +01:00
Ian Campbell
72dff9059d kubernetes: arrange for kubelet-plugins directory to be persistent
/usr/libexec/kubernetes/kubelet-plugins is a new path in Kube 1.8 (related to
flexvolumes) which should be persisted. Like /etc/cni and /opt/cni we also need
to arrange for this path to be valid in the host environment (since various
system containers will try and mount bind mount it).

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-03 15:08:43 +01:00
Ian Campbell
57a2ae4318 kubernetes: adjust for v1.8 bootstrapping arrangements.
With kube 1.8 kubeadm initially configures worker nodes with a
bootstrap-kubelet.conf. Adjust our start of day scripting to DTRT.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-03 15:08:43 +01:00
Ian Campbell
f85208c74a kubernetes: Bump to v1.8.0
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-03 15:08:37 +01:00
Ian Campbell
9a99164cf7 kubernetes: Use /etc/kubernetes rather than /var/lib/kubelet
This is a bind mount, but /etc/kubernetes is the path formally expected/create
by kubeadm.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-03 14:59:54 +01:00
Justin Cormack
ccaba8acc1 Merge pull request #156 from justincormack/no-init
Remove unused init package
2017-10-03 14:10:16 +01:00
Justin Cormack
fdee7f3792 Remove unused init package
We now use the same on as linuxkit.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-10-03 13:42:48 +01:00
Rolf Neugebauer
6e58dc2940 Merge pull request #2532 from eyz/linuxkit-format-device-filter
format: blkid content check, format argument, and verbose argument
2017-10-03 11:30:00 +01:00
Rolf Neugebauer
8900ade624 Merge pull request #2556 from rn/blkid
tools/alpine: Explicitly add blkid
2017-10-03 10:28:35 +01:00