Make etcd data dir configurable.
Closes: #1073 Signed-off-by: Sergii Golovatiuk <sgolovatiuk@mirantis.com>
This commit is contained in:
parent
87a100ae00
commit
a011677697
9 changed files with 12 additions and 7 deletions
|
@ -1,6 +1,9 @@
|
||||||
# Valid bootstrap options (required): ubuntu, coreos, centos, none
|
# Valid bootstrap options (required): ubuntu, coreos, centos, none
|
||||||
bootstrap_os: none
|
bootstrap_os: none
|
||||||
|
|
||||||
|
#Directory where etcd data stored
|
||||||
|
etcd_data_dir: /var/lib/etcd
|
||||||
|
|
||||||
# Directory where the binaries will be installed
|
# Directory where the binaries will be installed
|
||||||
bin_dir: /usr/local/bin
|
bin_dir: /usr/local/bin
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
---
|
---
|
||||||
kube_cert_group: kube-cert
|
kube_cert_group: kube-cert
|
||||||
|
etcd_data_dir: "/var/lib/etcd"
|
||||||
|
|
||||||
addusers:
|
addusers:
|
||||||
etcd:
|
etcd:
|
||||||
name: etcd
|
name: etcd
|
||||||
comment: "Etcd user"
|
comment: "Etcd user"
|
||||||
createhome: yes
|
createhome: yes
|
||||||
home: "/var/lib/etcd"
|
home: "{{ etcd_data_dir }}"
|
||||||
system: yes
|
system: yes
|
||||||
shell: /bin/nologin
|
shell: /bin/nologin
|
||||||
kube:
|
kube:
|
||||||
|
|
|
@ -3,7 +3,7 @@ addusers:
|
||||||
- name: etcd
|
- name: etcd
|
||||||
comment: "Etcd user"
|
comment: "Etcd user"
|
||||||
createhome: yes
|
createhome: yes
|
||||||
home: "/var/lib/etcd"
|
home: "{{ etcd_data_dir }}"
|
||||||
system: yes
|
system: yes
|
||||||
shell: /bin/nologin
|
shell: /bin/nologin
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ addusers:
|
||||||
- name: etcd
|
- name: etcd
|
||||||
comment: "Etcd user"
|
comment: "Etcd user"
|
||||||
createhome: yes
|
createhome: yes
|
||||||
home: "/var/lib/etcd"
|
home: "{{ etcd_data_dir }}"
|
||||||
system: yes
|
system: yes
|
||||||
shell: /bin/nologin
|
shell: /bin/nologin
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
---
|
---
|
||||||
etcd_bin_dir: "{{ local_release_dir }}/etcd/etcd-{{ etcd_version }}-linux-amd64/"
|
etcd_bin_dir: "{{ local_release_dir }}/etcd/etcd-{{ etcd_version }}-linux-amd64/"
|
||||||
|
etcd_data_dir: "/var/lib/etcd"
|
||||||
|
|
||||||
etcd_config_dir: /etc/ssl/etcd
|
etcd_config_dir: /etc/ssl/etcd
|
||||||
etcd_cert_dir: "{{ etcd_config_dir }}/ssl"
|
etcd_cert_dir: "{{ etcd_config_dir }}/ssl"
|
||||||
|
|
|
@ -13,7 +13,7 @@ ExecStart={{ docker_bin_dir }}/docker run --restart=on-failure:5 \
|
||||||
--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 /var/lib/etcd:/var/lib/etcd:rw \
|
-v {{ etcd_data_dir }}:/var/lib/etcd: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 %}
|
||||||
|
|
|
@ -15,7 +15,7 @@ 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=/var/lib/etcd,readOnly=false \
|
--volume=var-lib-etcd,kind=host,source={{ etcd_data_dir }},readOnly=false \
|
||||||
--mount=volume=var-lib-etcd,target=/var/lib/etcd \
|
--mount=volume=var-lib-etcd,target=/var/lib/etcd \
|
||||||
--set-env-file=/etc/etcd.env \
|
--set-env-file=/etc/etcd.env \
|
||||||
--stage1-from-dir=stage1-fly.aci \
|
--stage1-from-dir=stage1-fly.aci \
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
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 %}
|
||||||
|
|
|
@ -56,7 +56,7 @@
|
||||||
with_items:
|
with_items:
|
||||||
- "{{kube_config_dir}}"
|
- "{{kube_config_dir}}"
|
||||||
- /var/lib/kubelet
|
- /var/lib/kubelet
|
||||||
- /var/lib/etcd
|
- "{{ etcd_data_dir }}"
|
||||||
- /etc/ssl/etcd
|
- /etc/ssl/etcd
|
||||||
- /var/log/calico
|
- /var/log/calico
|
||||||
- /etc/cni
|
- /etc/cni
|
||||||
|
|
Loading…
Reference in a new issue