-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
readme: add example to use release artifacts #18
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -78,6 +78,74 @@ To add the automatic systemd unit loading to your distribution, store [`ensure-s | |
|
||
The tools normally generate squashfs images not only because of the compression benefits but also because it doesn't need root permissions and loop device mounts. | ||
|
||
### Consuming the published images | ||
|
||
There is a Github Action to build current recipes and to publish the built images as release artifacts. It's possible to directly consume the latest release from a Butane/Ignition configuration, example: | ||
```yaml | ||
# butane < config.yaml > config.json | ||
# ./flatcar_production_qemu.sh -i ./config.json | ||
variant: flatcar | ||
version: 1.0.0 | ||
storage: | ||
files: | ||
- path: /opt/extensions/docker/docker-24.0.5.raw | ||
contents: | ||
source: https://github.com/flatcar/sysext-bakery/releases/download/20230803/docker-24.0.5.raw | ||
- path: /opt/extensions/kubernetes/kubernetes-v1.27.4.raw | ||
contents: | ||
source: https://github.com/flatcar/sysext-bakery/releases/download/20230803/kubernetes-v1.27.4.raw | ||
- path: /etc/systemd/system-generators/torcx-generator | ||
links: | ||
- target: /opt/extensions/docker/docker-24.0.5.raw | ||
path: /etc/extensions/docker.raw | ||
hard: false | ||
- target: /opt/extensions/kubernetes/kubernetes-v1.27.4.raw | ||
path: /etc/extensions/kubernetes.raw | ||
hard: false | ||
``` | ||
|
||
In the generated artifacts, there is a `SHA256SUMS` holding the list of built images with their respective SHA256 digest. It allows to use `https://github.com/flatcar/sysext-bakery/releases/latest/download/` in a [`systemd-sysupdate`](https://www.freedesktop.org/software/systemd/man/sysupdate.d.html) configuration file, example: | ||
```yaml | ||
# butane < config.yaml > config.json | ||
# ./flatcar_production_qemu.sh -i ./config.json | ||
variant: flatcar | ||
version: 1.0.0 | ||
storage: | ||
files: | ||
- path: /etc/sysupdate.kubernetes.d/kubernetes.conf | ||
contents: | ||
inline: | | ||
[Transfer] | ||
Verify=false | ||
|
||
[Source] | ||
Type=url-file | ||
Path=https://github.com/flatcar/sysext-bakery/releases/latest/download/ | ||
[email protected] | ||
|
||
[Target] | ||
InstancesMax=3 | ||
Type=regular-file | ||
Path=/opt/extensions/kubernetes | ||
CurrentSymlink=/etc/extensions/kubernetes.raw | ||
- path: /etc/sysupdate.docker.d/docker.conf | ||
contents: | ||
inline: | | ||
[Transfer] | ||
Verify=false | ||
|
||
[Source] | ||
Type=url-file | ||
Path=https://github.com/flatcar/sysext-bakery/releases/latest/download/ | ||
[email protected] | ||
|
||
[Target] | ||
InstancesMax=3 | ||
Type=regular-file | ||
Path=/opt/extensions/docker | ||
CurrentSymlink=/etc/extensions/docker.raw | ||
``` | ||
pothos marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
### Creating a custom Docker sysext image | ||
|
||
The Docker releases publish static binaries including containerd and the only missing piece are the systemd units. | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it's a "hack" around the
torcx-generator
to prevent it to run. Otherwise Torcx unpackscontainerd.service
anddocker.{service,socket}
under/run/systemd/system/
which takes precedence over/usr/lib/systemd/system/docker.{service,socket}
and/usr/lib/systemd/system/containerd.service
merged bysystemd-sysext
.Which leads to this weird situation: