Skip to content

Commit 4c35a9e

Browse files
authored
⬆️ upgrade redis to 6.2.6, added persistency ⚠️ devops (ITISFoundation#2793)
1 parent d7b614e commit 4c35a9e

File tree

4 files changed

+30
-31
lines changed

4 files changed

+30
-31
lines changed

services/docker-compose-ops.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,7 @@ services:
7070
retries: 3
7171

7272
filestash:
73-
container_name: filestash
7473
image: machines/filestash:3a01b70
75-
restart: always
7674
ports:
7775
- "9002:8334"
7876
volumes:
@@ -81,9 +79,7 @@ services:
8179
- simcore_default
8280

8381
onlyoffice:
84-
container_name: filestash_oods
8582
image: onlyoffice/documentserver:7.0.0.132
86-
restart: always
8783
networks:
8884
- simcore_default
8985

services/docker-compose.yml

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ services:
2020
- traefik.http.services.${SWARM_STACK_NAME}_api-server.loadbalancer.healthcheck.path=/
2121
- traefik.http.services.${SWARM_STACK_NAME}_api-server.loadbalancer.healthcheck.interval=2000ms
2222
- traefik.http.services.${SWARM_STACK_NAME}_api-server.loadbalancer.healthcheck.timeout=1000ms
23-
- traefik.http.routers.${SWARM_STACK_NAME}_api-server.rule=hostregexp(`{host:.+}`)
24-
&& (Path(`/`, `/v0`) || PathPrefix(`/v0/`))
23+
- traefik.http.routers.${SWARM_STACK_NAME}_api-server.rule=hostregexp(`{host:.+}`) && (Path(`/`, `/v0`) || PathPrefix(`/v0/`))
2524
- traefik.http.routers.${SWARM_STACK_NAME}_api-server.entrypoints=simcore_api
2625
- traefik.http.routers.${SWARM_STACK_NAME}_api-server.priority=1
2726
- traefik.http.routers.${SWARM_STACK_NAME}_api-server.middlewares=${SWARM_STACK_NAME}_gzip@docker,ratelimit-${SWARM_STACK_NAME}_api-server
@@ -156,9 +155,7 @@ services:
156155
- traefik.http.services.${SWARM_STACK_NAME}_static_webserver.loadbalancer.healthcheck.interval=2000ms
157156
- traefik.http.services.${SWARM_STACK_NAME}_static_webserver.loadbalancer.healthcheck.timeout=1000ms
158157
- traefik.http.middlewares.${SWARM_STACK_NAME}_static_webserver_retry.retry.attempts=2
159-
- traefik.http.routers.${SWARM_STACK_NAME}_static_webserver.rule=hostregexp(`{host:.+}`)
160-
&& (Path(`/osparc`,`/s4l`,`/tis`,`/transpiled`,`/resource`) ||
161-
PathPrefix(`/osparc/`,`/s4l/`,`/tis/`,`/transpiled/`,`/resource/`))
158+
- traefik.http.routers.${SWARM_STACK_NAME}_static_webserver.rule=hostregexp(`{host:.+}`) && (Path(`/osparc`,`/s4l`,`/tis`,`/transpiled`,`/resource`) || PathPrefix(`/osparc/`,`/s4l/`,`/tis/`,`/transpiled/`,`/resource/`))
162159
- traefik.http.routers.${SWARM_STACK_NAME}_static_webserver.service=${SWARM_STACK_NAME}_static_webserver
163160
- traefik.http.routers.${SWARM_STACK_NAME}_static_webserver.entrypoints=http
164161
- traefik.http.routers.${SWARM_STACK_NAME}_static_webserver.priority=2
@@ -167,11 +164,7 @@ services:
167164
- traefik.http.routers.${SWARM_STACK_NAME}_legacy_services_catchall.service=${SWARM_STACK_NAME}_legacy_services_catchall
168165
- traefik.http.routers.${SWARM_STACK_NAME}_legacy_services_catchall.priority=1
169166
- traefik.http.routers.${SWARM_STACK_NAME}_legacy_services_catchall.entrypoints=http
170-
- traefik.http.routers.${SWARM_STACK_NAME}_legacy_services_catchall.rule=hostregexp(`{host:.+}`)
171-
&&
172-
(Path(`/x/{node_uuid:\b[0-9a-f]{8}\b-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-\b[0-9a-f]{12}\b}`)
173-
||
174-
PathPrefix(`/x/{node_uuid:\b[0-9a-f]{8}\b-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-\b[0-9a-f]{12}\b}/`))
167+
- traefik.http.routers.${SWARM_STACK_NAME}_legacy_services_catchall.rule=hostregexp(`{host:.+}`) && (Path(`/x/{node_uuid:\b[0-9a-f]{8}\b-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-\b[0-9a-f]{12}\b}`) || PathPrefix(`/x/{node_uuid:\b[0-9a-f]{8}\b-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-\b[0-9a-f]{12}\b}/`))
175168
# this tricks traefik into a 502 (bad gateway) since the service does not exist on this port
176169
- traefik.http.services.${SWARM_STACK_NAME}_legacy_services_catchall.loadbalancer.server.port=0
177170
# this tricks traefik into returning a 503 (service unavailable) since the healthcheck will always return false
@@ -235,15 +228,10 @@ services:
235228
- traefik.http.services.${SWARM_STACK_NAME}_webserver.loadbalancer.sticky.cookie.secure=true
236229
- traefik.http.middlewares.${SWARM_STACK_NAME}_webserver_retry.retry.attempts=2
237230
- traefik.http.routers.${SWARM_STACK_NAME}_webserver.service=${SWARM_STACK_NAME}_webserver
238-
- traefik.http.routers.${SWARM_STACK_NAME}_webserver.rule=hostregexp(`{host:.+}`)
239-
&& (Path(`/`, `/v0`,`/socket.io/`,`/static-frontend-data.json`,
240-
`/study/{study_uuid:\b[0-9a-f]{8}\b-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-\b[0-9a-f]{12}\b}`,
241-
`/view`, `/#/view`, `/#/error`) || PathPrefix(`/v0/`))
231+
- traefik.http.routers.${SWARM_STACK_NAME}_webserver.rule=hostregexp(`{host:.+}`) && (Path(`/`, `/v0`,`/socket.io/`,`/static-frontend-data.json`, `/study/{study_uuid:\b[0-9a-f]{8}\b-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-\b[0-9a-f]{12}\b}`, `/view`, `/#/view`, `/#/error`) || PathPrefix(`/v0/`))
242232
- traefik.http.routers.${SWARM_STACK_NAME}_webserver.entrypoints=http
243233
- traefik.http.routers.${SWARM_STACK_NAME}_webserver.priority=2
244-
- traefik.http.routers.${SWARM_STACK_NAME}_webserver.middlewares=${SWARM_STACK_NAME}_gzip@docker,
245-
${SWARM_STACK_NAME_NO_HYPHEN}_sslheader@docker,
246-
${SWARM_STACK_NAME}_webserver_retry
234+
- traefik.http.routers.${SWARM_STACK_NAME}_webserver.middlewares=${SWARM_STACK_NAME}_gzip@docker, ${SWARM_STACK_NAME_NO_HYPHEN}_sslheader@docker, ${SWARM_STACK_NAME}_webserver_retry
247235
networks:
248236
- default
249237
- interactive_services_subnet
@@ -413,20 +401,37 @@ services:
413401
]
414402

