Skip to content

Commit

Permalink
Merge pull request #1197 from flatcar/tormath1/oem-openstack
Browse files Browse the repository at this point in the history
oem: port digitalocean, equinix metal (packet) and openstack
  • Loading branch information
tormath1 authored Oct 9, 2023
2 parents 333e3f1 + bafe49f commit da1b25f
Show file tree
Hide file tree
Showing 24 changed files with 91 additions and 144 deletions.
18 changes: 12 additions & 6 deletions build_library/vm_image_util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ VALID_OEM_PACKAGES=(
cloudsigma
cloudstack
digitalocean
ec2-compat
exoscale
gce
hyperv
openstack
packet
qemu
rackspace
Expand Down Expand Up @@ -229,16 +229,18 @@ IMG_ami_OEM_USE=ami
IMG_ami_OEM_PACKAGE=common-oem-files
IMG_ami_OEM_SYSEXT=oem-ami

## openstack, supports ec2's metadata format so use oem-ec2-compat
## openstack
IMG_openstack_DISK_FORMAT=qcow2
IMG_openstack_DISK_LAYOUT=vm
IMG_openstack_OEM_PACKAGE=oem-ec2-compat
IMG_openstack_OEM_PACKAGE=common-oem-files
IMG_openstack_OEM_USE=openstack
IMG_openstack_OEM_SYSEXT=oem-openstack

## openstack but without a resized root partition for more flexibility
IMG_openstack_mini_DISK_FORMAT=qcow2
IMG_openstack_mini_OEM_PACKAGE=oem-ec2-compat
IMG_openstack_mini_OEM_PACKAGE=common-oem-files
IMG_openstack_mini_OEM_USE=openstack
IMG_openstack_mini_OEM_SYSEXT=oem-openstack

## brightbox, supports ec2's metadata format so use oem-ec2-compat
IMG_brightbox_DISK_FORMAT=qcow2
Expand Down Expand Up @@ -280,7 +282,9 @@ IMG_cloudstack_vhd_DISK_FORMAT=vhd
IMG_cloudstack_vhd_OEM_PACKAGE=oem-cloudstack

## digitalocean
IMG_digitalocean_OEM_PACKAGE=oem-digitalocean
IMG_digitalocean_OEM_PACKAGE=common-oem-files
IMG_digitalocean_OEM_USE=digitalocean
IMG_digitalocean_OEM_SYSEXT=oem-digitalocean

## exoscale
IMG_exoscale_DISK_FORMAT=qcow2
Expand All @@ -302,7 +306,9 @@ IMG_cloudsigma_DISK_FORMAT=qcow2
IMG_cloudsigma_OEM_PACKAGE=oem-cloudsigma

## packet
IMG_packet_OEM_PACKAGE=oem-packet
IMG_packet_OEM_PACKAGE=common-oem-files
IMG_packet_OEM_SYSEXT=oem-packet
IMG_packet_OEM_USE=packet

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
[Unit]
ConditionKernelCommandLine=|flatcar.oem.id=ec2
ConditionKernelCommandLine=|coreos.oem.id=ec2

ConditionKernelCommandLine=|flatcar.oem.id=azure
ConditionKernelCommandLine=|coreos.oem.id=azure

ConditionKernelCommandLine=|flatcar.oem.id=digitalocean
ConditionKernelCommandLine=|coreos.oem.id=digitalocean

ConditionKernelCommandLine=|flatcar.oem.id=gce
ConditionKernelCommandLine=|coreos.oem.id=gce

ConditionKernelCommandLine=|flatcar.oem.id=openstack
ConditionKernelCommandLine=|coreos.oem.id=openstack

ConditionKernelCommandLine=|flatcar.oem.id=packet
ConditionKernelCommandLine=|coreos.oem.id=packet

Description=Flatcar Metadata Agent

[Service]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ EAPI=8
OEMIDS=(
ami
azure
digitalocean
openstack
packet
qemu
vmware
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# Flatcar GRUB settings

set oem_id="packet"
set linux_append="flatcar.autologin"

if [ "$grub_cpu" = i386 ] || [ "$grub_cpu" = x86_64 ]; then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ CROS_WORKON_REPO="https://github.com"
if [[ "${PV}" == 9999 ]]; then
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
else
CROS_WORKON_COMMIT="22c07b1270fb2f40dedef00f0d0fb1699727d995" # flatcar-master
CROS_WORKON_COMMIT="c01a33756a8fd9c672283d5a4ca56807dec4b9ff" # flatcar-master
KEYWORDS="amd64 arm arm64 x86"
fi

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/etc/systemd/system/multi-user.target.requires/[email protected]
/oem/base/
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/etc/systemd/system/multi-user.target.requires/[email protected]
/oem/base/
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/etc/systemd/system/multi-user.target.requires/[email protected]
/etc/systemd/system/packet-phone-home.service
/oem/base/
/oem/units/

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright (c) 2020 Kinvolk GmbH. All rights reserved.
# Distributed under the terms of the GNU General Public License v2

EAPI=8

DESCRIPTION="DigitalOcean suite for DigitalOcean"
HOMEPAGE="https://www.digitalocean.com/"
SRC_URI=""

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 arm64"
IUSE=""

OEM_NAME="DigitalOcean"
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,15 @@
# Copyright (c) 2020 Kinvolk GmbH. All rights reserved.
# Distributed under the terms of the GNU General Public License v2

EAPI=8

DESCRIPTION="OpenStack suite for OpenStack"
HOMEPAGE="https://www.openstack.org/"
SRC_URI=""

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 arm64"
IUSE=""

OEM_NAME="Openstack"

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright (c) 2020 Kinvolk GmbH. All rights reserved.
# Distributed under the terms of the GNU General Public License v2

EAPI=8

DESCRIPTION="Equinix Metal suite for Equinix Metal"
HOMEPAGE="https://www.equinix.com/"
SRC_URI=""

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 arm64"
IUSE=""

OEM_NAME="Equinix Metal"

0 comments on commit da1b25f

Please sign in to comment.