Reload `consul` when deploying service config.

This commit is contained in:
Kazuhiro MUSASHI 2020-11-23 01:42:06 +09:00
parent 7270023c92
commit 9af4fa19a6
9 changed files with 35 additions and 16 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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