Page MenuHomeDevCentral

D2013.id5078.diff
No OneTemporary

D2013.id5078.diff

diff --git a/_modules/zr.py b/_modules/zr.py
--- a/_modules/zr.py
+++ b/_modules/zr.py
@@ -107,3 +107,16 @@
zr_command = "zr getcredentials {0} token".format(credential_id)
return __salt__['cmd.shell'](zr_command)
+
+
+def get_sentry_dsn(args):
+ sentry_server = _get_sentry_server(args['realm'])
+
+ return "https://" + ":".join([
+ get_username(args['credential']),
+ get_password(args['credential']),
+ ]) + "@" + sentry_server + "/" + str(args['project_id'])
+
+
+def _get_sentry_server(realm):
+ return __pillar__['sentry_realms'][realm]['host']
diff --git a/pillar/paas/docker.sls b/pillar/paas/docker.sls
--- a/pillar/paas/docker.sls
+++ b/pillar/paas/docker.sls
@@ -149,7 +149,10 @@
credentials:
broker: nasqueron.notifications.broker
mailgun: nasqueron.notifications.mailgun
- sentry: nasqueron.notifications.sentry
+ sentry:
+ realm: nasqueron
+ project_id: 2
+ credential: nasqueron.notifications.sentry
#
# Bugzilla
diff --git a/pillar/saas/sentry.sls b/pillar/saas/sentry.sls
--- a/pillar/saas/sentry.sls
+++ b/pillar/saas/sentry.sls
@@ -18,3 +18,4 @@
smtp: sentry_smtp
credential: nasqueron.sentry.app_key
email_from: no-reply@sentry.nasqueron.org
+ host: sentry.nasqueron.org
diff --git a/pillar/top.sls b/pillar/top.sls
--- a/pillar/top.sls
+++ b/pillar/top.sls
@@ -19,6 +19,7 @@
dwellers:
- credentials.zr
- paas.docker
+ - saas.sentry
eglide:
- shellserver.quassel
diff --git a/roles/paas-docker/containers/notifications.sls b/roles/paas-docker/containers/notifications.sls
--- a/roles/paas-docker/containers/notifications.sls
+++ b/roles/paas-docker/containers/notifications.sls
@@ -37,7 +37,7 @@
- MAILGUN_DOMAIN: {{ salt['zr.get_username'](container['credentials']['mailgun']) }}
- MAILGUN_APIKEY: {{ salt['zr.get_password'](container['credentials']['mailgun']) }}
- - SENTRY_DSN: https://{{ salt['zr.get_username'](container['credentials']['sentry']) }}:{{ salt['zr.get_password'](container['credentials']['sentry']) }}@sentry.nasqueron.org/2
+ - SENTRY_DSN: {{ salt['zr.get_sentry_dsn'](container['sentry']) }}
- ports:
- 80
- port_bindings:

File Metadata

Mime Type
text/plain
Expires
Tue, Nov 19, 17:01 (8 h, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2252794
Default Alt Text
D2013.id5078.diff (2 KB)

Event Timeline