Skip to content
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

Update butane, ignition, fcos + whitespace cleanup #4

Merged
merged 3 commits into from
Mar 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions fedora-coreos/provisioning/fcos-lab-tutorial.bu
Original file line number Diff line number Diff line change
Expand Up @@ -72,25 +72,25 @@ storage:
- path: /usr/local/bin/butane
mode: 0755
contents:
source: https://github.com/coreos/butane/releases/download/v0.20.0/butane-x86_64-unknown-linux-gnu
source: https://github.com/coreos/butane/releases/download/v0.23.0/butane-x86_64-unknown-linux-gnu
- path: /usr/local/bin/ignition-validate
mode: 0755
contents:
source: https://github.com/coreos/ignition/releases/download/v2.18.0/ignition-validate-x86_64-linux
source: https://github.com/coreos/ignition/releases/download/v2.20.0/ignition-validate-x86_64-linux
- path: /usr/local/bin/launch_coreos_vm
mode: 0755
contents:
source: https://raw.githubusercontent.com/coreos/coreos-tutorials/Patch_main/fedora-coreos/provisioning/launch_coreos_vm
source: https://raw.githubusercontent.com/coreos/coreos-tutorials/main/fedora-coreos/provisioning/launch_coreos_vm
- path: /srv/dummy.ign
mode: 0755
contents:
inline: '{"ignition":{"version":"3.4.0"}}'
- path: /srv/fedora-coreos.qcow2.xz
mode: 0644
contents:
source: https://builds.coreos.fedoraproject.org/prod/streams/stable/builds/40.20240519.3.0/x86_64/fedora-coreos-40.20240519.3.0-qemu.x86_64.qcow2.xz
source: https://builds.coreos.fedoraproject.org/prod/streams/stable/builds/41.20250302.3.2/x86_64/fedora-coreos-41.20250302.3.2-qemu.x86_64.qcow2.xz
verification:
hash: sha512-7bc2f327f5d29f26ebf6aaa6983d28946feed3ad1c062751ea3f7f9cee065e7822301c070031015ce4a181fd301783035d7ea953113fb6956ea04a541cf39c85
hash: sha256-49f42308233ed373252d60f991eef41266185c687187277a3f303bcd57b0068d
- path: /usr/local/bin/setup-users.sh
mode: 0755
contents:
Expand Down Expand Up @@ -118,7 +118,7 @@ systemd:
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/rpm-ostree install --apply-live --allow-inactive $RPMS
ExecStart=sed -i s/192.168.122/192.168.124/g /etc/libvirt/qemu/networks/default.xml
ExecStart=sed -i s/192.168.122/192.168.124/g /etc/libvirt/qemu/networks/default.xml
ExecStart=systemctl enable --now virtnetworkd.service libvirtd.socket
ExecStart=/bin/touch /var/lib/%N.stamp
[Install]
Expand Down
17 changes: 8 additions & 9 deletions fedora-coreos/provisioning/launch_coreos_vm
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ set -euo pipefail
print_help() {
cat 1>&2 <<'EOF'
Usage: $0 [OPTIONS]
Launch a coreOS VM instance, optionnally attaching an ignition config.

Launch a coreOS VM instance, optionnally attaching an ignition config.

The following options are available:

Expand All @@ -16,7 +16,7 @@ Usage: $0 [OPTIONS]


The following environnement variables are aslo supported:

BACKING_STORE_PATH Set a custom path for the boot backing store
VIRT_INSTALL_EXTRA_ARGS Adds extra arguments to the virt-install command

Expand Down Expand Up @@ -51,7 +51,7 @@ while getopts 'hi:b:d:' FLAG; do
echo "error: unrecognized option: $FLAG"
;;
esac
done
done
shift "$((OPTIND -1))"

if test -n "${IGNITION_CONFIG}" && test -n "${BUTANE_CONFIG}"; then
Expand All @@ -67,11 +67,11 @@ fi


# Setup the correct SELinux label to allow access to the config
if test -n "${IGNITION_CONFIG}"; then
if test -n "${IGNITION_CONFIG}"; then
chcon --verbose --type svirt_home_t "${IGNITION_CONFIG}"
IGNITION_CONFIG=$(realpath ${IGNITION_CONFIG})
else
IGNITION_CONFIG="/srv/dummy.ign"
else
IGNITION_CONFIG="/srv/dummy.ign"
fi


Expand All @@ -83,7 +83,6 @@ virt-install --transient --name=fcos-"${USER}" --vcpus=2 --ram=1024 --os-variant
"${IGN_CMDLINE}" \
--disk=size=20,backing_store="${BACKING_STORE_PATH}" ${DISK_OPT:-} \
${VIRT_INSTALL_EXTRA_ARGS:-}




virsh destroy fcos-"${USER}"