mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-22 06:01:41 +02:00
coreos-base/oem-gce: migrate gce to sysext format
Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
This commit is contained in:
parent
90fb8ad002
commit
5cfbf6e1eb
@ -256,8 +256,10 @@ IMG_iso_MEM=2048
|
|||||||
## gce, image tarball
|
## gce, image tarball
|
||||||
IMG_gce_DISK_LAYOUT=vm
|
IMG_gce_DISK_LAYOUT=vm
|
||||||
IMG_gce_CONF_FORMAT=gce
|
IMG_gce_CONF_FORMAT=gce
|
||||||
IMG_gce_OEM_PACKAGE=oem-gce
|
IMG_gce_OEM_PACKAGE=common-oem-files
|
||||||
IMG_gce_OEM_ACI=gce
|
IMG_gce_OEM_ACI=gce
|
||||||
|
IMG_gce_OEM_USE=gce
|
||||||
|
IMG_gce_OEM_SYSEXT=oem-gce
|
||||||
|
|
||||||
## rackspace
|
## rackspace
|
||||||
IMG_rackspace_OEM_PACKAGE=oem-rackspace
|
IMG_rackspace_OEM_PACKAGE=oem-rackspace
|
||||||
|
@ -31,6 +31,7 @@ fi
|
|||||||
COMMON_OEMIDS=(
|
COMMON_OEMIDS=(
|
||||||
ami
|
ami
|
||||||
azure
|
azure
|
||||||
|
gce
|
||||||
openstack
|
openstack
|
||||||
packet
|
packet
|
||||||
qemu
|
qemu
|
@ -1,7 +1,3 @@
|
|||||||
# Flatcar GRUB settings
|
|
||||||
|
|
||||||
set oem_id="gce"
|
|
||||||
|
|
||||||
# GCE only has a serial console.
|
# GCE only has a serial console.
|
||||||
set linux_console="console=ttyS0,115200n8"
|
set linux_console="console=ttyS0,115200n8"
|
||||||
serial com0 --speed=115200 --word=8 --parity=no
|
serial com0 --speed=115200 --word=8 --parity=no
|
13
sdk_container/src/third_party/coreos-overlay/coreos-base/misc-files/files/oems/gce
vendored
Normal file
13
sdk_container/src/third_party/coreos-overlay/coreos-base/misc-files/files/oems/gce
vendored
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
/etc/systemd/system/multi-user.target.wants/oem-cloudinit.service
|
||||||
|
/etc/systemd/system/multi-user.target.wants/oem-gce.service
|
||||||
|
/etc/systemd/system/oem-cloudinit.service
|
||||||
|
/etc/systemd/system/oem-gce-enable-oslogin.service
|
||||||
|
/etc/systemd/system/oem-gce.service
|
||||||
|
/etc/systemd/system/sysinit.target.wants/oem-gce-enable-oslogin.service
|
||||||
|
/oem/base/
|
||||||
|
/oem/bin/
|
||||||
|
/oem/files/
|
||||||
|
/oem/flatcar-oem-gce.aci
|
||||||
|
/oem/units/
|
||||||
|
/var/lib/flatcar-oem-gce
|
||||||
|
/var/lib/flatcar-oem-gce.img
|
@ -1,4 +0,0 @@
|
|||||||
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.
|
|
@ -1,57 +0,0 @@
|
|||||||
{
|
|
||||||
"ignition": {
|
|
||||||
"version": "2.2.0"
|
|
||||||
},
|
|
||||||
"storage": {
|
|
||||||
"files": [
|
|
||||||
{
|
|
||||||
"filesystem": "root",
|
|
||||||
"path": "/etc/systemd/system/oem-gce.service",
|
|
||||||
"contents": {
|
|
||||||
"source": "oem:///units/oem-gce.service"
|
|
||||||
},
|
|
||||||
"mode": 292
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filesystem": "root",
|
|
||||||
"path": "/etc/systemd/system/oem-gce-enable-oslogin.service",
|
|
||||||
"contents": {
|
|
||||||
"source": "oem:///units/oem-gce-enable-oslogin.service"
|
|
||||||
},
|
|
||||||
"mode": 292
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filesystem": "root",
|
|
||||||
"path": "/etc/hosts",
|
|
||||||
"contents": {
|
|
||||||
"source": "oem:///files/hosts"
|
|
||||||
},
|
|
||||||
"mode": 292
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filesystem": "root",
|
|
||||||
"path": "/etc/profile.d/google-cloud-sdk.sh",
|
|
||||||
"contents": {
|
|
||||||
"source": "oem:///files/google-cloud-sdk.sh"
|
|
||||||
},
|
|
||||||
"mode": 292
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"systemd": {
|
|
||||||
"units": [
|
|
||||||
{
|
|
||||||
"name": "coreos-metadata-sshkeys@.service",
|
|
||||||
"enabled": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "oem-gce.service",
|
|
||||||
"enabled": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "oem-gce-enable-oslogin.service",
|
|
||||||
"enabled": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,5 +0,0 @@
|
|||||||
ID=gce
|
|
||||||
VERSION_ID=@@OEM_VERSION_ID@@
|
|
||||||
NAME="Google Compute Engine"
|
|
||||||
HOME_URL="https://cloud.google.com/products/compute-engine/"
|
|
||||||
BUG_REPORT_URL="https://issues.flatcar.org"
|
|
2
sdk_container/src/third_party/coreos-overlay/coreos-base/oem-gce/files/units/10-oem-gce.conf
vendored
Normal file
2
sdk_container/src/third_party/coreos-overlay/coreos-base/oem-gce/files/units/10-oem-gce.conf
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
[Unit]
|
||||||
|
Upholds=oem-gce-enable-oslogin.service setup-oem.service
|
@ -10,7 +10,7 @@ Before=sshd.socket
|
|||||||
Type=oneshot
|
Type=oneshot
|
||||||
RemainAfterExit=true
|
RemainAfterExit=true
|
||||||
|
|
||||||
ExecStart=/oem/bin/enable-oslogin
|
ExecStart=/usr/bin/enable-oslogin
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=sysinit.target
|
WantedBy=sysinit.target
|
||||||
|
12
sdk_container/src/third_party/coreos-overlay/coreos-base/oem-gce/files/units/setup-oem.service
vendored
Normal file
12
sdk_container/src/third_party/coreos-overlay/coreos-base/oem-gce/files/units/setup-oem.service
vendored
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Setup OEM
|
||||||
|
Before=oem-gce-enable-oslogin.service
|
||||||
|
DefaultDependencies=false
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
RemainAfterExit=yes
|
||||||
|
ExecStart=-/usr/bin/ln --symbolic --force /usr/share/gce/hosts /etc/hosts
|
||||||
|
ExecStart=-/usr/bin/ln --symbolic /usr/share/gce/google-cloud-sdk.sh /etc/profile.d/google-cloud-sdk.sh
|
||||||
|
[Install]
|
||||||
|
WantedBy=sysinit.target
|
@ -1,33 +0,0 @@
|
|||||||
# Copyright (c) 2013 CoreOS, Inc.. All rights reserved.
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=7
|
|
||||||
|
|
||||||
DESCRIPTION="OEM suite for Google Compute Engine images"
|
|
||||||
HOMEPAGE=""
|
|
||||||
SRC_URI=""
|
|
||||||
|
|
||||||
LICENSE="Apache-2.0"
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS="amd64"
|
|
||||||
IUSE=""
|
|
||||||
|
|
||||||
# no source directory
|
|
||||||
S="${WORKDIR}"
|
|
||||||
|
|
||||||
src_prepare() {
|
|
||||||
default
|
|
||||||
sed -e "s\\@@OEM_VERSION_ID@@\\${PVR}\\g" \
|
|
||||||
"${FILESDIR}/oem-release" > "${T}/oem-release" || die
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
insinto "/oem"
|
|
||||||
doins "${FILESDIR}/grub.cfg"
|
|
||||||
doins "${T}/oem-release"
|
|
||||||
doins -r "${FILESDIR}/base"
|
|
||||||
doins -r "${FILESDIR}/files"
|
|
||||||
doins -r "${FILESDIR}/units"
|
|
||||||
exeinto "/oem/bin"
|
|
||||||
doexe "${FILESDIR}/bin/enable-oslogin"
|
|
||||||
}
|
|
35
sdk_container/src/third_party/coreos-overlay/coreos-base/oem-gce/oem-gce-20180823-r6.ebuild
vendored
Normal file
35
sdk_container/src/third_party/coreos-overlay/coreos-base/oem-gce/oem-gce-20180823-r6.ebuild
vendored
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
# Copyright (c) 2013 CoreOS, Inc.. All rights reserved.
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
# Copyright (c) 2020 Kinvolk GmbH. All rights reserved.
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=8
|
||||||
|
|
||||||
|
inherit systemd
|
||||||
|
|
||||||
|
DESCRIPTION="OEM suite for Google Compute Engine images"
|
||||||
|
HOMEPAGE="https://cloud.google.com/products/compute-engine/"
|
||||||
|
SRC_URI=""
|
||||||
|
|
||||||
|
LICENSE="Apache-2.0"
|
||||||
|
SLOT="0"
|
||||||
|
KEYWORDS="amd64"
|
||||||
|
IUSE=""
|
||||||
|
|
||||||
|
# no source directory
|
||||||
|
S="${WORKDIR}"
|
||||||
|
|
||||||
|
OEM_NAME="Google Compute Engine"
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
systemd_dounit "${FILESDIR}/units/oem-gce-enable-oslogin.service"
|
||||||
|
systemd_dounit "${FILESDIR}/units/setup-oem.service"
|
||||||
|
systemd_install_dropin "multi-user.target" "${FILESDIR}/units/10-oem-gce.conf"
|
||||||
|
|
||||||
|
dobin "${FILESDIR}/bin/enable-oslogin"
|
||||||
|
|
||||||
|
# These files will be symlinked to /etc via 'setup-oem.service'
|
||||||
|
insinto /usr/share/gce/
|
||||||
|
doins "${FILESDIR}/files/hosts"
|
||||||
|
doins "${FILESDIR}/files/google-cloud-sdk.sh"
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user