增加集群服务器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

@@ -0,0 +1,13 @@
{
"server" : true,
"datacenter" : "{{ consul.datacenter }}",
"data_dir" : "/var/consul-cluster",
"encrypt" : "{{ consul.dckey }}",
"disable_update_check" : true,
"bootstrap_expect": 2,
"log_level" : "info",
"log_file" : "/var/consul-cluster/log/consul_cluster.log",
"retry_join" : ["{{ consul.cluster_ip }}","{{ consul.cluster_ip_backup }}"],
"retry_interval" : "10s"
}

View File

@@ -0,0 +1,4 @@
#!/bin/bash
BIND_ADDRESS=$(ifconfig {{ consul.cluster_ethname }} | grep inet | head -1 |awk '{print $2}')
systemctl set-environment CONSUL_BIND_ADDRESS=${BIND_ADDRESS}