Skip to content

Commit d44357a

Browse files
committed
Merge remote-tracking branch 'upstream/main' into add-notifications-service
2 parents 4bed84e + 8cfbc87 commit d44357a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+453
-191
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ docs/_build
129129
/services/monitoring/pgsql_query_exporter_config.yaml
130130
/services/monitoring/docker-compose.yml
131131
/services/monitoring/smokeping_prober_config.yaml
132-
132+
services/monitoring/tempo_config.yaml
133133

134134
# Simcore: Contains location of repo.config file on the machine and of the whole config directory
135135
.config.location

Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ down-maintenance: ## Stop the maintenance mode
7171
fi \
7272
,)
7373

74-
7574
# Misc: info & clean
7675
.PHONY: info info-vars info-local
7776
info: ## Displays some important info

scripts/common.Makefile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,18 @@ endef
297297
298298
endif
299299
300+
# Check that given variables are set and all have non-empty values,
301+
# die with an error otherwise.
302+
#
303+
# Params:
304+
# 1. Variable name(s) to test.
305+
# 2. (optional) Error message to print.
306+
guard-%:
307+
@ if [ "${${*}}" = "" ]; then \
308+
echo "Argument '$*' is missing. TIP: make <rule> $*=<value>"; \
309+
exit 1; \
310+
fi
311+
300312
# Gracefully use defaults and potentially overwrite them, via https://stackoverflow.com/a/49804748
301313
%: %-default
302314
@ true

scripts/deployments/prepare_simcore_stack.bash

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,14 @@ scripts/deployments/compose_stack_yml.bash
4848
log_info "Ensuring dask secrets are relative to the stack file"
4949
# Check if the dask_tls_cert secret exists and update its file path if it does.
5050
if ./yq eval '.secrets.dask_tls_cert' stack.yml >/dev/null; then
51-
./yq eval --inplace '.secrets.dask_tls_cert.file = "./dask-sidecar/.dask-certificates/dask-cert.pem"' stack.yml
51+
./yq eval --inplace '.secrets.dask_tls_cert.file = "./assets/dask-certificates/dask-cert.pem"' stack.yml
5252
else
5353
log_warning "The 'dask_tls_cert' secret does not exist. Skipping this step."
5454
fi
5555

5656
# Check if the dask_tls_key secret exists and update its file path if it does.
5757
if ./yq eval '.secrets.dask_tls_key' stack.yml >/dev/null; then
58-
./yq eval --inplace '.secrets.dask_tls_key.file = "./dask-sidecar/.dask-certificates/dask-key.pem"' stack.yml
58+
./yq eval --inplace '.secrets.dask_tls_key.file = "./assets/dask-certificates/dask-key.pem"' stack.yml
5959
else
6060
log_warning "The 'dask_tls_key' secret does not exist. Skipping this step."
6161
fi

services/admin-panels/Makefile

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,42 +13,42 @@ include ${REPO_BASE_DIR}/scripts/common.Makefile
1313

1414
# Helpers --------------------------------------------------
1515
define custom-jinja
16-
@${REPO_BASE_DIR}/.venv/bin/j2 --format=json $(1) $(2) -o $(3)
16+
@${REPO_BASE_DIR}/.venv/bin/j2 --format=json $(1) $(2) -o $(3) \
17+
--filters $(REPO_BASE_DIR)/scripts/j2cli_global_filters.py
1718
endef
1819

1920
.PHONY: .data.json
2021
.data.json:
2122
@$(_tree) -J ${PWD}/data | jq ".[0]" > .data.json
2223

23-
2424
.PHONY: docker-compose.yml
25-
docker-compose.yml: docker-compose.yml.j2 .venv .data.json
25+
docker-compose.yml: docker-compose.yml.j2 .venv .data.json .env jupyter_server_config.py
2626
$(call custom-jinja, $<, .data.json, tmp.yml)
2727
@${REPO_BASE_DIR}/scripts/docker-stack-config.bash tmp.yml > $@
2828
@rm tmp.yml
2929

3030
.PHONY: up
31-
up: .init .env jupyter_server_config.py ${TEMP_COMPOSE} ## Deploys jaeger stack
31+
up: .init ${TEMP_COMPOSE} prune-docker-stack-configs ## Deploys jaeger stack
3232
@docker stack deploy --with-registry-auth --prune --compose-file ${TEMP_COMPOSE} ${STACK_NAME}
3333

3434
.PHONY: up-letsencrypt-http
35-
up-letsencrypt-http: .init .env jupyter_server_config.py ${TEMP_COMPOSE}-letsencrypt-http ## Deploys jaeger stack using let's encrypt http challenge
35+
up-letsencrypt-http: .init ${TEMP_COMPOSE}-letsencrypt-http prune-docker-stack-configs ## Deploys jaeger stack using let's encrypt http challenge
3636
@docker stack deploy --with-registry-auth --prune --compose-file ${TEMP_COMPOSE}-letsencrypt-http ${STACK_NAME}
3737

