Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OEM: IONOS Cloud Images #2389

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions build_library/vm_image_util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ VALID_IMG_TYPES=(
hetzner
hyperv
hyperv_vhdx
ionoscloud
iso
kubevirt
openstack
Expand Down Expand Up @@ -54,6 +55,7 @@ VALID_OEM_PACKAGES=(
gce
hetzner
hyperv
ionoscloud
kubevirt
openstack
packet
Expand Down Expand Up @@ -332,6 +334,14 @@ 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_PACKAGE=common-oem-files
IMG_ionoscloud_OEM_SYSEXT=oem-ionoscloud
IMG_ionoscloud_DISK_LAYOUT=vm
IMG_ionoscloud_DISK_FORMAT=qcow2
IMG_ionoscloud_DISK_EXTENSION=qcow2

###########################################################

# Print the default vm type for the specified board
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ ConditionKernelCommandLine=|flatcar.oem.id=kubevirt

ConditionKernelCommandLine=|flatcar.oem.id=akamai

ConditionKernelCommandLine=|flatcar.oem.id=ionoscloud

Description=Flatcar Metadata Agent

[Service]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ COMMON_OEMIDS=(
qemu
scaleway
kubevirt
ionoscloud
)

ARM64_ONLY_OEMIDS=(
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
set linux_append="flatcar.autologin"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don’t think this is a good idea to enable autologin

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It depends on the cloud provider actually - if on Ionos you have access to the instance console you can still reboot the instance and inject the flatcar.autologin from the Grub menu. See here for more details: #1866 (comment)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not intended to be kept. Just helps me with debugging things while I finish the setup. Sorry I shouldn't have opened the PRs yet.

Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
# 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

if [[ "${PV}" == 9999 ]]; then
KEYWORDS="~amd64 ~arm64"
else
EGIT_COMMIT="f3aaab923de5075524780716635f25564b5e6934" # flatcar-master
EGIT_COMMIT="57fac09cb2f4c13b89f6baec46569a3e66a3b29b" # feat/ionoscloud-support
KEYWORDS="amd64 arm64"
fi

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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="768ad10d2f3aafb4b2d90ee548022872f426bc34" # feat/ionoscloud-support
KEYWORDS="amd64 arm arm64 x86"
fi

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Placeholder for IONOS cloud.cfg injection
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
</pkgmetadata>
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# 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"

S="${WORKDIR}"

src_install() {
dodir /etc/cloud/cloud.cfg.d/
dodir /var/lib/cloud/seed/nocloud/

insinto /etc/cloud
doins "${FILESDIR}/cloud.cfg"
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
# Distributed under the terms of the GNU General Public License v2

EAPI=7
EGIT_REPO_URI="https://github.com/flatcar/bootengine.git"
EGIT_REPO_URI="https://github.com/tuunit/flatcar-bootengine.git"

if [[ "${PV}" == 9999 ]]; then
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
else
EGIT_COMMIT="f3c80fb02fe65dd3be2b0bb4727fc10985acfa9d" # flatcar-master
KEYWORDS="amd64 arm arm64 x86"
EGIT_COMMIT="dc60e2fcc09e99082e2f1c8287a7526328217391" # feat/ionoscloud-support
KEYWORDS="amd64 arm arm64 x86"
fi

inherit git-r3
Expand Down