Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CONF
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
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
UvA
CONF
Commits
64511f5b
Commit
64511f5b
authored
Nov 23, 2017
by
Spiros Koulouzis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change env from list to map
parent
f697af80
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
659 additions
and
36 deletions
+659
-36
stack_monitoring.yml
docs/composer_files/stack_monitoring.yml
+17
-22
BEIAv3.yml
docs/input_tosca_files/BEIAv3.yml
+619
-0
rpc_server.py
drip_parser/src/rpc_server.py
+1
-1
docker_compose_transformer.py
drip_parser/src/transformer/docker_compose_transformer.py
+14
-5
docker_compose_transformer.pyc
drip_parser/src/transformer/docker_compose_transformer.pyc
+0
-0
rpc_server.py
drip_planner2/src/rpc_server.py
+8
-8
No files found.
docs/composer_files/stack_monitoring.yml
View file @
64511f5b
version
:
'
3'
services
:
server
:
image
:
salmant/ul_monitoring_server_container_image2
ports
:
-
"
8080:8080"
-
"
4242:4242"
-
"
4245:4245"
-
"
7199:7199"
-
"
7000:7000"
-
"
7001:7001"
-
"
9160:9160"
-
"
9042:9042"
-
"
8012:8012"
-
"
61621:61621"
environment
:
-
"
MONITORING_SERVER=server"
agent
:
image
:
salmant/monitoring_agent
deploy
:
{
replicas
:
10
}
depends_on
:
[
server
]
command
:
--monitoringServerIP=server
\ No newline at end of file
AlertChecker
:
container_name
:
alerter_AlertChecker
environment
:
[
'
TOSCA=http://i213.cscloud.cf.ac.uk:7001/api/switchapps/258/tosca'
,
MONITORING_PROXY=Monitoring Proxy
]
image
:
beia/alerter
Graphite
:
container_name
:
graphite_Graphite
environment
:
[
Environment=SET_ITS_VALUE
,
Environment=SET_ITS_VALUE
,
Environment=SET_ITS_VALUE
,
TOSCA=SET_ITS_VALUE
,
TOSCA=SET_ITS_VALUE
,
TOSCA=SET_ITS_VALUE
,
MONITORING_PROXY=SET_ITS_VALUE
,
MONITORING_PROXY=SET_ITS_VALUE
,
MONITORING_PROXY=SET_ITS_VALUE
]
image
:
vladwing/graphite
SIPNotifier
:
container_name
:
sip_notifier_SIPNotifier
environment
:
[
'
TOSCA=http://i213.cscloud.cf.ac.uk:7001/api/switchapps/258/tosca'
,
MONITORING_PROXY=Monitoring Proxy
]
image
:
beia/sip_notifier
version
:
'
2'
\ No newline at end of file
docs/input_tosca_files/BEIAv3.yml
0 → 100644
View file @
64511f5b
This diff is collapsed.
Click to expand it.
drip_parser/src/rpc_server.py
View file @
64511f5b
...
...
@@ -82,7 +82,7 @@ def handle_delivery(message):
def
test_local
():
home
=
expanduser
(
"~"
)
transformer
=
DockerComposeTransformer
(
home
+
"/workspace/DRIP/docs/input_tosca_files/
Matej.BEIA
.yml"
)
transformer
=
DockerComposeTransformer
(
home
+
"/workspace/DRIP/docs/input_tosca_files/
BEIAv3
.yml"
)
compose
=
transformer
.
getnerate_compose
()
print
yaml
.
dump
(
compose
)
response
=
{}
...
...
drip_parser/src/transformer/docker_compose_transformer.py
View file @
64511f5b
...
...
@@ -63,9 +63,16 @@ class DockerComposeTransformer:
for
prop
in
properties
:
if
prop
==
'Environment_variables'
or
prop
==
'Live_variables'
or
prop
==
'Environment'
:
for
var
in
properties
[
prop
]:
environment
=
{}
environment
[
var
]
=
properties
[
prop
][
var
]
environments
.
append
(
environment
)
if
'Environment'
in
properties
[
prop
]:
for
key
in
properties
[
prop
][
'Environment'
]:
environment
=
{}
environment
[
str
(
key
)]
=
str
(
properties
[
prop
][
'Environment'
][
key
])
environments
.
append
(
environment
)
else
:
environment
=
{}
environment
[
str
(
var
)]
=
str
(
properties
[
prop
][
var
])
environments
.
append
(
environment
)
# environments.append(str(var)+"="+str(properties[prop][var]))
# if properties[prop] and not isinstance(properties[prop],dict):
# environment.append(prop+"="+str(properties[prop]))
return
environments
...
...
@@ -140,7 +147,7 @@ class DockerComposeTransformer:
docker_types
=
self
.
get_docker_types
()
node_templates
=
self
.
get_node_templates
()
services
=
{}
services
[
'version'
]
=
'2'
#
services['version'] = '2'
services
[
'services'
]
=
{}
all_volumes
=
[]
for
node_template_key
in
node_templates
:
...
...
@@ -162,7 +169,9 @@ class DockerComposeTransformer:
properties
=
self
.
get_properties
(
node_templates
[
node_template_key
])
environment
=
self
.
get_enviroment_vars
(
properties
)
if
environment
:
service
[
'environment'
]
=
environment
for
env
in
environment
:
service
[
'environment'
]
=
env
# service['environment'] = environment
port_maps
=
self
.
get_port_map
(
properties
)
if
port_maps
:
...
...
drip_parser/src/transformer/docker_compose_transformer.pyc
View file @
64511f5b
No preview for this file type
drip_planner2/src/rpc_server.py
View file @
64511f5b
...
...
@@ -99,14 +99,14 @@ def handle_delivery(message):
return
json
.
dumps
(
response
)
if
__name__
==
"__main__"
:
#
home = expanduser("~")
# planner = DumpPlanner(home+"/workspace/DRIP/docs/input_tosca_files/BEIA_cardif2
.yml")
#
print planner.plan()
logger
.
info
(
"Input args: "
+
sys
.
argv
[
0
]
+
' '
+
sys
.
argv
[
1
]
+
' '
+
sys
.
argv
[
2
])
channel
=
init_chanel
(
sys
.
argv
)
global
queue_name
queue_name
=
sys
.
argv
[
2
]
start
(
channel
)
home
=
expanduser
(
"~"
)
planner
=
DumpPlanner
(
home
+
"/workspace/DRIP/docs/input_tosca_files/BEIAv3
.yml"
)
print
planner
.
plan
()
#
logger.info("Input args: " + sys.argv[0] + ' ' + sys.argv[1] + ' ' + sys.argv[2])
#
channel = init_chanel(sys.argv)
#
global queue_name
#
queue_name = sys.argv[2]
#
start(channel)
#
...
...
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