a56d9de502
* Add restart for weave service unit * Reuse docker_bin_dir everythere * Limit systemd managed docker containers by CPU/RAM. Do not configure native systemd limits due to the lack of consensus in the kernel community requires out-of-tree kernel patches. Signed-off-by: Bogdan Dobrelya <bdobrelia@mirantis.com>
14 lines
656 B
Django/Jinja
14 lines
656 B
Django/Jinja
#!/bin/bash
|
|
{{ docker_bin_dir }}/docker run -i --privileged --rm \
|
|
--net=host --pid=host \
|
|
-e ETCD_ENDPOINTS={{ etcd_access_endpoint }} \
|
|
-e ETCD_CA_CERT_FILE=/etc/calico/certs/ca_cert.crt \
|
|
-e ETCD_CERT_FILE=/etc/calico/certs/cert.crt \
|
|
-e ETCD_KEY_FILE=/etc/calico/certs/key.pem \
|
|
-v {{ docker_bin_dir }}/docker:{{ docker_bin_dir }}/docker \
|
|
-v /var/run/docker.sock:/var/run/docker.sock \
|
|
-v /var/run/calico:/var/run/calico \
|
|
-v /etc/calico/certs:/etc/calico/certs:ro \
|
|
--memory={{ calicoctl_memory_limit|regex_replace('Mi', 'M') }} --cpu-shares={{ calicoctl_cpu_limit|regex_replace('m', '') }} \
|
|
{{ calicoctl_image_repo }}:{{ calicoctl_image_tag}} \
|
|
$@
|