|
|
@ -444,10 +444,10 @@ down_all () |
|
|
|
printf "\\n\\n===> CLEAN UP SWARMLAB" |
|
|
|
|
|
|
|
printf "\\n%s\\n" "$HEADER" |
|
|
|
echo "$ docker-compose down" |
|
|
|
echo "$ docker compose down" |
|
|
|
printf "\\n" |
|
|
|
|
|
|
|
docker-compose down |
|
|
|
docker compose down |
|
|
|
} |
|
|
|
|
|
|
|
up_registry () |
|
|
@ -455,12 +455,12 @@ up_registry () |
|
|
|
printf "\\n\\n===> SPIN UP REGISTRY" |
|
|
|
|
|
|
|
printf "\\n%s\\n" "$HEADER" |
|
|
|
echo "$ docker-compose up -d registry" |
|
|
|
echo "$ docker compose up -d registry" |
|
|
|
printf "\\n" |
|
|
|
|
|
|
|
#docker stop swarmlab-registry || true && docker rm swarmlab-registry || true # remove for microservices |
|
|
|
docker container prune --force |
|
|
|
docker-compose up --no-recreate -d registry |
|
|
|
docker compose up --no-recreate -d registry |
|
|
|
} |
|
|
|
|
|
|
|
generate_ssh_keys () |
|
|
@ -495,18 +495,18 @@ up_master () |
|
|
|
{ |
|
|
|
printf "\\n\\n===> SPIN UP MASTER NODE" |
|
|
|
printf "\\n%s\\n" "$HEADER" |
|
|
|
echo "$ docker-compose up -d masterservice" |
|
|
|
echo "$ docker compose up -d masterservice" |
|
|
|
printf "\\n" |
|
|
|
echo "$ $IMAGE_local -d $IMAGE_origin" |
|
|
|
printf "\\n" |
|
|
|
|
|
|
|
docker-compose rm -f -s -v |
|
|
|
docker-compose up --build --remove-orphans --force-recreate -d masterservice << ANSWERS |
|
|
|
docker compose rm -f -s -v |
|
|
|
docker compose up --build --remove-orphans --force-recreate -d masterservice << ANSWERS |
|
|
|
yes |
|
|
|
yes |
|
|
|
yes |
|
|
|
ANSWERS |
|
|
|
#docker-compose up --force-recreate -d masterservice |
|
|
|
#docker compose up --force-recreate -d masterservice |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -514,19 +514,19 @@ up_workers () |
|
|
|
{ |
|
|
|
printf "\\n\\n===> SPIN UP WORKER NODES" |
|
|
|
printf "\\n%s\\n" "$HEADER" |
|
|
|
echo "$ docker-compose up -d worker" |
|
|
|
echo "$ docker compose up -d worker" |
|
|
|
printf "\\n" |
|
|
|
docker-compose rm -f -s -v |
|
|
|
docker-compose up --build --force-recreate --renew-anon-volumes --remove-orphans -d workerservice |
|
|
|
#docker-compose up --force-recreate -d workerservice |
|
|
|
docker compose rm -f -s -v |
|
|
|
docker compose up --build --force-recreate --renew-anon-volumes --remove-orphans -d workerservice |
|
|
|
#docker compose up --force-recreate -d workerservice |
|
|
|
|
|
|
|
printf "\\n" |
|
|
|
printf "\\n%s\\n" "$HEADER" |
|
|
|
|
|
|
|
NUM_WORKER=$((SIZE - 1)) |
|
|
|
echo "$ docker-compose scale workerservice=$NUM_WORKER" |
|
|
|
echo "$ docker compose scale workerservice=$NUM_WORKER" |
|
|
|
printf "\\n" |
|
|
|
docker-compose scale workerservice=${NUM_WORKER} |
|
|
|
docker compose scale workerservice=${NUM_WORKER} |
|
|
|
} |
|
|
|
|
|
|
|
down_master () |
|
|
@ -534,34 +534,34 @@ down_master () |
|
|
|
printf "\\n\\n===> TORN DOWN MASTER NODE" |
|
|
|
printf "\\n%s\\n" "$HEADER" |
|
|
|
|
|
|
|
echo "$ docker-compose stop masterservice && docker-compose rm -f masterservice" |
|
|
|
echo "$ docker compose stop masterservice && docker compose rm -f masterservice" |
|
|
|
printf "\\n" |
|
|
|
docker-compose stop masterservice && docker-compose rm -f masterservice |
|
|
|
docker compose stop masterservice && docker compose rm -f masterservice |
|
|
|
} |
|
|
|
|
|
|
|
down_workers () |
|
|
|
{ |
|
|
|
printf "\\n\\n===> TORN DOWN WORKER NODES" |
|
|
|
printf "\\n%s\\n" "$HEADER" |
|
|
|
echo "$ docker-compose stop worker && docker-compose rm -f worker" |
|
|
|
echo "$ docker compose stop worker && docker compose rm -f worker" |
|
|
|
printf "\\n" |
|
|
|
docker-compose stop workerservice && docker-compose rm -f workerservice |
|
|
|
docker compose stop workerservice && docker compose rm -f workerservice |
|
|
|
} |
|
|
|
|
|
|
|
list () |
|
|
|
{ |
|
|
|
printf "\\n\\n===> LIST CONTAINERS" |
|
|
|
printf "\\n%s\\n" "$HEADER" |
|
|
|
echo "$ docker-compose ps" |
|
|
|
echo "$ docker compose ps" |
|
|
|
printf "\\n" |
|
|
|
docker-compose ps |
|
|
|
docker compose ps |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
exec_on_mpi_master_container () |
|
|
|
{ |
|
|
|
# shellcheck disable=SC2046 |
|
|
|
docker exec -it -u $DOCKERuser $(docker-compose ps | grep 'masterservice'| awk 'NR==1{print $1}') "$@" |
|
|
|
docker exec -it -u $DOCKERuser $(docker compose ps | grep 'masterservice'| awk 'NR==1{print $1}') "$@" |
|
|
|
} |
|
|
|
|
|
|
|
prompt_ready () |
|
|
|