Skip to content

Instantly share code, notes, and snippets.

@jcockhren
Created May 12, 2014 16:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jcockhren/3231d715e24b17dc1be4 to your computer and use it in GitHub Desktop.
Save jcockhren/3231d715e24b17dc1be4 to your computer and use it in GitHub Desktop.
This is an example on how to get salt to manage supervisor based processes. This is old and was abandoned due to the ease of usage of elasticsearch official packages.
deps:
pkg.installed:
- name: supervisor
module.run:
- name: s3.get
- bucket: mypackages
- path: elasticsearch
- local_file: /tmp/es.tar.gz
- return_bin: True
supervisor:
pkg:
- installed
file.managed:
- name: /etc/supervisor/conf.d/elasticsearch.conf
- source: salt://elasticsearch/elasticsearch.conf
service:
- running
- enable: True
read-es:
module.run:
- name: supervisord.update
- watch:
- file: /etc/supervisor/conf.d/elasticsearch.conf
- stateful: True
enable-es:
module.wait:
- name: supervisord.add
- m_name: elasticsearch
- require:
- file: /etc/supervisor/conf.d/elasticsearch.conf
- stateful: True
- watch:
- module: read-es
elasticsearch:
supervisord:
- running
- require:
- file: /etc/supervisor/conf.d/elasticsearch.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment