Commit e5010b4c authored by Alexander Lercher's avatar Alexander Lercher

Merge branch 'feature/bin-scripts-feedback' into develop

parents 4c83bce4 e52460d2
...@@ -21,6 +21,7 @@ command_args = [{'path': path, ...@@ -21,6 +21,7 @@ command_args = [{'path': path,
for path for path
in paths] in paths]
error:int = 0
res_str = [] res_str = []
for command_arg in command_args: for command_arg in command_args:
path = command_arg['path'] path = command_arg['path']
...@@ -34,11 +35,19 @@ for command_arg in command_args: ...@@ -34,11 +35,19 @@ for command_arg in command_args:
os.remove(os.path.join(ROOT, DOCKER_COMPOSE_NAME)) os.remove(os.path.join(ROOT, DOCKER_COMPOSE_NAME))
res_str.append(f"{image_name} built with exit code {exit_val}") res_str.append(f"{image_name} built with exit code {exit_val}")
if exit_val != 0:
error = exit_val
os.system(f"docker push {image_name}") # push created Docker image
exit_val = os.system(f"docker push {image_name}")
res_str.append(f"{image_name} pushed with exit code {exit_val}") res_str.append(f"{image_name} pushed with exit code {exit_val}")
if exit_val != 0:
error = exit_val
print(f"Found {len(command_args)} images") print(f"Found {len(command_args)} images")
for s in res_str: for s in res_str:
print(s) print(s)
sys.exit(1 if error > 0 else 0)
\ No newline at end of file
import os import os
import sys import sys
EXTERNAL_IP = "143.205.173.225"
# apply or delete config # apply or delete config
kube_command = 'apply' kube_command = 'apply'
if len(sys.argv) == 2: if len(sys.argv) == 2:
...@@ -14,14 +12,10 @@ for p, _, f in os.walk('./'): ...@@ -14,14 +12,10 @@ for p, _, f in os.walk('./'):
if 'deployment.yml' == file: if 'deployment.yml' == file:
paths.append(os.path.normpath(p)) paths.append(os.path.normpath(p))
error:int = 0
for path in paths: for path in paths:
os.system(f"kubectl {kube_command} -f {path}") exit_val = os.system(f"kubectl {kube_command} -f {path}")
if exit_val != 0:
# if kube_command == 'apply': error = exit_val
# # apply external ip
# service_name = path.split(os.path.normpath('/'))[-2] # -1 is deployment folder sys.exit(1 if error > 0 else 0)
# if service_name.split('-')[-1] == 'microservice': \ No newline at end of file
# # remove microservice suffix
# service_name = service_name[:len(service_name)-len('-microservice')]
# os.system(f"kubectl patch service {service_name} -p '{{\"spec\":{{\"externalIPs\":[\"{EXTERNAL_IP}\"]}}}}'")
\ No newline at end of file
...@@ -9,7 +9,9 @@ RUN apt-get update ...@@ -9,7 +9,9 @@ RUN apt-get update
EXPOSE 5000 EXPOSE 5000
WORKDIR /app WORKDIR /app
COPY src/modules/ /app/
COPY src/data-hub/community-detection-microservice/app/ /app/ COPY src/data-hub/community-detection-microservice/app/ /app/
RUN pip install -r requirements.txt RUN pip install -r requirements.txt
RUN chmod a+x main.py RUN chmod a+x main.py
......
connexion[swagger-ui] astroid==2.3.3
numpy attrs==19.3.0
matplotlib autopep8==1.5
scikit-learn certifi==2019.11.28
\ No newline at end of file chardet==3.0.4
Click==7.0
clickclick==1.2.2
connexion==2.6.0
cycler==0.10.0
Flask==1.1.1
idna==2.8
importlib-metadata==1.5.0
inflection==0.3.1
isort==4.3.21
itsdangerous==1.1.0
Jinja2==2.11.1
joblib==0.14.1
jsonschema==3.2.0
kiwisolver==1.1.0
lazy-object-proxy==1.4.3
MarkupSafe==1.1.1
matplotlib==3.1.3
mccabe==0.6.1
numpy==1.18.1
openapi-spec-validator==0.2.8
# pkg-resources==0.0.0
pycodestyle==2.5.0
pylint==2.4.4
pymongo==3.10.1
pyparsing==2.4.6
pyrsistent==0.15.7
python-dateutil==2.8.1
PyYAML==5.3
requests==2.22.0
rope==0.16.0
scikit-learn==0.22.1
scipy==1.4.1
six==1.14.0
swagger-ui-bundle==0.0.6
typed-ast==1.4.1
urllib3==1.25.8
Werkzeug==0.16.1
wrapt==1.11.2
zipp==2.1.0
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment