jebovic.supervisor
スーパーバイザー
スーパーバイザーをインストールして設定します。YAML変数を使って独自のプログラムを追加できます。
このロールは私のOPSプロジェクトの一部です。このリンクをフォローして実際の動作を確認してください。OPSは、開発用VMのためのヴァグラントファイルやロールオーケストレーション用のプレイブック、インベントリファイル、ロール設定の例、Ansibleの設定ファイルなど、多くの機能を提供します。
互換性
テスト済みおよび承認済み:
- Debian jessie (8+)
- Ubuntu Trusty (14.04 LTS)
- Ubuntu Xenial (16.04 LTS)
ロール変数
# スーパーバイザーのインストール設定
supervisor_packages:
- supervisor
supervisor_pip_packages:
- superlance
# スーパーバイザーの基本設定
supervisor_user: root
supervisor_socket: /tmp/supervisor.sock
supervisor_pidfile: /var/run/supervisord.pid
supervisor_log_path: /var/log/supervisord
supervisor_log_file: "{{ supervisor_log_path }}/supervisord.log"
supervisor_http_host: "{{ ansible_host }}"
supervisor_http_port: 9988
supervisor_http_username: supervisor_user
supervisor_http_password: supervisor
# スーパーバイザーのプログラム
supervisor_programs: []
# スーパーバイザーのイベント
supervisor_events: []
例プレイブック
- hosts: servers
roles:
- { role: jebovic.supervisor }
例: 設定
# スーパーバイザーのUI IP & ポートバインディング
supervisor_user: supervisor
supervisor_http_host: 127.0.0.1
supervisor_http_port: 9988
# スーパーバイザーのプログラム設定
supervisor_programs:
traefik:
command: "{{ traefik_bin_path }} -c {{ traefik_config_dir }}/traefik.toml"
autostart: "true"
autorestart: "true"
stderr_logfile: "{{ supervisor_log_path }}/traefik-stderr.log"
stderr_logfile_maxbytes: 1MB
stderr_logfile_backups: 10
stdout_logfile: "{{ supervisor_log_path }}/traefik-stdout.log"
stdout_logfile_maxbytes: 1MB
stdout_logfile_backups: 10
user: root
consul:
command: "{{ consul_bin_path }} agent -ui -bind={{ ansible_host }} -client=0.0.0.0 -node={{ ansible_fqdn }} -bootstrap -server -http-port {{ consul_http_port }} -data-dir={{ consul_data_dir }} -config-dir={{ consul_config_dir }} -domain={{ ansible_fqdn }}."
autostart: "true"
autorestart: "true"
stderr_logfile: "{{ supervisor_log_path }}/consul-stderr.log"
stderr_logfile_maxbytes: 1MB
stderr_logfile_backups: 10
stdout_logfile: "{{ supervisor_log_path }}/consul-stdout.log"
stdout_logfile_maxbytes: 1MB
stdout_logfile_backups: 10
user: root
mailhog:
command: /usr/local/bin/mailhog -api-bind-addr :8025 -ui-bind-addr :8025
autostart: "true"
autorestart: "true"
stderr_logfile: "{{ supervisor_log_path }}/mailhog-stderr.log"
user: www-data
# スーパーバイザーのイベント設定(superlanceプラグインのインストールに依存)
supervisor_events:
httpok:
command: httpok -p mailhog http://localhost:8025
events: TICK_60
タグ
- supervisor_config : 設定を更新してサービスを再起動するのみ
ライセンス
MIT
著者情報
ジェレミー・バウムガルト https://github.com/jebovic
プロジェクトについて
Install and configure supervisor, you can add your own programs with yaml variables
インストール
ansible-galaxy install jebovic.supervisor
ライセンス
mit
ダウンロード
2.8k
所有者