Commit Graph

4975 Commits

Author SHA1 Message Date
Ian Campbell
12e6a85661 Make linuxkit pkg build on an unsupported arch a nop
Rather than a hard fail. This allows batch builds of a set of packages without
the surrounding loop needing to be away of the possibility.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-10 10:42:58 +01:00
Ian Campbell
e0b537b19e Revert "Rename poweroff to test-poweroff for consistency"
This reverts commit c889f13251.

Changing the name breaks signing.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-10 10:33:07 +01:00
Ian Campbell
57225335bc Correct manifest push without content trust
The script expects an empty second argument to mean no trust and anything else
to mean trust.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-10 10:22:24 +01:00
Ian Campbell
d055ab31d8 tools: mkimage-*: disable content trust
Signing is not setup for these repositories. It seems they haven't been updated
since before trust was added since their previous Makefile metadata (which was
translated in build.yml) did not contain `NOTRUST=1`.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-10 10:13:15 +01:00
Ian Campbell
a237b51511 Bump alpine base across the board.
By running:

    ./scripts/update-component-sha.sh --image linuxkit/alpine ad35b6ddbc70faa07e59a9d7dee7707c08122e8d

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-10 09:55:45 +01:00
Ian Campbell
206fc78a6a Update alpine package
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-10 08:54:44 +00:00
Ian Campbell
13d11f49ba Rename "tag*" Makefile targets to "build*"
This better matches the `linuxkit pkg build` nomenclature.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-09 16:48:48 +01:00
Ian Campbell
9bb87c0091 Remove unused pkg/package.mk
All uses now converted to `linuxkit pkg`

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-09 16:40:33 +01:00
Ian Campbell
298ef8520d Convert some of projects/kubernetes/* to linuxkit pkg build
This just covers those using pkg/package.mk.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-09 16:40:00 +01:00
Ian Campbell
fc3e659f0e Convert all of pkg/* to linuxkit pkg build
This was done with the following "script":

    git rm pkg/{auditd,binfmt,init}/Makefile
    sed -e 's/IMAGE=/image: /g' -i pkg/*/Makefile
    sed -e 's/NETWORK=1/network: true/g' -i pkg/*/Makefile
    sed -e 's/ARCHES=x86_64/arches:\n  - amd64/g' -i pkg/*/Makefile
    sed -e '/DEPS:\?=/d' -i pkg/*/Makefile
    sed -e '/ARCHES=SKIP/d' -i pkg/node_exporter/Makefile
    sed -e 's/include \.\.\/package.mk//g' -i pkg/*/Makefile
    sed -e '/^$/d' -i pkg/*/Makefile
    git mv pkg/node_exporter/Makefile pkg/node_exporter/build.yml-skip
    for i in pkg/*/Makefile ; do git mv $i ${i%Makefile}build.yml ; done

and manual update of pkg/Makefile.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-09 16:20:26 +01:00
Ian Campbell
c889f13251 Rename poweroff to test-poweroff for consistency
This was the only one of `test/pkg` not to have a `test-` prefix.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-09 16:20:26 +01:00
Ian Campbell
588d095e19 Convert all of test/pkg/* to linuxkit pkg build
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-09 16:20:26 +01:00
Ian Campbell
624e7c82f1 Convert most of tools/* to linuxkit pkg build
tools/alpine and tools/guestfs are omitted since they do not currently use
pkg/package.mk and do their own thing. Slightly hacky arrangements are made for
these. Note that previously they were only recursed into for their default
target (push) and that behaviour is retained.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-09 16:20:25 +01:00
Ian Campbell
f7c50156c5 tools: pull linuxkit/guestfs by digest only (not digest+tag)
Current versions of Docker complain:

    Sending build context to Docker daemon   5.12kB
    Step 1/4 : FROM linuxkit/guestfs@sha256:62e810869e83dabe04af7ac8fcd81d9f177d986a3424dcb9c4eb5439993c962f
    ...
    Successfully tagged linuxkit/mkimage-gcp:736880776838c8f41c081276d9c017ae6adbf1bb-amd64
    Tagging linuxkit/guestfs@sha256:62e810869e83dabe04af7ac8fcd81d9f177d986a3424dcb9c4eb5439993c962f as linuxkit/guestfs:aecc40bf84ce4f4238e06934c46d7cc570a39eed@sha256:62e810869e83dabe04af7ac8fcd81d9f177d986a3424dcb9c4eb5439993c962f
    refusing to create a tag with a digest reference
    ../../pkg/package.mk:82: recipe for target 'tag-y' failed

Just use the digest for now. Perhaps someone will have time to fixup this build
properly at some point.

Make the same change to test/pkg/ltp.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-09 16:20:10 +01:00
Ian Campbell
ca70b7b6af Update pkg/Makefile and test/pkg/Makefile based on tools/Makefile
Using explicit targets is cleaner and easier to follow.

Also add `forcepush` to pkg and test/pkg and make `push` explicit.

The `dirs` phony was non-existent in all three cases. Likewise `$(DIR)` wasn't
used in that way in pkg or test/pkg and is nolonger used in that way in tools.

Finally, `clean` was bogus in all cases (tools cleaned a thing which never
exists and pkg and test/pkg were a syntax error).

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-09 16:20:08 +01:00
Ian Campbell
d11e49d113 Fixup linuxkit pkg debug output (space wrong side of variable)
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-09 16:19:20 +01:00
Justin Cormack
d0882b9674 Merge pull request #2571 from ijc/linuxkit-pkg
Implement package build, push and show-tag in linuxkit tool
2017-10-09 13:59:02 +01:00
Rolf Neugebauer
74e9dddb21 Merge pull request #2575 from yankcrime/openstack_metadata
[OpenStack] Metadata service support
2017-10-09 13:54:11 +01:00
Rolf Neugebauer
cca98d7944 Merge pull request #2577 from justincormack/mobyup
Update Moby tool
2017-10-09 13:53:15 +01:00
Justin Cormack
61d1906e51 Update Moby
Several fixes and updates since last update.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-10-09 12:30:47 +01:00
Nick Jones
d73092adca
Update metadata image references
Signed-off-by: Nick Jones <nick@dischord.org>
2017-10-09 12:27:00 +01:00
Ian Campbell
2f10af2bf3 linuxkit-push-manifest is no longer required in $PATH
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-09 11:25:20 +01:00
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
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
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