Skip to content

Commit e699691

Browse files
authored
Merge pull request #3018 from stackitcloud/stackit-oem-image
OEM: Provide STACKIT images
2 parents 6751410 + ad0b524 commit e699691

File tree

10 files changed

+69
-1
lines changed

10 files changed

+69
-1
lines changed

build_library/vm_image_util.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ VALID_IMG_TYPES=(
3232
rackspace_onmetal
3333
rackspace_vhd
3434
scaleway
35+
stackit
3536
vagrant
3637
vagrant_parallels
3738
vagrant_virtualbox
@@ -63,6 +64,7 @@ VALID_OEM_PACKAGES=(
6364
rackspace
6465
rackspace-onmetal
6566
scaleway
67+
stackit
6668
vagrant
6769
vagrant-key
6870
vagrant-virtualbox
@@ -321,6 +323,13 @@ IMG_scaleway_OEM_USE=scaleway
321323
IMG_scaleway_OEM_SYSEXT=oem-scaleway
322324
IMG_scaleway_DISK_EXTENSION=qcow2
323325

326+
## stackit
327+
IMG_stackit_DISK_FORMAT=qcow2
328+
IMG_stackit_DISK_LAYOUT=vm
329+
IMG_stackit_OEM_PACKAGE=common-oem-files
330+
IMG_stackit_OEM_USE=stackit
331+
IMG_stackit_OEM_SYSEXT=oem-stackit
332+
324333
## kubevirt
325334
IMG_kubevirt_DISK_FORMAT=qcow2
326335
IMG_kubevirt_DISK_LAYOUT=vm
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Added STACKIT images ([flatcar/scripts#3018](https://github.com/flatcar/scripts/pull/3018))

ci-automation/vms.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ function _vm_build_impl() {
138138
COMPRESSION_FORMAT="bz2,none"
139139
elif [[ "${format}" =~ ^(hyperv|hyperv_vhdx)$ ]];then
140140
COMPRESSION_FORMAT="zip"
141-
elif [[ "${format}" =~ ^(scaleway|kubevirt|proxmoxve)$ ]];then
141+
elif [[ "${format}" =~ ^(scaleway|kubevirt|proxmoxve|stackit)$ ]];then
142142
COMPRESSION_FORMAT="none"
143143
elif [[ "${format}" =~ ^(akamai)$ ]];then
144144
COMPRESSION_FORMAT="gz"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ COMMON_OEMIDS=(
3838
proxmoxve
3939
qemu
4040
scaleway
41+
stackit
4142
kubevirt
4243
)
4344

@@ -131,6 +132,11 @@ src_compile() {
131132
oemid_cmdline="ec2"
132133
fi
133134

135+
# STACKIT is running on top of OpenStack, so the `oem_cmdline` has to be `openstack` for Ignition/Afterburn integration but the `oemid` has to stay `stackit` to load the correct `oem-stackit` sysext image.
136+
if [[ "${oemid}" == "stackit" ]]; then
137+
oemid_cmdline="openstack"
138+
fi
139+
134140
lines=(
135141
'# Flatcar GRUB settings'
136142
''
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
driftfile /var/lib/chrony/drift
2+
makestep 1.0 3
3+
maxupdateskew 100.0
4+
dumpdir /var/lib/chrony
5+
rtcsync
6+
refclock PHC /dev/ptp_kvm poll 3 dpoll -2 offset 0 stratum 2
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[Service]
2+
Restart=always
3+
4+
[Unit]
5+
Wants=modprobe@ptp_kvm.service
6+
After=modprobe@ptp_kvm.service
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
d /etc/chrony 0755 root root - -
2+
d /etc/chrony/conf.d 0755 root root - -
3+
L /etc/chrony/chrony.conf - - - - ../../usr/share/oem-stackit/chrony.conf
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
d /var/lib/chrony 0770 ntp ntp - -
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
3+
<pkgmetadata>
4+
</pkgmetadata>
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Copyright (c) 2025 Flatcar Maintainers. All rights reserved.
2+
# Distributed under the terms of the GNU General Public License v2
3+
4+
EAPI=8
5+
6+
inherit systemd tmpfiles
7+
8+
DESCRIPTION="OEM suite for STACKIT"
9+
HOMEPAGE="https://stackit.cloud"
10+
SRC_URI=""
11+
12+
LICENSE="GPL-2"
13+
SLOT="0"
14+
KEYWORDS="amd64 arm64"
15+
IUSE=""
16+
17+
RDEPEND="
18+
net-misc/chrony
19+
"
20+
21+
S="${WORKDIR}"
22+
23+
OEM_NAME="STACKIT"
24+
25+
src_install() {
26+
systemd_install_dropin chronyd.service "${FILESDIR}"/chronyd-overwrite.conf
27+
systemd_enable_service multi-user.target chronyd.service
28+
dotmpfiles "${FILESDIR}"/var-chrony.conf
29+
dotmpfiles "${FILESDIR}"/etc-chrony.conf
30+
insinto /usr/share/"${PN}"
31+
doins "${FILESDIR}"/chrony.conf
32+
}

0 commit comments

Comments
 (0)