#1 [DO NOT MERGE] Initial KIWI descriptions
Opened 5 months ago by ngompa. Modified 4 months ago

file modified
+33
@@ -2,6 +2,39 @@ 

  

  This contains the KIWI descriptions for building the CentOS Hyperscale spin for CentOS Stream 9.

  

+ ## Spin variants

+ 

+ * Cloud (image type: `oem`, image profiles: `OpenStack`/`AWSEC2`/`Azure`/`GCE`)

+ * Workstation GNOME (image type: `iso`, image profiles: `GNOME-Live`)

+ * Workstation KDE (image type: `iso`, image profiles: `KDE-Live`)

+ 

+ ## Spin build quickstart

+ 

+ ### Podman

+ 

+ The instructions below will use the `podman` command. Docker may work, but it's not tested or supported.

+ 

+ First, pull down the container of the required environment (CentOS Stream 9).

+ 

+ ```bash

+ $ sudo podman pull quay.io/centoshyperscale/centos:stream9

+ ```

+ 

+ Assuming you're in the root directory of the Git checkout, set up the container:

+ 

+ ```bash

+ $ sudo podman run --privileged --rm -it -v $PWD:/code:z -w /code quay.io/centoshyperscale/centos:stream9 /bin/bash

+ ```

+ 

+ Once in the container environment, set up your development environment and run the image build (substitute `<image_type>` and `<image_profile>` for the appropriate settings):

+ 

+ ```bash

+ # Install kiwi

+ []$ dnf --assumeyes install kiwi

+ # Run the image build

+ []$ kiwi-ng --type=<image_type> --profile=<image_profile> --color-output system build --description ./ --target-dir ./outdir

+ ```

+ 

  ## Licensing

  

  This is free software: you can redistribute it and/or modify

file added
+18
@@ -0,0 +1,18 @@ 

+ <image>

+ 	<profiles>

+ 		<profile name="BootCore" description="Boot core packages"/>

+ 	</profiles>

+ 	<packages type="image" profiles="BootCore">

+ 		<package name="grub2-efi-aa64" arch="aarch64"/>

+ 		<package name="grub2-efi-aa64-modules" arch="aarch64"/>

+ 		<package name="grub2-efi-x64" arch="x86_64"/>

+ 		<package name="grub2-efi-x64-modules" arch="x86_64"/>

+ 		<package name="grub2-pc" arch="x86_64"/>

+ 		<package name="grub2-pc-modules" arch="x86_64"/>

+ 		<package name="shim-signed-aa64" arch="aarch64"/>

+ 		<package name="shim-signed-x64" arch="x86_64"/>

+ 		<package name="kernel-core"/>

+ 		<package name="systemd-oomd-defaults"/>

+ 		<package name="systemd-resolved"/>

+ 	</packages>

+ </image>

@@ -0,0 +1,28 @@ 

+ <image>

+ 	<profiles>

+ 		<profile name="DesktopCommon" description="Common desktop packages"/>

+ 		<profile name="GNOME-Desktop" description="GNOME Desktop">

+ 			<requires profile="DesktopCommon"/>

+ 		</profile>

+ 		<profile name="KDE-Desktop" description="KDE Plasma Desktop">

+ 			<requires profile="DesktopCommon"/>

+ 		</profile>

+ 	</profiles>

+ 	<packages type="image" profiles="DesktopCommon">

+ 		<package name="centos-backgrounds"/>

+ 	</packages>

+ 	<packages type="image" profiles="GNOME-Desktop">

+ 		<namedCollection name="workstation-product-environment"/>

+ 		<ignore name="@standard"/>

+ 	</packages>

+ 	<packages type="image" profiles="KDE-Desktop">

+ 		<ignore name="@admin-tools"/>

+ 		<ignore name="gnome-disk-utility"/>

+ 		<ignore name="system-config-printer"/>

+ 		<namedCollection name="kde-desktop-environment"/>

+ 		<namedCollection name="firefox"/>

+ 		<namedCollection name="kde-apps"/>

+ 		<namedCollection name="kde-media"/>

+ 		<package name="fuse"/>

+ 	</packages>

+ </image>

@@ -0,0 +1,29 @@ 

+ <image>

+ 	<profiles>

+ 		<profile name="LiveInstall" description="Live Install ISO">

+ 			<requires profile="BootCore"/>

+ 		</profile>

+ 	</profiles>

+ 	<preferences profiles="LiveInstall">

+ 		<type image="iso" publisher="CentOS Hyperscale SIG" primary="true" flags="dmsquash" firmware="uefi" kernelcmdline="splash quiet" mediacheck="false"/>

+ 	</preferences>

+ 	<packages type="image" profiles="LiveInstall">

+ 		<!-- The point of a live image is to install -->

+ 		<namedCollection name="anaconda-tools"/>

+ 		<package name="anaconda"/>

+ 		<package name="anaconda-install-env-deps"/>

+ 		<package name="anaconda-live"/>

+ 		<!-- Need this for SVG release note images -->

+ 		<package name="aajohan-comfortaa-fonts"/>

+ 		<package name="dracut-live"/>

+ 		<package name="glibc-all-langpacks"/>

+ 		<package name="kernel"/>

+ 		<package name="kernel-modules"/>

+ 		<package name="kernel-modules-extra"/>

+ 		<package name="livesys-scripts"/>

+ 		<package name="btrfs-progs"/>

+ 		<package name="udisks2-btrfs"/>

+ 		<ignore name="@dial-up"/>

+ 		<ignore name="gfs2-utils"/>

+ 	</packages>

+ </image>

@@ -0,0 +1,6 @@ 

+ <image>

+ 	<users profiles="Azure,AWSEC2,OpenStack,LiveInstall">

+ 		<!-- The password here does not matter, it will be erased in config.sh -->

+ 		<user name="root" groups="root" password="linux" home="/root" pwdformat="plain" />

+ 	</users>

+ </image>

file added
+88
@@ -0,0 +1,88 @@ 

+ #!/bin/bash

+ 

+ set -euxo pipefail

+ 

+ #======================================

+ # Functions...

+ #--------------------------------------

+ test -f /.kconfig && . /.kconfig

+ test -f /.profile && . /.profile

+ 

+ #======================================

+ # Greeting...

+ #--------------------------------------

+ echo "Configure image: [$kiwi_iname]-[$kiwi_profiles]..."

+ 

+ #======================================

+ # Turn on sticky vendors

+ #--------------------------------------

+ echo "allow_vendor_change=True" >> /etc/dnf/dnf.conf

+ 

+ #======================================

+ # Mark for SELinux autorelabeling

+ #--------------------------------------

+ if [[ "$kiwi_profiles" != *"Live"* ]]; then

+ 	touch /.autorelabel

+ fi

+ 

+ #======================================

+ # Set SELinux booleans

+ #--------------------------------------

+ ## Fixes KDE Plasma, see rhbz#2058657

+ setsebool -P selinuxuser_execmod 1

+ 

+ #======================================

+ # Clear machine specific configuration

+ #--------------------------------------

+ ## Force generic hostname

+ echo "localhost" > /etc/hostname

+ ## Clear machine-id on pre generated images

+ truncate -s 0 /etc/machine-id

+ 

+ #======================================

+ # Delete & lock the root user password

+ #--------------------------------------

+ if [[ "$kiwi_profiles" == *"AWS"* ]] || [[ "$kiwi_profiles" == *"Azure"* ]] || [[ "$kiwi_profiles" == *"OpenStack"* ]] || [[ "$kiwi_profiles" == *"Live"* ]]; then

+ 	passwd -d root

+ 	passwd -l root

+ fi

+ 

+ #======================================

+ # Setup default services

+ #--------------------------------------

+ 

+ if [[ "$kiwi_profiles" == *"AWS"* ]] || [[ "$kiwi_profiles" == *"Azure"* ]] || [[ "$kiwi_profiles" == *"OpenStack"* ]]; then

+ 	## Enable cloud-init

+ 	systemctl enable cloud-config.service cloud-final.service cloud-init.service cloud-init-local.service cloud-init.target

+ fi

+ 

+ if [[ "$kiwi_profiles" == *"Live"* ]]; then

+ 	## Enable livesys services

+ 	systemctl enable livesys.service livesys-late.service

+ 	if [[ "$kiwi_profiles" == *"GNOME"* ]]; then

+ 		echo 'livesys_session="gnome"' > /etc/sysconfig/livesys

+ 	fi

+ 	if [[ "$kiwi_profiles" == *"KDE"* ]]; then

+ 		echo 'livesys_session="kde"' > /etc/sysconfig/livesys

+ 	fi

+ fi

+ 

+ ## Enable chrony

+ systemctl enable chronyd.service

+ ## Enable oomd

+ systemctl enable systemd-oomd.service

+ ## Enable resolved

+ systemctl enable systemd-resolved.service

+ ## Enable persistent journal

+ mkdir -p /var/log/journal

+ 

+ #======================================

+ # Setup default target

+ #--------------------------------------

+ if [[ "$kiwi_profiles" == *"GNOME"* ]] || [[ "$kiwi_profiles" == *"KDE"* ]]; then

+ 	systemctl set-default graphical.target

+ else

+ 	systemctl set-default multi-user.target

+ fi

+ 

+ exit 0

file added
+41
@@ -0,0 +1,41 @@ 

+ <?xml version="1.0" encoding="utf-8"?>

+ 

+ <image schemaversion="7.4" name="CentOS-Stream-Hyperscale-Spin">

+ 	<description type="system">

+ 		<author>CentOS Hyperscale SIG</author>

+ 		<contact>sig-hyperscale@centosproject.org</contact>

+ 		<specification>CentOS Stream Hyperscale Spin</specification>

+ 	</description>

+ 	<preferences>

+ 		<version>9.0.0</version>

+ 		<packagemanager>dnf</packagemanager>

+ 		<locale>en_US</locale>

+ 		<keytable>us</keytable>

+ 		<timezone>UTC</timezone>

+ 		<rpm-check-signatures>true</rpm-check-signatures>

+ 		<release-version>9</release-version>

+ 	</preferences>

+ 	<include from="file://repositories/core.xml"/>

+ 	<include from="file://repositories/epel.xml"/>

+ 	<include from="file://repositories/hyperscale.xml"/>

+ 	<include from="file://components/boot.xml"/>

+ 	<include from="file://components/desktop-environments.xml"/>

+ 	<include from="file://components/liveinstall.xml"/>

+ 	<include from="file://components/users.xml"/>

+ 	<include from="file://platforms/cloud.xml"/>

+ 	<include from="file://platforms/workstation.xml"/>

+ 	<packages type="image">

+ 		<ignore name="rhc"/> <!-- work around broken epel comps groups -->

+ 		<namedCollection name="core"/>

+ 		<package name="btrfs-progs"/>

+ 		<package name="chrony"/>

+ 		<package name="centos-stream-spin-hyperscale-release"/>

+ 		<package name="python3-dnf-plugin-cow"/>

+ 		<package name="nano"/>

+ 		<package name="yum-utils"/>

+ 	</packages>

+ 	<packages type="bootstrap">

+ 		<package name="basesystem"/>

+ 		<package name="filesystem"/>

+ 	</packages>

+ </image>

file added
+90
@@ -0,0 +1,90 @@ 

+ <image>

+ 	<profiles>

+ 		<profile name="CloudCore" description="Cloud spin core packages">

+ 			<requires profile="BootCore"/>

+ 		</profile>

+ 		<profile name="Azure" description="Azure Guest Image">

+ 			<requires profile="CloudCore"/>

+ 		</profile>

+ 		<profile name="AWSEC2" description="AWS EC2 HVM Guest Image">

+ 			<requires profile="CloudCore"/>

+ 		</profile>

+ 		<profile name="GCE" description="GCE Guest Image">

+ 			<requires profile="CloudCore"/>

+ 		</profile>

+ 		<profile name="OpenStack" description="OpenStack Guest Image">

+ 			<requires profile="CloudCore"/>

+ 		</profile>

+ 	</profiles>

+ 	<preferences profiles="Azure">

+ 		<type image="oem" filesystem="btrfs" kernelcmdline="USE_BY_UUID_DEVICE_NAMES=1 earlyprintk=ttyS0 console=ttyS0 rootdelay=300 net.ifnames=0 dis_ucode_ldr scsi_mod.use_blk_mq=1 multipath=off" devicepersistency="by-uuid" formatoptions="force_size" format="vhd-fixed" bootpartition="true" bootpartsize="1000" bootfilesystem="xfs" efipartsize="100" firmware="uefi">

+ 			<bootloader name="grub2" console="serial" timeout="1" timeout_style="countdown"/>

+ 			<systemdisk>

+ 				<volume name="home"/>

+ 				<volume name="root"/>

+ 				<volume name="var"/>

+ 			</systemdisk>

+ 			<size unit="G">5</size>

+ 			<oemconfig>

+ 				<oem-resize>false</oem-resize>

+ 			</oemconfig>

+ 		</type>

+ 	</preferences>

+ 	<preferences profiles="AWSEC2">

