增加集群服务器ha配置;更新pyinstaller打包后找不到依赖库的bug.
This commit is contained in:
@@ -8,7 +8,7 @@ After=network.target
|
||||
[Service]
|
||||
EnvironmentFile=/opt/consul-external/etc/systemd/consul.conf
|
||||
ExecStartPre=/opt/consul-external/script/consul_bind_ip_generate.sh
|
||||
ExecStart=/opt/consul-external/bin/consul agent -config-dir /opt/consul-external/etc/ -config-file /opt/consul-external/etc/consul/config-server.json -bind ${CONSUL_BIND_ADDRESS} -client 0.0.0.0
|
||||
ExecStart=/opt/consul-external/bin/consul agent -config-dir /opt/consul-external/etc/ -config-file /opt/consul-external/etc/consul/config-client.json -bind ${CONSUL_BIND_ADDRESS} -client 0.0.0.0
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
@@ -12,8 +12,10 @@
|
||||
|
||||
- name: "Template config-server.json"
|
||||
template:
|
||||
src: "{{ role_path }}/templates/config-server.json.j2"
|
||||
dest: /opt/consul-external/etc/consul/config-server.json
|
||||
#src: "{{ role_path }}/templates/config-server.json.j2"
|
||||
#dest: /opt/consul-external/etc/consul/config-server.json
|
||||
src: "{{ role_path }}/templates/config-client.json.j2"
|
||||
dest: /opt/consul-external/etc/consul/config-client.json
|
||||
tags: template
|
||||
|
||||
- name: "Install consul-external"
|
||||
|
||||
9
roles/consul-external/templates/config-client.json.j2
Normal file
9
roles/consul-external/templates/config-client.json.j2
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"server" : false,
|
||||
"datacenter" : "{{ consul.datacenter }}",
|
||||
"data_dir" : "/var/consul-external",
|
||||
"encrypt" : "{{ consul.dckey }}",
|
||||
"disable_update_check" : true,
|
||||
"retry_join" : ["{{ consul.cluster_ip }}","{{ consul.cluster_ip_backup }}"],
|
||||
"retry_interval" : "10s"
|
||||
}
|
||||
Reference in New Issue
Block a user