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
333c729f
Commit
333c729f
authored
Sep 14, 2020
by
Manuel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
switch microservices to use of general resource folder
parent
718c4778
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
8 deletions
+11
-8
main.py
src/data-hub/semantic-linking-microservice/app/main.py
+3
-8
deployment.yml
...b/semantic-linking-microservice/deployment/deployment.yml
+8
-0
No files found.
src/data-hub/semantic-linking-microservice/app/main.py
View file @
333c729f
...
@@ -16,7 +16,7 @@ LOGGER = logging.getLogger(__name__)
...
@@ -16,7 +16,7 @@ LOGGER = logging.getLogger(__name__)
#################################
#################################
import
connexion
import
connexion
from
security
import
swagger_util
from
security
import
swagger_util
from
env_info
import
is_running_locally
from
env_info
import
is_running_locally
,
get_resources_path
from
messaging.ReconnectingMessageManager
import
ReconnectingMessageManager
from
messaging.ReconnectingMessageManager
import
ReconnectingMessageManager
from
messaging.MessageHandler
import
MessageHandler
from
messaging.MessageHandler
import
MessageHandler
...
@@ -33,18 +33,13 @@ def api_root():
...
@@ -33,18 +33,13 @@ def api_root():
return
'Endpoint of semantic-linking-microservice!'
return
'Endpoint of semantic-linking-microservice!'
# SSL configuration
# SSL configuration
try
:
certificate_path
=
get_resources_path
()
certificate_path
=
os
.
environ
[
'ARTICONF_CERTIFICATE_PATH'
]
except
KeyError
:
certificate_path
=
'/srv/articonf/'
context
=
(
os
.
path
.
normpath
(
f
'{certificate_path}/articonf1.crt'
),
os
.
path
.
normpath
(
f
'{certificate_path}/articonf1.key'
))
# certificate and key files
context
=
(
os
.
path
.
normpath
(
f
'{certificate_path}/articonf1.crt'
),
os
.
path
.
normpath
(
f
'{certificate_path}/articonf1.key'
))
# certificate and key files
if
is_running_locally
():
if
is_running_locally
():
# Local Mode
print
(
"Running locally..."
)
print
(
"Running with local settings..."
)
app
.
add_api
(
swagger_util
.
get_bundled_specs
(
Path
(
"configs/swagger_local.yml"
)),
app
.
add_api
(
swagger_util
.
get_bundled_specs
(
Path
(
"configs/swagger_local.yml"
)),
resolver
=
connexion
.
RestyResolver
(
"cms_rest_api"
))
resolver
=
connexion
.
RestyResolver
(
"cms_rest_api"
))
context
=
'adhoc'
else
:
else
:
app
.
add_api
(
swagger_util
.
get_bundled_specs
(
Path
(
"configs/swagger.yml"
)),
app
.
add_api
(
swagger_util
.
get_bundled_specs
(
Path
(
"configs/swagger.yml"
)),
resolver
=
connexion
.
RestyResolver
(
"cms_rest_api"
))
resolver
=
connexion
.
RestyResolver
(
"cms_rest_api"
))
...
...
src/data-hub/semantic-linking-microservice/deployment/deployment.yml
View file @
333c729f
...
@@ -32,6 +32,14 @@ spec:
...
@@ -32,6 +32,14 @@ spec:
image
:
alexx882/semantic-linking-microservice
image
:
alexx882/semantic-linking-microservice
ports
:
ports
:
-
containerPort
:
5000
-
containerPort
:
5000
volumeMounts
:
-
mountPath
:
/srv/articonf
name
:
articonf
volumes
:
-
name
:
articonf
hostPath
:
path
:
/srv/articonf
type
:
Directory
---
---
apiVersion
:
v1
apiVersion
:
v1
kind
:
Service
kind
:
Service
...
...
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