Merge "Run IPA in chroot instead of container in CoreOS"
This commit is contained in:
commit
45ec263f3f
@ -43,27 +43,126 @@ coreos:
|
||||
-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: 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.moun
|
||||
After=opt-ironic\x2dpython\x2dagent-mnt.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.moun
|
||||
Requires=opt-ironic\x2dpython\x2dagent-mnt.mount
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/systemd-nspawn -D /opt/ironic-python-agent \
|
||||
--share-system \
|
||||
--capability=all \
|
||||
--machine=ironic_python_agent \
|
||||
--bind=/dev:/dev \
|
||||
--bind=/dev/pts:/dev/pts \
|
||||
--bind=/proc:/proc \
|
||||
--bind=/sys:/sys \
|
||||
--bind=/usr/share/oem:/mnt \
|
||||
--user=root \
|
||||
--keep-unit \
|
||||
/usr/local/bin/ironic-python-agent
|
||||
ExecStart=/usr/bin/chroot /opt/ironic-python-agent \
|
||||
/usr/local/bin/ironic-python-agent
|
||||
Restart=always
|
||||
RestartSec=30s
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user