diff --git a/scripts/deployments/start_simcore_locally.bash b/scripts/deployments/start_simcore_locally.bash index a69b47f4..c544ef36 100755 --- a/scripts/deployments/start_simcore_locally.bash +++ b/scripts/deployments/start_simcore_locally.bash @@ -72,7 +72,7 @@ if [[ "$devel_repo_path" = "0" ]] ; then # IF GETREPO DOESNT EXIST if [ ! -d osparc-simcore ]; then export GIT_SIMCORE_REPO_URL="https://github.com/ITISFoundation/osparc-simcore.git" - git clone "$GIT_SIMCORE_REPO_URL" + git clone --depth 1 "$GIT_SIMCORE_REPO_URL" fi # FI # diff --git a/services/monitoring/docker-compose.yml.j2 b/services/monitoring/docker-compose.yml.j2 index 1fad5a89..81bb79a7 100644 --- a/services/monitoring/docker-compose.yml.j2 +++ b/services/monitoring/docker-compose.yml.j2 @@ -408,6 +408,9 @@ configs: prometheus_config_federation: name: ${STACK_NAME}_prometheus_config_federation_{{ "./prometheus/prometheus-federation.yml" | sha256file | substring(0,10) }} file: ./prometheus/prometheus-federation.yml + prometheus_config: + name: ${STACK_NAME}_prometheus_config_{{ "./prometheus/prometheus.yml" | sha256file | substring(0,10) }} + file: ./prometheus/prometheus.yml prometheus_rules: name: ${STACK_NAME}_prometheus_rules_{{ "./prometheus/prometheus.rules.yml" | sha256file | substring(0,10) }} file: ./prometheus/prometheus.rules.yml diff --git a/services/simcore/docker-compose.deploy.local.yml b/services/simcore/docker-compose.deploy.local.yml index fcde80b9..aae8308d 100644 --- a/services/simcore/docker-compose.deploy.local.yml +++ b/services/simcore/docker-compose.deploy.local.yml @@ -9,6 +9,18 @@ services: catalog: deploy: replicas: ${SIMCORE_CATALOG_REPLICAS} + sto-worker-cpu-bound: + secrets: + - source: storageca.crt + target: /usr/local/share/ca-certificates/osparc.crt + environment: + - REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt + sto-worker: + secrets: + - source: storageca.crt + target: /usr/local/share/ca-certificates/osparc.crt + environment: + - REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt storage: secrets: - source: storageca.crt @@ -113,6 +125,8 @@ services: webserver: deploy: replicas: 1 + healthcheck: + test: ["CMD", "echo", "health"] secrets: - source: rootca.crt target: /usr/local/share/ca-certificates/osparc.crt diff --git a/services/traefik/Makefile b/services/traefik/Makefile index 95b20199..7aeb625d 100644 --- a/services/traefik/Makefile +++ b/services/traefik/Makefile @@ -42,7 +42,7 @@ traefik_dynamic_config.yml: .PHONY: ${TEMP_COMPOSE}-local -${TEMP_COMPOSE}-local: docker-compose.yml docker-compose.local.yml .env +${TEMP_COMPOSE}-local: docker-compose.yml docker-compose.local.yml .env traefik_dynamic_config.yml @set -o allexport; \ source .env; \ set +o allexport; \ diff --git a/services/traefik/config/customCAInit.sh b/services/traefik/config/customCAInit.sh index ee466b89..964661a0 100644 --- a/services/traefik/config/customCAInit.sh +++ b/services/traefik/config/customCAInit.sh @@ -4,7 +4,8 @@ # If necessary. # #Uncomment this to debug: -#echo Remaining arguments passed to Traefik: "$@" +echo Running custom entrypointsh to add self-signed CAs +echo Remaining arguments passed to Traefik: "$@" # # Add cp statements for the certificates here: cp /secrets/storageca.crt /usr/local/share/ca-certificates diff --git a/services/traefik/docker-compose.local.yml b/services/traefik/docker-compose.local.yml index 418f37ef..16c7d879 100644 --- a/services/traefik/docker-compose.local.yml +++ b/services/traefik/docker-compose.local.yml @@ -63,8 +63,10 @@ services: - source: customEntrypoint.sh target: /customEntrypoint.sh secrets: - - domain.key - - domain.crt + - source: domain.key + target: /etc/traefik_certs/osparc.local.key + - source: domain.crt + target: /etc/traefik_certs/osparc.local.crt - source: storageca.crt target: /secrets/storageca.crt diff --git a/services/traefik/scripts/gen_dyn_cfg_from_cert_domains.py b/services/traefik/scripts/gen_dyn_cfg_from_cert_domains.py deleted file mode 100644 index 6d0d2279..00000000 --- a/services/traefik/scripts/gen_dyn_cfg_from_cert_domains.py +++ /dev/null @@ -1,44 +0,0 @@ -import json -import sys -from pathlib import Path - -import yaml - -if len(sys.argv) != 3: - raise TypeError( - "Usage: gen_dyn_cfg_from_cert_domains.py " - ) - -CERT_DOMAINS_FILE = sys.argv[1] -OUTPUT_FILE = sys.argv[2] -CERT_PATH_PREFIX = Path("/etc/traefik_certs") - - -def main(): - with open(CERT_DOMAINS_FILE) as f: - cert_domains = json.load(f) - - main_domains = [item["domain"] for item in cert_domains] - - for ix in range(len(main_domains)): - if main_domains[ix].startswith("*."): - main_domains[ix] = main_domains[ix].replace("*.", "_.") - - dyn_cfg = { - "tls": { - "certificates": [ - { - "certFile": str(CERT_PATH_PREFIX / f"{domain}.crt"), - "keyFile": str(CERT_PATH_PREFIX / f"{domain}.key"), - } - for domain in main_domains - ] - } - } - - with open(OUTPUT_FILE, "w") as f: - yaml.dump(dyn_cfg, f) - - -if __name__ == "__main__": - main()