Skip to content

Commit

Permalink
removes gc from stack
Browse files Browse the repository at this point in the history
  • Loading branch information
pcrespov committed Feb 14, 2022
1 parent d1d4207 commit a887d4e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 83 deletions.
40 changes: 0 additions & 40 deletions .env-webserver-garbage-collector

This file was deleted.

4 changes: 0 additions & 4 deletions services/docker-compose.devel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,6 @@ services:
- WEBSERVER_RESOURCES_DELETION_TIMEOUT_SECONDS=15
- WEBSERVER_LOGLEVEL=${LOG_LEVEL:-DEBUG}

webserver-garbage-collector:
volumes: *webserver-volumes
environment: *webserver-environment

dask-sidecar:
volumes:
&dev-dask-sidecar-volumes
Expand Down
58 changes: 19 additions & 39 deletions services/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ services:
- traefik.http.services.${SWARM_STACK_NAME}_api-server.loadbalancer.healthcheck.path=/
- traefik.http.services.${SWARM_STACK_NAME}_api-server.loadbalancer.healthcheck.interval=2000ms
- traefik.http.services.${SWARM_STACK_NAME}_api-server.loadbalancer.healthcheck.timeout=1000ms
- traefik.http.routers.${SWARM_STACK_NAME}_api-server.rule=hostregexp(`{host:.+}`) && (Path(`/`, `/v0`) || PathPrefix(`/v0/`))
- traefik.http.routers.${SWARM_STACK_NAME}_api-server.rule=hostregexp(`{host:.+}`)
&& (Path(`/`, `/v0`) || PathPrefix(`/v0/`))
- traefik.http.routers.${SWARM_STACK_NAME}_api-server.entrypoints=simcore_api
- traefik.http.routers.${SWARM_STACK_NAME}_api-server.priority=1
- traefik.http.routers.${SWARM_STACK_NAME}_api-server.middlewares=${SWARM_STACK_NAME}_gzip@docker,ratelimit-${SWARM_STACK_NAME}_api-server
Expand Down Expand Up @@ -155,7 +156,9 @@ services:
- traefik.http.services.${SWARM_STACK_NAME}_static_webserver.loadbalancer.healthcheck.interval=2000ms
- traefik.http.services.${SWARM_STACK_NAME}_static_webserver.loadbalancer.healthcheck.timeout=1000ms
- traefik.http.middlewares.${SWARM_STACK_NAME}_static_webserver_retry.retry.attempts=2
- traefik.http.routers.${SWARM_STACK_NAME}_static_webserver.rule=hostregexp(`{host:.+}`) && (Path(`/osparc`,`/s4l`,`/tis`,`/transpiled`,`/resource`) || PathPrefix(`/osparc/`,`/s4l/`,`/tis/`,`/transpiled/`,`/resource/`))
- traefik.http.routers.${SWARM_STACK_NAME}_static_webserver.rule=hostregexp(`{host:.+}`)
&& (Path(`/osparc`,`/s4l`,`/tis`,`/transpiled`,`/resource`) ||
PathPrefix(`/osparc/`,`/s4l/`,`/tis/`,`/transpiled/`,`/resource/`))
- traefik.http.routers.${SWARM_STACK_NAME}_static_webserver.service=${SWARM_STACK_NAME}_static_webserver
- traefik.http.routers.${SWARM_STACK_NAME}_static_webserver.entrypoints=http
- traefik.http.routers.${SWARM_STACK_NAME}_static_webserver.priority=2
Expand All @@ -164,7 +167,11 @@ services:
- traefik.http.routers.${SWARM_STACK_NAME}_legacy_services_catchall.service=${SWARM_STACK_NAME}_legacy_services_catchall
- traefik.http.routers.${SWARM_STACK_NAME}_legacy_services_catchall.priority=1
- traefik.http.routers.${SWARM_STACK_NAME}_legacy_services_catchall.entrypoints=http
- 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}/`))
- 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}/`))
# this tricks traefik into a 502 (bad gateway) since the service does not exist on this port
- traefik.http.services.${SWARM_STACK_NAME}_legacy_services_catchall.loadbalancer.server.port=0
# this tricks traefik into returning a 503 (service unavailable) since the healthcheck will always return false
Expand Down Expand Up @@ -205,7 +212,6 @@ services:
- STORAGE_PORT=${STORAGE_PORT:-8080}
- SWARM_STACK_NAME=${SWARM_STACK_NAME:-simcore}
- WEBSERVER_LOGLEVEL=${LOG_LEVEL:-WARNING}
- WEBSERVER_GARBAGE_COLLECTOR=0
env_file:
- ../.env
deploy:
Expand All @@ -229,42 +235,15 @@ services:
- traefik.http.services.${SWARM_STACK_NAME}_webserver.loadbalancer.sticky.cookie.secure=true
- traefik.http.middlewares.${SWARM_STACK_NAME}_webserver_retry.retry.attempts=2
- traefik.http.routers.${SWARM_STACK_NAME}_webserver.service=${SWARM_STACK_NAME}_webserver
- 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/`))
- 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/`))
- traefik.http.routers.${SWARM_STACK_NAME}_webserver.entrypoints=http
- traefik.http.routers.${SWARM_STACK_NAME}_webserver.priority=2
- 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
networks:
- default
- interactive_services_subnet

webserver-garbage-collector:
image: ${DOCKER_REGISTRY:-itisfoundation}/webserver:${DOCKER_IMAGE_TAG:-latest}
init: true
hostname: "{{.Node.Hostname}}-{{.Service.Name}}-{{.Task.Slot}}"
environment:
# TODO: clean this. Currently needed for config legacy
- CATALOG_HOST=${CATALOG_HOST:-catalog}
- CATALOG_PORT=${CATALOG_PORT:-8000}
- DIAGNOSTICS_MAX_AVG_LATENCY=10
- DIAGNOSTICS_MAX_TASK_DELAY=30
- DIRECTOR_HOST=${DIRECTOR_HOST:-director}
- DIRECTOR_PORT=${DIRECTOR_PORT:-8080}
- DIRECTOR_V2_HOST=${DIRECTOR_V2_HOST:-director-v2}
- DIRECTOR_V2_PORT=${DIRECTOR_V2_PORT:-8000}
- STORAGE_HOST=${STORAGE_HOST:-storage}
- STORAGE_PORT=${STORAGE_PORT:-8080}
- SWARM_STACK_NAME=${SWARM_STACK_NAME:-simcore}
- WEBSERVER_LOGLEVEL=${LOG_LEVEL:-WARNING}
env_file:
- ../.env
- ../.env-webserver-garbage-collector

deploy:
placement:
constraints:
- node.platform.os == linux
labels:
- io.simcore.zone=${TRAEFIK_SIMCORE_ZONE}
- 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
networks:
- default
- interactive_services_subnet
Expand Down Expand Up @@ -475,7 +454,8 @@ services:
# https://github.com/traefik/traefik/issues/7886
- "--providers.docker.swarmModeRefreshSeconds=1"
- "--providers.docker.exposedByDefault=false"
- "--providers.docker.constraints=Label(`io.simcore.zone`, `${TRAEFIK_SIMCORE_ZONE}`)"
- "--providers.docker.constraints=Label(`io.simcore.zone`,
`${TRAEFIK_SIMCORE_ZONE}`)"
- "--tracing=true"
- "--tracing.jaeger=true"
- "--tracing.jaeger.samplingServerURL=http://jaeger:5778/sampling"
Expand Down

0 comments on commit a887d4e

Please sign in to comment.