更新设备管理部署剧本

This commit is contained in:
zhangzhihan
2020-05-08 18:19:47 +08:00
parent 9a593538d3
commit e801af6ae3
41 changed files with 2143250 additions and 60 deletions

Binary file not shown.

View File

@@ -0,0 +1,11 @@
{
"server" : false,
"datacenter" : "consul-ADC01",
"data_dir" : "/var/consul-internal",
"encrypt" : "h1fHoHnJ+n+764ObqTNVjw==",
"disable_update_check" : true,
"log_level" : "err",
"log_file" : "/var/consul-internal/log/consul_internal.log",
"retry_join" : ["192.168.200.5"],
"retry_interval" : "10s"
}

View File

@@ -0,0 +1,14 @@
# Systemd unit file for default tomcat
#
[Unit]
Description=Consul-internal
After=network.target
[Service]
EnvironmentFile=/opt/consul-internal/etc/systemd/consul.conf
ExecStartPre=/opt/consul-internal/script/consul_bind_ip_generate.sh
ExecStart=/opt/consul-internal/bin/consul agent -config-dir /opt/consul-internal/etc/ -config-file /opt/consul-internal/etc/consul/config-client.json -bind ${CONSUL_BIND_ADDRESS}
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,10 @@
#!/bin/bash
rm -f /usr/lib/systemd/system/consul*service
rm -f /usr/lib/systemd/system/consul*service
cp -f /opt/consul-internal/etc/systemd/consul-client.service /usr/lib/systemd/system/consul-client-internal.service
cp -f /opt/consul-internal/bin/consul /usr/bin/
ln -sf /opt/consul-internal/script/consul_path_setup.sh /etc/profile.d/

View File

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

View File

@@ -0,0 +1,3 @@
PATH=/opt/consul-internal/bin:${PATH}
export PATH