mirror of
https://github.com/flatcar/scripts.git
synced 2026-05-04 19:56:32 +02:00
add ionoscloud support
This commit is contained in:
parent
bd313b34df
commit
f61f854cd1
@ -41,6 +41,7 @@ VALID_IMG_TYPES=(
|
||||
vmware_ova
|
||||
vmware_raw
|
||||
xen
|
||||
ionoscloud
|
||||
)
|
||||
|
||||
#list of oem package names, minus the oem- prefix
|
||||
@ -66,6 +67,7 @@ VALID_OEM_PACKAGES=(
|
||||
vagrant-virtualbox
|
||||
virtualbox
|
||||
vmware
|
||||
ionoscloud
|
||||
)
|
||||
|
||||
# Set at runtime to one of the above types
|
||||
@ -332,6 +334,15 @@ IMG_akamai_OEM_PACKAGE=common-oem-files
|
||||
IMG_akamai_OEM_USE=akamai
|
||||
IMG_akamai_OEM_SYSEXT=oem-akamai
|
||||
|
||||
## ionoscloud
|
||||
IMG_ionoscloud_OEM_USE=ionoscloud
|
||||
IMG_ionoscloud_OEM_SYSEXT=oem-ionoscloud
|
||||
IMG_ionoscloud_OEM_PACKAGE=common-oem-files
|
||||
IMG_ionoscloud_DISK_LAYOUT=vm
|
||||
IMG_ionoscloud_DISK_FORMAT=qcow2
|
||||
IMG_ionoscloud_DISK_EXTENSION=qcow2
|
||||
IMG_ionoscloud_FS_HOOK=ionoscloud
|
||||
|
||||
###########################################################
|
||||
|
||||
# Print the default vm type for the specified board
|
||||
@ -610,6 +621,16 @@ _run_box_fs_hook() {
|
||||
sudo rm -fr "${VM_TMP_ROOT}/oem/box"
|
||||
}
|
||||
|
||||
_run_ionoscloud_fs_hook() {
|
||||
# Prepare root partition for IONOS Cloud legacy injection
|
||||
# This is a workaround until the IONOS Cloud introduces a metadata server
|
||||
sudo mount -o remount,rw "${VM_TMP_ROOT}"
|
||||
sudo mkdir -p "${VM_TMP_ROOT}/var/lib/cloud/seed/nocloud"
|
||||
sudo mkdir -p "${VM_TMP_ROOT}/etc/cloud"
|
||||
sudo touch "${VM_TMP_ROOT}/etc/cloud/cloud.cfg"
|
||||
sudo mount -o remount,ro "${VM_TMP_ROOT}"
|
||||
}
|
||||
|
||||
# Write the vm disk image to the target directory in the proper format
|
||||
write_vm_disk() {
|
||||
if [[ $(_get_vm_opt PARTITIONED_IMG) -eq 1 ]]; then
|
||||
|
||||
@ -138,7 +138,7 @@ function _vm_build_impl() {
|
||||
COMPRESSION_FORMAT="bz2,none"
|
||||
elif [[ "${format}" =~ ^(hyperv|hyperv_vhdx)$ ]];then
|
||||
COMPRESSION_FORMAT="zip"
|
||||
elif [[ "${format}" =~ ^(scaleway|kubevirt)$ ]];then
|
||||
elif [[ "${format}" =~ ^(scaleway|kubevirt|ionoscloud)$ ]];then
|
||||
COMPRESSION_FORMAT="none"
|
||||
elif [[ "${format}" =~ ^(akamai)$ ]];then
|
||||
COMPRESSION_FORMAT="gz"
|
||||
|
||||
@ -25,6 +25,8 @@ ConditionKernelCommandLine=|flatcar.oem.id=kubevirt
|
||||
|
||||
ConditionKernelCommandLine=|flatcar.oem.id=akamai
|
||||
|
||||
ConditionKernelCommandLine=|flatcar.oem.id=ionoscloud
|
||||
|
||||
Description=Flatcar Metadata Agent
|
||||
|
||||
[Service]
|
||||
|
||||
@ -47,6 +47,7 @@ AMD64_ONLY_OEMIDS=(
|
||||
digitalocean
|
||||
gce
|
||||
vmware
|
||||
ionoscloud
|
||||
)
|
||||
|
||||
OEMIDS=(
|
||||
|
||||
@ -0,0 +1 @@
|
||||
set linux_append="flatcar.autologin"
|
||||
@ -2,7 +2,7 @@
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
EGIT_REPO_URI="https://github.com/flatcar/coreos-cloudinit.git"
|
||||
EGIT_REPO_URI="https://github.com/tuunit/flatcar-cloudinit.git"
|
||||
COREOS_GO_PACKAGE="github.com/flatcar/coreos-cloudinit"
|
||||
COREOS_GO_GO111MODULE="on"
|
||||
inherit git-r3 systemd toolchain-funcs udev coreos-go
|
||||
@ -10,7 +10,7 @@ inherit git-r3 systemd toolchain-funcs udev coreos-go
|
||||
if [[ "${PV}" == 9999 ]]; then
|
||||
KEYWORDS="~amd64 ~arm64"
|
||||
else
|
||||
EGIT_COMMIT="f3aaab923de5075524780716635f25564b5e6934" # flatcar-master
|
||||
EGIT_COMMIT="57fac09cb2f4c13b89f6baec46569a3e66a3b29b" # feat/ionoscloud-support
|
||||
KEYWORDS="amd64 arm64"
|
||||
fi
|
||||
|
||||
|
||||
@ -3,12 +3,12 @@
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
EGIT_REPO_URI="https://github.com/flatcar/init.git"
|
||||
EGIT_REPO_URI="https://github.com/tuunit/flatcar-init.git"
|
||||
|
||||
if [[ "${PV}" == 9999 ]]; then
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
|
||||
else
|
||||
EGIT_COMMIT="05b4b2aafbe706bdd65265c7a7103ed75fee14d2" # flatcar-master
|
||||
EGIT_COMMIT="bfee73ca7420eb071556584e47736dbdb9c9a87e" # flatcar-master
|
||||
KEYWORDS="amd64 arm arm64 x86"
|
||||
fi
|
||||
|
||||
|
||||
4
sdk_container/src/third_party/coreos-overlay/coreos-base/oem-ionoscloud/metadata.xml
vendored
Normal file
4
sdk_container/src/third_party/coreos-overlay/coreos-base/oem-ionoscloud/metadata.xml
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
</pkgmetadata>
|
||||
15
sdk_container/src/third_party/coreos-overlay/coreos-base/oem-ionoscloud/oem-ionoscloud-0.ebuild
vendored
Normal file
15
sdk_container/src/third_party/coreos-overlay/coreos-base/oem-ionoscloud/oem-ionoscloud-0.ebuild
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
# Copyright (c) 2013 CoreOS, Inc.. All rights reserved.
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DESCRIPTION="OEM suite for IONOS Cloud"
|
||||
HOMEPAGE="https://cloud.ionos.com"
|
||||
SRC_URI=""
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64"
|
||||
IUSE=""
|
||||
|
||||
OEM_NAME="IONOS Cloud"
|
||||
@ -10,7 +10,7 @@ inherit coreos-go git-r3 systemd udev
|
||||
if [[ "${PV}" == 9999 ]]; then
|
||||
KEYWORDS="~amd64 ~arm64"
|
||||
else
|
||||
EGIT_COMMIT="a204f429f13194ae379be9401d49e5241439660b" # v2.20.0
|
||||
EGIT_COMMIT="488d302a0863ede5b723aea4ddd558f96e318569" # v2.20.0
|
||||
KEYWORDS="amd64 arm64"
|
||||
fi
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user