[WIP]: fixed cloud-init for VA

Change-Id: If7fbd55fb4177db51deefb82d0c6be30080e1c97
This commit is contained in:
Egorov, Stas (se6518) 2020-01-15 11:53:46 -08:00
parent f00f35a2ab
commit 59a859bbed
2 changed files with 83 additions and 0 deletions

View File

@ -0,0 +1,47 @@
---
schema: 'drydock/BootAction/v1'
metadata:
schema: 'metadata/Document/v1'
name: cloud-final-systemd-unit
replacement: false
storagePolicy: 'cleartext'
layeringDefinition:
abstract: false
layer: site
parentSelector:
name: cloud-final-systemd-unit
actions:
- method: replace
path: .assets
labels:
application: 'drydock'
data:
signaling: false
assets:
- path: /lib/systemd/system/cloud-final.service
type: unit
permissions: '444'
data: |
[Unit]
Description=Execute cloud user/final scripts
After=network-online.target cloud-config.service rc-local.service
Before=apt-daily.service
Wants=network-online.target cloud-config.service
[Service]
Type=oneshot
ExecStart=/usr/bin/cloud-init modules --mode=final
RemainAfterExit=yes
TimeoutSec=0
KillMode=process
TasksMax=infinity
# Output needs to appear in instance console output
StandardOutput=journal+console
[Install]
WantedBy=multi-user.target
data_pipeline:
- utf8_decode
...

View File

@ -0,0 +1,36 @@
---
schema: 'drydock/BootAction/v1'
metadata:
schema: 'metadata/Document/v1'
name: cloud-init-systemd-unit
replacement: false
storagePolicy: 'cleartext'
layeringDefinition:
abstract: false
layer: site
parentSelector:
name: cloud-init-systemd-unit
actions:
- method: replace
path: .assets
labels:
application: 'drydock'
data:
signaling: false
assets:
- path: /lib/systemd/system/cloud-init.target
type: unit
permissions: '444'
data: |
# cloud-init target is enabled by cloud-init-generator
# To disable it you can either:
# a.) boot with kernel cmdline of 'cloud-init=disabled'
# b.) touch a file /etc/cloud/cloud-init.disabled
[Unit]
Description=Cloud-init target
[Install]
WantedBy=multi-user.target
data_pipeline:
- utf8_decode
...