Commit a58cc362 authored by Alexander Lercher's avatar Alexander Lercher

Removed depreciated microservices

parent 64618ea6
FROM python:3
LABEL maintainer="Alexander Lercher"
ENV http_proxy http://proxy.uni-klu.ac.at:3128/
ENV https_proxy http://proxy.uni-klu.ac.at:3128/
RUN apt-get update
RUN pip install flask
RUN pip install connexion[swagger-ui]
EXPOSE 5000
WORKDIR /app
COPY src/data-hub/democratic-reasoning-microservice/app/ /app/
RUN chmod a+x main.py
CMD ["python", "./main.py"]
\ No newline at end of file
# Democratic Reasoning Microservice
The democratic reasoning microservice serves as a central knowledge-based component providing all facts and rules for other microservices.
## Technologies
- Python 3.x
- Python module Flask
- Python module Connexion with Swagger
- Docker
- Kubernetes
\ No newline at end of file
swagger: "2.0"
info:
title: Democratic Reasoning microservice
description: This is the documentation for the democratic reasoning microservice.
version: "1.0.0"
consumes:
- "application/json"
produces:
- "application/json"
basePath: "/api"
paths:
/debug:
post:
operationId: "debug.echo"
tags:
- "Echo"
summary: "Echo function for debugging purposes"
description: "Echoes the input back to the caller."
parameters:
- in: body
name: "Object"
required: true
schema:
type: object
responses:
200:
description: "Successful echo of request data"
from flask import request
def echo():
return request.json
\ No newline at end of file
import connexion
# load swagger config
app = connexion.App(__name__, specification_dir='configs/')
app.add_api('swagger.yml')
@app.route('/', methods=['GET'])
def api_root():
return 'Endpoint of democratic-reasoning-microservice!'
# start app
if __name__ == '__main__':
app.run(host='0.0.0.0', port=5000, debug=True)
apiVersion: v1
kind: Service
metadata:
name: democratic-reasoning
spec:
type: LoadBalancer
selector:
app: democratic-reasoning
ports:
- name: http
port: 80
targetPort: 5000
nodePort: 30106
protocol: TCP
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: democratic-reasoning
spec:
replicas: 1
selector:
matchLabels:
app: democratic-reasoning
template:
metadata:
labels:
app: democratic-reasoning
spec:
containers:
- name: democratic-reasoning
image: alexx882/democratic-reasoning-microservice
ports:
- containerPort: 5000
\ No newline at end of file
FROM python:3
LABEL maintainer="Alexander Lercher"
ENV http_proxy http://proxy.uni-klu.ac.at:3128/
ENV https_proxy http://proxy.uni-klu.ac.at:3128/
RUN apt-get update
RUN pip install flask
RUN pip install connexion[swagger-ui]
EXPOSE 5000
WORKDIR /app
COPY src/data-hub/geo-profiling-microservice/app/ /app/
RUN chmod a+x main.py
CMD ["python", "./main.py"]
\ No newline at end of file
# Geo Profiling Microservice
The geo profiling microservice helps to cluster users physically close to each other.
## Technologies
- Python 3.x
- Python module Flask
- Python module Connexion with Swagger
- Docker
- Kubernetes
\ No newline at end of file
swagger: "2.0"
info:
title: Geo Profiling microservice
description: This is the documentation for the geo profiling microservice.
version: "1.0.0"
consumes:
- "application/json"
produces:
- "application/json"
basePath: "/api"
paths:
/debug:
post:
operationId: "debug.echo"
tags:
- "Echo"
summary: "Echo function for debugging purposes"
description: "Echoes the input back to the caller."
parameters:
- in: body
name: "Object"
required: true
schema:
type: object
responses:
200:
description: "Successful echo of request data"
from flask import request
def echo():
return request.json
\ No newline at end of file
import connexion
# load swagger config
app = connexion.App(__name__, specification_dir='configs/')
app.add_api('swagger.yml')
@app.route('/', methods=['GET'])
def api_root():
return 'Endpoint of geo-profiling-microservice!'
# start app
if __name__ == '__main__':
app.run(host='0.0.0.0', port=5000, debug=True)
apiVersion: v1
kind: Service
metadata:
name: geo-profiling
spec:
type: LoadBalancer
selector:
app: geo-profiling
ports:
- name: http
port: 80
targetPort: 5000
nodePort: 30105
protocol: TCP
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: geo-profiling
spec:
replicas: 1
selector:
matchLabels:
app: geo-profiling
template:
metadata:
labels:
app: geo-profiling
spec:
containers:
- name: geo-profiling
image: alexx882/geo-profiling-microservice
ports:
- containerPort: 5000
\ 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