Commit Graph

8095 Commits

Author SHA1 Message Date
Avi Deitcher
1cf22ed0ac
Merge pull request #3812 from deitch/safer-cache-write
verbosity for pkg build and error catching
2022-08-22 11:32:55 -04:00
Avi Deitcher
bc5084df99 verbosity for pkg build and error catching
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2022-08-14 11:06:02 -07:00
Avi Deitcher
56a05f628f
Merge pull request #3808 from deitch/push-manifest-only
add ability to just update manifest
2022-08-07 01:26:18 -08:00
Avi Deitcher
acdfb911ac bump manifest-tool to support OCI index media-type and consume it
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2022-07-29 00:18:13 +03:00
Avi Deitcher
b28621b95a add ability to just update manifest
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2022-07-28 10:46:45 +03:00
Avi Deitcher
239d4d9502
Merge pull request #3764 from deitch/virtualization-framework
add support for virtualization framework
2022-07-28 10:46:13 +03:00
Avi Deitcher
9c149a61b5
Merge pull request #3809 from giggsoff/fix-start-of-builder
Restart of the builder container
2022-07-27 20:23:52 +03:00
Petr Fedchenkov
2fd7ff7ff0
Restart of the builder container
We check only for existence of builder container and do not start it in
case of not running state. We should start it for example after reboot
of node to be able to build something.

Signed-off-by: Petr Fedchenkov <giggsoff@gmail.com>
2022-07-27 19:01:47 +03:00
David Scott
4bb25bda97 Fix Makefile
Before:
```
djs55@m1 linuxkit % make
make -C ./src/cmd/linuxkit
tar cf - -C . . | docker run --rm --net=none --log-driver=none -i -e GOOS= -e GOARCH= linuxkit/go-compile:7b1f5a37d2a93cd4a9aa2a87db264d8145944006 --package github.com/linuxkit/linuxkit/src/cmd/linuxkit --ldflags "-X github.com/linuxkit/linuxkit/src/cmd/linuxkit/version.GitCommit=a201652e0dabfc7f62b14ac1a43b5572a8ecae9a -X github.com/linuxkit/linuxkit/src/cmd/linuxkit/version.Version="v0.8+"" -o linuxkit > tmp_linuxkit_bin.tar
gofmt...
govet...
golint...
ineffassign...
go build...

djs55@m1 linuxkit % file bin/linuxkit
bin/linuxkit: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), static-pie linked, Go BuildID=alxJ_URcsHKe5NnzKTgb/kT7Da_wy0_5L3jkAxzZ7/jVuNyKW2yhIE_wT0QFHL/g86-fS2la_qumeAPHD40, stripped

djs55@m1 linuxkit % ./bin/linuxkit
zsh: exec format error: ./bin/linuxkit
```

After:
```
djs55@m1 linuxkit % make
make -C ./src/cmd/linuxkit
CGO_ENABLED=1 go build -o /Users/djs55/github.com/djs55/linuxkit/bin/linuxkit  --ldflags "-X github.com/linuxkit/linuxkit/src/cmd/linuxkit/version.GitCommit=df47d22bce0a1767e6e0c967d9b516cc656d7db4 -X github.com/linuxkit/linuxkit/src/cmd/linuxkit/version.Version="v0.8+""
codesign --entitlements linuxkit.entitlements --force -s - /Users/djs55/github.com/djs55/linuxkit/bin/linuxkit
/Users/djs55/github.com/djs55/linuxkit/bin/linuxkit: replacing existing signature

djs55@m1 linuxkit % file ./bin/linuxkit
./bin/linuxkit: Mach-O 64-bit executable arm64

djs55@m1 linuxkit % ./bin/linuxkit
Please specify a command.

USAGE: linuxkit [options] COMMAND
```

Signed-off-by: David Scott <dave@recoil.org>
2022-07-25 08:01:32 +01:00
David Scott
e97dda48c5
Merge pull request #3807 from dgageot/memlogd-json
Write log entries as json
2022-07-25 07:48:11 +01:00
Avi Deitcher
de1d8cdeda add support for virtualization framework
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2022-07-22 16:55:47 +03:00
David Scott
2bf3726a81
Merge pull request #3778 from NeilGerring/fix-bad-rebase
Fix a merge conflict in openstack.yml example
2022-07-22 06:06:57 -07:00
David Gageot
acbef4424a
Make the linter happy
Signed-off-by: David Gageot <david.gageot@docker.com>
2022-07-22 15:02:19 +02:00
David Gageot
0b136bf80d
Write log entries as json
Signed-off-by: David Gageot <david.gageot@docker.com>
2022-07-22 14:41:23 +02:00
Avi Deitcher
ea61ff95ce
Merge pull request #3806 from giggsoff/update-buildkit
Update buildkit to have platform fix
2022-07-22 07:36:07 -04:00
Petr Fedchenkov
3540a1bc34
Update buildkit to have platform fix
We noticed that we use host arch when we want to use previously build
image in oci-layout. Let's use fix on buildkit side and improve test.