3838
.PHONY: up-letsencrypt-dns
39-
up-letsencrypt-dns: .init .env jupyter_server_config.py ${TEMP_COMPOSE}-letsencrypt-dns ## Deploys jaeger stack using let's encrypt dns challenge
39+
up-letsencrypt-dns: .init ${TEMP_COMPOSE}-letsencrypt-dns prune-docker-stack-configs ## Deploys jaeger stack using let's encrypt dns challenge
4040
@docker stack deploy --with-registry-auth --prune --compose-file ${TEMP_COMPOSE}-letsencrypt-dns ${STACK_NAME}
4141

4242
.PHONY: up-dalco ## Deploys jaeger stack for Dalco Cluster
43-
up-dalco: .init .env jupyter_server_config.py ${TEMP_COMPOSE}-dalco
43+
up-dalco: .init ${TEMP_COMPOSE}-dalco prune-docker-stack-configs
4444
@docker stack deploy --with-registry-auth --prune --compose-file ${TEMP_COMPOSE}-dalco ${STACK_NAME}
4545

4646
.PHONY: up-aws
47-
up-aws: .init .env jupyter_server_config.py ${TEMP_COMPOSE}-aws ## Deploys jaeger stack in aws
47+
up-aws: .init ${TEMP_COMPOSE}-aws prune-docker-stack-configs ## Deploys jaeger stack in aws
4848
@docker stack deploy --with-registry-auth --prune --compose-file ${TEMP_COMPOSE}-aws ${STACK_NAME}
4949

5050
.PHONY: up-master
51-
up-master: .init .env jupyter_server_config.py ${TEMP_COMPOSE}-master
51+
up-master: .init ${TEMP_COMPOSE}-master prune-docker-stack-configs
5252
@docker stack deploy --with-registry-auth --prune --compose-file ${TEMP_COMPOSE}-master ${STACK_NAME}
5353

5454
.PHONY: up-local
@@ -85,7 +85,6 @@ ${TEMP_COMPOSE}-aws: docker-compose.yml docker-compose.aws.yml .env
8585
${TEMP_COMPOSE}: docker-compose.yml .env
8686
@${REPO_BASE_DIR}/scripts/docker-stack-config.bash -e .env $< > $@
8787

88-
8988
.PHONY: jupyter_server_config.py
9089
jupyter_server_config.py: jupyter_server_config.py.template
9190
@set -o allexport; \

services/admin-panels/docker-compose.yml.j2

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
version: "3.7"
22
configs:
33
adminpanel-jupyter-server-config:
4+
name: ${STACK_NAME}_adminpanel-jupyter-server-config_{{ "./jupyter_server_config.py" | sha256file | substring(0,10) }}
45
file: ./jupyter_server_config.py
56
{% for item in contents %}
67
{{ item.name }}:
8+
name: {% raw %}${STACK_NAME}{% endraw %}_{{item.name}}_{{ ("./data/" ~ item.name) | sha256file | substring(0,10) }}
79
file: ./data/{{ item.name }}{% endfor %}
810
services:
911
adminpanels:

services/admin-panels/template.env

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# This contains all relevant secrets so that the admin panels may use them to access the services
2+
STACK_NAME=${STACK_NAME}
3+
24
MONITORING_DOMAIN=${MONITORING_DOMAIN}
35
ADMINPANELS_DOMAIN=${ADMINPANELS_DOMAIN}
46
DEPLOYMENT_FQDNS=${DEPLOYMENT_FQDNS}

services/filestash/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
filestash_config.json
22
venv/*
3+
docker-compose.yml

services/filestash/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ up-local: up
4141

4242
# Helpers -------------------------------------------------
4343

44+
docker-compose.yml: docker-compose.yml.j2 .venv .env filestash_config.json
45+
@$(call jinja, $<, .env, $@)
46+
4447
.PHONY: ${TEMP_COMPOSE}
4548
${TEMP_COMPOSE}: docker-compose.yml .env
4649
@${REPO_BASE_DIR}/scripts/docker-stack-config.bash -e .env $< > $@

services/filestash/docker-compose.yml renamed to services/filestash/docker-compose.yml.j2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,5 @@ networks:
4545

4646
configs:
4747
filestash_config:
48+
name: ${STACK_NAME}_filestash_config_{{ "./filestash_config.json" | sha256file | substring(0,10) }}
4849
file: ./filestash_config.json

0 commit comments

Comments
 (0)