-
Notifications
You must be signed in to change notification settings - Fork 53
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
Derivatives examples #1125
Closed
Closed
Derivatives examples #1125
Changes from 1 commit
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
b447a9b
Bump toolchain/yq to 4.19.1 (#1115)
cOS-cibot ffc674d
ci: Fixup docker socket permission in runner image (#1117)
mudler 9e95f32
ci: github-runner add affinity rules (#1118)
mudler 8d38484
Bump luet-cosing to republish (#1121)
f68f60f
derivatives examples
Ludea 32f281c
move ubuntu luet file into right folder
Ludea fddf11a
derivatives examples
Ludea daf5d28
move ubuntu luet file into right folder
Ludea 9f36758
Fix path
Ludea 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 |
---|---|---|
@@ -0,0 +1,53 @@ | ||
ARG LUET_VERSION=0.20.6 | ||
FROM quay.io/luet/base:$LUET_VERSION AS luet | ||
|
||
FROM fedora:35 | ||
|
||
ENV COSIGN_EXPERIMENTAL=1 | ||
ENV COSIGN_REPOSITORY=raccos/releases-orange | ||
|
||
RUN dnf install -y \ | ||
NetworkManager \ | ||
squashfs-tools \ | ||
dracut-live \ | ||
efibootmgr \ | ||
audit \ | ||
kernel \ | ||
systemd \ | ||
parted \ | ||
dracut \ | ||
e2fsprogs \ | ||
dosfstools \ | ||
coreutils \ | ||
device-mapper \ | ||
grub2 \ | ||
which \ | ||
curl \ | ||
nano \ | ||
gawk \ | ||
haveged \ | ||
tar \ | ||
rsync | ||
|
||
# Copy the luet config file pointing to the upgrade repository | ||
COPY conf/luet.yaml /etc/luet/luet.yaml | ||
|
||
# Copy luet from the official images | ||
COPY --from=luet /usr/bin/luet /usr/bin/luet | ||
|
||
RUN luet install -y meta/cos-verify | ||
|
||
RUN luet install --plugin luet-cosign -y \ | ||
meta/cos-minimal \ | ||
utils/k9s \ | ||
utils/nerdctl | ||
|
||
COPY files/ / | ||
|
||
RUN dracut --regenerate-all -f | ||
RUN kernel=$(ls /boot/vmlinuz-* | head -n1) && \ | ||
ln -sf "${kernel#/boot/}" /boot/vmlinuz | ||
|
||
RUN kernel=$(ls /lib/modules | head -n1) && \ | ||
cd /boot && \ | ||
ln -sf *.img initrd |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
logging: | ||
color: false | ||
enable_emoji: false | ||
general: | ||
debug: false | ||
spinner_charset: 9 | ||
repositories: | ||
- name: "cos" | ||
description: "cOS official" | ||
type: "docker" | ||
enable: true | ||
cached: true | ||
priority: 1 | ||
verify: false | ||
urls: | ||
- "quay.io/costoolkit/releases-blue" |
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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# cOS configuration file | ||
# This file allows to tweak cOS configuration such as: default upgrade/recovery image and GRUB menu entry | ||
|
||
# Disable/enable image verification during upgrades ( default: true ) | ||
VERIFY=false | ||
|
||
# Disable/enable upgrades via release channels instead of container images. ( default: true ) | ||
CHANNEL_UPGRADES=false | ||
|
||
# Default container image used for upgrades. ( defaults to system/cos with channel CHANNEL_UPGRADES enabled ) | ||
UPGRADE_IMAGE="quay.io/mudler/cos-test:cos-standard" | ||
|
||
# Default recovery image to use when upgrading the recovery partition | ||
# ( defaults to recovery/cos in vanilla cOS images with channel CHANNEL_UPGRADES enabled. Otherwise it defaults to UPGRADE_IMAGE ). | ||
RECOVERY_IMAGE="quay.io/mudler/cos-test:cos-standard" | ||
|
||
# GRUB entry to display on boot. ( defaults: cOS ) | ||
GRUB_ENTRY_NAME="example" | ||
|
||
# Space separated list of additional paths that are used to | ||
# source cloud-config from. ( defaults paths are: /system/oem /oem/ /usr/local/cloud-config/ ) | ||
CLOUD_INIT_PATHS="" | ||
|
||
# This is the directory that can be used to store cloud-init files that can be enabled/disabled in runtime | ||
# by cos-features. ( defaults to /system/features ) | ||
COS_FEATURESDIR="/system/features" | ||
|
||
# This is the repository that hosts the signature files used by cosign and luet-cosign plugin during upgrade/deploy to | ||
# check the artifact signatures | ||
COSIGN_REPOSITORY="raccos/releases-blue" | ||
|
||
# This sets keyless verify on building packages with luet and the luet-cosign plugin. | ||
# 1 = enabled keyless, 0 = disabled, uses normal public key verification | ||
COSIGN_EXPERIMENTAL=1 | ||
|
||
# This sets the location of the public key to use to verify the packages installed by luet during upgrade/deploy | ||
# This can be set to file, URL, KMS URI or Kubernetes Secret | ||
# This is only used if COSIGN_EXPERIMENTAL is set to 0 | ||
COSIGN_PUBLIC_KEY_LOCATION="" | ||
|
||
# Default size (in MB) of disk image files (.img) created during upgrades | ||
DEFAULT_IMAGE_SIZE=3240 | ||
|
||
# Path to default configuration grub file | ||
GRUBCONF="/etc/cos/grub.cfg" |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
VERSION="35" | ||
PRETTY_NAME="Fedora" |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
17 changes: 17 additions & 0 deletions
17
examples/standard/opensuse/files/system/oem/04_accounting.yaml
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Default cOS OEM configuration file | ||
# | ||
# This file is part of cOS and will get reset during upgrades. | ||
# | ||
# Before you change this file manually, | ||
# consider copying this file to /usr/local/cloud-config or | ||
# copy the file with a prefix starting by 90, e.g. /oem/91_custom.yaml | ||
name: "Default user" | ||
stages: | ||
initramfs: | ||
- name: "Setup users" | ||
ensure_entities: | ||
- path: /etc/shadow | ||
entity: | | ||
kind: "shadow" | ||
username: "root" | ||
password: "cos" |
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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
ARG LUET_VERSION=0.20.6 | ||
FROM quay.io/luet/base:$LUET_VERSION AS luet | ||
|
||
FROM ubuntu:20.04 | ||
|
||
ENV COSIGN_EXPERIMENTAL=1 | ||
ENV COSIGN_REPOSITORY=raccos/releases-orange | ||
|
||
RUN apt install -y \ | ||
systemd \ | ||
grub2-common \ | ||
iproute2 \ | ||
squashfs-tools \ | ||
parted dracut \ | ||
dracut-network \ | ||
e2fsprogs \ | ||
dosfstools \ | ||
coreutils \ | ||
debianutils \ | ||
curl \ | ||
nano \ | ||
gawk \ | ||
haveged \ | ||
rsync | ||
|
||
# Copy the luet config file pointing to the upgrade repository | ||
COPY conf/luet.yaml /etc/luet/luet.yaml | ||
|
||
# Copy luet from the official images | ||
COPY --from=luet /usr/bin/luet /usr/bin/luet | ||
|
||
RUN luet install -y meta/cos-verify | ||
|
||
RUN luet install --plugin luet-cosign -y \ | ||
meta/cos-minimal \ | ||
utils/k9s \ | ||
utils/nerdctl | ||
|
||
COPY files/ / | ||
|
||
RUN dracut --regenerate-all -f | ||
RUN kernel=$(ls /boot/vmlinuz-* | head -n1) && \ | ||
ln -sf "${kernel#/boot/}" /boot/vmlinuz |
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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# cOS configuration file | ||
# This file allows to tweak cOS configuration such as: default upgrade/recovery image and GRUB menu entry | ||
|
||
# Disable/enable image verification during upgrades ( default: true ) | ||
VERIFY=false | ||
|
||
# Disable/enable upgrades via release channels instead of container images. ( default: true ) | ||
CHANNEL_UPGRADES=false | ||
|
||
# Default container image used for upgrades. ( defaults to system/cos with channel CHANNEL_UPGRADES enabled ) | ||
UPGRADE_IMAGE="quay.io/mudler/cos-test:cos-standard" | ||
|
||
# Default recovery image to use when upgrading the recovery partition | ||
# ( defaults to recovery/cos in vanilla cOS images with channel CHANNEL_UPGRADES enabled. Otherwise it defaults to UPGRADE_IMAGE ). | ||
RECOVERY_IMAGE="quay.io/mudler/cos-test:cos-standard" | ||
|
||
# GRUB entry to display on boot. ( defaults: cOS ) | ||
GRUB_ENTRY_NAME="example" | ||
|
||
# Space separated list of additional paths that are used to | ||
# source cloud-config from. ( defaults paths are: /system/oem /oem/ /usr/local/cloud-config/ ) | ||
CLOUD_INIT_PATHS="" | ||
|
||
# This is the directory that can be used to store cloud-init files that can be enabled/disabled in runtime | ||
# by cos-features. ( defaults to /system/features ) | ||
COS_FEATURESDIR="/system/features" | ||
|
||
# This is the repository that hosts the signature files used by cosign and luet-cosign plugin during upgrade/deploy to | ||
# check the artifact signatures | ||
COSIGN_REPOSITORY="raccos/releases-orange" | ||
|
||
# This sets keyless verify on building packages with luet and the luet-cosign plugin. | ||
# 1 = enabled keyless, 0 = disabled, uses normal public key verification | ||
COSIGN_EXPERIMENTAL=1 | ||
|
||
# This sets the location of the public key to use to verify the packages installed by luet during upgrade/deploy | ||
# This can be set to file, URL, KMS URI or Kubernetes Secret | ||
# This is only used if COSIGN_EXPERIMENTAL is set to 0 | ||
COSIGN_PUBLIC_KEY_LOCATION="" | ||
|
||
# Default size (in MB) of disk image files (.img) created during upgrades | ||
DEFAULT_IMAGE_SIZE=3240 | ||
|
||
# Path to default configuration grub file | ||
GRUBCONF="/etc/cos/grub.cfg" |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
VERSION="20.04" | ||
PRETTY_NAME="Ubuntu" |
17 changes: 17 additions & 0 deletions
17
examples/standard/ubuntu/files/system/oem/04_accounting.yaml
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Default cOS OEM configuration file | ||
# | ||
# This file is part of cOS and will get reset during upgrades. | ||
# | ||
# Before you change this file manually, | ||
# consider copying this file to /usr/local/cloud-config or | ||
# copy the file with a prefix starting by 90, e.g. /oem/91_custom.yaml | ||
name: "Default user" | ||
stages: | ||
initramfs: | ||
- name: "Setup users" | ||
ensure_entities: | ||
- path: /etc/shadow | ||
entity: | | ||
kind: "shadow" | ||
username: "root" | ||
password: "cos" |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
logging: | ||
color: false | ||
enable_emoji: false | ||
general: | ||
debug: false | ||
spinner_charset: 9 | ||
repositories: | ||
- name: "cos" | ||
description: "cOS official" | ||
type: "docker" | ||
enable: true | ||
cached: true | ||
priority: 1 | ||
verify: false | ||
urls: | ||
- "quay.io/costoolkit/releases-orange" |
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.
I'd rather move this out in favor of adding this conf file directly: https://github.com/rancher-sandbox/cOS-toolkit/blob/master/images/framework/cos.yaml
and actually adding a step in the
Dockerfile
to add the file directly, e.g.:with a config file per-flavor in there.
In this way the example should also cover arm64 out of the box (of course, the packages that will be pulled might change slightly from the zypper/dnf/.. commands, so that still might need to be arch-specific)
wdyt @Itxaka @davidcassany ?
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.
👍