Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
f0d8cf0
wip
mrnicegyu11 Sep 19, 2024
e906b41
Merge remote-tracking branch 'upstream/main' into main
mrnicegyu11 Oct 23, 2024
14c751d
Merge remote-tracking branch 'upstream/main' into main
mrnicegyu11 Oct 23, 2024
293f63c
Add csi-s3 and have portainer use it
mrnicegyu11 Oct 24, 2024
f7f72ec
Change request @hrytsuk 1GB max portainer volume size
mrnicegyu11 Oct 25, 2024
94cfb76
t push
mrnicegyu11 Oct 28, 2024
509c717
Merge remote-tracking branch 'upstream/main'
mrnicegyu11 Oct 29, 2024
1a65ecf
Merge remote-tracking branch 'upstream/main'
mrnicegyu11 Nov 13, 2024
77ee45e
Merge remote-tracking branch 'upstream/main'
mrnicegyu11 Nov 25, 2024
c9c70d6
Arch Linux Certificates Customization
mrnicegyu11 Dec 3, 2024
7b8be53
Merge remote-tracking branch 'upstream/main'
mrnicegyu11 Dec 5, 2024
bcd61cd
Merge remote-tracking branch 'upstream/main'
mrnicegyu11 Dec 12, 2024
58e1030
Merge remote-tracking branch 'upstream/main'
mrnicegyu11 Dec 13, 2024
ed8d479
Merge remote-tracking branch 'upstream/main'
mrnicegyu11 Jan 10, 2025
dda6e01
Merge remote-tracking branch 'upstream/main'
mrnicegyu11 Feb 4, 2025
f6f4f36
Merge remote-tracking branch 'upstream/main'
mrnicegyu11 Feb 25, 2025
5dca5c3
Merge remote-tracking branch 'upstream/main'
mrnicegyu11 Mar 13, 2025
4a653ef
Merge remote-tracking branch 'upstream/main'
mrnicegyu11 Mar 20, 2025
3a21f0f
Merge remote-tracking branch 'upstream/main'
mrnicegyu11 Mar 28, 2025
48fbbca
Fix pgsql exporter failure
mrnicegyu11 Apr 24, 2025
08c57db
Merge remote-tracking branch 'upstream/main'
mrnicegyu11 May 6, 2025
5ecbfec
[Kubernetes] Introduce on-prem persistent Storage (Longhorn) :tada: …
YuryHrytsuk May 6, 2025
3ea41b5
Experimental: Try to add tracing to simcore-traefik on master
mrnicegyu11 May 9, 2025
29f2f2e
Fixes https://github.com/ITISFoundation/osparc-simcore/issues/7363
mrnicegyu11 May 14, 2025
cdef57f
Merge branch 'ITISFoundation:main' into main
mrnicegyu11 May 21, 2025
c0f393e
t push
mrnicegyu11 May 23, 2025
34a86fd
Merge remote-tracking branch 'upstream/main'
mrnicegyu11 Jul 2, 2025
df3f5df
Merge remote-tracking branch 'upstream/main'
mrnicegyu11 Jul 3, 2025
ac44663
Merge remote-tracking branch 'upstream/main'
mrnicegyu11 Jul 8, 2025
59c805a
Refactor ops-traefik: use env-var based config
mrnicegyu11 Jul 8, 2025
5bd1b1e
fixes
mrnicegyu11 Jul 8, 2025
0721ee9
fixes
mrnicegyu11 Jul 8, 2025
b674093
Re-add REDIS_EXTERNAL_PORT env var
mrnicegyu11 Jul 14, 2025
f33b913
wip
mrnicegyu11 Jul 14, 2025
d004350
wip
mrnicegyu11 Jul 14, 2025
4df1083
Merge remote-tracking branch 'upstream/main' into 2025/refactor/traef…
mrnicegyu11 Jul 16, 2025
6113a06
initial working version on osparc.local
mrnicegyu11 Jul 22, 2025
9f778a1
Update traefik to 3.4.4
mrnicegyu11 Jul 22, 2025
e16297b
osparc.local fixes
mrnicegyu11 Jul 22, 2025
9202365
Traefik v3 syntax fixes
mrnicegyu11 Jul 22, 2025
88a0e25
Merge branch 'main' into 2025/refactor/traefik_2ndAttempt
mrnicegyu11 Jul 22, 2025
7dde1aa
revert faulty commit
mrnicegyu11 Jul 22, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions scripts/common.Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ endif
export DEPLOYMENT_FQDNS_CAPTURE_TRAEFIK_RULE_CATCHALL:=$(shell set -o allexport; \
source $(REPO_CONFIG_LOCATION); \
if [ -z "$${DEPLOYMENT_FQDNS}" ]; then \
DEPLOYMENT_FQDNS_CAPTURE_TRAEFIK_RULE_CATCHALL="(Host(\`$$MACHINE_FQDN\`) && PathPrefix(\`/\`)) || (Host(\`invitations.$$MACHINE_FQDN\`))|| (HostRegexp(\`services.$$MACHINE_FQDN\`,\`{subhost:[a-zA-Z0-9-]+}.services.$$MACHINE_FQDN\`) && PathPrefix(\`/\`)) || (HostRegexp(\`services.testing.$$MACHINE_FQDN\`,\`{subhost:[a-zA-Z0-9-]+}.services.testing.$$MACHINE_FQDN\`) && PathPrefix(\`/\`))"; \
DEPLOYMENT_FQDNS_CAPTURE_TRAEFIK_RULE_CATCHALL="(Host(\`$$MACHINE_FQDN\`) && PathPrefix(\`/\`)) || (Host(\`invitations.$$MACHINE_FQDN\`))|| (HostRegexp(\`services.$$MACHINE_FQDN\`) && PathPrefix(\`/\`)) || (HostRegexp(\`services.testing.$$MACHINE_FQDN\`) && PathPrefix(\`/\`))"; \
else \
IFS=', ' read -r -a hosts <<< "$${DEPLOYMENT_FQDNS}"; \
DEPLOYMENT_FQDNS_CAPTURE_TRAEFIK_RULE_CATCHALL="(Host(\`$$MACHINE_FQDN\`) && PathPrefix(\`/\`)) || (Host(\`invitations.$$MACHINE_FQDN\`))|| (HostRegexp(\`services.$$MACHINE_FQDN\`,\`{subhost:[a-zA-Z0-9-]+}.services.$$MACHINE_FQDN\`) && PathPrefix(\`/\`)) || (HostRegexp(\`services.testing.$$MACHINE_FQDN\`,\`{subhost:[a-zA-Z0-9-]+}.services.testing.$$MACHINE_FQDN\`) && PathPrefix(\`/\`))"; \
DEPLOYMENT_FQDNS_CAPTURE_TRAEFIK_RULE_CATCHALL="(Host(\`$$MACHINE_FQDN\`) && PathPrefix(\`/\`)) || (Host(\`invitations.$$MACHINE_FQDN\`))|| (HostRegexp(\`services.$$MACHINE_FQDN\`) && PathPrefix(\`/\`)) || (HostRegexp(\`services.testing.$$MACHINE_FQDN\`) && PathPrefix(\`/\`))"; \
for element in "$${hosts[@]}"; \
do \
DEPLOYMENT_FQDNS_CAPTURE_TRAEFIK_RULE_CATCHALL="$$DEPLOYMENT_FQDNS_CAPTURE_TRAEFIK_RULE_CATCHALL || (Host(\`$$element\`) && PathPrefix(\`/\`)) || (Host(\`invitations.$$element\`)) || (HostRegexp(\`services.$$element\`,\`{subhost:[a-zA-Z0-9-]+}.services.$$element\`) && PathPrefix(\`/\`)) || (HostRegexp(\`services.testing.$$element\`,\`{subhost:[a-zA-Z0-9-]+}.services.testing.$$element\`) && PathPrefix(\`/\`))";\
DEPLOYMENT_FQDNS_CAPTURE_TRAEFIK_RULE_CATCHALL="$$DEPLOYMENT_FQDNS_CAPTURE_TRAEFIK_RULE_CATCHALL || (Host(\`$$element\`) && PathPrefix(\`/\`)) || (Host(\`invitations.$$element\`)) || (HostRegexp(\`services.$$element\`) && PathPrefix(\`/\`)) || (HostRegexp(\`services.testing.$$element\`) && PathPrefix(\`/\`))";\
done; \
DEPLOYMENT_FQDNS_CAPTURE_TRAEFIK_RULE_CATCHALL="$$DEPLOYMENT_FQDNS_CAPTURE_TRAEFIK_RULE_CATCHALL"; \
fi; \
Expand All @@ -68,13 +68,13 @@ export DEPLOYMENT_FQDNS_CAPTURE_INVITATIONS:=$(shell set -o allexport; \
export DEPLOYMENT_FQDNS_CAPTURE_TRAEFIK_RULE_MAINTENANCE_PAGE:=$(shell set -o allexport; \
source $(REPO_CONFIG_LOCATION); \
if [ -z "$${DEPLOYMENT_FQDNS}" ]; then \
DEPLOYMENT_FQDNS_CAPTURE_TRAEFIK_RULE_MAINTENANCE_PAGE="(Host(\`$$MACHINE_FQDN\`) && PathPrefix(\`/\`)) || (HostRegexp(\`services.$$MACHINE_FQDN\`,\`{subhost:[a-zA-Z0-9-]+}.services.$$MACHINE_FQDN\`) && PathPrefix(\`/\`))"; \
DEPLOYMENT_FQDNS_CAPTURE_TRAEFIK_RULE_MAINTENANCE_PAGE="(Host(\`$$MACHINE_FQDN\`) && PathPrefix(\`/\`)) || (HostRegexp(\`services.$$MACHINE_FQDN\`) && PathPrefix(\`/\`))"; \
else \
IFS=', ' read -r -a hosts <<< "$${DEPLOYMENT_FQDNS}"; \
DEPLOYMENT_FQDNS_CAPTURE_TRAEFIK_RULE_MAINTENANCE_PAGE="(Host(\`$$MACHINE_FQDN\`) && PathPrefix(\`/\`)) || (HostRegexp(\`services.$$MACHINE_FQDN\`,\`{subhost:[a-zA-Z0-9-]+}.services.$$MACHINE_FQDN\`) && PathPrefix(\`/\`))"; \
DEPLOYMENT_FQDNS_CAPTURE_TRAEFIK_RULE_MAINTENANCE_PAGE="(Host(\`$$MACHINE_FQDN\`) && PathPrefix(\`/\`)) || (HostRegexp(\`services.$$MACHINE_FQDN\`) && PathPrefix(\`/\`))"; \
for element in "$${hosts[@]}"; \
do \
DEPLOYMENT_FQDNS_CAPTURE_TRAEFIK_RULE_MAINTENANCE_PAGE="$$DEPLOYMENT_FQDNS_CAPTURE_TRAEFIK_RULE_MAINTENANCE_PAGE || (Host(\`$$element\`) && PathPrefix(\`/\`)) || (HostRegexp(\`services.$$element\`,\`{subhost:[a-zA-Z0-9-]+}.services.$$element\`) && PathPrefix(\`/\`))";\
DEPLOYMENT_FQDNS_CAPTURE_TRAEFIK_RULE_MAINTENANCE_PAGE="$$DEPLOYMENT_FQDNS_CAPTURE_TRAEFIK_RULE_MAINTENANCE_PAGE || (Host(\`$$element\`) && PathPrefix(\`/\`)) || (HostRegexp(\`services.$$element\`) && PathPrefix(\`/\`))";\
done; \
DEPLOYMENT_FQDNS_CAPTURE_TRAEFIK_RULE_MAINTENANCE_PAGE="$$DEPLOYMENT_FQDNS_CAPTURE_TRAEFIK_RULE_MAINTENANCE_PAGE"; \
fi; \
Expand Down
1 change: 0 additions & 1 deletion services/graylog/docker-compose.local.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: "3.7"
services:
mongodb:
deploy:
Expand Down
1 change: 0 additions & 1 deletion services/graylog/docker-compose.yml.j2
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: "3.7"
services:
# MongoDB: https://hub.docker.com/_/mongo/
mongodb:
Expand Down
2 changes: 1 addition & 1 deletion services/maintenance-page/docker-compose.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ services:
- traefik.enable=true
- traefik.swarm.network=${PUBLIC_NETWORK}
- traefik.http.routers.{{"maintenance_" + j2item.replace('@','').replace(' ','').replace('.','').replace('-','').replace('\'','') + "_html"}}.priority={{MAINTENANCE_PAGES_TRAEFIK_PRIORITY}}
- traefik.http.routers.{{"maintenance_" + j2item.replace('@','').replace(' ','').replace('.','').replace('-','').replace('\'','') + "_html"}}.rule=Host(`{{VENDOR_MANUAL_SUBDOMAIN_PREFIX}}.{{j2item}}`) || (Host(`{{j2item}}`) && PathPrefix(`/`)) || (HostRegexp(`services.{{j2item}}`,`{subhost:[a-zA-Z0-9-]+}.services.{{j2item}}`) && PathPrefix(`/`))
- traefik.http.routers.{{"maintenance_" + j2item.replace('@','').replace(' ','').replace('.','').replace('-','').replace('\'','') + "_html"}}.rule=Host(`{{VENDOR_MANUAL_SUBDOMAIN_PREFIX}}.{{j2item}}`) || (Host(`{{j2item}}`) && PathPrefix(`/`)) || (HostRegexp(`services.{{j2item}}`) && PathPrefix(`/`))
- traefik.http.routers.{{"maintenance_" + j2item.replace('@','').replace(' ','').replace('.','').replace('-','').replace('\'','') + "_html"}}.tls=true
- traefik.http.services.{{"maintenance_" + j2item.replace('@','').replace(' ','').replace('.','').replace('-','').replace('\'','') + "_html"}}.loadbalancer.server.port=80
- traefik.http.routers.{{"maintenance_" + j2item.replace('@','').replace(' ','').replace('.','').replace('-','').replace('\'','') + "_html"}}.entrypoints=https
Expand Down
2 changes: 1 addition & 1 deletion services/portainer/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ up: .init .env secrets ${TEMP_COMPOSE}
.PHONY: up-local ## Deploys portainer stack for local deployment
up-local: .init .env secrets ${TEMP_COMPOSE} ${TEMP_COMPOSE}-local
@docker stack deploy --with-registry-auth --prune --compose-file ${TEMP_COMPOSE}-local ${STACK_NAME}
@$(MAKE) --no-print-directory configure-portainer-registry
@$(MAKE) configure-portainer-registry

.PHONY: up-dalco ## Deploys portainer stack for Dalco Cluster
up-dalco: .init .env secrets ${TEMP_COMPOSE}-dalco
Expand Down
3 changes: 3 additions & 0 deletions services/portainer/scripts/configure_portainer_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ def get_portainer_api_auth_token(
f"{portainer_api_url}/auth",
# https://app.swaggerhub.com/apis/portainer/portainer-ce/2.27.6#/auth.authenticatePayload
json={"Username": portainer_username, "Password": portainer_password},
verify=False,
)

try:
Expand All @@ -49,6 +50,7 @@ def get_registries(portainer_api_url: str, auth_token: str) -> list[Registry]:
response = requests.get(
f"{portainer_api_url}/registries",
headers={"Authorization": f"Bearer {auth_token}"},
verify=False,
)

try:
Expand Down Expand Up @@ -81,6 +83,7 @@ def create_authenticated_dockerhub_registry(
"password": dockerhub_password,
"type": RegistryType.DOCKER_HUB.value,
},
verify=False,
)

try:
Expand Down
2 changes: 1 addition & 1 deletion services/portainer/template.env
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PORTAINER_ADMIN_PWD=${PORTAINER_PASSWORD}
PORTAINER_ADMIN_LOGIN=${PORTAINER_USER}
MONITORING_DOMAIN=${MONITORING_DOMAIN}

PORTAINER_URL=${PORTAINER_URL}
PUBLIC_NETWORK=${PUBLIC_NETWORK}
22 changes: 8 additions & 14 deletions services/traefik/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,38 +49,32 @@ ${TEMP_COMPOSE}-local: docker-compose.yml docker-compose.local.yml .env traefik_
${REPO_BASE_DIR}/scripts/docker-stack-config.bash -e .env $< docker-compose.local.yml > $@

.PHONY: ${TEMP_COMPOSE}-aws
${TEMP_COMPOSE}-aws: docker-compose.yml docker-compose.aws.yml .env
${TEMP_COMPOSE}-aws: docker-compose.yml .env
@set -o allexport; \
source .env; \
set +o allexport; \
${REPO_BASE_DIR}/scripts/docker-stack-config.bash -e .env $< docker-compose.aws.yml > $@
${REPO_BASE_DIR}/scripts/docker-stack-config.bash -e .env $< > $@

.PHONY: ${TEMP_COMPOSE}-dalco
${TEMP_COMPOSE}-dalco: docker-compose.yml docker-compose.dalco.yml .env
${TEMP_COMPOSE}-dalco: docker-compose.yml .env
@set -o allexport; \
source .env; \
set +o allexport; \
${REPO_BASE_DIR}/scripts/docker-stack-config.bash -e .env $< docker-compose.dalco.yml > $@
${REPO_BASE_DIR}/scripts/docker-stack-config.bash -e .env $< > $@

.PHONY: ${TEMP_COMPOSE}-public
${TEMP_COMPOSE}-public: docker-compose.yml docker-compose.public.yml .env
${TEMP_COMPOSE}-public: docker-compose.yml .env
@set -o allexport; \
source .env; \
set +o allexport; \
${REPO_BASE_DIR}/scripts/docker-stack-config.bash -e .env $< docker-compose.public.yml > $@
${REPO_BASE_DIR}/scripts/docker-stack-config.bash -e .env $< > $@

.PHONY: ${TEMP_COMPOSE}-master
${TEMP_COMPOSE}-master: docker-compose.yml docker-compose.master.yml .env
${TEMP_COMPOSE}-master: docker-compose.yml .env
@set -o allexport; \
source .env; \
set +o allexport; \
${REPO_BASE_DIR}/scripts/docker-stack-config.bash -e .env $< docker-compose.master.yml > $@

.PHONY: docker-compose.letsencrypt.dns.yml
docker-compose.letsencrypt.dns.yml: venv .env
@$(call jinja, docker-compose.letsencrypt.dns.yml.j2, .env, docker-compose.letsencrypt.dns.yml.unlinted) && \
$(_yq) docker-compose.letsencrypt.dns.yml.unlinted > docker-compose.letsencrypt.dns.yml; \
rm docker-compose.letsencrypt.dns.yml.unlinted >/dev/null 2>&1;
${REPO_BASE_DIR}/scripts/docker-stack-config.bash -e .env $< > $@

.PHONY: docker-compose.yml
docker-compose.yml: traefik_dynamic_config.yml venv .env
Expand Down
54 changes: 0 additions & 54 deletions services/traefik/docker-compose.aws.yml

This file was deleted.

44 changes: 0 additions & 44 deletions services/traefik/docker-compose.dalco.yml

This file was deleted.

50 changes: 3 additions & 47 deletions services/traefik/docker-compose.local.yml
Original file line number Diff line number Diff line change
@@ -1,50 +1,8 @@
services:
traefik:
command:
# Here we subsitute with a custom entrypoint to load self-signed
# certificates.
- "/bin/sh"
- "/customEntrypoint.sh"
- "--api=true"
- "--ping=true"
- "--entryPoints.ping.address=:9082"
- "--ping.entryPoint=ping"
- "--api.dashboard=true"
- "--log.level=${OPS_TRAEFIK_LOGLEVEL}"
- "--accesslog=true"
- "--accesslog.format=json"
- "--accesslog.fields.defaultmode=keep"
- "--accesslog.fields.names.ClientUsername=keep"
- "--accesslog.fields.headers.defaultmode=keep"
- "--accesslog.fields.headers.names.User-Agent=keep"
- "--accesslog.fields.headers.names.Authorization=drop"
- "--accesslog.fields.headers.names.Content-Type=keep"
- "--metrics.prometheus=true"
- "--metrics.prometheus.addEntryPointsLabels=true"
- "--metrics.prometheus.addServicesLabels=true"
- "--entryPoints.metrics.address=:8082"
- "--metrics.prometheus.entryPoint=metrics"
- "--entryPoints.smtp.address=:25"
- "--entryPoints.http.address=:80"
- "--entryPoints.http.transport.respondingTimeouts.writeTimeout=21600s" #6h, for https://github.com/traefik/traefik/issues/10805
- "--entryPoints.http.transport.respondingTimeouts.readTimeout=21600s" #6h, for https://github.com/traefik/traefik/issues/10805
- "--entryPoints.https.address=:443"
- "--entryPoints.https.transport.respondingTimeouts.writeTimeout=21600s" #6h, for https://github.com/traefik/traefik/issues/10805
- "--entryPoints.https.transport.respondingTimeouts.readTimeout=21600s" #6h, for https://github.com/traefik/traefik/issues/10805
- "--entryPoints.postgres.address=:5432"
- "--entrypoints.http.http.redirections.entrypoint.to=https"
- "--entrypoints.http.http.redirections.entrypoint.scheme=https"
- "--entrypoints.http.http.redirections.entrypoint.permanent=true"
- "--providers.swarm.endpoint=unix:///var/run/docker.sock"
- "--providers.swarm.exposedByDefault=false"
- "--providers.swarm.constraints=!LabelRegex(`io.simcore.zone`, `${TRAEFIK_SIMCORE_ZONE}`)"
- "--core.defaultRuleSyntax=v2"
- "--tracing=true"
- "--tracing.addinternals"
- "--tracing.otlp=true"
- "--tracing.otlp.http=true"
- "--providers.file.directory=/etc/traefik/"
- "--providers.file.watch=true"
volumes:
# So that Traefik can listen to the Docker events
- /var/run/docker.sock:/var/run/docker.sock
networks:
public:
monitored:
Expand All @@ -55,8 +13,6 @@ services:
deploy:
placement:
constraints: []
env_file:
- .env
configs:
- source: traefik_dynamic_config.yml
target: /etc/traefik/dynamic_conf.yml
Expand Down
54 changes: 0 additions & 54 deletions services/traefik/docker-compose.master.yml

This file was deleted.

Loading
Loading