You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
1.0 KiB

  1. [Unit]
  2. Description=calico-node
  3. After=docker.service
  4. Requires=docker.service
  5. [Service]
  6. EnvironmentFile=/etc/calico/calico.env
  7. ExecStartPre=-/usr/bin/docker rm -f calico-node
  8. ExecStart=/usr/bin/docker run --net=host --privileged \
  9. --name=calico-node \
  10. -e HOSTNAME=${CALICO_HOSTNAME} \
  11. -e IP=${CALICO_IP} \
  12. -e IP6=${CALICO_IP6} \
  13. -e CALICO_NETWORKING_BACKEND=${CALICO_NETWORKING_BACKEND} \
  14. -e AS=${CALICO_AS} \
  15. -e NO_DEFAULT_POOLS=${CALICO_NO_DEFAULT_POOLS} \
  16. -e CALICO_LIBNETWORK_ENABLED=${CALICO_LIBNETWORK_ENABLED} \
  17. -e ETCD_ENDPOINTS=${ETCD_ENDPOINTS} \
  18. -e ETCD_CA_CERT_FILE=${ETCD_CA_CERT_FILE} \
  19. -e ETCD_CERT_FILE=${ETCD_CERT_FILE} \
  20. -e ETCD_KEY_FILE=${ETCD_KEY_FILE} \
  21. -v /var/log/calico:/var/log/calico \
  22. -v /run/docker/plugins:/run/docker/plugins \
  23. -v /lib/modules:/lib/modules \
  24. -v /var/run/calico:/var/run/calico \
  25. -v {{ calico_cert_dir }}:{{ calico_cert_dir }}:ro \
  26. {{ calico_node_image_repo }}:{{ calico_node_image_tag }}
  27. Restart=always
  28. RestartSec=10s
  29. ExecStop=-/usr/bin/docker stop calico-node
  30. [Install]
  31. WantedBy=multi-user.target