From 36b193b08148290d8d054c2813ebb46496ae4a38 Mon Sep 17 00:00:00 2001 From: Dustin Kaiser Date: Mon, 2 Dec 2024 16:24:47 +0100 Subject: [PATCH] Local deploy fixes --- .gitignore | 2 +- .python-version | 2 +- scripts/deployments/start_simcore_locally.bash | 9 +++++++-- services/simcore/.gitignore | 1 + services/simcore/docker-compose.deploy.local.yml | 6 +++++- 5 files changed, 15 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 24edb7f6..2b9cef78 100644 --- a/.gitignore +++ b/.gitignore @@ -142,7 +142,7 @@ yq **/.env-devel **/.stack.*.yml **/.stack.*.yaml -./docker-compose.yml +docker-compose.yml stack.yml stack_with_prefix.yml docker-compose.simcore.yml diff --git a/.python-version b/.python-version index c8cfe395..2c073331 100644 --- a/.python-version +++ b/.python-version @@ -1 +1 @@ -3.10 +3.11 diff --git a/scripts/deployments/start_simcore_locally.bash b/scripts/deployments/start_simcore_locally.bash index 24ac8ae8..a69b47f4 100755 --- a/scripts/deployments/start_simcore_locally.bash +++ b/scripts/deployments/start_simcore_locally.bash @@ -131,8 +131,12 @@ scripts/deployments/compose_stack_yml.bash log_info "Adding prefix $PREFIX_STACK_NAME to all services..." ./yq "with(.services; with_entries(.key |= \"${PREFIX_STACK_NAME}_\" + .))" stack.yml > stack_with_prefix.yml log_info "Deleting the $SIMCORE_STACK_NAME docker stack if present" -docker stack rm "$SIMCORE_STACK_NAME" || true -sleep 3 # Wait for stack to be deleted, the networks often take a while, not waiting might lead to docker network creation issues +# Wait for stack to be deleted, the networks often take a while, not waiting might lead to docker network creation issues +# shellcheck disable=2015 +docker stack rm "$SIMCORE_STACK_NAME" && sleep 3 || true +log_info "Copying dask-certificates into place" +mkdir -p "$repo_basedir"/services/simcore/dask-sidecar/.dask-certificates +cp -r "$(dirname "${repo_config}")"/assets/dask-certificates/*.pem "$repo_basedir"/services/simcore/dask-sidecar/.dask-certificates log_info "Deploying: Running docker stack deploy for stack $SIMCORE_STACK_NAME..." # Retry logic via https://unix.stackexchange.com/a/82610 @@ -142,4 +146,5 @@ for i in {1..5}; do docker stack deploy -c stack_with_prefix.yml "$SIMCORE_STACK ############ # CLEANUP +# shellcheck disable=1073 rm -r "${repo_basedir:?}"/"${tempdirname:?}" 2>/dev/null || true diff --git a/services/simcore/.gitignore b/services/simcore/.gitignore index 8b4d445d..a6cefdd5 100644 --- a/services/simcore/.gitignore +++ b/services/simcore/.gitignore @@ -1,2 +1,3 @@ .env docker-compose.deploy.yml +dask-sidecar/** diff --git a/services/simcore/docker-compose.deploy.local.yml b/services/simcore/docker-compose.deploy.local.yml index 597ba5e3..8b27ce7d 100644 --- a/services/simcore/docker-compose.deploy.local.yml +++ b/services/simcore/docker-compose.deploy.local.yml @@ -1,4 +1,3 @@ -version: "3.8" services: autoscaling: deploy: @@ -138,3 +137,8 @@ services: clusters-keeper: deploy: replicas: 0 +secrets: + rootca.crt: + external: true + storageca.crt: + external: true