415403
redis:
416-
image: "redis:5.0.9-alpine@sha256:b011c1ca7fa97ed92d6c5995e5dd752dc37fe157c1b60ce96a6e35701851dabc"
404+
image: "redis:6.2.6@sha256:4bed291aa5efb9f0d77b76ff7d4ab71eee410962965d052552db1fb80576431d"
417405
init: true
418406
hostname: "{{.Node.Hostname}}-{{.Service.Name}}-{{.Task.Slot}}"
407+
command:
408+
# redis server will write a backup every 60 seconds if at least 1 key was changed
409+
# also aof (append only) is also enabled such that we get full durability at the expense
410+
# of backup size. The backup is written into /data.
411+
# https://redis.io/topics/persistence
412+
[
413+
"redis-server",
414+
"--save",
415+
"60 1",
416+
"--loglevel",
417+
"verbose",
418+
"--databases",
419+
"3",
420+
"--appendonly",
421+
"yes"
422+
]
419423
networks:
420424
- default
421-
- computational_services_subnet
425+
volumes:
426+
- redis-data:/data
422427
healthcheck:
423428
test: [ "CMD", "redis-cli", "ping" ]
424429
interval: 5s
425430
timeout: 30s
426431
retries: 50
427432

428433
traefik:
429-
image: traefik:v2.5.6
434+
image: "traefik:v2.5.6@sha256:2f603f8d3abe1dd3a4eb28960c55506be48293b41ea2c6ed4a4297c851a57a05"
430435
init: true
431436
hostname: "{{.Node.Hostname}}-{{.Service.Name}}-{{.Task.Slot}}"
432437
command:
@@ -454,8 +459,7 @@ services:
454459
# https://github.com/traefik/traefik/issues/7886
455460
- "--providers.docker.swarmModeRefreshSeconds=1"
456461
- "--providers.docker.exposedByDefault=false"
457-
- "--providers.docker.constraints=Label(`io.simcore.zone`,
458-
`${TRAEFIK_SIMCORE_ZONE}`)"
462+
- "--providers.docker.constraints=Label(`io.simcore.zone`, `${TRAEFIK_SIMCORE_ZONE}`)"
459463
- "--tracing=true"
460464
- "--tracing.jaeger=true"
461465
- "--tracing.jaeger.samplingServerURL=http://jaeger:5778/sampling"
@@ -490,6 +494,7 @@ services:
490494
volumes:
491495
postgres_data: {}
492496
computational_shared_data: {}
497+
redis-data: {}
493498

