0a7735d1ba
Currently we try to modprobe IPMI related modules in coreos image inside the chroot. It won't work, so we need to load them before we get in it. Change-Id: Ia0d912da8fc14aafcb6f84e9cc9e00c0408228e4 Closes-Bug: #1643353
226 lines
6.5 KiB
YAML
226 lines
6.5 KiB
YAML
#cloud-config
|
|
|
|
coreos:
|
|
units:
|
|
- name: user-configdrive.service
|
|
mask: true
|
|
|
|
- name: user-configvirtfs.service
|
|
mask: true
|
|
|
|
- name: user-configdrive.path
|
|
mask: true
|
|
|
|
- name: media-configdrive.mount
|
|
mask: true
|
|
|
|
- name: media-configvirtfs.mount
|
|
mask: true
|
|
|
|
- name: update-engine.service
|
|
mask: true
|
|
|
|
- name: update-engine-stub.service
|
|
mask: true
|
|
|
|
- name: resize-btrfs.service
|
|
mask: true
|
|
|
|
- name: locksmithd.service
|
|
mask: true
|
|
|
|
- name: fleet.service
|
|
mask: true
|
|
|
|
- name: etcd.service
|
|
mask: true
|
|
|
|
- name: usr-share-oem.mount
|
|
mask: true
|
|
|
|
- name: ironic-python-agent-embed-ssh-keys.service
|
|
command: start
|
|
content: |
|
|
[Unit]
|
|
Description=Migrate embedded SSH keys into core user
|
|
ConditionFileNotEmpty=/usr/share/oem/authorized_keys
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
RemainAfterExit=yes
|
|
ExecStart=/usr/bin/update-ssh-keys -a oem /usr/share/oem/authorized_keys
|
|
|
|
- name: ironic-python-agent-container-creation.service
|
|
command: start
|
|
content: |
|
|
[Unit]
|
|
Description=Untar Provided IPA Container
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
RemainAfterExit=yes
|
|
ExecStart=/usr/bin/mkdir -p /opt/ironic-python-agent
|
|
ExecStart=/usr/bin/tar -x --no-xattrs \
|
|
-C /opt/ironic-python-agent \
|
|
-f /usr/share/oem/container.tar.gz
|
|
|
|
- name: opt-ironic\x2dpython\x2dagent-proc.mount
|
|
command: start
|
|
content: |
|
|
[Unit]
|
|
DefaultDependencies=no
|
|
Conflicts=umount.target
|
|
Before=umount.target
|
|
After=ironic-python-agent-container-creation.service
|
|
Requires=ironic-python-agent-container-creation.service
|
|
|
|
[Mount]
|
|
What=/proc
|
|
Where=/opt/ironic-python-agent/proc
|
|
Type=none
|
|
Options=bind
|
|
|
|
- name: opt-ironic\x2dpython\x2dagent-dev.mount
|
|
command: start
|
|
content: |
|
|
[Unit]
|
|
DefaultDependencies=no
|
|
Conflicts=umount.target
|
|
Before=umount.target
|
|
After=ironic-python-agent-container-creation.service
|
|
Requires=ironic-python-agent-container-creation.service
|
|
|
|
[Mount]
|
|
What=/dev
|
|
Where=/opt/ironic-python-agent/dev
|
|
Type=none
|
|
Options=bind
|
|
|
|
- name: opt-ironic\x2dpython\x2dagent-dev-pts.mount
|
|
command: start
|
|
content: |
|
|
[Unit]
|
|
DefaultDependencies=no
|
|
Conflicts=umount.target
|
|
Before=umount.target
|
|
After=ironic-python-agent-container-creation.service
|
|
Requires=ironic-python-agent-container-creation.service
|
|
|
|
[Mount]
|
|
What=/dev/pts
|
|
Where=/opt/ironic-python-agent/dev/pts
|
|
Type=none
|
|
Options=bind
|
|
|
|
- name: opt-ironic\x2dpython\x2dagent-sys.mount
|
|
command: start
|
|
content: |
|
|
[Unit]
|
|
DefaultDependencies=no
|
|
Conflicts=umount.target
|
|
Before=umount.target
|
|
After=ironic-python-agent-container-creation.service
|
|
Requires=ironic-python-agent-container-creation.service
|
|
|
|
[Mount]
|
|
What=/sys
|
|
Where=/opt/ironic-python-agent/sys
|
|
Type=none
|
|
Options=bind
|
|
|
|
- name: opt-ironic\x2dpython\x2dagent-run.mount
|
|
command: start
|
|
content: |
|
|
[Unit]
|
|
DefaultDependencies=no
|
|
Conflicts=umount.target
|
|
Before=umount.target
|
|
After=ironic-python-agent-container-creation.service
|
|
Requires=ironic-python-agent-container-creation.service
|
|
|
|
[Mount]
|
|
What=/run
|
|
Where=/opt/ironic-python-agent/run
|
|
Type=none
|
|
Options=bind
|
|
|
|
- name: opt-ironic\x2dpython\x2dagent-mnt.mount
|
|
command: start
|
|
content: |
|
|
[Unit]
|
|
DefaultDependencies=no
|
|
Conflicts=umount.target
|
|
Before=umount.target
|
|
After=ironic-python-agent-container-creation.service
|
|
Requires=ironic-python-agent-container-creation.service
|
|
|
|
[Mount]
|
|
What=/usr/share/oem
|
|
Where=/opt/ironic-python-agent/mnt
|
|
Type=none
|
|
Options=bind
|
|
|
|
- name: opt-ironic\x2dpython\x2dagent-etc-resolvconf.service
|
|
command: start
|
|
content: |
|
|
[Unit]
|
|
Description="Provide host resolv.conf to chroot"
|
|
After=ironic-python-agent-container-creation.service
|
|
Requires=ironic-python-agent-container-creation.service
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
RemainAfterExit=yes
|
|
ExecStart=/bin/ln -f /etc/resolv.conf /opt/ironic-python-agent/etc/resolv.conf
|
|
|
|
- name: opt-ironic\x2dpython\x2dagent-run-log.mount
|
|
command: start
|
|
content: |
|
|
[Unit]
|
|
DefaultDependencies=no
|
|
Conflicts=umount.target
|
|
Before=umount.target
|
|
After=ironic-python-agent-container-creation.service
|
|
Requires=ironic-python-agent-container-creation.service
|
|
|
|
[Mount]
|
|
What=/run/log
|
|
Where=/opt/ironic-python-agent/run/log
|
|
Type=none
|
|
Options=bind
|
|
|
|
- name: ironic-python-agent.service
|
|
command: start
|
|
content: |
|
|
[Unit]
|
|
Description=Ironic Python Agent
|
|
After=ironic-python-agent-container-creation.service
|
|
After=opt-ironic\x2dpython\x2dagent-proc.mount
|
|
After=opt-ironic\x2dpython\x2dagent-dev.mount
|
|
After=opt-ironic\x2dpython\x2dagent-dev-pts.mount
|
|
After=opt-ironic\x2dpython\x2dagent-sys.mount
|
|
After=opt-ironic\x2dpython\x2dagent-run.mount
|
|
After=opt-ironic\x2dpython\x2dagent-mnt.mount
|
|
After=opt-ironic\x2dpython\x2dagent-etc-resolvconf.service
|
|
After=opt-ironic\x2dpython\x2dagent-run-log.mount
|
|
|
|
Requires=ironic-python-agent-container-creation.service
|
|
Requires=opt-ironic\x2dpython\x2dagent-proc.mount
|
|
Requires=opt-ironic\x2dpython\x2dagent-dev.mount
|
|
Requires=opt-ironic\x2dpython\x2dagent-dev-pts.mount
|
|
Requires=opt-ironic\x2dpython\x2dagent-sys.mount
|
|
Requires=opt-ironic\x2dpython\x2dagent-run.mount
|
|
Requires=opt-ironic\x2dpython\x2dagent-mnt.mount
|
|
Requires=opt-ironic\x2dpython\x2dagent-etc-resolvconf.service
|
|
Requires=opt-ironic\x2dpython\x2dagent-run-log.mount
|
|
|
|
[Service]
|
|
ExecStartPre=-/usr/sbin/modprobe ipmi_msghandler
|
|
ExecStartPre=-/usr/sbin/modprobe ipmi_devintf
|
|
ExecStartPre=-/usr/sbin/modprobe ipmi_si
|
|
ExecStart=/usr/bin/chroot /opt/ironic-python-agent \
|
|
/usr/local/bin/ironic-python-agent
|
|
Restart=always
|
|
RestartSec=30s
|
|
|