Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SMART
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UNI-KLU
SMART
Commits
1f634d10
Commit
1f634d10
authored
Aug 05, 2020
by
Alexander Lercher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added participation hub and business logic microservice
parent
6706e220
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
172 additions
and
0 deletions
+172
-0
Dockerfile
src/participation-hub/business-logic-microservice/Dockerfile
+19
-0
README.md
src/participation-hub/business-logic-microservice/README.md
+7
-0
swagger.yml
...n-hub/business-logic-microservice/app/configs/swagger.yml
+30
-0
debug.py
...articipation-hub/business-logic-microservice/app/debug.py
+6
-0
main.py
...participation-hub/business-logic-microservice/app/main.py
+13
-0
requirements.txt
...tion-hub/business-logic-microservice/app/requirements.txt
+23
-0
deployment.yml
...hub/business-logic-microservice/deployment/deployment.yml
+74
-0
No files found.
src/participation-hub/business-logic-microservice/Dockerfile
0 → 100644
View file @
1f634d10
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
EXPOSE
5000
WORKDIR
/app
COPY
src/participation-hub/business-logic-microservice/app/requirements.txt /app/
RUN
pip
install
-r
requirements.txt
COPY
src/modules/ /app/
COPY
src/participation-hub/business-logic-microservice/app/ /app/
RUN
chmod
a+x main.py
CMD
["python", "./main.py"]
\ No newline at end of file
src/participation-hub/business-logic-microservice/README.md
0 → 100644
View file @
1f634d10
# Business Logic Microservice
The business model microservice serves as an interface for the individual use cases. Here, schema information for all use cases is stored to enable context-aware processing.
## Technologies
-
Python 3.x
-
Docker
-
Kubernetes
\ No newline at end of file
src/participation-hub/business-logic-microservice/app/configs/swagger.yml
0 → 100644
View file @
1f634d10
swagger
:
"
2.0"
info
:
title
:
Business Logic microservice
description
:
This is the documentation for the business logic 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"
src/participation-hub/business-logic-microservice/app/debug.py
0 → 100644
View file @
1f634d10
from
flask
import
request
def
echo
():
return
request
.
json
\ No newline at end of file
src/participation-hub/business-logic-microservice/app/main.py
0 → 100644
View file @
1f634d10
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 business-logic-microservice!'
# start app
if
__name__
==
'__main__'
:
app
.
run
(
host
=
'0.0.0.0'
,
port
=
5000
,
debug
=
True
)
src/participation-hub/business-logic-microservice/app/requirements.txt
0 → 100644
View file @
1f634d10
attrs==19.3.0
certifi==2020.6.20
chardet==3.0.4
click==7.1.2
clickclick==1.2.2
connexion==2.7.0
Flask==1.1.2
idna==2.10
importlib-metadata==1.7.0
inflection==0.5.0
itsdangerous==1.1.0
Jinja2==2.11.2
jsonschema==3.2.0
MarkupSafe==1.1.1
openapi-spec-validator==0.2.9
pyrsistent==0.16.0
PyYAML==5.3.1
requests==2.24.0
six==1.15.0
swagger-ui-bundle==0.0.8
urllib3==1.25.10
Werkzeug==1.0.1
zipp==3.1.0
src/participation-hub/business-logic-microservice/deployment/deployment.yml
0 → 100644
View file @
1f634d10
apiVersion
:
v1
kind
:
Service
metadata
:
name
:
business-logic
spec
:
type
:
LoadBalancer
selector
:
app
:
business-logic
ports
:
-
name
:
http
port
:
80
targetPort
:
5000
nodePort
:
30420
protocol
:
TCP
---
apiVersion
:
apps/v1
kind
:
Deployment
metadata
:
name
:
business-logic
spec
:
replicas
:
1
selector
:
matchLabels
:
app
:
business-logic
template
:
metadata
:
labels
:
app
:
business-logic
spec
:
containers
:
-
name
:
business-logic
image
:
alexx882/business-logic-microservice
ports
:
-
containerPort
:
5000
---
apiVersion
:
v1
kind
:
Service
metadata
:
name
:
business-logic-db
spec
:
type
:
LoadBalancer
selector
:
app
:
business-logic-db
ports
:
-
name
:
http
port
:
27017
targetPort
:
27017
nodePort
:
30421
protocol
:
TCP
---
apiVersion
:
apps/v1
kind
:
Deployment
metadata
:
name
:
business-logic-db
spec
:
replicas
:
1
selector
:
matchLabels
:
app
:
business-logic-db
template
:
metadata
:
labels
:
app
:
business-logic-db
spec
:
containers
:
-
name
:
business-logic-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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment