Reload `consul` when deploying service config.
This commit is contained in:
parent
7270023c92
commit
9af4fa19a6
|
@ -17,7 +17,11 @@ remote_file '/etc/consul.d/service-go-mmproxy.json' do
|
||||||
group 'root'
|
group 'root'
|
||||||
mode '644'
|
mode '644'
|
||||||
|
|
||||||
notifies :restart, 'service[supervisor]'
|
notifies :reload, 'service[consul]'
|
||||||
|
end
|
||||||
|
|
||||||
|
service 'consul' do
|
||||||
|
action :nothing
|
||||||
end
|
end
|
||||||
|
|
||||||
# Firewall settings here:
|
# Firewall settings here:
|
||||||
|
|
|
@ -74,7 +74,11 @@ remote_file '/etc/consul.d/service-gitea.json' do
|
||||||
group 'root'
|
group 'root'
|
||||||
mode '644'
|
mode '644'
|
||||||
|
|
||||||
notifies :restart, 'service[supervisor]'
|
notifies :reload, 'service[consul]'
|
||||||
|
end
|
||||||
|
|
||||||
|
service 'consul' do
|
||||||
|
action :nothing
|
||||||
end
|
end
|
||||||
|
|
||||||
# Depoy `promtail` configuration for `gitea`:
|
# Depoy `promtail` configuration for `gitea`:
|
||||||
|
|
|
@ -46,7 +46,11 @@ remote_file '/etc/consul.d/service-grafana.json' do
|
||||||
group 'root'
|
group 'root'
|
||||||
mode '644'
|
mode '644'
|
||||||
|
|
||||||
notifies :restart, 'service[supervisor]'
|
notifies :reload, 'service[consul]'
|
||||||
|
end
|
||||||
|
|
||||||
|
service 'consul' do
|
||||||
|
action :nothing
|
||||||
end
|
end
|
||||||
|
|
||||||
# Firewall settings here:
|
# Firewall settings here:
|
||||||
|
|
|
@ -38,7 +38,11 @@ template '/etc/consul.d/service-loki.json' do
|
||||||
|
|
||||||
variables(ipaddr: node['consul']['ipaddr'])
|
variables(ipaddr: node['consul']['ipaddr'])
|
||||||
|
|
||||||
notifies :restart, 'service[supervisor]'
|
notifies :reload, 'service[consul]'
|
||||||
|
end
|
||||||
|
|
||||||
|
service 'consul' do
|
||||||
|
action :nothing
|
||||||
end
|
end
|
||||||
|
|
||||||
# Depoy `promtail` configuration for `loki`:
|
# Depoy `promtail` configuration for `loki`:
|
||||||
|
|
|
@ -22,10 +22,9 @@ remote_file '/etc/consul.d/service-filestat_exporter.json' do
|
||||||
group 'root'
|
group 'root'
|
||||||
mode '644'
|
mode '644'
|
||||||
|
|
||||||
notifies :restart, 'service[supervisor]'
|
notifies :reload, 'service[consul]'
|
||||||
end
|
end
|
||||||
|
|
||||||
service 'supervisor' do
|
service 'consul' do
|
||||||
action :nothing
|
action :nothing
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -13,10 +13,10 @@ remote_file '/etc/consul.d/service-node_exporter.json' do
|
||||||
group 'root'
|
group 'root'
|
||||||
mode '644'
|
mode '644'
|
||||||
|
|
||||||
notifies :restart, 'service[supervisor]'
|
notifies :reload, 'service[consul]'
|
||||||
end
|
end
|
||||||
|
|
||||||
service 'supervisor' do
|
service 'consul' do
|
||||||
action :nothing
|
action :nothing
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -29,11 +29,11 @@ remote_file '/etc/consul.d/service-prometheus.json' do
|
||||||
group 'root'
|
group 'root'
|
||||||
mode '644'
|
mode '644'
|
||||||
|
|
||||||
notifies :restart, 'service[supervisor]'
|
notifies :reload, 'service[consul]'
|
||||||
end
|
end
|
||||||
|
|
||||||
# Restart the `supervisor`:
|
# Restart the `consul`:
|
||||||
service 'supervisor' do
|
service 'consul' do
|
||||||
action :nothing
|
action :nothing
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -18,11 +18,11 @@ remote_file '/etc/consul.d/service-snmp_exporter.json' do
|
||||||
group 'root'
|
group 'root'
|
||||||
mode '644'
|
mode '644'
|
||||||
|
|
||||||
notifies :restart, 'service[supervisor]'
|
notifies :reload, 'service[consul]'
|
||||||
end
|
end
|
||||||
|
|
||||||
# Restart the `supervisor`:
|
# Restart the `reload`:
|
||||||
service 'supervisor' do
|
service 'consul' do
|
||||||
action :nothing
|
action :nothing
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,11 @@ template '/etc/consul.d/service-vector-syslog.json' do
|
||||||
|
|
||||||
variables(ipaddr: node['vector']['ipaddr'])
|
variables(ipaddr: node['vector']['ipaddr'])
|
||||||
|
|
||||||
notifies :restart, 'service[supervisor]'
|
notifies :reload, 'service[consul]'
|
||||||
|
end
|
||||||
|
|
||||||
|
service 'cosul' do
|
||||||
|
action :nothing
|
||||||
end
|
end
|
||||||
|
|
||||||
template '/etc/promtail/syslog.yaml' do
|
template '/etc/promtail/syslog.yaml' do
|
||||||
|
|
Loading…
Reference in New Issue