Signed-off-by: Petr Fedchenkov <giggsoff@gmail.com>
2022-07-22 12:25:39 +03:00
Avi Deitcher
3f25e09ab5
Merge pull request #3805 from giggsoff/fixes-for-chained
Ability to parse args from Dockerfile
2022-07-20 16:11:47 -04:00
Petr Fedchenkov
5763c4f4bc
Ability to parse args from Dockerfile
We should check if we have args in "FROM" and replace them:

ARG IMAGE=linuxkit/img
FROM ${IMAGE} as src

will be parsed as

FROM linuxkit/img as src

Signed-off-by: Petr Fedchenkov <giggsoff@gmail.com>
2022-07-20 17:07:43 +03:00
Avi Deitcher
403e8f9353
Merge pull request #3797 from deitch/use-images-from-cache
add support for building from cached images
2022-07-20 09:19:47 -04:00
Avi Deitcher
4e7f87e1ea
Merge pull request #3804 from giggsoff/allow-docker-multiarch
Allow store to docker multiarch builds
2022-07-18 19:08:26 +03:00
David Scott
8070434cad
Merge pull request #3542 from thaJeztah/configurable_socket
pkg/trim-after-delete: make docker socket path configurable
2022-07-17 03:26:52 -07:00
David Scott
a3327ef377
Merge pull request #3794 from giggsoff/net-admin-sysctl
Add CAP_NET_ADMIN capability to sysctl
2022-07-17 03:25:19 -07:00
Petr Fedchenkov
39f1649995
Allow store to docker multiarch builds
We do not allow to load into docker images that are targets another
platform differ from current arch. Assume this is because of no support
of manifest. But we can keep all images in place by adding arch suffix
and using tag without arch suffix to point onto current system arch. It
will help to use images from docker for another arch.

Signed-off-by: Petr Fedchenkov <giggsoff@gmail.com>
2022-07-15 16:51:18 +03:00
Avi Deitcher
a90ff542cd add support for building from cached images
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2022-07-14 12:53:34 +03:00
Avi Deitcher
44dfac2725
Merge pull request #3801 from waldner/master
New output format: iso-efi-initrd
2022-07-12 12:03:11 +03:00
Davide Brini
860934d5d9 New output format: iso-efi-initrd
This option was previously not available and required postprocessing of a `tar-kernel-initrd` output.

Comparison with `iso-efi`:

