Page MenuHomePhabricator

D3233.diff
No OneTemporary

D3233.diff

diff --git a/services/.env b/services/.env
new file mode 100644
--- /dev/null
+++ b/services/.env
@@ -0,0 +1,4 @@
+COMM_SERVICES_PORT_TUNNELBROKER=50051
+COMM_SERVICES_PORT_BACKUP=50052
+COMM_SERVICES_PORT_BLOB=50053
+COMM_TEST_SERVICES=0
diff --git a/services/scripts/build_base_image.sh b/services/scripts/build_base_image.sh
--- a/services/scripts/build_base_image.sh
+++ b/services/scripts/build_base_image.sh
@@ -2,6 +2,4 @@
set -e
-. ./scripts/services_config.sh
-
docker-compose build $1
diff --git a/services/scripts/run_all_services.sh b/services/scripts/run_all_services.sh
--- a/services/scripts/run_all_services.sh
+++ b/services/scripts/run_all_services.sh
@@ -2,12 +2,6 @@
set -e
-. ./scripts/services_config.sh
-
-echo "tunnelbroker service will run at port ${COMM_SERVICES_PORT_TUNNELBROKER}"
-echo "backup service will run at port ${COMM_SERVICES_PORT_BACKUP}"
-echo "blob service will run at port ${COMM_SERVICES_PORT_BLOB}"
-
SERVICES_LIST=`./scripts/list_services.sh`
SERVICES=""
for SERVICE in $SERVICES_LIST; do
diff --git a/services/scripts/run_server_image.sh b/services/scripts/run_server_image.sh
--- a/services/scripts/run_server_image.sh
+++ b/services/scripts/run_server_image.sh
@@ -11,31 +11,23 @@
exit 1;
fi
-. ./scripts/services_config.sh
-
SERVICE=$1
-PORT=0
if [ "$SERVICE" == "tunnelbroker" ]; then
if [ ! -z "$2" ]; then
export COMM_SERVICES_PORT_TUNNELBROKER=$2
fi
- PORT=$COMM_SERVICES_PORT_TUNNELBROKER
elif [ "$SERVICE" == "backup" ]; then
if [ ! -z "$2" ]; then
export COMM_SERVICES_PORT_BACKUP=$2
fi
- PORT=$COMM_SERVICES_PORT_BACKUP
elif [ "$SERVICE" == "blob" ]; then
if [ ! -z "$2" ]; then
export COMM_SERVICES_PORT_BLOB=$2
fi
- PORT=$COMM_SERVICES_PORT_BLOB
else
echo "No such service ${SERVICE}, aborting"
exit 1
fi
-echo "${SERVICE} service will run at port ${PORT}"
-
docker-compose build $SERVICE-server
docker-compose up $SERVICE-server
diff --git a/services/scripts/services_config.sh b/services/scripts/services_config.sh
deleted file mode 100755
--- a/services/scripts/services_config.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/bash
-
-set -e
-
-export COMM_SERVICES_PORT_TUNNELBROKER=50051
-export COMM_SERVICES_PORT_BACKUP=50052
-export COMM_SERVICES_PORT_BLOB=50053
-
-export COMM_TEST_SERVICES=0
diff --git a/services/scripts/test_service.sh b/services/scripts/test_service.sh
--- a/services/scripts/test_service.sh
+++ b/services/scripts/test_service.sh
@@ -2,8 +2,6 @@
set -e
-. ./scripts/services_config.sh
-
SERVICES=`./scripts/list_services.sh`
SERVICE=`echo "$SERVICES" | grep $1` || echo "No such service: $1"

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 24, 11:25 AM (21 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2575169
Default Alt Text
D3233.diff (2 KB)

Event Timeline