Merge pull request #1679 from flatcar-linux/sayan/merge-pro-in-regular

Merge Pro features into the regular image
This commit is contained in:
Sayan Chowdhury 2022-03-02 20:43:40 +05:30 committed by GitHub
commit 55328bc249
20 changed files with 50 additions and 191 deletions

View File

@ -0,0 +1 @@
- Merge the Flatcar Pro features into the regular Flatcar images ([#1679](https://github.com/flatcar-linux/coreos-overlay/pull/1679))

View File

@ -0,0 +1 @@
- nvidia-drivers ([CVE-2022-21814](https://nvd.nist.gov/vuln/detail/CVE-2022-21814), [CVE-2022-21813](https://nvd.nist.gov/vuln/detail/CVE-2022-21813))

View File

@ -0,0 +1 @@
- nvidia-drivers ([510.47.03](https://docs.nvidia.com/datacenter/tesla/tesla-release-notes-510-47-03/index.html))

View File

@ -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.

View File

@ -1,37 +0,0 @@
{
"ignition": {
"version": "2.1.0"
},
"storage": {
"files": [
{
"filesystem": "root",
"path": "/etc/systemd/system/waagent.service",
"contents": {
"source": "oem:///units/waagent.service"
},
"mode": 292
},
{
"filesystem": "root",
"path": "/etc/systemd/system/nvidia.service",
"contents": {
"source": "oem:///units/nvidia.service"
},
"mode": 292
}
]
},
"systemd": {
"units": [
{
"name": "waagent.service",
"enabled": true
},
{
"name": "nvidia.service",
"enabled": true
}
]
}
}

View File

@ -1,14 +0,0 @@
{
"ignition": {
"version": "2.1.0"
},
"systemd": {
"units": [
{
"name": "oem-cloudinit.service",
"enabled": true,
"contents": "[Unit]\nDescription=Cloudinit from Azure metadata\n\n[Service]\nType=oneshot\nExecStart=/usr/bin/coreos-cloudinit --oem=azure\n\n[Install]\nWantedBy=multi-user.target\n"
}
]
}
}

View File

@ -1,16 +0,0 @@
# Flatcar GRUB settings
set oem_id="azure"
set linux_append="flatcar.autologin"
# Azure only has a serial console.
serial --unit=0 --speed=115200 --word=8 --parity=no
terminal_input serial
terminal_output serial
if [ "$grub_cpu" = arm64 ]; then
set linux_console="console=tty1 console=ttyAMA0,115200n8 earlycon=pl011,0xeffec000"
else
set linux_console="console=tty1 console=ttyS0,115200n8 earlyprintk=ttyS0,115200"
fi

View File

@ -1,5 +0,0 @@
ID=azure
VERSION_ID=@@OEM_VERSION_ID@@
NAME="Microsoft Azure (Pro)"
HOME_URL="https://azure.microsoft.com/"
BUG_REPORT_URL="https://issues.flatcar-linux.org"

View File

@ -1,15 +0,0 @@
[Unit]
Description=Microsoft Azure Agent
Wants=network-online.target sshd-keygen.service
After=network-online.target sshd-keygen.service
[Service]
Type=simple
Restart=always
RestartSec=5s
Environment=PATH=/usr/share/oem/python/bin:/usr/share/oem/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
Environment=PYTHONUNBUFFERED=x
ExecStart=/usr/share/oem/bin/waagent -daemon
[Install]
WantedBy=multi-user.target

View File

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
</pkgmetadata>

View File

@ -1,39 +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 Azure"
HOMEPAGE=""
SRC_URI=""
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 arm64"
IUSE=""
# no source directory
S="${WORKDIR}"
# This source is a superset of oem-azure and implments the pro bits. The source
# of oem-azure-pro is duplicated from oem-azure because making using of RDEPEND
# would result in the conflict of `base.ign`
RDEPEND="
~app-emulation/wa-linux-agent-${PV}
amd64? ( x11-drivers/nvidia-drivers )
"
src_prepare() {
default
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"
doins -r "${FILESDIR}/units"
dosym "/usr/bin/true" "/usr/share/oem/bin/eject"
}

View File

@ -11,6 +11,14 @@
"source": "oem:///units/waagent.service"
},
"mode": 292
},
{
"filesystem": "root",
"path": "/etc/systemd/system/nvidia.service",
"contents": {
"source": "oem:///units/nvidia.service"
},
"mode": 292
}
]
},
@ -19,6 +27,10 @@
{
"name": "waagent.service",
"enabled": true
},
{
"name": "nvidia.service",
"enabled": true
}
]
}

View File

@ -15,7 +15,10 @@ IUSE=""
# no source directory
S="${WORKDIR}"
RDEPEND="~app-emulation/wa-linux-agent-${PV}"
RDEPEND="
~app-emulation/wa-linux-agent-${PV}
x11-drivers/nvidia-drivers
"
src_prepare() {
default

View File

@ -1,37 +0,0 @@
{
"ignition": {
"version": "2.1.0"
},
"storage": {
"files": [
{
"filesystem": "root",
"path": "/etc/eks/bootstrap.sh",
"contents": {
"source": "oem:///eks/bootstrap.sh"
},
"mode": 493
},
{
"filesystem": "root",
"path": "/etc/systemd/system/nvidia.service",
"contents": {
"source": "oem:///units/nvidia.service"
},
"mode": 292
}
]
},
"systemd": {
"units": [
{
"name": "coreos-metadata-sshkeys@.service",
"enabled": true
},
{
"name": "nvidia.service",
"enabled": true
}
]
}
}

View File

@ -12,6 +12,10 @@
"name": "amazon-ssm-agent.service",
"enabled": true,
"contents": "[Unit]\nDescription=amazon-ssm-agent\nAfter=network-online.target\n\n[Service]\nType=simple\nWorkingDirectory=/usr/share/oem\nExecStart=/usr/share/oem/bin/amazon-ssm-agent\nKillMode=process\nRestart=on-failure\nRestartForceExitStatus=SIGPIPE\nRestartSec=15min\n\n[Install]\nWantedBy=multi-user.target\n"
},
{
"name": "nvidia.service",
"enabled": true
}
]
},
@ -32,6 +36,22 @@
"source": "oem:///ssm/seelog.xml.template"
},
"mode": 292
},
{
"filesystem": "root",
"path": "/etc/eks/bootstrap.sh",
"contents": {
"source": "oem:///eks/bootstrap.sh"
},
"mode": 493
},
{
"filesystem": "root",
"path": "/etc/systemd/system/nvidia.service",
"contents": {
"source": "oem:///units/nvidia.service"
},
"mode": 292
}
]
}

View File

@ -10,15 +10,13 @@ SRC_URI=""
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 arm64 x86"
IUSE="ec2 openstack brightbox aws_pro"
REQUIRED_USE="^^ ( ec2 openstack brightbox aws_pro )"
IUSE="ec2 openstack brightbox"
REQUIRED_USE="^^ ( ec2 openstack brightbox )"
RDEPEND="
ec2? ( app-emulation/amazon-ssm-agent )
aws_pro? (
coreos-base/flatcar-eks
x11-drivers/nvidia-drivers
)
ec2? ( app-emulation/amazon-ssm-agent )
coreos-base/flatcar-eks
x11-drivers/nvidia-drivers
"
# no source directory
@ -26,13 +24,9 @@ S="${WORKDIR}"
src_prepare() {
default
if use ec2 || use aws_pro ; then
if use ec2 ; then
ID="ami"
if use ec2; then
NAME="Amazon EC2"
else
NAME="Amazon EC2 (Pro)"
fi
NAME="Amazon EC2"
HOME_URL="http://aws.amazon.com/ec2/"
elif use openstack ; then
ID="openstack"
@ -56,7 +50,7 @@ src_prepare() {
src_install() {
insinto "/usr/share/oem"
doins "${T}/oem-release"
if use ec2 || use aws_pro ; then
if use ec2 ; then
newins "${FILESDIR}/grub-ec2.cfg" grub.cfg
elif use openstack ; then
newins "${FILESDIR}/grub-openstack.cfg" grub.cfg
@ -69,7 +63,5 @@ src_install() {
doins "${FILESDIR}/base/default.ign"
if use ec2 ; then
newins "${FILESDIR}/base/base-ec2.ign" base.ign
elif use aws_pro ; then
newins "${FILESDIR}/base/base-aws-pro.ign" base.ign
fi
}

View File

@ -24,12 +24,12 @@ function download_flatcar_developer_container() {
if [[ "$GROUP" == "developer" ]]
then
FLATCAR_DEVELOPER_CONTAINER_URL="https://storage.googleapis.com/flatcar-jenkins/developer/developer/boards/${FLATCAR_RELEASE_BOARD}/${FLATCAR_RELEASE_VERSION}/${FLATCAR_DEVELOPER_CONTAINER}.bz2"
FLATCAR_DEVELOPER_CONTAINER_URL="https://bucket.release.flatcar-linux.net/flatcar-jenkins/developer/developer/boards/${FLATCAR_RELEASE_BOARD}/${FLATCAR_RELEASE_VERSION}/${FLATCAR_DEVELOPER_CONTAINER}.bz2"
else if [[ "$(curl -I -s -o /dev/null -w "%{http_code}" "https://${GROUP}.release.flatcar-linux.net/${FLATCAR_RELEASE_BOARD}/${FLATCAR_RELEASE_VERSION}/${FLATCAR_DEVELOPER_CONTAINER}.bz2")" == 200 ]]
then
FLATCAR_DEVELOPER_CONTAINER_URL="https://${GROUP}.release.flatcar-linux.net/${FLATCAR_RELEASE_BOARD}/${FLATCAR_RELEASE_VERSION}/${FLATCAR_DEVELOPER_CONTAINER}.bz2"
else
FLATCAR_DEVELOPER_CONTAINER_URL="https://storage.googleapis.com/flatcar-jenkins/${GROUP}/boards/${FLATCAR_RELEASE_BOARD}/${FLATCAR_RELEASE_VERSION}/${FLATCAR_DEVELOPER_CONTAINER}.bz2"
FLATCAR_DEVELOPER_CONTAINER_URL="https://bucket.release.flatcar-linux.net/flatcar-jenkins/${GROUP}/boards/${FLATCAR_RELEASE_BOARD}/${FLATCAR_RELEASE_VERSION}/${FLATCAR_DEVELOPER_CONTAINER}.bz2"
fi
fi

View File

@ -1,2 +1,2 @@
NVIDIA_DRIVER_VERSION=470.57.02
NVIDIA_DRIVER_VERSION=510.47.03
NVIDIA_PRODUCT_TYPE=tesla