Deploy the `consul` config for `Grafana`.

This commit is contained in:
Kazuhiro MUSASHI 2020-09-26 17:34:59 +09:00
parent 06438d0dc2
commit e8d8ceeacb
2 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,6 @@
{
"service": {
"name": "grafana",
"port": 3000
}
}

View File

@ -3,6 +3,15 @@ service 'grafana-server' do
action [ :enable, :start ] action [ :enable, :start ]
end end
# Deploy `consul` config for `grafana`:
remote_file '/etc/consul.d/service-grafana.json' do
owner 'root'
group 'root'
mode '644'
notifies :restart, 'service[supervisor]'
end
# Firewall settings here: # Firewall settings here:
%w( 3000/tcp ).each do |p| %w( 3000/tcp ).each do |p|
execute "ufw allow #{p}" do execute "ufw allow #{p}" do