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
7a859fa4
Commit
7a859fa4
authored
Jul 29, 2019
by
Alexander Lercher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added ping tool and RabbitMQ for message broker
parent
3c431769
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
68 additions
and
1 deletion
+68
-1
build.py
build.py
+3
-1
deployment.yml
message-broker/deployment/deployment.yml
+21
-0
loadbalancer.yml
message-broker/deployment/loadbalancer.yml
+18
-0
main.py
tools/ping-tool/main.py
+26
-0
No files found.
build.py
View file @
7a859fa4
...
...
@@ -11,7 +11,8 @@ for r, _, f in os.walk('./'):
command_args
=
[{
'path'
:
path
,
# ./transaction-hub-out/tokenized-decision-making-microservice/Dockerfile
# -> tokenized-decision-making
'name'
:
'-'
.
join
(
str
(
path
)
.
split
(
'/'
)[
2
]
.
split
(
'-'
)[:
-
1
])}
#'name': '-'.join(str(path).split('/')[2].split('-')[:-1])}
'name'
:
str
(
path
)
.
split
(
'/'
)[
2
]}
for
path
in
paths
]
...
...
@@ -19,3 +20,4 @@ for command_arg in command_args:
image_name
=
f
"{docker_reg}/{command_arg['name']}"
os
.
system
(
f
"docker image build -t {image_name} {command_arg['path']}"
)
os
.
system
(
f
"docker push {image_name}"
)
print
(
f
"Finished {image_name}"
)
\ No newline at end of file
message-broker/deployment/deployment.yml
0 → 100644
View file @
7a859fa4
apiVersion
:
apps/v1
kind
:
Deployment
metadata
:
name
:
rabbit-mq
spec
:
replicas
:
2
selector
:
matchLabels
:
app
:
rabbit-mq
template
:
metadata
:
labels
:
app
:
rabbit-mq
spec
:
containers
:
-
name
:
rabbit-mq
image
:
rabbitmq:3-management
ports
:
-
containerPort
:
15672
\ No newline at end of file
message-broker/deployment/loadbalancer.yml
0 → 100644
View file @
7a859fa4
apiVersion
:
v1
kind
:
Service
metadata
:
name
:
rabbit-mq-endpoint
spec
:
type
:
LoadBalancer
externalIPs
:
-
143.205.173.36
selector
:
app
:
rabbit-mq
ports
:
-
name
:
http
port
:
8080
targetPort
:
15672
nodePort
:
30301
protocol
:
TCP
\ No newline at end of file
tools/ping-tool/main.py
0 → 100644
View file @
7a859fa4
import
requests
import
random
import
json
ports
=
[]
# transaction hub in
ports
.
extend
(
range
(
30001
,
30003
))
# data hub
ports
.
extend
(
range
(
30101
,
30110
))
# transaction hub out
ports
.
extend
(
range
(
30201
,
30205
))
print
(
f
"Checking {len(ports)} ports"
)
home_url
=
'http://143.205.173.36:{port}/'
debug_url
=
home_url
+
'api/debug'
print
(
debug_url
)
for
port
in
ports
:
response
=
requests
.
get
(
home_url
.
replace
(
"{port}"
,
str
(
port
)))
print
(
response
.
text
)
data
=
{
'data'
:
f
"Echo {str(random.random())}"
}
response
=
requests
.
post
(
debug_url
.
replace
(
"{port}"
,
str
(
port
)),
json
=
data
)
print
(
response
.
text
)
\ 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