atomic-openshift-master-controllers.service.j2 1.8 KB

1234567891011121314151617181920212223242526272829303132333435
  1. [Unit]
  2. Description=Atomic OpenShift Master Controllers
  3. Documentation=https://github.com/openshift/origin
  4. Wants={{ openshift.common.service_type }}-master-api.service
  5. After={{ openshift.common.service_type }}-master-api.service
  6. After={{ openshift_docker_service_name }}.service
  7. Requires={{ openshift_docker_service_name }}.service
  8. PartOf={{ openshift_docker_service_name }}.service
  9. [Service]
  10. EnvironmentFile=/etc/sysconfig/{{ openshift.common.service_type }}-master-controllers
  11. Environment=GOTRACEBACK=crash
  12. ExecStartPre=-/usr/bin/docker rm -f {{ openshift.common.service_type}}-master-controllers
  13. ExecStart=/usr/bin/docker run --rm --privileged --net=host \
  14. --name {{ openshift.common.service_type }}-master-controllers \
  15. --env-file=/etc/sysconfig/{{ openshift.common.service_type }}-master-controllers \
  16. -v {{ r_openshift_master_data_dir }}:{{ r_openshift_master_data_dir }} \
  17. -v /var/run/docker.sock:/var/run/docker.sock \
  18. -v {{ openshift.common.config_base }}:{{ openshift.common.config_base }} \
  19. {% if openshift_cloudprovider_kind | default('') != '' -%} -v {{ openshift.common.config_base }}/cloudprovider:{{ openshift.common.config_base}}/cloudprovider {% endif -%} \
  20. -v /etc/pki:/etc/pki:ro \
  21. {% if l_bind_docker_reg_auth | default(False) %} -v {{ oreg_auth_credentials_path }}:/root/.docker:ro{% endif %}\
  22. {{ openshift.master.master_image }}:${IMAGE_VERSION} start master controllers \
  23. --config=${CONFIG_FILE} $OPTIONS
  24. ExecStartPost=/usr/bin/sleep 10
  25. ExecStop=/usr/bin/docker stop {{ openshift.common.service_type }}-master-controllers
  26. LimitNOFILE=131072
  27. LimitCORE=infinity
  28. WorkingDirectory={{ r_openshift_master_data_dir }}
  29. SyslogIdentifier={{ openshift.common.service_type }}-master-controllers
  30. Restart=always
  31. RestartSec=5s
  32. [Install]
  33. WantedBy={{ openshift_docker_service_name }}.service