Page MenuHomeDevCentral

D2881.id7338.diff
No OneTemporary

D2881.id7338.diff

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
@@ -72,7 +72,75 @@
max_memory_ratio: 0.2
#
- # Services maintained by Sentry
+ # Snuba
+ #
+
+ snuba:
+ sentry_snuba_api:
+ command: api --http 0.0.0.0:1218 --py-autoreload 1 --http-keepalive 1
+ network: sentry
+ services: &sentry_snuba_services
+ broker: sentry_kafka:9092
+ clickhouse: sentry_clickhouse
+ redis: sentry_redis
+
+ sentry_snuba_consumer:
+ command: consumer --storage errors --auto-offset-reset=latest --max-batch-time-ms 750
+ network: sentry
+ services: *sentry_snuba_services
+
+ sentry_snuba_outcomes_consumer:
+ command: consumer --storage outcomes_raw --auto-offset-reset=earliest --max-batch-time-ms 750
+ network: sentry
+ services: *sentry_snuba_services
+
+ sentry_snuba_replacer:
+ command: replacer --storage errors --auto-offset-reset=latest
+ network: sentry
+ services: *sentry_snuba_services
+
+ sentry_snuba_replays_consumer:
+ command: consumer --storage replays --auto-offset-reset=latest --max-batch-time-ms 750
+ network: sentry
+ services: *sentry_snuba_services
+
+ sentry_snuba_sessions_consumer:
+ command: consumer --storage sessions_raw --auto-offset-reset=latest --max-batch-time-ms 750
+ network: sentry
+ services: *sentry_snuba_services
+
+ sentry_snuba_subscription_consumer_events:
+ command: subscriptions-scheduler-executor --dataset events --entity events --auto-offset-reset=latest
+ --no-strict-offset-reset --consumer-group=snuba-events-subscriptions-consumers
+ --followed-consumer-group=snuba-consumers --delay-seconds=60 --schedule-ttl=60
+ --stale-threshold-seconds=900
+ network: sentry
+ services: *sentry_snuba_services
+
+ sentry_snuba_subscription_consumer_sessions:
+ command: subscriptions-scheduler-executor --dataset sessions --entity sessions
+ --auto-offset-reset=latest --no-strict-offset-reset --consumer-group=snuba-sessions-subscriptions-consumers
+ --followed-consumer-group=sessions-group --delay-seconds=60 --schedule-ttl=60
+ --stale-threshold-seconds=900
+ network: sentry
+ services: *sentry_snuba_services
+
+ sentry_snuba_subscription_consumer_transactions:
+ command: subscriptions-scheduler-executor --dataset transactions --entity transactions
+ --auto-offset-reset=latest --no-strict-offset-reset --consumer-group=snuba-transactions-subscriptions-consumers
+ --followed-consumer-group=transactions_group --delay-seconds=60 --schedule-ttl=60
+ --stale-threshold-seconds=900
+ network: sentry
+ services: *sentry_snuba_services
+
+ sentry_snuba_transactions_consumer:
+ command: consumer --storage transactions --consumer-group transactions_group
+ --auto-offset-reset=latest --max-batch-time-ms 750
+ network: sentry
+ services: *sentry_snuba_services
+
+ #
+ # Sentry
#
sentry:
diff --git a/roles/paas-docker/containers/snuba.sls b/roles/paas-docker/containers/snuba.sls
new file mode 100644
--- /dev/null
+++ b/roles/paas-docker/containers/snuba.sls
@@ -0,0 +1,34 @@
+# -------------------------------------------------------------
+# Salt — Provision Docker engine
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# License: Trivial work, not eligible to copyright
+# Notes: Environment follows getsentry/self-hosted
+# -------------------------------------------------------------
+
+{% for instance, container in pillar['docker_containers']['snuba'].items() %}
+
+{{ instance }}:
+ docker_container.running:
+ - detach: True
+ - interactive: True
+ - image: getsentry/snuba
+ - command: {{ container["command"] }}
+ - environment:
+ SNUBA_SETTINGS: docker
+ CLICKHOUSE_HOST: {{ container["services"]["clickhouse"] }}
+ DEFAULT_BROKERS: {{ container["services"]["broker"] }}
+ REDIS_HOST: {{ container["services"]["redis"] }}
+ UWSGI_MAX_REQUESTS: 10000
+ UWSGI_DISABLE_LOGGING: "true"
+
+ # Leaving the value empty to just pass whatever is set
+ # on the host system (or in the .env file)
+ SENTRY_EVENT_RETENTION_DAYS:
+ - network: {{ container["network"] }}
+ - ports:
+ - 80
+ - port_bindings:
+ - {{ container['app_port'] }}:9000
+
+{% endfor %}

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 18, 07:32 (4 h, 2 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2250444
Default Alt Text
D2881.id7338.diff (4 KB)

Event Timeline