Skip to content

Instantly share code, notes, and snippets.

@inthecloud247
Created January 14, 2015 22:38
Show Gist options
  • Save inthecloud247/59993d5f94f7534be340 to your computer and use it in GitHub Desktop.
Save inthecloud247/59993d5f94f7534be340 to your computer and use it in GitHub Desktop.
supervisor:
pkg.latest:
- skip_suggestions: True
- refresh: False
service.running:
- enable: True
- reload: True
- watch: [ file: supervisor ]
file.managed:
- name: /etc/supervisord.conf
- mode: 644
- contents: |
[supervisord]
nodaemon=false
logfile=/var/log/supervisor/supervisord.log
pidfile=/var/run/supervisord.pid
childlogdir=/var/log/supervisor
[include]
files = /etc/supervisor/conf.d/*.conf
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[supervisorctl]
serverurl=unix:///var/run//supervisor.sock
file:
- directory
- user: root
- group: root
- mode: 755
- makedirs: True
- names:
- /etc/supervisor/conf.d
- /var/log/supervisor
@inthecloud247
Copy link
Author

heka:
  file.managed:
  - name: /etc/supervisor/conf.d/heka.conf
  - mode: 644
  - user: root
  - group: root
  - contents: |
      [program:heka]
      command={{heka.start}}
      directory=/
      user=root
      autostart=true
      autorestart=true
      redirect_stderr=true
      stdout_logfile=/var/log/heka/heka.log
  - listen_in:
    - supervisord: heka
    - cmd: heka_update
  supervisord.running:
  - update: True

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment