Skip to content

Instantly share code, notes, and snippets.

@viq
Created November 18, 2013 16:13
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 viq/7530516 to your computer and use it in GitHub Desktop.
Save viq/7530516 to your computer and use it in GitHub Desktop.
sentry-reqs:
pkg.installed:
- pkgs:
- python-virtualenv
- supervisor
- python-pip
- virtualenvwrapper
- postgresql-server-dev-all
- python-dev
- require_in:
- sentry
postgresql:
pkg:
- installed
service:
- running
- enable: True
- watch:
- pkg: postgresql
sentry_db:
postgres_database.present:
- name: {{ salt['pillar.get']('sentry:db:db_name') }}
- owner: {{ salt['pillar.get']('sentry:db:db_user') }}
- require:
- postgres_user: {{ salt['pillar.get']('sentry:db:db_user') }}
postgres_user.present:
- name: {{ salt['pillar.get']('sentry:db:db_user') }}
- password: {{ salt['pillar.get']('sentry:db:db_password') }}
sentry:
virtualenv.managed:
- name: /opt/sentry
- require:
- pkg: sentry-reqs
pip.installed:
- name: sentry[postgres]
- bin_env: /opt/sentry
- require:
- virtualenv: sentry
file.managed:
- name: /etc/sentry/sentry.conf.py
- source: salt://sentry/sentry.conf.py
- template: jinja
sentry_service:
file.managed:
- name: /etc/supervisor/conf.d/sentry.conf
- source: salt://sentry/supervisor_sentry.conf
- require:
- pkg: sentry-reqs
supervisord:
- name: sentry
- running
- watch:
- file: /etc/supervisor/conf.d/sentry.conf
- file: /etc/sentry/sentry.conf.py
- require:
- pip: sentry
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment