From 8f60b5764a4b6f121bec5dbfcb94c92bb982a607 Mon Sep 17 00:00:00 2001 From: Fabian Arrotin Date: Sep 13 2022 07:03:51 +0000 Subject: Adding complex-build examples to test kiwi Signed-off-by: Fabian Arrotin --- diff --git a/kiwi/complex-build/components/boot.xml b/kiwi/complex-build/components/boot.xml new file mode 100644 index 0000000..a14727d --- /dev/null +++ b/kiwi/complex-build/components/boot.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/kiwi/complex-build/components/users.xml b/kiwi/complex-build/components/users.xml new file mode 100644 index 0000000..e126074 --- /dev/null +++ b/kiwi/complex-build/components/users.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/kiwi/complex-build/config.sh b/kiwi/complex-build/config.sh new file mode 100755 index 0000000..95d4c78 --- /dev/null +++ b/kiwi/complex-build/config.sh @@ -0,0 +1,65 @@ +#!/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 + +#====================================== +# 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" == *"Azure"* ]]; then + ## Enable WALinuxAgent + systemctl enable waagent.service +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 +#-------------------------------------- +systemctl set-default multi-user.target + +exit 0 diff --git a/kiwi/complex-build/config.xml b/kiwi/complex-build/config.xml new file mode 100644 index 0000000..49399bc --- /dev/null +++ b/kiwi/complex-build/config.xml @@ -0,0 +1,35 @@ + + + + + CentOS Hyperscale Appliance + ngompa@centosproject.org + CentOS Stream Hyperscale Appliance + + + 9.0.0 + dnf + en_US + us + UTC + true + 9 + + + + + + + + + + + + + + + + + + + diff --git a/kiwi/complex-build/platforms/cloud.xml b/kiwi/complex-build/platforms/cloud.xml new file mode 100644 index 0000000..64d0dd3 --- /dev/null +++ b/kiwi/complex-build/platforms/cloud.xml @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + + false + + + + + + + 5 + + + + + + + false + + + + + + + 5 + + + + + + + false + + + + + + + 5 + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + diff --git a/kiwi/complex-build/platforms/vagrant.xml b/kiwi/complex-build/platforms/vagrant.xml new file mode 100644 index 0000000..36baac6 --- /dev/null +++ b/kiwi/complex-build/platforms/vagrant.xml @@ -0,0 +1,37 @@ + + + + + + + + + + 5 + + + + + + + false + + + + + + + + + + + + + + + + + + + + diff --git a/kiwi/complex-build/repositories/core.xml b/kiwi/complex-build/repositories/core.xml new file mode 100644 index 0000000..d0a1ca2 --- /dev/null +++ b/kiwi/complex-build/repositories/core.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kiwi/complex-build/repositories/epel.xml b/kiwi/complex-build/repositories/epel.xml new file mode 100644 index 0000000..05c1689 --- /dev/null +++ b/kiwi/complex-build/repositories/epel.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/kiwi/complex-build/repositories/hyperscale.xml b/kiwi/complex-build/repositories/hyperscale.xml new file mode 100644 index 0000000..92442f9 --- /dev/null +++ b/kiwi/complex-build/repositories/hyperscale.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + +