Delete `supervisor` dependency.

This commit is contained in:
Kazuhiro MUSASHI 2023-02-21 23:12:51 +09:00
parent 97710d00ee
commit 7889da9ceb
8 changed files with 19 additions and 32 deletions

View File

@ -1,10 +1,8 @@
# Deploy the `supervisord` configuration:
# Deploy the configuration:
remote_file '/etc/prometheus_exporters.d/filestat.yml' do
owner 'root'
group 'root'
mode '644'
notifies :restart, 'service[supervisor]'
end
# Deploy the `systemd` configuration:

View File

@ -16,7 +16,7 @@ encrypted_remote_file '/etc/prometheus.d/alertmanager.yml' do
source 'files/etc/prometheus.d/alertmanager.yml/'
password ENV['ITAMAE_PASSWORD']
notifies :restart, 'service[supervisor]'
notifies :restart, 'service[alertmanager]'
end
# Deploy alert setting file:
@ -26,7 +26,7 @@ end
group 'root'
mode '644'
notifies :restart, 'service[supervisor]'
notifies :restart, 'service[prometheus]'
end
end

View File

@ -1,14 +1,13 @@
# Deploy `supervisor` config for `Alert Manager Webhook Logger`
remote_file '/etc/supervisor/conf.d/alertmanager_webhook_logger.conf' do
# Deploy `systemd` config for `Alert Manager Webhook Logger`
remote_file '/etc/systemd/system.d/webhook.conf' do
owner 'root'
group 'root'
mode '644'
notifies :restart, 'service[supervisor]'
notifies :restart, 'service[webhook]'
end
# Restart the `supervisor`:
service 'supervisor' do
action :nothing
service 'webhook' do
action [:enable, :start]
end

View File

@ -1,8 +0,0 @@
[program:alertmanager]
command=/usr/local/bin/alertmanager --config.file /etc/prometheus.d/alertmanager.yml
stdout_logfile=/var/log/supervisor/alertmanager.log
redirect_stderr=true
stdout_logfile_maxbytes=1MB
stdout_logfile_backups=5
autorestart=true
stopsignal=HUP

View File

@ -1,7 +0,0 @@
[program:alertmanager-webhook-logger]
command=/usr/local/bin/alertmanager-webhook-logger
stdout_logfile=/var/log/supervisor/alertmanager-webhook-logger.log
redirect_stderr=true
stdout_logfile_maxbytes=1MB
stdout_logfile_backups=5
autorestart=true

View File

@ -0,0 +1,11 @@
[Unit]
Description=AlertmanagerWebhook
Wants=network-online.target
After=network-online.target
[Service]
Type=simple
ExecStart=/usr/local/bin/alertmanager-webhook-logger
[Install]
WantedBy=multi-user.target

View File

@ -1,5 +0,0 @@
package 'supervisor'
service 'supervisor' do
action [ :enable, :start]
end

View File

@ -1,6 +1,5 @@
include_recipe '../cookbooks/base/default.rb'
include_recipe '../cookbooks/kazu634/default.rb'
include_recipe '../cookbooks/supervisor/default.rb'
include_recipe '../cookbooks/vault/default.rb'
include_recipe '../cookbooks/consul-template/default.rb'
include_recipe '../cookbooks/consul/default.rb'