File tree 8 files changed +16
-19
lines changed
8 files changed +16
-19
lines changed Original file line number Diff line number Diff line change 1
- backend = "etcd "
1
+ backend = "etcdv3 "
2
2
interval = 10
3
3
watch = true
4
4
nodes = [
Original file line number Diff line number Diff line change 116
116
117
117
- block :
118
118
- name : Wait until the etcd cluster is healthy
119
- command : /usr/local/bin/etcdctl cluster-health
120
- environment :
121
- ETCDCTL_API : 2
119
+ command : >
120
+ /usr/local/bin/etcdctl endpoint health
121
+ --endpoints=http://{{ inventory_hostname }}:2379
122
122
register : etcd_health_result
123
- run_once : true
124
- changed_when : false
125
- until : " 'cluster is healthy' in etcd_health_result.stdout"
123
+ until : " 'is healthy' in etcd_health_result.stdout"
126
124
retries : 10
127
125
delay : 10
126
+ changed_when : false
128
127
ignore_errors : false
129
128
130
129
- name : cluster health
131
- run_once : true
132
130
debug :
133
- var : etcd_health_result.stdout_lines
131
+ msg : " {{ etcd_health_result.stdout }} "
134
132
tags : etcd, etcd_start, etcd_status
135
133
136
134
...
Original file line number Diff line number Diff line change @@ -10,4 +10,3 @@ ETCD_DATA_DIR="{{ etcd_data_dir }}"
10
10
ETCD_ELECTION_TIMEOUT="5000"
11
11
ETCD_HEARTBEAT_INTERVAL="1000"
12
12
ETCD_INITIAL_ELECTION_TICK_ADVANCE="false"
13
- ETCD_ENABLE_V2="true"
Original file line number Diff line number Diff line change @@ -30,11 +30,11 @@ restapi:
30
30
# password: password
31
31
32
32
{% if not dcs_exists |bool and dcs_type == 'etcd' %}
33
- etcd :
33
+ etcd3 :
34
34
hosts: {% for host in groups ['etcd_cluster' ] %} {{ hostvars[host] ['inventory_hostname'] }}:2379{% if not loop .last %} ,{% endif %}{% endfor %}
35
35
{% endif %}
36
36
{% if dcs_exists |bool and dcs_type == 'etcd' %}
37
- etcd :
37
+ etcd3 :
38
38
hosts: {% for etcd_hosts in patroni_etcd_hosts %} {{etcd_hosts.host}}:{{etcd_hosts.port}}{% if not loop .last %} ,{% endif %}{% endfor %}
39
39
{% endif %}
40
40
Original file line number Diff line number Diff line change 11
11
- name : Wait for the cluster ip address (VIP) "{{ cluster_vip }}" is running
12
12
wait_for :
13
13
host : " {{ cluster_vip }}"
14
- port : " {{ ansible_ssh_port | default(22 ) }}"
14
+ port : " {{ postgresql_port | default(5432 ) }}"
15
15
state : started
16
16
timeout : 60
17
17
delay : 2
Original file line number Diff line number Diff line change @@ -58,8 +58,8 @@ postgresql_packages:
58
58
# - postgresql-{{ postgresql_version }}-repack"
59
59
60
60
# Extra packages
61
- etcd_package_repo : " https://github.com/etcd-io/etcd/releases/download/{{ etcd_ver }}/etcd-{{ etcd_ver }}-linux-amd64.tar.gz"
62
- vip_manager_package_repo : " https://github.com/cybertec-postgresql/vip-manager/releases/download/v{{ vip_manager_version }}/vip-manager_{{ vip_manager_version }}-1_amd64 .deb"
61
+ etcd_package_repo : " https://github.com/etcd-io/etcd/releases/download/v {{ etcd_ver }}/etcd-v {{ etcd_ver }}-linux-amd64.tar.gz"
62
+ vip_manager_package_repo : " https://github.com/cybertec-postgresql/vip-manager/releases/download/v{{ vip_manager_version }}/vip-manager_{{ vip_manager_version }}_Linux_x86_64 .deb"
63
63
# (if with_haproxy_load_balancing: true)
64
64
haproxy_installation_method : " deb" # (default)"deb" or "src"
65
65
haproxy_install_repo : true # or 'false'
Original file line number Diff line number Diff line change @@ -79,8 +79,8 @@ postgresql_packages:
79
79
# - pg_repack{{ postgresql_version_terse }}
80
80
81
81
# Extra packages
82
- etcd_package_repo : " https://github.com/etcd-io/etcd/releases/download/{{ etcd_ver }}/etcd-{{ etcd_ver }}-linux-amd64.tar.gz"
83
- vip_manager_package_repo : " https://github.com/cybertec-postgresql/vip-manager/releases/download/v{{ vip_manager_version }}/vip-manager- {{ vip_manager_version }}-1.x86_64 .rpm"
82
+ etcd_package_repo : " https://github.com/etcd-io/etcd/releases/download/v {{ etcd_ver }}/etcd-v {{ etcd_ver }}-linux-amd64.tar.gz"
83
+ vip_manager_package_repo : " https://github.com/cybertec-postgresql/vip-manager/releases/download/v{{ vip_manager_version }}/vip-manager_ {{ vip_manager_version }}_Linux_x86_64 .rpm"
84
84
# (if with_haproxy_load_balancing: true)
85
85
haproxy_installation_method : " rpm" # (default)"rpm" or "src"
86
86
haproxy_install_repo : true # or 'false' # only for RedHat/CentOS version 7.
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ haproxy_timeout:
39
39
server : " 60m"
40
40
41
41
# vip-manager (if cluster_vip is specified and with_haproxy_load_balancing: false)
42
- vip_manager_version : " 1.0.2 " # version to install
42
+ vip_manager_version : " 2. 1.0" # version to install
43
43
vip_manager_conf : " /etc/patroni/vip-manager.yml"
44
44
vip_manager_interval : " 1000" # time (in milliseconds) after which vip-manager wakes up and checks if it needs to register or release ip addresses.
45
45
vip_manager_iface : " {{ vip_interface }}" # interface to which the virtual ip will be added
@@ -52,7 +52,7 @@ dcs_exists: false # or 'true' if you don't want to deploy a new etcd cluster
52
52
dcs_type : " etcd" # or 'consul'
53
53
54
54
# if dcs_type: "etcd" and dcs_exists: false
55
- etcd_ver : " v3.3.27 " # version for deploy etcd cluster
55
+ etcd_ver : " 3.5.7 " # version for deploy etcd cluster
56
56
etcd_data_dir : " /var/lib/etcd"
57
57
etcd_cluster_name : " etcd-{{ patroni_cluster_name }}" # ETCD_INITIAL_CLUSTER_TOKEN
58
58
You can’t perform that action at this time.
0 commit comments