Skip to content

Commit

Permalink
Local deploy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mrnicegyu11 committed Dec 2, 2024
1 parent b3b3ae1 commit 36b193b
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.10
3.11
9 changes: 7 additions & 2 deletions scripts/deployments/start_simcore_locally.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
1 change: 1 addition & 0 deletions services/simcore/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.env
docker-compose.deploy.yml
dask-sidecar/**
6 changes: 5 additions & 1 deletion services/simcore/docker-compose.deploy.local.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: "3.8"
services:
autoscaling:
deploy:
Expand Down Expand Up @@ -138,3 +137,8 @@ services:
clusters-keeper:
deploy:
replicas: 0
secrets:
rootca.crt:
external: true
storageca.crt:
external: true

0 comments on commit 36b193b

Please sign in to comment.