summaryrefslogtreecommitdiffstats
path: root/roles/openshift_node/templates
diff options
context:
space:
mode:
authorBrenton Leanhardt <bleanhar@redhat.com>2016-03-14 13:22:13 -0400
committerBrenton Leanhardt <bleanhar@redhat.com>2016-03-14 13:22:13 -0400
commit238171804159ca5127b0a4d419bc7489b0fa8ab4 (patch)
tree9777b16283726b27cb23cc682e68305de6bc1cb3 /roles/openshift_node/templates
parent00ccce6741369f5cffdcca2a9511c57e3aff4b47 (diff)
parent8f7b31051dae0cdb853ca2f7fb68c31a40ae2967 (diff)
downloadopenshift-238171804159ca5127b0a4d419bc7489b0fa8ab4.tar.gz
openshift-238171804159ca5127b0a4d419bc7489b0fa8ab4.tar.bz2
openshift-238171804159ca5127b0a4d419bc7489b0fa8ab4.tar.xz
openshift-238171804159ca5127b0a4d419bc7489b0fa8ab4.zip
Merge pull request #1550 from detiber/docker_refactor
Docker role refactor
Diffstat (limited to 'roles/openshift_node/templates')
-rw-r--r--roles/openshift_node/templates/openshift.docker.node.service8
-rw-r--r--roles/openshift_node/templates/openvswitch.docker.service1
2 files changed, 6 insertions, 3 deletions
diff --git a/roles/openshift_node/templates/openshift.docker.node.service b/roles/openshift_node/templates/openshift.docker.node.service
index 83b697f73..fa14cd770 100644
--- a/roles/openshift_node/templates/openshift.docker.node.service
+++ b/roles/openshift_node/templates/openshift.docker.node.service
@@ -1,12 +1,13 @@
[Unit]
-After=docker.service
After={{ openshift.common.service_type }}-master.service
+After=docker.service
After=openvswitch.service
+PartOf=docker.service
+Requires=docker.service
{% if openshift.common.use_openshift_sdn %}
Requires=openvswitch.service
{% endif %}
-Requires=docker.service
-PartOf=docker.service
+Wants={{ openshift.common.service_type }}-master.service
[Service]
EnvironmentFile=/etc/sysconfig/{{ openshift.common.service_type }}-node
@@ -14,6 +15,7 @@ ExecStartPre=-/usr/bin/docker rm -f {{ openshift.common.service_type }}-node
ExecStart=/usr/bin/docker run --name {{ openshift.common.service_type }}-node --rm --privileged --net=host --pid=host -v /:/rootfs:ro -e CONFIG_FILE=${CONFIG_FILE} -e OPTIONS=${OPTIONS} -e HOST=/rootfs -e HOST_ETC=/host-etc -v {{ openshift.common.data_dir }}:{{ openshift.common.data_dir }} -v {{ openshift.common.config_base }}/node:{{ openshift.common.config_base }}/node -v /etc/localtime:/etc/localtime:ro -v /etc/machine-id:/etc/machine-id:ro -v /run:/run -v /sys:/sys:ro -v /usr/bin/docker:/usr/bin/docker:ro -v /var/lib/docker:/var/lib/docker -v /lib/modules:/lib/modules -v /etc/origin/openvswitch:/etc/openvswitch -v /etc/origin/sdn:/etc/openshift-sdn -v /etc/systemd/system:/host-etc/systemd/system -v /var/log:/var/log {{ openshift.node.node_image }}:${IMAGE_VERSION}
ExecStartPost=/usr/bin/sleep 10
ExecStop=/usr/bin/docker stop {{ openshift.common.service_type }}-node
+SyslogIdentifier={{ openshift.common.service_type }}-node
Restart=always
[Install]
diff --git a/roles/openshift_node/templates/openvswitch.docker.service b/roles/openshift_node/templates/openvswitch.docker.service
index 7af2b7431..047f66fda 100644
--- a/roles/openshift_node/templates/openvswitch.docker.service
+++ b/roles/openshift_node/templates/openvswitch.docker.service
@@ -9,6 +9,7 @@ ExecStartPre=-/usr/bin/docker rm -f openvswitch
ExecStart=/usr/bin/docker run --name openvswitch --rm --privileged --net=host --pid=host -v /lib/modules:/lib/modules -v /run:/run -v /sys:/sys:ro -v /etc/origin/openvswitch:/etc/openvswitch {{ openshift.node.ovs_image }}:${IMAGE_VERSION}
ExecStartPost=/usr/bin/sleep 5
ExecStop=/usr/bin/docker stop openvswitch
+SyslogIdentifier=openvswitch
Restart=always
[Install]