diff --git a/src/start_webui_dev_mode.sh b/src/start_webui_dev_mode.sh new file mode 100755 index 0000000000000000000000000000000000000000..46de8314f314eaf4037fdd8ebde72091ac1c29d1 --- /dev/null +++ b/src/start_webui_dev_mode.sh @@ -0,0 +1,11 @@ +export CONTEXT_SERVICE_ADDRESS=`kubectl get service/contextservice -n tf-dev -o jsonpath='{.spec.clusterIP}'` + +echo $CONTEXT_SERVICE_ADDRESS + +export DEVICE_SERVICE_ADDRESS=`kubectl get service/deviceservice -n tf-dev -o jsonpath='{.spec.clusterIP}'` + +echo $DEVICE_SERVICE_ADDRESS + +export HOST="127.0.0.1" + +python -m webui.service diff --git a/src/webui/Config.py b/src/webui/Config.py index 152a4d7c41c5317a64a055edd49ea1c63e6069a5..f47f04f1b7cd6e9023dd8508d31a2075e85a5219 100644 --- a/src/webui/Config.py +++ b/src/webui/Config.py @@ -1,3 +1,4 @@ +import os import logging # General settings @@ -15,10 +16,8 @@ HOST = '0.0.0.0' # accepts connections coming from any ADDRESS DEBUG=False -# CONTEXT_SERVICE_ADDRESS = '10.107.242.226' -CONTEXT_SERVICE_ADDRESS = 'context' # TODO: use the correct context ADDRESS +CONTEXT_SERVICE_ADDRESS = os.environ.get('CONTEXT_SERVICE_ADDRESS', 'context') CONTEXT_SERVICE_PORT = 1010 -# DEVICE_SERVICE_ADDRESS = '10.109.49.149' -DEVICE_SERVICE_ADDRESS = 'device' # TODO: use the correct address +DEVICE_SERVICE_ADDRESS = os.environ.get('DEVICE_SERVICE_ADDRESS', 'device') DEVICE_SERVICE_PORT = 2020