`iso-efi` only loads the kernel at boot, and the root filesystem is mounted from the actual boot media (eg, a CD-ROM - physical or emulated). This can often cause trouble (it has for us) for multiple reasons:
- the linuxkit kernel might not have the correct drivers built-in for the hardware (see #3154)
- especially with virtual or emulated CD-ROMs, performance can be abysmal: we saw the case where the server IPMI allowed using a ISO stored in AWS S3 over HTTP...you can imagine what happens when you start doing random I/O on the root fs in that case.
- The ISO image has the root device name baked in (ie, `/dev/sr0`) which fails if for some reason the CD-ROM we're running from doesn't end up using that device, so manual tweaking is required (see #2375)

`iso-efi-initrd`, on the other hand, packs the root filesystem as an initramfs (ie similar to what the raw output does, except that in this case we're preparing an ISO image), so both the kernel and the initramfs are loaded in memory by the boot loader and, once running, we don't need to worry about root devices or kernel drivers (and the speed is good, as everything runs in RAM).

Also, the generated ISO can be copied verbatim (eg with `dd`) onto a USB media and it still works.

Finally, the image size is much smaller compared to `iso-efi`.

IMHO, `iso-efi-initrd` could be used almost anywhere `iso-efi` would be used, or might even supersede it. I can't think of a scenario where one might explicitly want to use `iso-efi`.

Points to consider:

- Not tested under aarch64 as I don't have access to that arch. If the automated CI tests also test that, then it should be fine.
- I'm not sure what to put inside `images.yaml` for the `iso-efi-initrd` image. As it is it works of course (my personal image on docker hub), but I guess it'll have to be some more "official" image. However, that cannot be until this PR is merged, so it's kind of a chicken and egg situation. Please advise.
- I can look into adding the corresponding `iso-bios-initrd` builder if there is interest.

![cute seal](https://sites.psu.edu/siowfa16/files/2016/09/baby-seal-29vsgyf-288x300.jpg)

Signed-off-by: Davide Brini <waldner@katamail.com>
2022-07-11 20:26:14 +02:00
Avi Deitcher
ad3d8bdac0
Merge pull request #3800 from waldner/master
Fix: #3799 golint requires comments on non-main package for blank import
2022-07-10 17:58:49 +03:00
Davide Brini
9edeba42d7 Fix: #3799 golint requires comments on non-main package for blank import
Signed-off-by: Davide Brini <waldner@katamail.com>
2022-07-10 11:55:51 +02:00
Rolf Neugebauer
806c5c418d
Merge pull request #3796 from deitch/document-cache
add docs to the cache spec
2022-07-06 10:10:10 +01:00
Avi Deitcher
9c95286a35 add docs to the cache spec
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2022-07-01 15:30:22 +03:00
Avi Deitcher
7778f34c0c
Merge pull request #3791 from deitch/direct-buildkit
build directly with buildkit
2022-07-01 12:29:20 +03:00
Petr Fedchenkov
afefea9740
Add CAP_NET_ADMIN capability to sysctl
With linux kernel 5.15+ change of proc/sys/net/ipv4/ip_forward require
CAP_NET_ADMIN (https://github.com/torvalds/linux/commit/8292d7f6). We do
 not use ip_forward now, but we should be ready for future changes of
 conf files.

Signed-off-by: Petr Fedchenkov <giggsoff@gmail.com>
2022-06-28 16:55:32 +03:00
Avi Deitcher
0929aabe50 build directly with buildkit
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2022-06-28 10:36:30 +03:00
Avi Deitcher
fb111d3bbf add buildkit module and update packages and vendor
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2022-06-28 10:35:45 +03:00
Avi Deitcher
1073b2dd8d
Merge pull request #3790 from giggsoff/support-gcp-vtpm
Support for vTPM on GCP
2022-06-21 18:43:09 +02:00
Petr Fedchenkov
a51f40f68b
Support for vTPM on GCP
Add options to support vTPM-enabled VMs on GCP

Signed-off-by: Petr Fedchenkov <giggsoff@gmail.com>
2022-06-21 16:53:41 +03:00
Avi Deitcher
74b8215f0c
Merge pull request #3788 from deitch/pkg-dummy
test pkg/dummy
2022-06-08 09:29:22 +03:00
Avi Deitcher
58486bbe88 remove silent from Makefile so we can see what command it is doing; sort dirs for consistency
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2022-06-07 21:16:13 +03:00
Avi Deitcher
857f53cdff test pkg/dummy
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2022-06-07 21:16:13 +03:00
Avi Deitcher
0cb96dcfa0
Merge pull request #3789 from deitch/continue-after-noarchs
when no archs for pkg to build, should continue rather than return
2022-06-07 21:12:34 +03:00
Avi Deitcher
9218f2577d when no archs for pkg to build, should continue rather than return, or it misses other packages
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2022-06-07 19:45:35 +03:00
Avi Deitcher
b56a0df58d
Merge pull request #3787 from deitch/skip-build-if-no-platforms 2022-06-07 13:24:59 +03:00
Avi Deitcher
02fd6c48ee do not push if the tag and digest are identical
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2022-06-07 10:45:29 +03:00
Avi Deitcher
6cd8a874a6 do not try to build or push if no architectures are available
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2022-06-07 10:25:41 +03:00
Avi Deitcher
a8c4b174a3
Merge pull request #3785 from deitch/login-docker-hub
login to docker hub before publishing
2022-06-06 21:26:38 +03:00
Rolf Neugebauer
b33bda7a33
Merge pull request #3722 from gabchab/openssl-in-kernel-build
Add openssl to the kernel-build
2022-06-03 21:55:47 +01:00
Rolf Neugebauer
9e333a1358
Merge pull request #3775 from deitch/doc-kernel-builder
add docs about how to find the builder
2022-06-03 20:48:20 +01:00
Avi Deitcher
9c673d5650 login to docker hub before publishing
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2022-05-29 14:52:21 -07:00
Avi Deitcher
04aaebfa71
Merge pull request #3784 from deitch/download-linuxkit-in-dir
ensure bin/ dir exists, parametrize linuxkit filename
2022-05-29 11:56:45 -07:00
Avi Deitcher
a848205f9d ensure bin/ dir exists, parametrize linuxkit filename
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2022-05-29 10:27:55 -07:00