diff --git a/services/director-v2/src/simcore_service_director_v2/modules/dynamic_sidecar/docker_service_specs/proxy.py b/services/director-v2/src/simcore_service_director_v2/modules/dynamic_sidecar/docker_service_specs/proxy.py index bbe24ade928..6b3d1afea3d 100644 --- a/services/director-v2/src/simcore_service_director_v2/modules/dynamic_sidecar/docker_service_specs/proxy.py +++ b/services/director-v2/src/simcore_service_director_v2/modules/dynamic_sidecar/docker_service_specs/proxy.py @@ -92,7 +92,7 @@ def get_dynamic_proxy_spec( f"traefik.http.routers.{scheduler_data.proxy_service_name}.entrypoints": "http", f"traefik.http.routers.{scheduler_data.proxy_service_name}.priority": "10", f"traefik.http.routers.{scheduler_data.proxy_service_name}.rule": f"hostregexp(`{scheduler_data.node_uuid}.services.{{host:.+}}`)", - f"traefik.http.routers.{scheduler_data.proxy_service_name}.middlewares": f"{dynamic_services_scheduler_settings.SWARM_STACK_NAME}_gzip@docker, {scheduler_data.proxy_service_name}-security-headers", + f"traefik.http.routers.{scheduler_data.proxy_service_name}.middlewares": f"{dynamic_services_scheduler_settings.SWARM_STACK_NAME}_gzip@swarm, {scheduler_data.proxy_service_name}-security-headers", "dynamic_type": "dynamic-sidecar", # tagged as dynamic service } | StandardSimcoreDockerLabels( diff --git a/services/director/src/simcore_service_director/producer.py b/services/director/src/simcore_service_director/producer.py index 20f34ae3608..b74da40c913 100644 --- a/services/director/src/simcore_service_director/producer.py +++ b/services/director/src/simcore_service_director/producer.py @@ -267,7 +267,7 @@ async def _create_docker_service_params( f"traefik.http.routers.{service_name}.rule": f"PathPrefix(`/x/{node_uuid}`)", f"traefik.http.routers.{service_name}.entrypoints": "http", f"traefik.http.routers.{service_name}.priority": "10", - f"traefik.http.routers.{service_name}.middlewares": f"{config.SWARM_STACK_NAME}_gzip@docker", + f"traefik.http.routers.{service_name}.middlewares": f"{config.SWARM_STACK_NAME}_gzip@swarm", }, "networks": [internal_network_id] if internal_network_id else [], } diff --git a/services/docker-compose.local.yml b/services/docker-compose.local.yml index 2ba2aa37a2d..d52eea00ed6 100644 --- a/services/docker-compose.local.yml +++ b/services/docker-compose.local.yml @@ -131,7 +131,7 @@ services: - traefik.http.routers.${SWARM_STACK_NAME}_webserver_local.entrypoints=http - traefik.http.routers.${SWARM_STACK_NAME}_webserver_local.rule=hostregexp(`{host:.+}`) && PathPrefix(`/dev/`) - traefik.http.routers.${SWARM_STACK_NAME}_webserver_local.priority=3 - - traefik.http.routers.${SWARM_STACK_NAME}_webserver_local.middlewares=${SWARM_STACK_NAME}_gzip@docker, ${SWARM_STACK_NAME_NO_HYPHEN}_sslheader@docker, ${SWARM_STACK_NAME}_webserver_retry + - traefik.http.routers.${SWARM_STACK_NAME}_webserver_local.middlewares=${SWARM_STACK_NAME}_gzip@swarm, ${SWARM_STACK_NAME_NO_HYPHEN}_sslheader@swarm, ${SWARM_STACK_NAME}_webserver_retry wb-api-server: environment: @@ -233,7 +233,7 @@ services: - traefik.http.routers.${SWARM_STACK_NAME}_api_internal.service=api@internal - traefik.http.routers.${SWARM_STACK_NAME}_api_internal.rule=PathPrefix(`/dashboard`) || PathPrefix(`/api`) - traefik.http.routers.${SWARM_STACK_NAME}_api_internal.entrypoints=traefik_monitor - - traefik.http.routers.${SWARM_STACK_NAME}_api_internal.middlewares=${SWARM_STACK_NAME}_gzip@docker + - traefik.http.routers.${SWARM_STACK_NAME}_api_internal.middlewares=${SWARM_STACK_NAME}_gzip@swarm - traefik.http.services.${SWARM_STACK_NAME}_api_internal.loadbalancer.server.port=8080 whoami: @@ -247,4 +247,4 @@ services: - traefik.http.services.${SWARM_STACK_NAME}_whoami.loadbalancer.server.port=80 - traefik.http.routers.${SWARM_STACK_NAME}_whoami.rule=PathPrefix(`/whoami`) - traefik.http.routers.${SWARM_STACK_NAME}_whoami.entrypoints=traefik_monitor - - traefik.http.routers.${SWARM_STACK_NAME}_whoami.middlewares=${SWARM_STACK_NAME}_gzip@docker + - traefik.http.routers.${SWARM_STACK_NAME}_whoami.middlewares=${SWARM_STACK_NAME}_gzip@swarm diff --git a/services/docker-compose.yml b/services/docker-compose.yml index 1564a1b3185..842b07d9c38 100644 --- a/services/docker-compose.yml +++ b/services/docker-compose.yml @@ -56,7 +56,7 @@ services: - traefik.http.routers.${SWARM_STACK_NAME}_api-server.rule=hostregexp(`{host:.+}`) && (Path(`/`, `/v0`) || PathPrefix(`/v0/`) || Path(`/api/v0/openapi.json`)) - 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,inflightreq-${SWARM_STACK_NAME}_api-server + - traefik.http.routers.${SWARM_STACK_NAME}_api-server.middlewares=${SWARM_STACK_NAME}_gzip@swarm,ratelimit-${SWARM_STACK_NAME}_api-server,inflightreq-${SWARM_STACK_NAME}_api-server networks: - default @@ -521,7 +521,7 @@ services: - 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 - - traefik.http.routers.${SWARM_STACK_NAME}_static_webserver.middlewares=${SWARM_STACK_NAME}_gzip@docker,${SWARM_STACK_NAME}_static_webserver_retry + - traefik.http.routers.${SWARM_STACK_NAME}_static_webserver.middlewares=${SWARM_STACK_NAME}_gzip@swarm,${SWARM_STACK_NAME}_static_webserver_retry # catchall for legacy services (this happens if a backend disappears and a frontend tries to reconnect, the right return value is a 503) - 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 @@ -749,7 +749,7 @@ services: - 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 + - traefik.http.routers.${SWARM_STACK_NAME}_webserver.middlewares=${SWARM_STACK_NAME}_gzip@swarm, ${SWARM_STACK_NAME_NO_HYPHEN}_sslheader@swarm, ${SWARM_STACK_NAME}_webserver_retry networks: &webserver_networks - default - interactive_services_subnet @@ -1160,7 +1160,7 @@ services: retries: 50 traefik: - image: "traefik:v2.9.8@sha256:553239e27c4614d0477651415205b9b119f7a98f698e6562ef383c9d8ff3b6e6" + image: "traefik:v3.1.2@sha256:ec1a82940b8e00eaeef33fb4113aa1d1573b2ebb6440e10c023743fe96f08475" init: true hostname: "{{.Node.Hostname}}-{{.Task.Slot}}" command: @@ -1169,7 +1169,7 @@ services: - "--ping=true" - "--entryPoints.ping.address=:9082" - "--ping.entryPoint=ping" - - "--log.level=WARNING" + - "--log.level=WARN" # WARN, not WARNING - "--accesslog=false" - "--metrics.prometheus=true" - "--metrics.prometheus.addEntryPointsLabels=true" @@ -1182,17 +1182,18 @@ services: - "--entryPoints.simcore_api.forwardedHeaders.insecure" - "--entryPoints.traefik_monitor.address=:8080" - "--entryPoints.traefik_monitor.forwardedHeaders.insecure" - - "--providers.docker.endpoint=unix:///var/run/docker.sock" - - "--providers.docker.network=${SWARM_STACK_NAME}_default" - - "--providers.docker.swarmMode=true" + - "--providers.swarm.endpoint=unix:///var/run/docker.sock" + - "--providers.swarm.network=${SWARM_STACK_NAME}_default" # 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}`)" - - "--tracing=true" - - "--tracing.jaeger=true" - - "--tracing.jaeger.samplingServerURL=http://jaeger:5778/sampling" - - "--tracing.jaeger.localAgentHostPort=jaeger:6831" + - "--providers.swarm.refreshSeconds=1" + - "--providers.swarm.exposedByDefault=false" + - "--providers.swarm.constraints=Label(`io.simcore.zone`, `${TRAEFIK_SIMCORE_ZONE}`)" + - "--core.defaultRuleSyntax=v2" + - "--tracing" + - "--tracing.addinternals" + - "--tracing.otlp=true" + - "--tracing.otlp.http=true" + # - "--tracing.otlp.http.endpoint=0.0.0.0:4318/v1/traces" volumes: # So that Traefik can listen to the Docker events - /var/run/docker.sock:/var/run/docker.sock