Commit 27acd841 authored by Alexander Lercher's avatar Alexander Lercher

Added all output-interface microservices

parent d3b0af3f
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 app/ /app/
RUN chmod a+x main.py
CMD ["python", "./main.py"]
\ No newline at end of file
# Event Detection Microservice
The event detection microservice publishes information about events to its subscribers. If new communities are detected, this event of forming a
physical group is broadcasted to consumer services.
## 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: Event Detection microservice
description: This is the documentation for the event detection 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 event-detection-microservice!'
# start app
if __name__ == '__main__':
app.run(host='0.0.0.0', port=5000, debug=True)
apiVersion: apps/v1
kind: Deployment
metadata:
name: event-detection
spec:
replicas: 2
selector:
matchLabels:
app: event-detection
template:
metadata:
labels:
app: event-detection
spec:
containers:
- name: event-detection
image: 172.16.1.20:5000/event-detection-microservice
ports:
- containerPort: 5000
\ No newline at end of file
apiVersion: v1
kind: Service
metadata:
name: event-detection-endpoint
spec:
type: LoadBalancer
externalIPs:
- 143.205.173.36
selector:
app: event-detection
ports:
- name: http
port: 80
targetPort: 5000
nodePort: 30204
protocol: TCP
\ 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 app/ /app/
RUN chmod a+x main.py
CMD ["python", "./main.py"]
\ No newline at end of file
# Smart Matching Microservice
The smart matching microservice preserves security in this distributed environment through decentralized consensus based on voting among the recommended list of reputable agents to express their acceptance of valid transactions.
## 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: Smart Matching microservice
description: This is the documentation for the smart matching 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 smart-matching-microservice!'
# start app
if __name__ == '__main__':
app.run(host='0.0.0.0', port=5000, debug=True)
apiVersion: apps/v1
kind: Deployment
metadata:
name: smart-matching
spec:
replicas: 2
selector:
matchLabels:
app: smart-matching
template:
metadata:
labels:
app: smart-matching
spec:
containers:
- name: smart-matching
image: 172.16.1.20:5000/smart-matching-microservice
ports:
- containerPort: 5000
\ No newline at end of file
apiVersion: v1
kind: Service
metadata:
name: smart-matching-endpoint
spec:
type: LoadBalancer
externalIPs:
- 143.205.173.36
selector:
app: smart-matching
ports:
- name: http
port: 80
targetPort: 5000
nodePort: 30203
protocol: TCP
\ 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 app/ /app/
RUN chmod a+x main.py
CMD ["python", "./main.py"]
\ No newline at end of file
# Tokenized Decision Making Microservice
The tokenized decision making microservice predicts future results and helps the decentralized social media reduce costs and latency by analyzing previous voting outcomes and preferences.
## 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: Tokenized Decision Making microservice
description: This is the documentation for the tokenized decision making 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 tokenized-decision-making-microservice!'
# start app
if __name__ == '__main__':
app.run(host='0.0.0.0', port=5000, debug=True)
apiVersion: apps/v1
kind: Deployment
metadata:
name: tokenized-decision-making
spec:
replicas: 2
selector:
matchLabels:
app: tokenized-decision-making
template:
metadata:
labels:
app: tokenized-decision-making
spec:
containers:
- name: tokenized-decision-making
image: 172.16.1.20:5000/tokenized-decision-making-microservice
ports:
- containerPort: 5000
\ No newline at end of file
apiVersion: v1
kind: Service
metadata:
name: tokenized-decision-making-endpoint
spec:
type: LoadBalancer
externalIPs:
- 143.205.173.36
selector:
app: tokenized-decision-making
ports:
- name: http
port: 80
targetPort: 5000
nodePort: 30201
protocol: TCP
\ 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 app/ /app/
RUN chmod a+x main.py
CMD ["python", "./main.py"]
\ No newline at end of file
# Trust SLA Microservice
The trust SLA microservice takes optimized decisions according to conflicting objectives to suggest relevant communities for various services over time, in order to improve the recommendation quality and eliminate malicious actors in participatory exchanges.
## 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: Trust SLA microservice
description: This is the documentation for the trust SLA 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 trust-sla-microservice!'
# start app
if __name__ == '__main__':
app.run(host='0.0.0.0', port=5000, debug=True)
apiVersion: apps/v1
kind: Deployment
metadata:
name: trust-sla
spec:
replicas: 2
selector:
matchLabels:
app: trust-sla
template:
metadata:
labels:
app: trust-sla
spec:
containers:
- name: trust-sla
image: 172.16.1.20:5000/trust-sla-microservice
ports:
- containerPort: 5000
\ No newline at end of file
apiVersion: v1
kind: Service
metadata:
name: trust-sla-endpoint
spec:
type: LoadBalancer
externalIPs:
- 143.205.173.36
selector:
app: trust-sla
ports:
- name: http
port: 80
targetPort: 5000
nodePort: 30202
protocol: TCP
\ 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