Skip to content

Commit

Permalink
add redis password in swarm script
Browse files Browse the repository at this point in the history
  • Loading branch information
luqin committed May 19, 2020
1 parent b7f87af commit 389c85a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions scripts/docker_swarm/.env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export ADMIN_HOST=singa_auto_admin
export ADMIN_PORT=3000
export REDIS_HOST=singa_auto_redis
export REDIS_PORT=6379
export REDIS_PASSWORD=singa_auto
export PREDICTOR_PORT=3003
export WEB_ADMIN_HOST=singa_auto_admin_web
export ZOOKEEPER_HOST=singa_auto_zookeeper
Expand Down Expand Up @@ -81,3 +82,5 @@ export IMAGE_KAFKA=wurstmeister/kafka:2.12-2.1.1
# Utility configuration
export PYTHONPATH=$PWD # Ensures that `singa_auto` module can be imported at project root
export PYTHONUNBUFFERED=1 # Ensures logs from Python appear instantly

export CONTAINER_MODE=SWARM
2 changes: 2 additions & 0 deletions scripts/docker_swarm/start_admin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ title "Starting SINGA-Auto's Admin..."
-e ADMIN_PORT=$ADMIN_PORT \
-e REDIS_HOST=$REDIS_HOST \
-e REDIS_PORT=$REDIS_PORT \
-e REDIS_PASSWORD=$REDIS_PASSWORD \
-e KAFKA_HOST=$KAFKA_HOST \
-e KAFKA_PORT=$KAFKA_PORT \
-e PREDICTOR_PORT=$PREDICTOR_PORT \
Expand All @@ -70,6 +71,7 @@ title "Starting SINGA-Auto's Admin..."
-e PARAMS_DIR_PATH=$PARAMS_DIR_PATH \
-e LOGS_DIR_PATH=$LOGS_DIR_PATH \
-e APP_MODE=$APP_MODE \
-e CONTAINER_MODE=$CONTAINER_MODE \
-v /var/run/docker.sock:/var/run/docker.sock \
$VOLUME_MOUNTS \
-p $ADMIN_EXT_PORT:$ADMIN_PORT \
Expand Down
2 changes: 1 addition & 1 deletion scripts/docker_swarm/start_redis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ title "Starting SINGA-Auto's Redis..."
(docker run --rm --name $REDIS_HOST \
--network $DOCKER_NETWORK \
-p $REDIS_EXT_PORT:$REDIS_PORT \
$IMAGE_REDIS \
$IMAGE_REDIS redis-server --appendonly yes --requirepass $REDIS_PASSWORD \
&> $LOG_FILE_PATH) &

ensure_stable "SINGA-Auto's Redis" $LOG_FILE_PATH 2

0 comments on commit 389c85a

Please sign in to comment.