+ 		<type image="oem" filesystem="btrfs" kernelcmdline="console=ttyS0 net.ifnames=0 nvme_core.io_timeout=4294967295 nvme_core.admin_timeout=4294967295 8250.nr_uarts=4 dis_ucode_ldr multipath=off" devicepersistency="by-label" bootpartition="true" bootpartsize="1000" bootfilesystem="xfs" efipartsize="100" firmware="uefi">

+ 			<bootloader name="grub2" timeout="1"/>

+ 			<size unit="G">5</size>

+ 			<systemdisk>

+ 				<volume name="home"/>

+ 				<volume name="root"/>

+ 				<volume name="var"/>

+ 			</systemdisk>

+ 			<oemconfig>

+ 				<oem-resize>false</oem-resize>

+ 			</oemconfig>

+ 		</type>

+ 	</preferences>

+ 	<preferences profiles="GCE">

+ 		<type image="oem" filesystem="btrfs" kernelcmdline="console=ttyS0,38400n8 multipath=off net.ifnames=0 dis_ucode_ldr" devicepersistency="by-label" bootpartition="true" bootpartsize="1000" bootfilesystem="xfs" efipartsize="100" format="gce" firmware="uefi">

+ 			<bootloader name="grub2" timeout="1"/>

+ 			<size unit="G">5</size>

+ 			<systemdisk>

+ 				<volume name="home"/>

+ 				<volume name="root"/>

+ 				<volume name="var"/>

+ 			</systemdisk>

+ 			<oemconfig>

+ 				<oem-resize>false</oem-resize>

+ 			</oemconfig>

+ 		</type>

+ 	</preferences>

+ 	<preferences profiles="OpenStack">

+ 		<type image="oem" filesystem="btrfs" kernelcmdline="console=ttyS0 net.ifnames=0 dis_ucode_ldr" devicepersistency="by-label" bootpartition="true" bootpartsize="1000" bootfilesystem="xfs" efipartsize="100" firmware="uefi" format="qcow2">

+ 			<bootloader name="grub2" console="serial" timeout="1"/>

+ 			<size unit="G">5</size>

+ 			<systemdisk>

+ 				<volume name="home"/>

+ 				<volume name="root"/>

+ 				<volume name="var"/>

+ 			</systemdisk>

+ 			<oemconfig>

+ 				<oem-resize>false</oem-resize>

+ 			</oemconfig>

+ 		</type>

+ 	</preferences>

+ 	<packages type="image" profiles="CloudCore">

+ 		<ignore name="dracut-config-rescue"/>

+ 		<ignore name="firewalld"/>

+ 		<ignore name="kernel"/>

+ 		<ignore name="*-firmware"/>

+ 		<ignore name="geolite2-city"/>

+ 		<ignore name="geolite2-country"/>

+ 		<package name="cloud-init"/>

+ 		<package name="cloud-utils-growpart"/>

+ 		<package name="gdisk"/>

+ 		<package name="glibc-langpack-en"/>

+ 	</packages>

+ 	<packages type="image" profiles="OpenStack">

+ 		<package name="qemu-guest-agent"/>

+ 	</packages>

+ </image>

@@ -0,0 +1,12 @@ 

+ <image>

+ 	<profiles>

+ 		<profile name="GNOME-Live" description="GNOME Live DVD">

+ 			<requires profile="GNOME-Desktop"/>

+ 			<requires profile="LiveInstall"/>

+ 		</profile>

+ 		<profile name="KDE-Live" description="KDE Plasma Live DVD">

+ 			<requires profile="KDE-Desktop"/>

+ 			<requires profile="LiveInstall"/>

+ 		</profile>

+ 	</profiles>

+ </image>

@@ -0,0 +1,22 @@ 

+ <image>

+ 	<repository type="rpm-md" alias="extras" sourcetype="metalink">

+ 		<source path="https://mirrors.centos.org/metalink?repo=centos-extras-sig-extras-common-$releasever-stream&amp;arch=$basearch">

+ 			<signing key="file:///usr/share/distribution-gpg-keys/centos/RPM-GPG-KEY-CentOS-SIG-Extras"/>

+ 		</source>

+ 	</repository>

+ 	<repository type="rpm-md" alias="crb" sourcetype="metalink">

+ 		<source path="https://mirrors.centos.org/metalink?repo=centos-crb-$releasever-stream&amp;arch=$basearch">

+ 			<signing key="file:///usr/share/distribution-gpg-keys/centos/RPM-GPG-KEY-CentOS-Official"/>

+ 		</source>

+ 	</repository>

+ 	<repository type="rpm-md" alias="appstream" sourcetype="metalink">

