jebovic.supervisor
Supervisor
Zainstaluj i skonfiguruj supervisora, możesz dodać swoje własne programy za pomocą zmiennych yaml.
Ta rola jest częścią mojego projektu OPS, kliknij ten link, aby zobaczyć go w działaniu. OPS oferuje wiele rzeczy, takich jak plik vagrant dla maszyn wirtualnych do programowania, playbooki do orkiestracji ról, pliki inwentarzowe, przykłady konfiguracji ról, plik konfiguracyjny ansible i wiele innych.
Zgodność
Testowane i zatwierdzone na:
- Debian jessie (8+)
- Ubuntu Trusty (14.04 LTS)
- Ubuntu Xenial (16.04 LTS)
Zmienne Roli
# Konfiguracja instalacji supervisora
supervisor_packages:
- supervisor
supervisor_pip_packages:
- superlance
# Podstawowa konfiguracja supervisora
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
# Programy supervisora
supervisor_programs: []
# Wydarzenia supervisora
supervisor_events: []
Przykładowy Playbook
- hosts: serwery
roles:
- { role: jebovic.supervisor }
Przykład: konfiguracja
# IP i port interfejsu użytkownika supervisora
supervisor_user: supervisor
supervisor_http_host: 127.0.0.1
supervisor_http_port: 9988
# Konfiguracja programów supervisora
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
# Konfiguracja wydarzeń supervisora (zależna od instalacji wtyczki superlance)
supervisor_events:
httpok:
command: httpok -p mailhog http://localhost:8025
events: TICK_60
Tagi
- supervisor_config : tylko zaktualizuj konfigurację i ponownie uruchom usługę
Licencja
MIT
Informacje o autorze
Jérémy Baumgarth https://github.com/jebovic
O projekcie
Install and configure supervisor, you can add your own programs with yaml variables
Zainstaluj
ansible-galaxy install jebovic.supervisor
Licencja
mit
Pobrania
2.8k
Właściciel