Skip to content

Commit 5e8dfc2

Browse files
author
ds
committed
devservices config for sentinel
1 parent cd1d259 commit 5e8dfc2

File tree

2 files changed

+111
-2
lines changed

2 files changed

+111
-2
lines changed

devservices/config.yml

Lines changed: 110 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ x-sentry-service-config:
99
repo_name: sentry-shared-redis
1010
branch: main
1111
repo_link: https://github.com/getsentry/sentry-shared-redis.git
12+
redis-master:
13+
description: Master instance of redis to be used with sentinel
14+
redis-replica:
15+
description: Replica instance of redis to be used with sentinel
16+
redis-sentinel-1:
17+
description: Instance of redis-sentinel
18+
redis-sentinel-2:
19+
description: Another instance of redis-sentinel
1220
kafka:
1321
description: Shared instance of kafka used by sentry services
1422
remote:
@@ -18,8 +26,8 @@ x-sentry-service-config:
1826
relay:
1927
description: Service that pushes some functionality from the Sentry SDKs as well as the Sentry server into a proxy process.
2028
modes:
21-
default: [redis, kafka]
22-
containerized: [redis, kafka, relay]
29+
default: [redis, kafka, redis-sentinel-1, redis-sentinel-2, redis-master, redis-replica]
30+
containerized: [redis, kafka, relay, redis-sentinel-1, redis-sentinel-2, redis-master, redis-replica]
2331

2432
x-programs:
2533
devserver:
@@ -47,8 +55,108 @@ services:
4755
labels:
4856
- orchestrator=devservices
4957
restart: unless-stopped
58+
redis-master:
59+
image: ghcr.io/getsentry/image-mirror-library-redis:5.0-alpine
60+
healthcheck:
61+
test: redis-cli -p 16379 ping | grep PONG
62+
interval: 5s
63+
timeout: 5s
64+
retries: 3
65+
command:
66+
- redis-server
67+
- --appendonly
68+
- yes
69+
- --port
70+
- "16379"
71+
ports:
72+
- "16379:16379"
73+
labels:
74+
- orchestrator=devservices
75+
networks:
76+
- devservices
77+
restart: unless-stopped
78+
redis-replica:
79+
image: ghcr.io/getsentry/image-mirror-library-redis:5.0-alpine
80+
healthcheck:
81+
test: redis-cli -p 16380 ping | grep PONG
82+
interval: 5s
83+
timeout: 5s
84+
retries: 3
85+
command:
86+
- redis-server
87+
- --appendonly
88+
- yes
89+
- --port
90+
- "16380"
91+
- --replicaof
92+
- redis-master
93+
- "16379"
94+
depends_on:
95+
- redis-master
96+
ports:
97+
- "16380:16380"
98+
labels:
99+
- orchestrator=devservices
100+
networks:
101+
- devservices
102+
restart: unless-stopped
103+
redis-sentinel-1:
104+
image: ghcr.io/getsentry/image-mirror-library-redis:5.0-alpine
105+
healthcheck:
106+
test: redis-cli -p 26379 ping | grep PONG
107+
interval: 5s
108+
timeout: 5s
109+
retries: 3
110+
command:
111+
- sh
112+
- -ec
113+
- |
114+
mkdir -p /etc/redis
115+
cp -n /sentinel.bootstrap.conf /etc/redis/sentinel.conf
116+
redis-server /etc/redis/sentinel.conf --sentinel --port 26379
117+
depends_on:
118+
- redis-master
119+
- redis-replica
120+
ports:
121+
- "26379:26379"
122+
labels:
123+
- orchestrator=devservices
124+
networks:
125+
- devservices
126+
volumes:
127+
- ./config/sentinel.bootstrap.conf:/sentinel.bootstrap.conf:ro
128+
restart: unless-stopped
129+
redis-sentinel-2:
130+
image: ghcr.io/getsentry/image-mirror-library-redis:5.0-alpine
131+
healthcheck:
132+
test: redis-cli -p 26380 ping | grep PONG
133+
interval: 5s
134+
timeout: 5s
135+
retries: 3
136+
command:
137+
- sh
138+
- -ec
139+
- |
140+
mkdir -p /etc/redis
141+
cp -n /sentinel.bootstrap.conf /etc/redis/sentinel.conf
142+
redis-server /etc/redis/sentinel.conf --sentinel --port 26380
143+
depends_on:
144+
- redis-master
145+
- redis-replica
146+
ports:
147+
- "26380:26380"
148+
labels:
149+
- orchestrator=devservices
150+
networks:
151+
- devservices
152+
volumes:
153+
- ./config/sentinel.bootstrap.conf:/sentinel.bootstrap.conf:ro
154+
restart: unless-stopped
50155

51156
networks:
52157
devservices:
53158
name: devservices
54159
external: true
160+
161+
volumes:
162+
redis-data:
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
sentinel monitor redis-sentry redis-master 16379 2

0 commit comments

Comments
 (0)