Reduce the size of the IPA ramfs #147
@@ -1,6 +1,6 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#!BuildTag: %%IMG_PREFIX%%ironic-ipa-downloader:3.0.4
|
||||
#!BuildTag: %%IMG_PREFIX%%ironic-ipa-downloader:3.0.4-%RELEASE%
|
||||
#!BuildTag: %%IMG_PREFIX%%ironic-ipa-downloader:3.0.5
|
||||
#!BuildTag: %%IMG_PREFIX%%ironic-ipa-downloader:3.0.5-%RELEASE%
|
||||
ARG SLE_VERSION
|
||||
FROM registry.suse.com/bci/bci-micro:$SLE_VERSION AS micro
|
||||
|
||||
@@ -18,11 +18,11 @@ FROM micro AS final
|
||||
LABEL org.opencontainers.image.authors="SUSE LLC (https://www.suse.com/)"
|
||||
LABEL org.opencontainers.image.title="SLE Based Ironic IPA Downloader Container Image"
|
||||
LABEL org.opencontainers.image.description="ironic-ipa-downloader based on the SLE Base Container Image."
|
||||
LABEL org.opencontainers.image.version="3.0.4"
|
||||
LABEL org.opencontainers.image.version="3.0.5"
|
||||
LABEL org.opencontainers.image.url="https://www.suse.com/solutions/edge-computing/"
|
||||
LABEL org.opencontainers.image.created="%BUILDTIME%"
|
||||
LABEL org.opencontainers.image.vendor="SUSE LLC"
|
||||
LABEL org.opensuse.reference="%%IMG_REPO%%/%%IMG_PREFIX%%ironic-ipa-downloader:3.0.4-%RELEASE%"
|
||||
LABEL org.opensuse.reference="%%IMG_REPO%%/%%IMG_PREFIX%%ironic-ipa-downloader:3.0.5-%RELEASE%"
|
||||
LABEL org.openbuildservice.disturl="%DISTURL%"
|
||||
LABEL com.suse.supportlevel="%%SUPPORT_LEVEL%%"
|
||||
LABEL com.suse.eula="SUSE Combined EULA February 2024"
|
||||
|
@@ -1,6 +1,6 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#!BuildTag: %%IMG_PREFIX%%ironic-ipa-downloader-aarch64:3.0.4
|
||||
#!BuildTag: %%IMG_PREFIX%%ironic-ipa-downloader-aarch64:3.0.4-%RELEASE%
|
||||
#!BuildTag: %%IMG_PREFIX%%ironic-ipa-downloader-aarch64:3.0.5
|
||||
#!BuildTag: %%IMG_PREFIX%%ironic-ipa-downloader-aarch64:3.0.5-%RELEASE%
|
||||
ARG SLE_VERSION
|
||||
FROM registry.suse.com/bci/bci-micro:$SLE_VERSION AS micro
|
||||
|
||||
@@ -18,11 +18,11 @@ FROM micro AS final
|
||||
LABEL org.opencontainers.image.authors="SUSE LLC (https://www.suse.com/)"
|
||||
LABEL org.opencontainers.image.title="SLE Based Ironic IPA Downloader Container Image"
|
||||
LABEL org.opencontainers.image.description="ironic-ipa-downloader based on the SLE Base Container Image."
|
||||
LABEL org.opencontainers.image.version="3.0.4"
|
||||
LABEL org.opencontainers.image.version="3.0.5"
|
||||
LABEL org.opencontainers.image.url="https://www.suse.com/solutions/edge-computing/"
|
||||
LABEL org.opencontainers.image.created="%BUILDTIME%"
|
||||
LABEL org.opencontainers.image.vendor="SUSE LLC"
|
||||
LABEL org.opensuse.reference="%%IMG_REPO%%/%%IMG_PREFIX%%ironic-ipa-downloader:3.0.4-%RELEASE%"
|
||||
LABEL org.opensuse.reference="%%IMG_REPO%%/%%IMG_PREFIX%%ironic-ipa-downloader:3.0.5-%RELEASE%"
|
||||
LABEL org.openbuildservice.disturl="%DISTURL%"
|
||||
LABEL com.suse.supportlevel="%%SUPPORT_LEVEL%%"
|
||||
LABEL com.suse.eula="SUSE Combined EULA February 2024"
|
||||
|
@@ -1,6 +1,6 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#!BuildTag: %%IMG_PREFIX%%ironic-ipa-downloader-x86_64:3.0.4
|
||||
#!BuildTag: %%IMG_PREFIX%%ironic-ipa-downloader-x86_64:3.0.4-%RELEASE%
|
||||
#!BuildTag: %%IMG_PREFIX%%ironic-ipa-downloader-x86_64:3.0.5
|
||||
#!BuildTag: %%IMG_PREFIX%%ironic-ipa-downloader-x86_64:3.0.5-%RELEASE%
|
||||
ARG SLE_VERSION
|
||||
FROM registry.suse.com/bci/bci-micro:$SLE_VERSION AS micro
|
||||
|
||||
@@ -18,11 +18,11 @@ FROM micro AS final
|
||||
LABEL org.opencontainers.image.authors="SUSE LLC (https://www.suse.com/)"
|
||||
LABEL org.opencontainers.image.title="SLE Based Ironic IPA Downloader Container Image"
|
||||
LABEL org.opencontainers.image.description="ironic-ipa-downloader based on the SLE Base Container Image."
|
||||
LABEL org.opencontainers.image.version="3.0.4"
|
||||
LABEL org.opencontainers.image.version="3.0.5"
|
||||
LABEL org.opencontainers.image.url="https://www.suse.com/solutions/edge-computing/"
|
||||
LABEL org.opencontainers.image.created="%BUILDTIME%"
|
||||
LABEL org.opencontainers.image.vendor="SUSE LLC"
|
||||
LABEL org.opensuse.reference="%%IMG_REPO%%/%%IMG_PREFIX%%ironic-ipa-downloader:3.0.4-%RELEASE%"
|
||||
LABEL org.opensuse.reference="%%IMG_REPO%%/%%IMG_PREFIX%%ironic-ipa-downloader:3.0.5-%RELEASE%"
|
||||
LABEL org.openbuildservice.disturl="%DISTURL%"
|
||||
LABEL com.suse.supportlevel="%%SUPPORT_LEVEL%%"
|
||||
LABEL com.suse.eula="SUSE Combined EULA February 2024"
|
||||
|
@@ -26,11 +26,15 @@ if [ -z "${IPA_BASEURI}" ]; then
|
||||
IMAGE_CHANGED=1
|
||||
# SLES BASED IPA - ironic-ipa-ramdisk-x86_64 and ironic-ipa-ramdisk-aarch64 packages
|
||||
mkdir -p /shared/html/images
|
||||
if [ -f /tmp/initrd-x86_64.zst ]; then
|
||||
cp /tmp/initrd-x86_64.zst /shared/html/images/ironic-python-agent-x86_64.initramfs
|
||||
cp /tmp/openstack-ironic-image.x86_64*.kernel /shared/html/images/ironic-python-agent-x86_64.kernel
|
||||
fi
|
||||
# Use arm64 as destination for iPXE compatibility
|
||||
if [ -f /tmp/initrd-aarch64.zst ]; then
|
||||
cp /tmp/initrd-aarch64.zst /shared/html/images/ironic-python-agent-arm64.initramfs
|
||||
cp /tmp/openstack-ironic-image.aarch64*.kernel /shared/html/images/ironic-python-agent-arm64.kernel
|
||||
fi
|
||||
|
||||
cp /tmp/images.sha256 /shared/images.sha256
|
||||
else
|
||||
|
@@ -13,11 +13,6 @@ echo "Configure image: [$kiwi_iname]..."
|
||||
#------------------------------------------
|
||||
baseSetupBuildDay
|
||||
|
||||
#======================================
|
||||
# Mount system filesystems
|
||||
#--------------------------------------
|
||||
#baseMount
|
||||
|
||||
#==========================================
|
||||
# remove unneded kernel files
|
||||
#------------------------------------------
|
||||
@@ -39,12 +34,8 @@ suseImportBuildKey
|
||||
#--------------------------------------
|
||||
baseInsertService openstack-ironic-python-agent
|
||||
baseInsertService suse-ironic-image-setup
|
||||
baseInsertService suse-network-setup
|
||||
baseInsertService sshd
|
||||
baseInsertService NetworkManager
|
||||
#suseInsertService sshd
|
||||
#suseInsertService openstack-ironic-python-agent
|
||||
#suseInsertService suse-ironic-image-setup
|
||||
|
||||
echo 'DEFAULT_TIMEZONE="UTC"' >> /etc/sysconfig/clock
|
||||
baseUpdateSysConfig /etc/sysconfig/clock HWCLOCK "-u"
|
||||
@@ -64,42 +55,7 @@ sed -E 's/^(ExecStart=.*\/agetty).*(--noclear.*)/\1 \2 --autologin root/' /usr/l
|
||||
#------------------------------------------
|
||||
echo 'tmpfs /tmp tmpfs size=3G 0 0' >> /etc/fstab
|
||||
|
||||
#==========================================
|
||||
# remove package docs and manuals
|
||||
#------------------------------------------
|
||||
#baseStripDocs
|
||||
#baseStripMans
|
||||
#baseStripInfos
|
||||
|
||||
#======================================
|
||||
# only basic version of vim is
|
||||
# installed; no syntax highlighting
|
||||
#--------------------------------------
|
||||
sed -i -e's/^syntax on/" syntax on/' /etc/vimrc
|
||||
|
||||
#======================================
|
||||
# Remove yast if not in use
|
||||
#--------------------------------------
|
||||
#suseRemoveYaST
|
||||
|
||||
#======================================
|
||||
# Remove package manager
|
||||
#--------------------------------------
|
||||
#suseStripPackager
|
||||
|
||||
#rm -f usr/lib/perl5/*/*/auto/Encode/??/??.so # 9MB
|
||||
|
||||
#======================================
|
||||
# Umount kernel filesystems
|
||||
#--------------------------------------
|
||||
#baseCleanMount
|
||||
|
||||
ln -s /sbin/init /init
|
||||
|
||||
#==========================================
|
||||
# umount
|
||||
#------------------------------------------
|
||||
umount /proc >/dev/null 2>&1
|
||||
|
||||
exit 0
|
||||
|
||||
|
@@ -12,6 +12,7 @@
|
||||
<locale>en_US</locale>
|
||||
<packagemanager>zypper</packagemanager>
|
||||
<rpm-check-signatures>false</rpm-check-signatures>
|
||||
<rpm-excludedocs>true</rpm-excludedocs>
|
||||
<timezone>UTC</timezone>
|
||||
<version>1.0.0</version>
|
||||
</preferences>
|
||||
@@ -102,62 +103,23 @@
|
||||
<package name="libxcb-render0"/>
|
||||
<package name="libxcb-shm0"/>
|
||||
<package name="libxcb1"/>
|
||||
<package name="plymouth"/>
|
||||
<package name="plymouth-branding-SLE"/>
|
||||
</packages>
|
||||
|
||||
<packages type="image">
|
||||
<package name="checkmedia"/>
|
||||
<package name="plymouth-branding-SLE"/>
|
||||
<package name="plymouth-dracut"/>
|
||||
<package name="plymouth-theme-bgrt"/>
|
||||
<package name="grub2-branding-SLE"/>
|
||||
<package name="iputils"/>
|
||||
<package name="vim"/>
|
||||
<package name="grub2"/>
|
||||
<package name="grub2-x86_64-efi" arch="x86_64"/>
|
||||
<package name="grub2-arm64-efi" arch="aarch64"/>
|
||||
<package name="grub2-i386-pc" arch="x86_64"/>
|
||||
<package name="syslinux" arch="x86_64"/>
|
||||
<package name="lvm2"/>
|
||||
<package name="plymouth"/>
|
||||
<package name="fontconfig"/>
|
||||
<package name="fonts-config"/>
|
||||
<package name="openssh"/>
|
||||
<package name="iproute2"/>
|
||||
<package name="which"/>
|
||||
<package name="kernel-firmware"/>
|
||||
<package name="kernel-default"/>
|
||||
<package name="NetworkManager"/>
|
||||
<package name="nm-configurator"/>
|
||||
<package name="timezone"/>
|
||||
<package name="haveged"/>
|
||||
<!-- ironic-python-agent specific -->
|
||||
<package name="openstack-ironic-python-agent"/>
|
||||
<package name="hdparm"/>
|
||||
<package name="qemu-tools"/>
|
||||
<package name="python311-proliantutils"/>
|
||||
<package name="lshw"/>
|
||||
<package name="dmidecode"/>
|
||||
<package name="efibootmgr"/>
|
||||
<package name="gptfdisk"/>
|
||||
<package name="open-iscsi"/>
|
||||
<package name="hwinfo"/>
|
||||
<package name="ipmitool"/>
|
||||
<package name="iputils"/>
|
||||
<package name="lvm2"/>
|
||||
<package name="net-tools"/>
|
||||
<package name="ntp"/>
|
||||
<package name="parted"/>
|
||||
<package name="psmisc"/>
|
||||
<package name="timezone"/>
|
||||
<package name="which"/>
|
||||
<package name="kbd"/>
|
||||
</packages>
|
||||
|
||||
<packages type="kis">
|
||||
<package name="dracut-kiwi-oem-repart"/>
|
||||
<package name="dracut-kiwi-oem-dump"/>
|
||||
<package name="kernel-firmware-amdgpu"/>
|
||||
<package name="kernel-firmware-ath10k"/>
|
||||
<package name="kernel-firmware-ath11k"/>
|
||||
<package name="kernel-firmware-ath12k"/>
|
||||
<package name="kernel-firmware-atheros"/>
|
||||
<package name="kernel-firmware-bluetooth"/>
|
||||
<package name="kernel-firmware-brcm"/>
|
||||
<package name="kernel-firmware-i915"/>
|
||||
<package name="kernel-firmware-iwlwifi"/>
|
||||
<package name="kernel-firmware-media"/>
|
||||
<package name="kernel-firmware-nvidia"/>
|
||||
<package name="kernel-firmware-qcom"/>
|
||||
<package name="kernel-firmware-radeon"/>
|
||||
<package name="kernel-firmware-realtek"/>
|
||||
<package name="kernel-firmware-sound"/>
|
||||
<package name="kernel-firmware-ti"/>
|
||||
<package name="kernel-firmware-ueagle"/>
|
||||
</packages>
|
||||
|
||||
<packages type="bootstrap">
|
||||
@@ -167,5 +129,50 @@
|
||||
<package name="cracklib-dict-full"/>
|
||||
<package name="ca-certificates"/>
|
||||
<package name="sles-release"/>
|
||||
|
||||
<package name="checkmedia"/>
|
||||
<package name="fontconfig"/>
|
||||
<package name="fonts-config"/>
|
||||
<package name="grub2-arm64-efi" arch="aarch64"/>
|
||||
<package name="grub2-branding-SLE"/>
|
||||
<package name="grub2-i386-pc" arch="x86_64"/>
|
||||
<package name="grub2-x86_64-efi" arch="x86_64"/>
|
||||
<package name="grub2"/>
|
||||
<package name="iproute2"/>
|
||||
<package name="iputils"/>
|
||||
<package name="kernel-default"/>
|
||||
<package name="kernel-firmware-all"/>
|
||||
<package name="lvm2"/>
|
||||
<package name="NetworkManager"/>
|
||||
<package name="nm-configurator"/>
|
||||
<package name="openssh"/>
|
||||
<package name="timezone"/>
|
||||
<package name="which"/>
|
||||
<!-- ironic-python-agent specific -->
|
||||
<package name="dmidecode"/>
|
||||
<package name="efibootmgr"/>
|
||||
<package name="gptfdisk"/>
|
||||
<package name="hdparm"/>
|
||||
<package name="hwinfo"/>
|
||||
<package name="ipmitool"/>
|
||||
<package name="iputils"/>
|
||||
<package name="kbd"/>
|
||||
<package name="lshw"/>
|
||||
<package name="lvm2"/>
|
||||
<package name="net-tools"/>
|
||||
<package name="ntp"/>
|
||||
<package name="open-iscsi"/>
|
||||
<package name="openstack-ironic-python-agent"/>
|
||||
<package name="parted"/>
|
||||
<package name="psmisc"/>
|
||||
<package name="python311-proliantutils"/>
|
||||
<package name="qemu-tools"/>
|
||||
<package name="timezone"/>
|
||||
<package name="which"/>
|
||||
</packages>
|
||||
|
||||
<packages type="kis">
|
||||
<package name="dracut-kiwi-oem-repart"/>
|
||||
<package name="dracut-kiwi-oem-dump"/>
|
||||
</packages>
|
||||
</image>
|
||||
|
@@ -19,7 +19,7 @@
|
||||
|
||||
|
||||
Name: ironic-ipa-ramdisk
|
||||
Version: 3.0.4
|
||||
Version: 3.0.5
|
||||
Release: 0
|
||||
Summary: Kernel and ramdisk image for OpenStack Ironic
|
||||
License: SUSE-EULA
|
||||
@@ -27,7 +27,7 @@ Group: System/Management
|
||||
URL: https://github.com/SUSE-Cloud/
|
||||
Source0: config.sh
|
||||
Source10: ironic-ipa-ramdisk.kiwi
|
||||
Source20: root.tar.bz2
|
||||
Source20: root
|
||||
|
||||
BuildRequires: -post-build-checks
|
||||
BuildRequires: bash
|
||||
@@ -38,7 +38,7 @@ BuildArch: noarch
|
||||
|
||||
BuildRequires: checkmedia
|
||||
BuildRequires: acl
|
||||
BuildRequires: ca-certificates
|
||||
BuildRequires: ca-certificates-mozilla-prebuilt
|
||||
BuildRequires: cracklib-dict-full
|
||||
BuildRequires: cron
|
||||
BuildRequires: dbus-1
|
||||
@@ -62,7 +62,7 @@ BuildRequires: ipmitool
|
||||
BuildRequires: iproute2
|
||||
BuildRequires: iputils
|
||||
BuildRequires: kernel-default
|
||||
BuildRequires: kernel-firmware
|
||||
BuildRequires: kernel-firmware-all
|
||||
BuildRequires: lvm2
|
||||
BuildRequires: net-tools
|
||||
BuildRequires: ntp
|
||||
@@ -123,13 +123,13 @@ Kernel and ramdisk image for use with Metal3
|
||||
For %{_arch}
|
||||
|
||||
%prep
|
||||
mkdir -p /tmp/openstack-ironic-image/build /tmp/openstack-ironic-image/root /tmp/openstack-ironic-image/img
|
||||
mkdir -p /tmp/openstack-ironic-image/build /tmp/openstack-ironic-image/img
|
||||
|
||||
cp -a %{SOURCE0} /tmp/openstack-ironic-image/config.sh
|
||||
|
||||
cp -a %{SOURCE10} /tmp/openstack-ironic-image/config.kiwi
|
||||
|
||||
tar -xC /tmp/openstack-ironic-image/root -f %{SOURCE20}
|
||||
cp -ar %{SOURCE20} /tmp/openstack-ironic-image/root
|
||||
|
||||
%build
|
||||
if ! which kiwi; then
|
||||
|
BIN
ironic-ipa-ramdisk/root.tar.bz2
(Stored with Git LFS)
BIN
ironic-ipa-ramdisk/root.tar.bz2
(Stored with Git LFS)
Binary file not shown.
@@ -0,0 +1,24 @@
|
||||
# WARNING: This file has been modified by the diskimage-builder
|
||||
# dhcp-all-interfaces element as this machine is likely running
|
||||
# a ramdisk or needs to attempt auto-configuration on all interfaces.
|
||||
[main]
|
||||
# This makes sense even with dhcp on all interfaces in the event
|
||||
# that the configuration has been or is being supplied via external means.
|
||||
ignore-carrier=*
|
||||
# Use dhclient as was done previously to the Centos8/RHEL8 RPM defaults.
|
||||
# This is because dhclient shuts the interface down after a retry attempt
|
||||
# which allows the link state to reset with some switches, which may be
|
||||
# important for the ramdisk to recover networking.
|
||||
dhcp=dhclient
|
||||
|
||||
[connection]
|
||||
# Keep retrying, this is important for this important espescialy for
|
||||
# ramdisks in environments where varying switch configurations may
|
||||
# cause traffic to be blocked or intermittent connectivity failures
|
||||
# such as those at an edge site may cause issues.
|
||||
autoconnect-retries=-1
|
||||
# Set the timeout. Diskimage-builder dhcp-all-interfaces has a 30
|
||||
# second default. NetworkManager, by default, is 45 seconds.
|
||||
# In some cases where ramdisks are in use, 60 seconds is advisable.
|
||||
ipv4.dhcp-timeout=30
|
||||
ipv6.dhcp-timeout=30
|
1
ironic-ipa-ramdisk/root/etc/ironic-python-agent.conf.d
Symbolic link
1
ironic-ipa-ramdisk/root/etc/ironic-python-agent.conf.d
Symbolic link
@@ -0,0 +1 @@
|
||||
ironic-python-agent/ironic-python-agent.conf.d
|
1
ironic-ipa-ramdisk/root/etc/issue
Normal file
1
ironic-ipa-ramdisk/root/etc/issue
Normal file
@@ -0,0 +1 @@
|
||||
SUSE Ironic Python Agent Ramdisk - terminal \l
|
2
ironic-ipa-ramdisk/root/etc/sysctl.d/98-rp_filter.conf
Normal file
2
ironic-ipa-ramdisk/root/etc/sysctl.d/98-rp_filter.conf
Normal file
@@ -0,0 +1,2 @@
|
||||
# avoid problems with multiple network interfaces
|
||||
net.ipv4.conf.all.rp_filter=0
|
@@ -0,0 +1,7 @@
|
||||
[Unit]
|
||||
#WantsMountsFor=/mnt/ipa
|
||||
After=mnt-ipa.mount
|
||||
Wants=mnt-ipa.mount
|
||||
|
||||
[Service]
|
||||
ExecStartPre=-/usr/local/bin/suse-network-setup.sh
|
7
ironic-ipa-ramdisk/root/etc/systemd/system/mnt-ipa.mount
Normal file
7
ironic-ipa-ramdisk/root/etc/systemd/system/mnt-ipa.mount
Normal file
@@ -0,0 +1,7 @@
|
||||
[Unit]
|
||||
Description=config-2 rom consumed by IPA for networking configuration
|
||||
|
||||
[Mount]
|
||||
What=/dev/ipa
|
||||
Where=/mnt/ipa
|
||||
TimeoutSec=60
|
@@ -0,0 +1,12 @@
|
||||
[Unit]
|
||||
Description=Setup ironic-python-agent image
|
||||
After=getty.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/local/bin/suse-ironic-image-setup.sh
|
||||
StandardOutput=journal+console
|
||||
RemainAfterExit=true
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
@@ -0,0 +1 @@
|
||||
ACTION=="add", SUBSYSTEM=="block", ENV{ID_FS_LABEL}=="config-2", ENV{ID_FS_PUBLISHER_ID}=="?*", PROGRAM="/usr/local/bin/suse-test-config-2.sh", SYMLINK+="ipa ipa-config-2"
|
52
ironic-ipa-ramdisk/root/usr/local/bin/suse-ironic-image-setup.sh
Executable file
52
ironic-ipa-ramdisk/root/usr/local/bin/suse-ironic-image-setup.sh
Executable file
@@ -0,0 +1,52 @@
|
||||
#!/bin/sh
|
||||
PARAMS=$(</proc/cmdline)
|
||||
# find vfloppy device (based on IPA code)
|
||||
VMEDIA_DEVICE=$(find /dev/disk/by-label -iname ir-vfd-dev)
|
||||
# read params from vmedia and prepend them to params from kernel cmdline
|
||||
if [[ -b "$VMEDIA_DEVICE" ]]; then
|
||||
VMEDIA_MOUNT=$(mktemp -d)
|
||||
if mount -o loop $VMEDIA_DEVICE $VMEDIA_MOUNT; then
|
||||
# parameters.txt has one param per line, reformat to match cmdline
|
||||
VMEDIA_PARAMS=$(cat $VMEDIA_MOUNT/parameters.txt | tr '\n' ' ')
|
||||
umount $VMEDIA_MOUNT
|
||||
PARAMS="$VMEDIA_PARAMS $PARAMS"
|
||||
fi
|
||||
rmdir $VMEDIA_MOUNT
|
||||
fi
|
||||
|
||||
# resize /tmp
|
||||
if [[ $PARAMS =~ suse.tmpsize=([^ ]+) ]]; then
|
||||
echo "Resizing /tmp to ${BASH_REMATCH[1]}..."
|
||||
mount -o remount,size=${BASH_REMATCH[1]} /tmp
|
||||
fi
|
||||
# deploy authorized sshkey from kernel command line
|
||||
if [[ $PARAMS =~ sshkey=\"([^\"]+)\" ]]; then
|
||||
echo "Adding authorized SSH key..."
|
||||
(umask 077 ; mkdir -p /root/.ssh)
|
||||
echo "${BASH_REMATCH[1]}" >> /root/.ssh/authorized_keys
|
||||
fi
|
||||
# Inject certs
|
||||
if [[ $PARAMS =~ tls.enabled=(true|True) ]]; then
|
||||
cp /etc/ironic-python-agent.d/ca-certs/* /etc/pki/trust/anchors/
|
||||
cp /etc/ironic-python-agent.d/ca-certs/* /usr/share/pki/trust/anchors/
|
||||
update-ca-certificates
|
||||
fi
|
||||
# autologin root on given console (default tty1) if suse.autologin or coreos.autologin is enabled
|
||||
if [[ $PARAMS =~ (suse|coreos)\.autologin=?([^ ]*) ]]; then
|
||||
tty="${BASH_REMATCH[2]:-tty1}"
|
||||
echo "Enabling autologin on $tty..."
|
||||
systemctl stop getty@$tty
|
||||
systemctl disable getty@$tty
|
||||
systemctl start autologin@$tty
|
||||
fi
|
||||
|
||||
# Append to /etc/hosts
|
||||
# hosts.append=1.2.3.4_foo,4.5.6.7_foo2
|
||||
if [[ $PARAMS =~ hosts.append=([^ ]+) ]]; then
|
||||
HOSTS=${BASH_REMATCH[1]}
|
||||
echo "Appending to hosts ${HOSTS}..."
|
||||
for h in ${HOSTS/,/ }; do
|
||||
echo "${h/_/ }" >> /etc/hosts
|
||||
done
|
||||
cat /etc/hosts
|
||||
fi
|
24
ironic-ipa-ramdisk/root/usr/local/bin/suse-network-setup.sh
Executable file
24
ironic-ipa-ramdisk/root/usr/local/bin/suse-network-setup.sh
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eux
|
||||
|
||||
# Inspired by/based on glean-early.sh
|
||||
# https://opendev.org/opendev/glean/src/branch/master/glean/init/glean-early.sh
|
||||
|
||||
# NOTE(TheJulia): We care about iso images, and would expect lower case as a
|
||||
# result. In the case of VFAT partitions, they would be upper case.
|
||||
|
||||
PATH=/bin:/usr/bin:/sbin:/usr/sbin
|
||||
NETWORK_DATA_FILE="/mnt/ipa/openstack/latest/network_data.json"
|
||||
|
||||
|
||||
if [ ! -f "${NETWORK_DATA_FILE}" ]; then
|
||||
echo "No network_data.json found, skipping network configuration"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mkdir -p /tmp/nmc/{desired,generated}
|
||||
cp ${NETWORK_DATA_FILE} /tmp/nmc/desired/_all.yaml
|
||||
|
||||
nmc generate --config-dir /tmp/nmc/desired --output-dir /tmp/nmc/generated
|
||||
nmc apply --config-dir /tmp/nmc/generated
|
23
ironic-ipa-ramdisk/root/usr/local/bin/suse-test-config-2.sh
Executable file
23
ironic-ipa-ramdisk/root/usr/local/bin/suse-test-config-2.sh
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eux
|
||||
|
||||
PATH=/bin:/usr/bin:/sbin:/usr/sbin
|
||||
|
||||
# Transform the ID from the drive being considered to lower case
|
||||
device_publisher_id=$(echo ${ID_FS_PUBLISHER_ID} | tr '[A-Z]' '[a-z]')
|
||||
|
||||
# Retrieve the publisher ID from the command line and convert to lower case
|
||||
cmdline_publisher_id=""
|
||||
if grep -q "ir_pub_id" /proc/cmdline; then
|
||||
cmdline_publisher_id=$(cat /proc/cmdline | sed -e 's/^.*ir_pub_id=//' -e 's/ .*$//')
|
||||
fi
|
||||
|
||||
# Is this the filesystem we are looking for?
|
||||
if [[ "${cmdline_publisher_id}" == "${device_publisher_id}" ]]; then
|
||||
# It is the device we are looking for, return success
|
||||
exit 0
|
||||
else
|
||||
# Not a match, return failure
|
||||
exit 1
|
||||
fi
|
@@ -1,7 +1,7 @@
|
||||
#!BuildTag: %%CHART_PREFIX%%metal3:%%CHART_MAJOR%%.0.3_up0.11.1
|
||||
#!BuildTag: %%CHART_PREFIX%%metal3:%%CHART_MAJOR%%.0.3_up0.11.1-%RELEASE%
|
||||
#!BuildTag: %%CHART_PREFIX%%metal3:%%CHART_MAJOR%%.0.4_up0.11.2
|
||||
#!BuildTag: %%CHART_PREFIX%%metal3:%%CHART_MAJOR%%.0.4_up0.11.2-%RELEASE%
|
||||
apiVersion: v2
|
||||
appVersion: 0.11.1
|
||||
appVersion: 0.11.2
|
||||
dependencies:
|
||||
- alias: metal3-baremetal-operator
|
||||
name: baremetal-operator
|
||||
@@ -10,7 +10,7 @@ dependencies:
|
||||
- alias: metal3-ironic
|
||||
name: ironic
|
||||
repository: file://./charts/ironic
|
||||
version: 0.10.1
|
||||
version: 0.10.2
|
||||
- alias: metal3-mariadb
|
||||
condition: global.enable_mariadb
|
||||
name: mariadb
|
||||
@@ -25,4 +25,4 @@ description: A Helm chart that installs all of the dependencies needed for Metal
|
||||
icon: https://github.com/cncf/artwork/raw/master/projects/metal3/icon/color/metal3-icon-color.svg
|
||||
name: metal3
|
||||
type: application
|
||||
version: "%%CHART_MAJOR%%.0.3+up0.11.1"
|
||||
version: "%%CHART_MAJOR%%.0.4+up0.11.2"
|
||||
|
@@ -3,4 +3,4 @@ appVersion: 26.1.2
|
||||
description: A Helm chart for Ironic, used by Metal3
|
||||
name: ironic
|
||||
type: application
|
||||
version: 0.10.1
|
||||
version: 0.10.2
|
||||
|
@@ -60,7 +60,7 @@ images:
|
||||
ironicIPADownloader:
|
||||
repository: registry.opensuse.org/isv/suse/edge/metal3/containers/images/ironic-ipa-downloader
|
||||
pullPolicy: IfNotPresent
|
||||
tag: 3.0.4
|
||||
tag: 3.0.5
|
||||
|
||||
nameOverride: ""
|
||||
fullnameOverride: ""
|
||||
|
@@ -171,7 +171,7 @@ spec:
|
||||
- prettyName: Metal3
|
||||
releaseName: metal3
|
||||
chart: %%CHART_REPO%%/%%CHART_PREFIX%%metal3
|
||||
version: %%CHART_MAJOR%%.0.3+up0.11.1
|
||||
version: %%CHART_MAJOR%%.0.4+up0.11.2
|
||||
- prettyName: RancherTurtles
|
||||
releaseName: rancher-turtles
|
||||
chart: %%CHART_REPO%%/%%CHART_PREFIX%%rancher-turtles
|
||||
|
Reference in New Issue
Block a user