Skip to content

Commit eaea93e

Browse files
committed
add ionoscloud support
1 parent bd313b3 commit eaea93e

File tree

9 files changed

+49
-5
lines changed

9 files changed

+49
-5
lines changed

build_library/vm_image_util.sh

+21
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ VALID_IMG_TYPES=(
4141
vmware_ova
4242
vmware_raw
4343
xen
44+
ionoscloud
4445
)
4546

4647
#list of oem package names, minus the oem- prefix
@@ -66,6 +67,7 @@ VALID_OEM_PACKAGES=(
6667
vagrant-virtualbox
6768
virtualbox
6869
vmware
70+
ionoscloud
6971
)
7072

7173
# Set at runtime to one of the above types
@@ -332,6 +334,15 @@ IMG_akamai_OEM_PACKAGE=common-oem-files
332334
IMG_akamai_OEM_USE=akamai
333335
IMG_akamai_OEM_SYSEXT=oem-akamai
334336

337+
## ionoscloud
338+
IMG_ionoscloud_OEM_USE=ionoscloud
339+
IMG_ionoscloud_OEM_SYSEXT=oem-ionoscloud
340+
IMG_ionoscloud_OEM_PACKAGE=common-oem-files
341+
IMG_ionoscloud_DISK_LAYOUT=vm
342+
IMG_ionoscloud_DISK_FORMAT=qcow2
343+
IMG_ionoscloud_DISK_EXTENSION=qcow2
344+
IMG_ionoscloud_FS_HOOK=ionoscloud
345+
335346
###########################################################
336347

337348
# Print the default vm type for the specified board
@@ -610,6 +621,16 @@ _run_box_fs_hook() {
610621
sudo rm -fr "${VM_TMP_ROOT}/oem/box"
611622
}
612623

624+
_run_ionoscloud_fs_hook() {
625+
# Prep root parition for IONOS Cloud legacy injection
626+
# This is a workaround until the IONOS Cloud introduces a metadata server
627+
sudo mount -o remount,rw "${VM_TMP_ROOT}"
628+
sudo mkdir -p "${VM_TMP_ROOT}/var/lib/cloud/seed/nocloud"
629+
sudo mkdir -p "${VM_TMP_ROOT}/etc/cloud"
630+
sudo touch "${VM_TMP_ROOT}/etc/cloud/cloud.cfg"
631+
sudo mount -o remount,ro "${VM_TMP_ROOT}"
632+
}
633+
613634
# Write the vm disk image to the target directory in the proper format
614635
write_vm_disk() {
615636
if [[ $(_get_vm_opt PARTITIONED_IMG) -eq 1 ]]; then

sdk_container/src/third_party/coreos-overlay/coreos-base/afterburn/files/coreos-metadata.service

+2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ ConditionKernelCommandLine=|flatcar.oem.id=kubevirt
2525

2626
ConditionKernelCommandLine=|flatcar.oem.id=akamai
2727

28+
ConditionKernelCommandLine=|flatcar.oem.id=ionoscloud
29+
2830
Description=Flatcar Metadata Agent
2931

3032
[Service]

sdk_container/src/third_party/coreos-overlay/coreos-base/common-oem-files/common-oem-files-0-r8.ebuild

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ COMMON_OEMIDS=(
3838
qemu
3939
scaleway
4040
kubevirt
41+
ionoscloud
4142
)
4243

4344
ARM64_ONLY_OEMIDS=(
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
set linux_append="flatcar.autologin"

sdk_container/src/third_party/coreos-overlay/coreos-base/coreos-cloudinit/coreos-cloudinit-9999.ebuild

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
# Distributed under the terms of the GNU General Public License v2
33

44
EAPI=7
5-
EGIT_REPO_URI="https://github.com/flatcar/coreos-cloudinit.git"
5+
EGIT_REPO_URI="https://github.com/tuunit/flatcar-cloudinit.git"
66
COREOS_GO_PACKAGE="github.com/flatcar/coreos-cloudinit"
77
COREOS_GO_GO111MODULE="on"
88
inherit git-r3 systemd toolchain-funcs udev coreos-go
99

1010
if [[ "${PV}" == 9999 ]]; then
1111
KEYWORDS="~amd64 ~arm64"
1212
else
13-
EGIT_COMMIT="f3aaab923de5075524780716635f25564b5e6934" # flatcar-master
13+
EGIT_COMMIT="57fac09cb2f4c13b89f6baec46569a3e66a3b29b" # feat/ionoscloud-support
1414
KEYWORDS="amd64 arm64"
1515
fi
1616

sdk_container/src/third_party/coreos-overlay/coreos-base/coreos-init/coreos-init-9999.ebuild

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
# Distributed under the terms of the GNU General Public License v2
44

55
EAPI=7
6-
EGIT_REPO_URI="https://github.com/flatcar/init.git"
6+
EGIT_REPO_URI="https://github.com/tuunit/flatcar-init.git"
77

88
if [[ "${PV}" == 9999 ]]; then
99
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
1010
else
11-
EGIT_COMMIT="05b4b2aafbe706bdd65265c7a7103ed75fee14d2" # flatcar-master
11+
EGIT_COMMIT="a226d804b740bba9906e1beefe1ca51cba28dcdc" # flatcar-master
1212
KEYWORDS="amd64 arm arm64 x86"
1313
fi
1414

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>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Copyright (c) 2013 CoreOS, Inc.. All rights reserved.
2+
# Distributed under the terms of the GNU General Public License v2
3+
4+
EAPI=8
5+
6+
DESCRIPTION="OEM suite for IONOS Cloud"
7+
HOMEPAGE="https://cloud.ionos.com"
8+
SRC_URI=""
9+
10+
LICENSE="GPL-2"
11+
SLOT="0"
12+
KEYWORDS="amd64"
13+
IUSE=""
14+
15+
OEM_NAME="IONOS Cloud"

sdk_container/src/third_party/coreos-overlay/sys-apps/ignition/ignition-9999.ebuild

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ inherit coreos-go git-r3 systemd udev
1010
if [[ "${PV}" == 9999 ]]; then
1111
KEYWORDS="~amd64 ~arm64"
1212
else
13-
EGIT_COMMIT="a204f429f13194ae379be9401d49e5241439660b" # v2.20.0
13+
EGIT_COMMIT="488d302a0863ede5b723aea4ddd558f96e318569" # v2.20.0
1414
KEYWORDS="amd64 arm64"
1515
fi
1616

0 commit comments

Comments
 (0)