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

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