Loading deploy_in_kubernetes.sh +1 −1 Original line number Diff line number Diff line Loading @@ -10,7 +10,7 @@ REGISTRY_IMAGE="" #REGISTRY_IMAGE="http://my-container-registry.local/" # Set the list of components you want to build images for, and deploy. COMPONENTS="context device service compute monitoring centralizedattackdetector" COMPONENTS="context device service compute monitoring centralizedattackdetector webui" # Set the tag you want to use for your images. IMAGE_TAG="tf-dev" Loading src/context/requirements.txt 0 → 100644 +72 −0 Original line number Diff line number Diff line # # This file is autogenerated by pip-compile with python 3.9 # To update, run: # # pip-compile src/context/requirements.in # aniso8601==9.0.1 # via flask-restful attrs==21.2.0 # via pytest certifi==2021.5.30 # via requests charset-normalizer==2.0.6 # via requests click==8.0.1 # via flask flask==2.0.1 # via flask-restful flask-restful==0.3.9 # via -r src/context/requirements.in grpcio==1.41.0 # via # -r src/context/requirements.in # grpcio-health-checking grpcio-health-checking==1.41.0 # via -r src/context/requirements.in idna==3.2 # via requests iniconfig==1.1.1 # via pytest itsdangerous==2.0.1 # via flask jinja2==3.0.1 # via flask markupsafe==2.0.1 # via jinja2 packaging==21.0 # via pytest pluggy==1.0.0 # via pytest prometheus-client==0.11.0 # via -r src/context/requirements.in protobuf==3.18.0 # via grpcio-health-checking py==1.10.0 # via pytest py-cpuinfo==8.0.0 # via pytest-benchmark pyparsing==2.4.7 # via packaging pytest==6.2.5 # via # -r src/context/requirements.in # pytest-benchmark pytest-benchmark==3.4.1 # via -r src/context/requirements.in pytz==2021.1 # via flask-restful redis==3.5.3 # via -r src/context/requirements.in requests==2.26.0 # via -r src/context/requirements.in six==1.16.0 # via # flask-restful # grpcio toml==0.10.2 # via pytest urllib3==1.26.7 # via requests werkzeug==2.0.1 # via flask src/webui/Config.py +5 −1 Original line number Diff line number Diff line Loading @@ -11,6 +11,10 @@ METRICS_PORT = 9192 SECRET_KEY = '>s&}24@{]]#k3&^5$f3#?6?h3{W@[}/7z}2pa]>{3&5%RP<)[(' HOST = '0.0.0.0' # accepts connections coming from any IP HOST = '0.0.0.0' # accepts connections coming from any ADDRESS DEBUG=False CONTEXT_SERVICE_ADDRESS = '10.96.104.191' # CONTEXT_SERVICE_ADDRESS = 'context' # TODO: use the correct context ADDRESS CONTEXT_SERVICE_PORT = 1010 src/webui/Dockerfile +1 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ RUN python3 -m pip install -r webui/requirements.txt # Add files into working directory COPY common/. common COPY context/client/ContextClient.py context/client/ContextClient.py COPY webui/. webui # Start webui service Loading src/webui/genproto.sh +3 −3 Original line number Diff line number Diff line Loading @@ -24,19 +24,19 @@ rm -rf proto/__pycache__ touch proto/__init__.py # building protos of services used python -m grpc_tools.protoc -I../../proto --python_out=proto --grpc_python_out=proto compute.proto # python -m grpc_tools.protoc -I../../proto --python_out=proto --grpc_python_out=proto compute.proto python -m grpc_tools.protoc -I../../proto --python_out=proto --grpc_python_out=proto context.proto python -m grpc_tools.protoc -I../../proto --python_out=proto --grpc_python_out=proto device.proto python -m grpc_tools.protoc -I../../proto --python_out=proto --grpc_python_out=proto service.proto python -m grpc_tools.protoc -I../../proto --python_out=proto --grpc_python_out=proto monitoring.proto rm proto/compute_pb2_grpc.py # rm proto/compute_pb2_grpc.py rm proto/context_pb2_grpc.py rm proto/device_pb2_grpc.py rm proto/service_pb2_grpc.py rm proto/monitoring_pb2_grpc.py sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' proto/compute_pb2.py # sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' proto/compute_pb2.py sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' proto/context_pb2.py sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' proto/device_pb2.py sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' proto/service_pb2.py Loading Loading
deploy_in_kubernetes.sh +1 −1 Original line number Diff line number Diff line Loading @@ -10,7 +10,7 @@ REGISTRY_IMAGE="" #REGISTRY_IMAGE="http://my-container-registry.local/" # Set the list of components you want to build images for, and deploy. COMPONENTS="context device service compute monitoring centralizedattackdetector" COMPONENTS="context device service compute monitoring centralizedattackdetector webui" # Set the tag you want to use for your images. IMAGE_TAG="tf-dev" Loading
src/context/requirements.txt 0 → 100644 +72 −0 Original line number Diff line number Diff line # # This file is autogenerated by pip-compile with python 3.9 # To update, run: # # pip-compile src/context/requirements.in # aniso8601==9.0.1 # via flask-restful attrs==21.2.0 # via pytest certifi==2021.5.30 # via requests charset-normalizer==2.0.6 # via requests click==8.0.1 # via flask flask==2.0.1 # via flask-restful flask-restful==0.3.9 # via -r src/context/requirements.in grpcio==1.41.0 # via # -r src/context/requirements.in # grpcio-health-checking grpcio-health-checking==1.41.0 # via -r src/context/requirements.in idna==3.2 # via requests iniconfig==1.1.1 # via pytest itsdangerous==2.0.1 # via flask jinja2==3.0.1 # via flask markupsafe==2.0.1 # via jinja2 packaging==21.0 # via pytest pluggy==1.0.0 # via pytest prometheus-client==0.11.0 # via -r src/context/requirements.in protobuf==3.18.0 # via grpcio-health-checking py==1.10.0 # via pytest py-cpuinfo==8.0.0 # via pytest-benchmark pyparsing==2.4.7 # via packaging pytest==6.2.5 # via # -r src/context/requirements.in # pytest-benchmark pytest-benchmark==3.4.1 # via -r src/context/requirements.in pytz==2021.1 # via flask-restful redis==3.5.3 # via -r src/context/requirements.in requests==2.26.0 # via -r src/context/requirements.in six==1.16.0 # via # flask-restful # grpcio toml==0.10.2 # via pytest urllib3==1.26.7 # via requests werkzeug==2.0.1 # via flask
src/webui/Config.py +5 −1 Original line number Diff line number Diff line Loading @@ -11,6 +11,10 @@ METRICS_PORT = 9192 SECRET_KEY = '>s&}24@{]]#k3&^5$f3#?6?h3{W@[}/7z}2pa]>{3&5%RP<)[(' HOST = '0.0.0.0' # accepts connections coming from any IP HOST = '0.0.0.0' # accepts connections coming from any ADDRESS DEBUG=False CONTEXT_SERVICE_ADDRESS = '10.96.104.191' # CONTEXT_SERVICE_ADDRESS = 'context' # TODO: use the correct context ADDRESS CONTEXT_SERVICE_PORT = 1010
src/webui/Dockerfile +1 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ RUN python3 -m pip install -r webui/requirements.txt # Add files into working directory COPY common/. common COPY context/client/ContextClient.py context/client/ContextClient.py COPY webui/. webui # Start webui service Loading
src/webui/genproto.sh +3 −3 Original line number Diff line number Diff line Loading @@ -24,19 +24,19 @@ rm -rf proto/__pycache__ touch proto/__init__.py # building protos of services used python -m grpc_tools.protoc -I../../proto --python_out=proto --grpc_python_out=proto compute.proto # python -m grpc_tools.protoc -I../../proto --python_out=proto --grpc_python_out=proto compute.proto python -m grpc_tools.protoc -I../../proto --python_out=proto --grpc_python_out=proto context.proto python -m grpc_tools.protoc -I../../proto --python_out=proto --grpc_python_out=proto device.proto python -m grpc_tools.protoc -I../../proto --python_out=proto --grpc_python_out=proto service.proto python -m grpc_tools.protoc -I../../proto --python_out=proto --grpc_python_out=proto monitoring.proto rm proto/compute_pb2_grpc.py # rm proto/compute_pb2_grpc.py rm proto/context_pb2_grpc.py rm proto/device_pb2_grpc.py rm proto/service_pb2_grpc.py rm proto/monitoring_pb2_grpc.py sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' proto/compute_pb2.py # sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' proto/compute_pb2.py sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' proto/context_pb2.py sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' proto/device_pb2.py sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' proto/service_pb2.py Loading