Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3803479
D2012.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D2012.diff
View Options
diff --git a/PORTS b/PORTS
--- a/PORTS
+++ b/PORTS
@@ -2,7 +2,6 @@
3000 Mastodon public HTTP
4000 Mastodon streaming HTTP
15674 RabbitMQ
- 37080 Notifications center HTTP
41080 Nasqueron Tools HTTP
reserved-for-legacy-docker-migration-low-priority
@@ -31,6 +30,7 @@
34080 Etherpad
35080 Phabricator HTTP - Wolfplex
36080 Phabricator HTTP - Zed
+ 37080 Notifications center HTTP
38080 Jenkins HTTP - CD
39080 Cachet HTTP
42080 Jenkins HTTP - CI
diff --git a/pillar/credentials/zr.sls b/pillar/credentials/zr.sls
--- a/pillar/credentials/zr.sls
+++ b/pillar/credentials/zr.sls
@@ -28,6 +28,12 @@
# This API key is used by Wolfplex API to access to the pad lists
api: 125
+ # notifications.nasqueron.org
+ notifications:
+ broker: 56
+ mailgun: 82
+ sentry: 141
+
# sentry.nasqueron.org
sentry:
postgresql: 139
diff --git a/pillar/paas/docker.sls b/pillar/paas/docker.sls
--- a/pillar/paas/docker.sls
+++ b/pillar/paas/docker.sls
@@ -138,6 +138,20 @@
version: 5.7
#
+ # Notifications center
+ #
+
+ notifications:
+ notifications:
+ host: notifications.nasqueron.org
+ app_port: 37080
+ broker_link: white-rabbit
+ credentials:
+ broker: nasqueron.notifications.broker
+ mailgun: nasqueron.notifications.mailgun
+ sentry: nasqueron.notifications.sentry
+
+ #
# Bugzilla
#
diff --git a/roles/paas-docker/containers/notifications.sls b/roles/paas-docker/containers/notifications.sls
new file mode 100644
--- /dev/null
+++ b/roles/paas-docker/containers/notifications.sls
@@ -0,0 +1,46 @@
+# -------------------------------------------------------------
+# Salt — Provision Docker engine
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# Created: 2016-01-23
+# License: Trivial work, not eligible to copyright
+# -------------------------------------------------------------
+
+{% set containers = pillar['docker_containers'][grains['id']] %}
+
+{% for instance, container in containers['notifications'].items() %}
+
+# -------------------------------------------------------------
+# Container
+#
+# Image: nasqueron/notifications
+# Description: Listen to webhooks, fire notifications to
+# the broker. Used for CI / IRC notifications.
+# Services used: RabbitMQ broker (white-rabbit)
+# Docker volume (/data/notifications/storage)
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+{{ instance }}:
+ docker_container.running:
+ - detach: True
+ - interactive: True
+ - image: nasqueron/notifications
+ - binds: /srv/notifications/storage:/var/wwwroot/default/storage
+ - links:
+ - {{ container['broker_link'] }}:mq
+ - environment:
+ - BROKER_HOST: mq
+ - BROKER_USER: {{ salt['zr.get_username'](container['credentials']['broker']) }}
+ - BROKER_PASS: {{ salt['zr.get_password'](container['credentials']['broker']) }}
+ - BROKER_VHOST: dev
+
+ - 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
+ - ports:
+ - 80
+ - port_bindings:
+ - {{ container['app_port'] }}:80
+
+{% endfor %}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 30, 17:43 (21 h, 55 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2273235
Default Alt Text
D2012.diff (3 KB)
Attached To
Mode
D2012: Migrate Notifications center deployment to PaaS Docker
Attached
Detach File
Event Timeline
Log In to Comment