Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3747506
D2888.id7365.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
5 KB
Referenced Files
None
Subscribers
None
D2888.id7365.diff
View Options
diff --git a/PORTS b/PORTS
--- a/PORTS
+++ b/PORTS
@@ -26,6 +26,7 @@
24180 Tommy HTTP - CD
25080 Auth Grove HTTP
26080 Sentry HTTP
+ 26300 Sentry - Relay
30080 Pixelfed HTTP
31080 Phabricator HTTP - DevCentral
33080 Bugzilla HTTP - Espace Win
diff --git a/pillar/paas/docker/docker-002/sentry.sls b/pillar/paas/docker/docker-002/sentry.sls
--- a/pillar/paas/docker/docker-002/sentry.sls
+++ b/pillar/paas/docker/docker-002/sentry.sls
@@ -150,6 +150,17 @@
sentry_symbolicator:
network: sentry
+ #
+ # Relay
+ #
+
+ relay:
+ sentry_relay:
+ app_port: 26300
+ kafka: sentry_kafka
+ redis: sentry_redis
+ web: sentry_web
+
#
# Sentry
#
@@ -157,6 +168,7 @@
sentry:
sentry_web:
app_port: 26080
+ relay_port: 26300
host: sentry.nasqueron.org
command: run web
realm: nasqueron
diff --git a/roles/paas-docker/containers/files/relay/config.yml.jinja b/roles/paas-docker/containers/files/relay/config.yml.jinja
new file mode 100644
--- /dev/null
+++ b/roles/paas-docker/containers/files/relay/config.yml.jinja
@@ -0,0 +1,36 @@
+# -------------------------------------------------------------
+# Sentry configuration - Relay
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# License: Trivial work, not eligible to copyright
+# Source file: roles/paas-docker/containers/files/relay/config.yml.jinja
+# -------------------------------------------------------------
+#
+# <auto-generated>
+# This file is managed by our rOPS SaltStack repository.
+#
+# Changes to this file may cause incorrect behavior
+# and will be lost if the state is redeployed.
+# </auto-generated>
+
+relay:
+ upstream: http://{{ container.web }}:9000/
+
+ host: 0.0.0.0
+ port: 3000
+
+logging:
+ level: WARN
+
+processing:
+ enabled: true
+
+ kafka_config:
+ - name: bootstrap.servers
+ value: {{ container.kafka }}:9092
+ - name: message.max.bytes
+ value: 50000000 # 50MB
+
+ redis: redis://{{ container.redis }}:6379
+
+ geoip_path: "/usr/local/share/geoip/GeoLite2-City.mmdb"
diff --git a/roles/paas-docker/containers/relay.sls b/roles/paas-docker/containers/relay.sls
new file mode 100644
--- /dev/null
+++ b/roles/paas-docker/containers/relay.sls
@@ -0,0 +1,60 @@
+# -------------------------------------------------------------
+# Salt — Provision Docker engine
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# License: Trivial work, not eligible to copyright
+# -------------------------------------------------------------
+
+{% set has_selinux = salt['grains.get']('selinux:enabled', False) %}
+
+{% for instance, container in pillar['docker_containers']['relay'].items() %}
+
+# -------------------------------------------------------------
+# Data directory
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+/srv/relay/{{ instance }}:
+ file.directory:
+ - makedirs: True
+
+/srv/relay/{{ instance }}/config.yml:
+ file.managed:
+ - source: salt://roles/paas-docker/containers/files/relay/config.yml.jinja
+ - mode: 644
+ - template: jinja
+ - context:
+ container: {{ container }}
+
+{% if has_selinux %}
+selinux_context_{{ realm }}_relay_data:
+ selinux.fcontext_policy_present:
+ - name: /srv/relay/{{ instance }}
+ - sel_type: container_file_t
+
+selinux_context_{{ realm }}_relay_data_applied:
+ selinux.fcontext_policy_applied:
+ - name: /srv/relay/{{ instance }}
+{% endif %}
+
+{% endfor %}
+
+# -------------------------------------------------------------
+# Container
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+{{ instance }}:
+ docker_container.running:
+ - detach: True
+ - interactive: True
+ - image: getsentry/relay
+ - binds:
+ - /srv/relay/{{ instance }}/etc:/work/.relay
+ - /srv/geoip:/usr/local/share/geoip:ro
+ - ports:
+ - 3000
+ - port_bindings:
+ - {{ container['app_port'] }}:3000
+ - networks:
+ - {{ container['network'] }}
+
+{% endfor %}
diff --git a/roles/paas-docker/nginx/files/vhosts/sentry.conf b/roles/paas-docker/nginx/files/vhosts/sentry.conf
--- a/roles/paas-docker/nginx/files/vhosts/sentry.conf
+++ b/roles/paas-docker/nginx/files/vhosts/sentry.conf
@@ -2,8 +2,7 @@
# Configuration for Docker PaaS front-end nginx
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Author: Sébastien Santoro aka Dereckson
-# Created: 2018-09-11
-# Source file: roles/paas-docker/nginx/files/vhosts/_default.conf
+# Source file: roles/paas-docker/nginx/files/vhosts/sentry.conf
# -------------------------------------------------------------
#
# <auto-generated>
@@ -32,11 +31,27 @@
include includes/letsencrypt;
+ include includes/proxy_params;
+ proxy_redirect off;
+
+ location /api/store/ {
+ proxy_buffer_size 128k;
+ proxy_buffers 4 256k;
+ proxy_busy_buffers_size 256k;
+
+ proxy_pass http://localhost:{{ args.relay_port }};
+ }
+
+ location ~ ^/api/[1-9]\d*/ {
+ proxy_buffer_size 128k;
+ proxy_buffers 4 256k;
+ proxy_busy_buffers_size 256k;
+
+ proxy_pass http://localhost:{{ args.relay_port }};
+ }
+
location / {
proxy_pass http://localhost:{{ app_port }};
-
- include includes/proxy_params;
- proxy_redirect off;
}
location /.well-known/change-password {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 17, 02:31 (20 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2248540
Default Alt Text
D2888.id7365.diff (5 KB)
Attached To
Mode
D2888: Deploy Relay container for Sentry
Attached
Detach File
Event Timeline
Log In to Comment