mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-23 23:41:10 +02:00
coreos-base/oem-gce: migrate to the containerized GCE agent
The container is actually installed into the image when running the image_to_vm script, so this ebuild has no runtime dependencies. It only installs the GRUB configuration, oem-release file, and service unit to start the rkt container.
This commit is contained in:
parent
db06daab37
commit
4fd75fc80f
@ -1,12 +0,0 @@
|
||||
[Unit]
|
||||
Description=Google Compute Engine User Accounts Manager Daemon
|
||||
After=network.target
|
||||
Before=sshd.service
|
||||
Requires=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/share/oem/python/bin/python2.7 /usr/share/oem/google-compute-daemon/manage_accounts.py
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
@ -1,11 +0,0 @@
|
||||
[Unit]
|
||||
Description=Google Compute Engine Address Manager Daemon
|
||||
After=network.target
|
||||
Requires=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/share/oem/python/bin/python2.7 /usr/share/oem/google-compute-daemon/manage_addresses.py
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
@ -1,11 +0,0 @@
|
||||
[Unit]
|
||||
Description=Google Compute Engine Clock Sync Daemon
|
||||
After=network.target
|
||||
Requires=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/share/oem/python/bin/python2.7 /usr/share/oem/google-compute-daemon/manage_clock_sync.py
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
@ -1,15 +0,0 @@
|
||||
[Unit]
|
||||
Description=Google Compute Engine Startup Scripts
|
||||
After=network.target
|
||||
After=local-fs.target
|
||||
Before=sshd.service
|
||||
Requires=network.target
|
||||
Requires=local-fs.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
Environment=GOOGLE_SCRIPTS_PREFIX=/usr/share/oem/google-startup-scripts
|
||||
ExecStart=/usr/share/oem/google-startup-scripts/onboot
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
@ -1,14 +0,0 @@
|
||||
[Unit]
|
||||
Description=Google Compute Engine user startup scripts
|
||||
After=network.target
|
||||
After=google-startup-scripts-onboot.service
|
||||
Requires=google-startup-scripts-onboot.service
|
||||
Requires=network.target
|
||||
|
||||
[Service]
|
||||
Environment=GOOGLE_SCRIPTS_PREFIX=/usr/share/oem/google-startup-scripts
|
||||
ExecStart=/usr/share/oem/google-startup-scripts/run-startup-scripts
|
||||
Type=idle
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
29
sdk_container/src/third_party/coreos-overlay/coreos-base/oem-gce/files/units/oem-gce.service
vendored
Normal file
29
sdk_container/src/third_party/coreos-overlay/coreos-base/oem-gce/files/units/oem-gce.service
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
[Unit]
|
||||
Description=GCE Linux Agent
|
||||
After=local-fs.target network-online.target network.target
|
||||
After=local-fs.target network-online.target network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
|
||||
# There is a custom main process that kills all of the contained services.
|
||||
KillMode=process
|
||||
KillSignal=SIGTERM
|
||||
|
||||
ExecStart=/usr/bin/rkt run \
|
||||
--inherit-env=true \
|
||||
--insecure-options=image \
|
||||
--net=host \
|
||||
--stage1-path=/usr/lib/rkt/stage1-images/stage1-fly.aci \
|
||||
--volume=baselayout,kind=host,source=/usr/share/baselayout,readOnly=true \
|
||||
--volume=cacertificates,kind=host,source=/usr/share/ca-certificates,readOnly=true \
|
||||
--volume=etc,kind=host,source=/etc,readOnly=false \
|
||||
--volume=runsystemd,kind=host,source=/run/systemd,readOnly=false \
|
||||
/usr/share/oem/coreos-oem-gce.aci
|
||||
|
||||
ExecStopPost=/usr/bin/rkt gc --mark-only
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
@ -15,11 +15,6 @@ IUSE=""
|
||||
# no source directory
|
||||
S="${WORKDIR}"
|
||||
|
||||
RDEPEND="
|
||||
~app-emulation/google-compute-daemon-${PV}
|
||||
~app-emulation/google-startup-scripts-${PV}
|
||||
"
|
||||
|
||||
src_prepare() {
|
||||
sed -e "s\\@@OEM_VERSION_ID@@\\${PVR}\\g" \
|
||||
"${FILESDIR}/oem-release" > "${T}/oem-release" || die
|
Loading…
x
Reference in New Issue
Block a user