+ 		<source path="https://mirrors.centos.org/metalink?repo=centos-appstream-$releasever-stream&amp;arch=$basearch">

+ 			<signing key="file:///usr/share/distribution-gpg-keys/centos/RPM-GPG-KEY-CentOS-Official"/>

+ 		</source>

+ 	</repository>

+ 	<repository type="rpm-md" alias="baseos" sourcetype="metalink">

+ 		<source path="https://mirrors.centos.org/metalink?repo=centos-baseos-$releasever-stream&amp;arch=$basearch">

+ 			<signing key="file:///usr/share/distribution-gpg-keys/centos/RPM-GPG-KEY-CentOS-Official"/>

+ 		</source>

+ 	</repository>

+ </image>

@@ -0,0 +1,16 @@ 

+ <image>

+ 	<repository type="rpm-md" alias="epel-next" sourcetype="metalink">

+ 		<source path="https://mirrors.fedoraproject.org/metalink?repo=epel-next-$releasever&amp;arch=$basearch">

+ 			<signing key="file:///usr/share/distribution-gpg-keys/epel/RPM-GPG-KEY-EPEL-9"/>

+ 		</source>

+ 	</repository>

+ 	<repository type="rpm-md" alias="epel" sourcetype="metalink">

+ 		<source path="https://mirrors.fedoraproject.org/metalink?repo=epel-$releasever&amp;arch=$basearch">

+ 			<signing key="file:///usr/share/distribution-gpg-keys/epel/RPM-GPG-KEY-EPEL-9"/>

+ 		</source>

+ 	</repository>

+ 	<packages type="image">

+ 		<package name="epel-release"/>

+ 		<package name="epel-next-release"/>

+ 	</packages>

+ </image>

@@ -0,0 +1,22 @@ 

+ <image>

+ 	<repository type="rpm-md" alias="centos-hyperscale-experimental" sourcetype="metalink" priority="50">

+ 		<source path="https://mirrors.centos.org/metalink?repo=centos-hyperscale-sig-packages-experimental-$releasever-stream&amp;arch=$basearch">

+ 			<signing key="file:///usr/share/distribution-gpg-keys/centos/RPM-GPG-KEY-CentOS-SIG-HyperScale"/>

+ 		</source>

+ 	</repository>

+ 	<repository type="rpm-md" alias="centos-hyperscale-spin" sourcetype="metalink" priority="50">

+ 		<source path="https://mirrors.centos.org/metalink?repo=centos-hyperscale-sig-packages-spin-$releasever-stream&amp;arch=$basearch">

+ 			<signing key="file:///usr/share/distribution-gpg-keys/centos/RPM-GPG-KEY-CentOS-SIG-HyperScale"/>

+ 		</source>

+ 	</repository>

+ 	<repository type="rpm-md" alias="centos-hyperscale" sourcetype="metalink" priority="50">

+ 		<source path="https://mirrors.centos.org/metalink?repo=centos-hyperscale-sig-packages-main-$releasever-stream&amp;arch=$basearch">

+ 			<signing key="file:///usr/share/distribution-gpg-keys/centos/RPM-GPG-KEY-CentOS-SIG-HyperScale"/>

+ 		</source>

+ 	</repository>

+ 	<packages type="image">

+ 		<package name="centos-release-hyperscale"/>

+ 		<package name="centos-release-hyperscale-spin"/>

+ 		<package name="centos-release-hyperscale-experimental"/>

+ 	</packages>

+ </image>

no initial comment

This is not yet ready, as it's blocked on gh#osinside/kiwi#2092.

Also, the quickstart doesn't work on my machine yet...

rebased onto 44d696a

5 months ago

rebased onto 7c51f62

5 months ago

This is still blocked on getting the live media working properly...

rebased onto 4db5afd

4 months ago

rebased onto a8f2e27

4 months ago

rebased onto 08f48cc

4 months ago

rebased onto 5864ae1

4 months ago

rebased onto 55a7435

4 months ago

rebased onto ba06d9c

4 months ago

rebased onto 8dce694

4 months ago

rebased onto 865cad5

4 months ago

rebased onto 8e12324

4 months ago

rebased onto d16d36e

4 months ago

rebased onto fd11e08

4 months ago

rebased onto 52d2ab1

4 months ago

rebased onto 0c2aa22

4 months ago

rebased onto 0038b30

4 months ago

rebased onto 78d3b7d

4 months ago

rebased onto 2eaeb0a

4 months ago