494499
networks:
495500
default:

services/web/server/tests/unit/with_dbs/docker-compose-devel.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
version: "3.8"
22
services:
33
postgres:
4-
image: "postgres:10.11@sha256:2aef165ab4f30fbb109e88959271d8b57489790ea13a77d27\
5-
c02d8adb8feb20f"
4+
image: "postgres:10.11@sha256:2aef165ab4f30fbb109e88959271d8b57489790ea13a77d27c02d8adb8feb20f"
65
restart: always
76
environment:
87
# defaults are the same as in conftest.yaml so we start compose from command line for debugging
@@ -39,8 +38,7 @@ services:
3938
depends_on:
4039
- postgres
4140
redis:
42-
image: "redis:5.0.9-alpine@sha256:b011c1ca7fa97ed92d6c5995e5dd752dc37fe157c1b60\
43-
ce96a6e35701851dabc"
41+
image: "redis:6.2.6@sha256:4bed291aa5efb9f0d77b76ff7d4ab71eee410962965d052552db1fb80576431d"
4442
ports:
4543
- "6379:6379"
4644
redis-commander:

services/web/server/tests/unit/with_dbs/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ services:
2222
command: postgres -c tcp_keepalives_idle=600 -c tcp_keepalives_interval=600 -c tcp_keepalives_count=5
2323

2424
redis:
25-
image: "redis:5.0.9-alpine@sha256:b011c1ca7fa97ed92d6c5995e5dd752dc37fe157c1b60ce96a6e35701851dabc"
25+
image: "redis:6.2.6@sha256:4bed291aa5efb9f0d77b76ff7d4ab71eee410962965d052552db1fb80576431d"
2626
ports:
2727
- "6379:6379"

0 commit comments

Comments
 (0)