Commit 64618ea6 authored by Alexander Lercher's avatar Alexander Lercher

Changed deployment names and ports

Changed deployment script: arg has to match name exactly
parent 15ef25dd
......@@ -17,7 +17,7 @@ def print_help():
def get_microservice_name_from_path(path) -> str:
'''
Extracts the microservice name from the path.
:param path: The path, eg. src\data-hub\stage-discovery-microservice\deployment
:param path: The path, eg. src\\data-hub\\stage-discovery-microservice\\deployment
'''
name = path.split(os.path.normpath('/'))[-2]
......@@ -75,7 +75,7 @@ if __name__ == '__main__':
img_name = None
if len(sys.argv) > 2:
img_name = sys.argv[2]
deployment_file_paths = [p for p in deployment_file_paths if (img_name in p)]
deployment_file_paths = [p for p in deployment_file_paths if (img_name == get_microservice_name_from_path(p))]
error_val = 0
if command == 'delete' or command == 'redeploy':
......
......@@ -10,7 +10,7 @@ spec:
- name: http
port: 80
targetPort: 5000
nodePort: 30109
nodePort: 30105
protocol: TCP
---
apiVersion: apps/v1
......@@ -45,7 +45,7 @@ spec:
- name: http
port: 27017
targetPort: 27017
nodePort: 30111
nodePort: 30106
protocol: TCP
---
apiVersion: apps/v1
......
......@@ -33,38 +33,37 @@ spec:
ports:
- containerPort: 5000
---
# todo change DB name!
apiVersion: v1
kind: Service
metadata:
name: community-detection-db
name: role-stage-discovery-db
spec:
type: LoadBalancer
selector:
app: community-detection-db
app: role-stage-discovery-db
ports:
- name: http
port: 27017
targetPort: 27017
nodePort: 30110
nodePort: 30104
protocol: TCP
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: community-detection-db
name: role-stage-discovery-db
spec:
replicas: 1
selector:
matchLabels:
app: community-detection-db
app: role-stage-discovery-db
template:
metadata:
labels:
app: community-detection-db
app: role-stage-discovery-db
spec:
containers:
- name: community-detection-db
- name: role-stage-discovery-db
image: mongo
env:
- name: MONGO_INITDB_ROOT_USERNAME
......
......@@ -32,3 +32,43 @@ spec:
image: alexx882/semantic-linking-microservice
ports:
- containerPort: 5000
---
apiVersion: v1
kind: Service
metadata:
name: semantic-linking-db
spec:
type: LoadBalancer
selector:
app: semantic-linking-db
ports:
- name: http
port: 27017
targetPort: 27017
nodePort: 30102
protocol: TCP
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: semantic-linking-db
spec:
replicas: 1
selector:
matchLabels:
app: semantic-linking-db
template:
metadata:
labels:
app: semantic-linking-db
spec:
containers:
- name: semantic-linking-db
image: mongo
env:
- name: MONGO_INITDB_ROOT_USERNAME
value: root
- name: MONGO_INITDB_ROOT_PASSWORD
value: root
ports:
- containerPort: 27017
\ No newline at end of file
......@@ -7,15 +7,17 @@ RABBIT_MQ_PORT = 5672
## Trace Retrieval
TRACE_RETRIEVAL_HOSTNAME = 'trace-retrieval'
TRACE_RETRIEVAL_REST_PORT = 80
TRACE_RETRIEVAL_DB_HOSTNAME = 'trace-retrieval-db'
TRACE_RETRIEVAL_DB_HOSTNAME = f'{TRACE_RETRIEVAL_HOSTNAME}-db'
TRACE_RETRIEVAL_DB_PORT = 27017
# TRACE_RETRIEVAL_DB_HOSTNAME = 'articonf1.itec.aau.at'
# TRACE_RETRIEVAL_DB_PORT = 30003
## Semantic Linking
SEMANTIC_LINKING_HOSTNAME = 'semantic-linking'
SEMANTIC_LINKING_REST_PORT = 80
SEMANTIC_LINKING_DB_HOSTNAME = f'{SEMANTIC_LINKING_HOSTNAME}-db'
SEMANTIC_LINKING_DB_PORT = 27017
## Community Detection
COMMUNITY_DETECTION_HOSTNAME = 'community-detection'
COMMUNITY_DETECTION_HOSTNAME = 'role-stage-discovery'
COMMUNITY_DETECTION_REST_PORT = 80
COMMUNITY_DETECTION_DB_HOSTNAME = 'community-detection-db'
COMMUNITY_DETECTION_DB_HOSTNAME = f'{COMMUNITY_DETECTION_HOSTNAME}-db'
COMMUNITY_DETECTION_DB_PORT = 27017
\ No newline at end of file
# COMMUNITY_DETECTION_DB_HOSTNAME = 'localhost'
# COMMUNITY_DETECTION_DB_PORT = 30110
\ No newline at end of file
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