|
|
@ -543,7 +543,7 @@ down_all () |
|
|
|
echo "$ docker-compose down" |
|
|
|
printf "\\n" |
|
|
|
|
|
|
|
docker-compose down |
|
|
|
docker-compose -f $Wdir/docker-compose.yml down |
|
|
|
} |
|
|
|
|
|
|
|
up_registry () |
|
|
@ -556,7 +556,7 @@ up_registry () |
|
|
|
|
|
|
|
#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 -f $Wdir/docker-compose.yml up --no-recreate -d registry |
|
|
|
} |
|
|
|
|
|
|
|
generate_ssh_keys () |
|
|
@ -596,8 +596,8 @@ up_master () |
|
|
|
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 -f $Wdir/docker-compose.yml rm -f -s -v |
|
|
|
docker-compose -f $Wdir/docker-compose.yml up --build --remove-orphans --force-recreate -d masterservice << ANSWERS |
|
|
|
yes |
|
|
|
yes |
|
|
|
yes |
|
|
@ -612,8 +612,8 @@ up_workers () |
|
|
|
printf "\\n%s\\n" "$HEADER" |
|
|
|
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 -f $Wdir/docker-compose.yml rm -f -s -v |
|
|
|
docker-compose -f $Wdir/docker-compose.yml up --build --force-recreate --renew-anon-volumes --remove-orphans -d workerservice |
|
|
|
#docker-compose up --force-recreate -d workerservice |
|
|
|
|
|
|
|
printf "\\n" |
|
|
@ -622,7 +622,7 @@ up_workers () |
|
|
|
NUM_WORKER=$((SIZE - 1)) |
|
|
|
echo "$ docker-compose scale workerservice=$NUM_WORKER" |
|
|
|
printf "\\n" |
|
|
|
docker-compose scale workerservice=${NUM_WORKER} |
|
|
|
docker-compose -f $Wdir/docker-compose.yml scale workerservice=${NUM_WORKER} |
|
|
|
} |
|
|
|
|
|
|
|
down_master () |
|
|
@ -632,7 +632,7 @@ down_master () |
|
|
|
|
|
|
|
echo "$ docker-compose stop masterservice && docker-compose rm -f masterservice" |
|
|
|
printf "\\n" |
|
|
|
docker-compose stop masterservice && docker-compose rm -f masterservice |
|
|
|
docker-compose -f $Wdir/docker-compose.yml stop masterservice && docker-compose -f $Wdir/docker-compose.yml rm -f masterservice |
|
|
|
} |
|
|
|
|
|
|
|
down_workers () |
|
|
@ -641,7 +641,7 @@ down_workers () |
|
|
|
printf "\\n%s\\n" "$HEADER" |
|
|
|
echo "$ docker-compose stop worker && docker-compose rm -f worker" |
|
|
|
printf "\\n" |
|
|
|
docker-compose stop workerservice && docker-compose rm -f workerservice |
|
|
|
docker-compose -f $Wdir/docker-compose.yml stop workerservice && docker-compose -f $Wdir/docker-compose.yml rm -f workerservice |
|
|
|
} |
|
|
|
|
|
|
|
list () |
|
|
@ -650,14 +650,14 @@ list () |
|
|
|
printf "\\n%s\\n" "$HEADER" |
|
|
|
echo "$ docker-compose ps" |
|
|
|
printf "\\n" |
|
|
|
docker-compose ps |
|
|
|
docker-compose -f $Wdir/docker-compose.yml 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 -f $Wdir/docker-compose.yml ps | grep 'masterservice'| awk 'NR==1{print $1}') "$@" |
|
|
|
} |
|
|
|
|
|
|
|
prompt_ready () |
|
|
|