Skip to content
This repository has been archived by the owner on Sep 18, 2020. It is now read-only.

coreos-base/oem-hcloud: add hetzner cloud support #3490

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 4 additions & 0 deletions coreos-base/oem-hcloud/files/base/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
These Ignition configs are part of the OEM configuration. Do not modify
them. If you want to write an Ignition config directly to disk, put it in
../config.ign and it will be applied at first boot instead of a config
in userdata.
22 changes: 22 additions & 0 deletions coreos-base/oem-hcloud/files/base/base.ign
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"ignition": {
"version": "2.1.0"
},
"systemd": {
"units": [
{
"name": "[email protected]",
"enabled": true
},
{
"name": "coreos-metadata.service",
"enabled": true
},
{
"contents": "[Unit]\nDescription=Setting the hostname from the metadata\n\n[Service]\nType=oneshot\nEnvironment=COREOS_METADATA_OPT_PROVIDER=--cmdline\nExecStart=/usr/bin/coreos-metadata ${COREOS_METADATA_OPT_PROVIDER} --hostname=/etc/hostname\n\n[Install]\nRequiredBy=multi-user.target",
bgilbert marked this conversation as resolved.
Show resolved Hide resolved
"enable": true,
"name": "coreos-metadata-hostname.service"
}
]
}
}
14 changes: 14 additions & 0 deletions coreos-base/oem-hcloud/files/base/default.ign
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
bgilbert marked this conversation as resolved.
Show resolved Hide resolved
"ignition": {
"config": {},
"security": {
"tls": {}
},
"timeouts": {},
"version": "2.2.0"
},
"networkd": {},
"passwd": {},
"storage": {},
"systemd": {}
}
3 changes: 3 additions & 0 deletions coreos-base/oem-hcloud/files/grub.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# CoreOS GRUB settings

set oem_id="hcloud"
5 changes: 5 additions & 0 deletions coreos-base/oem-hcloud/files/oem-release
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
ID=hcloud
VERSION_ID=@@OEM_VERSION_ID@@
NAME="Hetzner Cloud"
HOME_URL="https://www.hetzner.com/cloud"
BUG_REPORT_URL="https://issues.coreos.com"
4 changes: 4 additions & 0 deletions coreos-base/oem-hcloud/metadata.xml
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>
27 changes: 27 additions & 0 deletions coreos-base/oem-hcloud/oem-hcloud-0.1.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Copyright (c) 2018 CoreOS, Inc.. All rights reserved.
# Distributed under the terms of the GNU General Public License v2

EAPI=5

DESCRIPTION="OEM suite for Hetzner Cloud images"
HOMEPAGE=""
SRC_URI=""

LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 x86"

# no source directory
S="${WORKDIR}"

src_prepare() {
sed -e "s\\@@OEM_VERSION_ID@@\\${PVR}\\g" \
"${FILESDIR}/oem-release" > "${T}/oem-release" || die
}

src_install() {
insinto "/usr/share/oem"
doins "${FILESDIR}/grub.cfg"
doins "${T}/oem-release"
doins -r "${FILESDIR}/base"
}