From 57c9b9a7f3aefac5d1939e92cc9dee3744555c65 Mon Sep 17 00:00:00 2001 From: zeus Date: Mon, 29 Nov 2021 22:53:46 +0200 Subject: [PATCH] pull --- .../usr/share/swarmlab.io/sec/swarmlab-sec | 31 ++++++++++++++++--- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/install/usr/share/swarmlab.io/sec/swarmlab-sec b/install/usr/share/swarmlab.io/sec/swarmlab-sec index 5c2a253..8b0dfaa 100755 --- a/install/usr/share/swarmlab.io/sec/swarmlab-sec +++ b/install/usr/share/swarmlab.io/sec/swarmlab-sec @@ -37,7 +37,7 @@ EOF # PACKAGES enabled ths with apt-get update && apt-get $APTPARAM install -y openssh-server $PACKAGES in in RUN export DEBIAN_FRONTEND=noninteractive APTPARAM=" --no-install-recommends " IMAGE_local="microservice-nodejs" -HYBRID_NETWORK="swarmlab-nodejs" +HYBRID_NETWORK="microservice-nodejs" # dont edit IMAGE_origin="hub.swarmlab.io:5480/hybrid-nodevuejs:latest" bootstrap="sec_bootstrap" @@ -98,6 +98,12 @@ fi create_dockerfile () { + docker pull $IMAGE_origin << ANSWERS +yes +yes +yes +ANSWERS + . $Wdir/ROOT_PASSWORD if [ -d "$Wdir/project" ]; then # ----------------------------------------------- @@ -172,6 +178,12 @@ fi create_project () { + docker pull $IMAGE_origin << ANSWERS +yes +yes +yes +ANSWERS + if [ "$Wdir" == "$HOME" ]; then echo"" @@ -273,6 +285,8 @@ services: - NET_ADMIN user: root entrypoint: ["sec_bootstrap", "role=workerservice", "sec_master_service_name=masterservice", "sec_worker_service_name=workerservice"] + ports: + - "\${SSH_PORT}:22" networks: - ${HYBRID_NETWORK} volumes: @@ -480,7 +494,14 @@ 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 stop masterservice && docker-compose rm -f masterservice + docker-compose rm -f -s -v + docker-compose up --build --remove-orphans --force-recreate -d masterservice << ANSWERS +yes +yes +yes +ANSWERS + } down_workers () @@ -629,7 +650,7 @@ if [ $COMMAND_UP -eq 1 ]; then generate_ssh_keys build_and_push_image # remove for microservices up_master - up_workers + #up_workers prompt_ready show_instruction @@ -650,7 +671,7 @@ elif [ $COMMAND_SCALE -eq 1 ]; then down_master down_workers up_master - up_workers + #up_workers prompt_ready show_instruction @@ -661,7 +682,7 @@ elif [ $COMMAND_RELOAD -eq 1 ]; then down_workers build_and_push_image up_master - up_workers + #up_workers prompt_ready show_instruction