增加集群服务器ha配置;更新pyinstaller打包后找不到依赖库的bug.

This commit is contained in:
lijia
2020-10-20 22:46:23 +08:00
parent 2344df69ee
commit 25e4f39bcc
47 changed files with 679 additions and 30 deletions

View File

@@ -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

View File

@@ -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"

View 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"
}