Skip to content
Snippets Groups Projects
Commit 64965420 authored by gdmelloatpoints's avatar gdmelloatpoints
Browse files

mount the etcd data directory in the container with the same path as on the host.

parent 5c1891ec
Branches
Tags
No related merge requests found
...@@ -15,8 +15,8 @@ ExecStart=/usr/bin/rkt run \ ...@@ -15,8 +15,8 @@ ExecStart=/usr/bin/rkt run \
--mount=volume=etc-ssl-certs,target=/etc/ssl/certs \ --mount=volume=etc-ssl-certs,target=/etc/ssl/certs \
--volume=etcd-cert-dir,kind=host,source={{ etcd_cert_dir }},readOnly=true \ --volume=etcd-cert-dir,kind=host,source={{ etcd_cert_dir }},readOnly=true \
--mount=volume=etcd-cert-dir,target={{ etcd_cert_dir }} \ --mount=volume=etcd-cert-dir,target={{ etcd_cert_dir }} \
--volume=var-lib-etcd,kind=host,source={{ etcd_data_dir }},readOnly=false \ --volume=etcd-data-dir,kind=host,source={{ etcd_data_dir }},readOnly=false \
--mount=volume=var-lib-etcd,target=/var/lib/etcd \ --mount=volume=etcd-data-dir,target={{ etcd_data_dir }} \
--set-env-file=/etc/etcd.env \ --set-env-file=/etc/etcd.env \
--stage1-from-dir=stage1-fly.aci \ --stage1-from-dir=stage1-fly.aci \
{{ etcd_image_repo }}:{{ etcd_image_tag }} \ {{ etcd_image_repo }}:{{ etcd_image_tag }} \
......
ETCD_DATA_DIR=/var/lib/etcd ETCD_DATA_DIR={{ etcd_data_dir }}
ETCD_ADVERTISE_CLIENT_URLS={{ etcd_client_url }} ETCD_ADVERTISE_CLIENT_URLS={{ etcd_client_url }}
ETCD_INITIAL_ADVERTISE_PEER_URLS={{ etcd_peer_url }} ETCD_INITIAL_ADVERTISE_PEER_URLS={{ etcd_peer_url }}
ETCD_INITIAL_CLUSTER_STATE={% if etcd_cluster_is_healthy.rc != 0 | bool %}new{% else %}existing{% endif %} ETCD_INITIAL_CLUSTER_STATE={% if etcd_cluster_is_healthy.rc != 0 | bool %}new{% else %}existing{% endif %}
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
--net=host \ --net=host \
-v /etc/ssl/certs:/etc/ssl/certs:ro \ -v /etc/ssl/certs:/etc/ssl/certs:ro \
-v {{ etcd_cert_dir }}:{{ etcd_cert_dir }}:ro \ -v {{ etcd_cert_dir }}:{{ etcd_cert_dir }}:ro \
-v {{ etcd_data_dir }}:/var/lib/etcd:rw \ -v {{ etcd_data_dir }}:{{ etcd_data_dir }}:rw \
{% if etcd_memory_limit is defined %} {% if etcd_memory_limit is defined %}
--memory={{ etcd_memory_limit|regex_replace('Mi', 'M') }} \ --memory={{ etcd_memory_limit|regex_replace('Mi', 'M') }} \
{% endif %} {% endif %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment