mirror of
https://github.com/flatcar/scripts.git
synced 2025-12-09 19:31:54 +01:00
oem-ec2-compat: Move the EC2 Pro features into regular images
Signed-off-by: Sayan Chowdhury <schowdhury@microsoft.com>
This commit is contained in:
parent
aa83e2f34f
commit
b422471a35
@ -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
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@ -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
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@ -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
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user