calico-node.service 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. # Licensed to the Apache Software Foundation (ASF) under one
  2. # or more contributor license agreements. See the NOTICE file
  3. # distributed with this work for additional information
  4. # regarding copyright ownership. The ASF licenses this file
  5. # to you under the Apache License, Version 2.0 (the
  6. # "License"); you may not use this file except in compliance
  7. # with the License. You may obtain a copy of the License at
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  11. # Unless required by applicable law or agreed to in writing, software
  12. # distributed under the License is distributed on an "AS IS" BASIS,
  13. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. # See the License for the specific language governing permissions and
  15. # limitations under the License.
  16. [Unit]
  17. Description=calico node
  18. After=docker.service
  19. Requires=docker.service
  20. [Service]
  21. User=root
  22. PermissionsStartOnly=true
  23. ExecStart=/usr/bin/docker run --net=host --privileged --name=calico-node \
  24. -e ETCD_ENDPOINTS=ETCD_ENDPOINTS_REPLACE \
  25. -e CALICO_LIBNETWORK_ENABLED=true \
  26. -e CALICO_NETWORKING_BACKEND=bird \
  27. -e CALICO_DISABLE_FILE_LOGGING=true \
  28. -e CALICO_IPV4POOL_CIDR=CALICO_IPV4POOL_CIDR_REPLACE/16 \
  29. -e CALICO_IPV4POOL_IPIP=always \
  30. -e FELIX_DEFAULTENDPOINTTOHOSTACTION=ACCEPT \
  31. -e FELIX_IPV6SUPPORT=false \
  32. -e FELIX_LOGSEVERITYSCREEN=info \
  33. -e FELIX_IPINIPMTU=1440 \
  34. -e FELIX_HEALTHENABLED=true \
  35. -e IP= \
  36. -v /etc/calico/ssl:/etc/calico/ssl \
  37. -v /var/run/calico:/var/run/calico \
  38. -v /lib/modules:/lib/modules \
  39. -v /run/docker/plugins:/run/docker/plugins \
  40. -v /var/run/docker.sock:/var/run/docker.sock \
  41. -v /var/log/calico:/var/log/calico \
  42. calico/node:v2.6.2
  43. ExecStop=/usr/bin/docker rm -f calico-node
  44. Restart=always
  45. RestartSec=10
  46. [Install]
  47. WantedBy=multi-user.target