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
a93108ad
Commit
a93108ad
authored
Jan 17, 2018
by
Spiros Koulouzis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
set cloud provider. New WT docker-compose.yml
parent
77a5a24d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
468 additions
and
6 deletions
+468
-6
docker-compose.yml
docs/composer_files/WT/docker-compose.yml
+462
-0
PlannerService.java
...main/java/nl/uva/sne/drip/api/service/PlannerService.java
+4
-3
PlannerController0.java
.../java/nl/uva/sne/drip/api/v0/rest/PlannerController0.java
+1
-1
PlannerController.java
...n/java/nl/uva/sne/drip/api/v1/rest/PlannerController.java
+1
-2
No files found.
docs/composer_files/WT/docker-compose.yml
0 → 100644
View file @
a93108ad
#####################################################
### PLEASE, CONFIGURE MONITOR-ADAPTER ENVIRONMENT ###
#####################################################
version
:
"
3.3"
services
:
monitor-adapter
:
image
:
beia/monitoring_agent
deploy
:
replicas
:
1
update_config
:
parallelism
:
1
delay
:
10s
restart_policy
:
condition
:
any
placement
:
constraints
:
[
node.role == manager
]
environment
:
-
MONITORING_SERVER=194.249.1.175
-
MONITORING_PREFIX=eu.switch.wt
hostname
:
monitor-adapter
networks
:
uc-ol
:
aliases
:
-
monitor-adapter
mongo
:
image
:
wtelecom/mongo:switch
deploy
:
replicas
:
1
update_config
:
parallelism
:
1
delay
:
10s
restart_policy
:
condition
:
any
placement
:
constraints
:
[
node.role == manager
]
depends_on
:
-
monitor-adapter
volumes
:
-
mongo-volume:/data/db
hostname
:
mongo
networks
:
uc-ol
:
aliases
:
-
mongo
redis
:
image
:
redis:4.0-alpine
deploy
:
replicas
:
1
update_config
:
parallelism
:
1
delay
:
10s
restart_policy
:
condition
:
any
placement
:
constraints
:
[
node.role == manager
]
depends_on
:
-
monitor-adapter
volumes
:
-
redis-volume:/data
hostname
:
redis
networks
:
uc-ol
:
aliases
:
-
redis
db
:
image
:
wtelecom/mysql:switch
deploy
:
replicas
:
1
update_config
:
parallelism
:
1
delay
:
10s
restart_policy
:
condition
:
any
placement
:
constraints
:
[
node.role == manager
]
depends_on
:
-
monitor-adapter
environment
:
-
MYSQL_ROOT_PASSWORD=supersecret
volumes
:
-
db-volume:/var/lib/mysql
hostname
:
db
networks
:
uc-ol
:
aliases
:
-
db
asterisk
:
image
:
wtelecom/asterisk:switch
deploy
:
replicas
:
1
update_config
:
parallelism
:
1
delay
:
10s
restart_policy
:
condition
:
any
depends_on
:
-
monitor-adapter
-
db
hostname
:
asterisk
networks
:
uc-ol
:
aliases
:
-
asterisk
doubango
:
image
:
wtelecom/doubango:switch
deploy
:
replicas
:
1
update_config
:
parallelism
:
1
delay
:
10s
restart_policy
:
condition
:
any
depends_on
:
-
monitor-adapter
-
db
hostname
:
doubango
networks
:
uc-ol
:
aliases
:
-
doubango
kamailio
:
image
:
wtelecom/kamailio:switch
deploy
:
replicas
:
1
update_config
:
parallelism
:
1
delay
:
10s
restart_policy
:
condition
:
any
placement
:
constraints
:
[
node.role == manager
]
depends_on
:
-
monitor-adapter
-
db
-
asterisk
-
doubango
environment
:
-
SUBNET_OVERLAY=192.168.2.0
volumes
:
-
/etc/hostname:/docker-entrypoint/hostname:ro
ports
:
-
target
:
5060
published
:
5060
protocol
:
udp
mode
:
host
-
target
:
5061
published
:
5061
protocol
:
udp
mode
:
host
-
target
:
443
published
:
443
protocol
:
tcp
mode
:
host
-
target
:
80
published
:
80
protocol
:
tcp
mode
:
host
hostname
:
kamailio
networks
:
uc-ol
:
aliases
:
-
kamailio
rtpengine
:
image
:
wtelecom/rtpengine:switch
deploy
:
replicas
:
1
update_config
:
parallelism
:
1
delay
:
10s
restart_policy
:
condition
:
any
depends_on
:
-
monitor-adapter
-
db
-
kamailio
environment
:
-
PORT_MAX=10050
-
PORT_MIN=10000
-
SUBNET_OVERLAY=192.168.2.0
-
BRIDGE_MODE=YES
volumes
:
-
/etc/hostname:/docker-entrypoint/hostname:ro
ports
:
-
target
:
10000
published
:
10000
protocol
:
udp
mode
:
host
-
target
:
10001
published
:
10001
protocol
:
udp
mode
:
host
-
target
:
10002
published
:
10002
protocol
:
udp
mode
:
host
-
target
:
10003
published
:
10003
protocol
:
udp
mode
:
host
-
target
:
10004
published
:
10004
protocol
:
udp
mode
:
host
-
target
:
10005
published
:
10005
protocol
:
udp
mode
:
host
-
target
:
10006
published
:
10006
protocol
:
udp
mode
:
host
-
target
:
10007
published
:
10007
protocol
:
udp
mode
:
host
-
target
:
10008
published
:
10008
protocol
:
udp
mode
:
host
-
target
:
10009
published
:
10009
protocol
:
udp
mode
:
host
-
target
:
10010
published
:
10010
protocol
:
udp
mode
:
host
-
target
:
10011
published
:
10011
protocol
:
udp
mode
:
host
-
target
:
10012
published
:
10012
protocol
:
udp
mode
:
host
-
target
:
10013
published
:
10013
protocol
:
udp
mode
:
host
-
target
:
10014
published
:
10014
protocol
:
udp
mode
:
host
-
target
:
10015
published
:
10015
protocol
:
udp
mode
:
host
-
target
:
10016
published
:
10016
protocol
:
udp
mode
:
host
-
target
:
10017
published
:
10017
protocol
:
udp
mode
:
host
-
target
:
10018
published
:
10018
protocol
:
udp
mode
:
host
-
target
:
10019
published
:
10019
protocol
:
udp
mode
:
host
-
target
:
10020
published
:
10020
protocol
:
udp
mode
:
host
-
target
:
10021
published
:
10021
protocol
:
udp
mode
:
host
-
target
:
10022
published
:
10022
protocol
:
udp
mode
:
host
-
target
:
10023
published
:
10023
protocol
:
udp
mode
:
host
-
target
:
10024
published
:
10024
protocol
:
udp
mode
:
host
-
target
:
10025
published
:
10025
protocol
:
udp
mode
:
host
-
target
:
10026
published
:
10026
protocol
:
udp
mode
:
host
-
target
:
10027
published
:
10027
protocol
:
udp
mode
:
host
-
target
:
10028
published
:
10028
protocol
:
udp
mode
:
host
-
target
:
10029
published
:
10029
protocol
:
udp
mode
:
host
-
target
:
10030
published
:
10030
protocol
:
udp
mode
:
host
-
target
:
10031
published
:
10031
protocol
:
udp
mode
:
host
-
target
:
10032
published
:
10032
protocol
:
udp
mode
:
host
-
target
:
10033
published
:
10033
protocol
:
udp
mode
:
host
-
target
:
10034
published
:
10034
protocol
:
udp
mode
:
host
-
target
:
10035
published
:
10035
protocol
:
udp
mode
:
host
-
target
:
10036
published
:
10036
protocol
:
udp
mode
:
host
-
target
:
10037
published
:
10037
protocol
:
udp
mode
:
host
-
target
:
10038
published
:
10038
protocol
:
udp
mode
:
host
-
target
:
10039
published
:
10039
protocol
:
udp
mode
:
host
-
target
:
10040
published
:
10040
protocol
:
udp
mode
:
host
-
target
:
10041
published
:
10041
protocol
:
udp
mode
:
host
-
target
:
10042
published
:
10042
protocol
:
udp
mode
:
host
-
target
:
10043
published
:
10043
protocol
:
udp
mode
:
host
-
target
:
10044
published
:
10044
protocol
:
udp
mode
:
host
-
target
:
10045
published
:
10045
protocol
:
udp
mode
:
host
-
target
:
10046
published
:
10046
protocol
:
udp
mode
:
host
-
target
:
10047
published
:
10047
protocol
:
udp
mode
:
host
-
target
:
10048
published
:
10048
protocol
:
udp
mode
:
host
-
target
:
10049
published
:
10049
protocol
:
udp
mode
:
host
-
target
:
10050
published
:
10050
protocol
:
udp
mode
:
host
networks
:
uc-ol
:
aliases
:
-
rtpengine
webportalbackend
:
image
:
wtelecom/webportalbackend:switch
deploy
:
replicas
:
1
update_config
:
parallelism
:
1
delay
:
10s
restart_policy
:
condition
:
any
depends_on
:
-
monitor-adapter
-
redis
-
mongo
-
kamailio
-
rtpengine
ports
:
-
"
3000:3000"
volumes
:
-
/etc/hostname:/docker-entrypoint/hostname:ro
hostname
:
webportalbackend
networks
:
uc-ol
:
aliases
:
-
webportalbackend
webportal
:
image
:
wtelecom/webportal:switch
deploy
:
replicas
:
1
update_config
:
parallelism
:
1
delay
:
10s
restart_policy
:
condition
:
any
depends_on
:
-
monitor-adapter
-
kamailio
-
rtpengine
-
webportalbackend
ports
:
-
"
4200:4200"
volumes
:
-
/etc/hostname:/docker-entrypoint/hostname:ro
hostname
:
webportal
networks
:
uc-ol
:
aliases
:
-
webportal
volumes
:
db-volume
:
redis-volume
:
mongo-volume
:
networks
:
uc-ol
:
driver
:
overlay
ipam
:
driver
:
default
config
:
-
subnet
:
192.168.2.0/24
drip-api/src/main/java/nl/uva/sne/drip/api/service/PlannerService.java
View file @
a93108ad
...
...
@@ -79,7 +79,7 @@ public class PlannerService {
logger
.
addHandler
(
new
DRIPLogHandler
(
messageBrokerHost
));
}
public
PlanResponse
getPlan
(
String
toscaId
)
throws
JSONException
,
UnsupportedEncodingException
,
IOException
,
TimeoutException
,
InterruptedException
{
public
PlanResponse
getPlan
(
String
toscaId
,
String
cloudProvider
)
throws
JSONException
,
UnsupportedEncodingException
,
IOException
,
TimeoutException
,
InterruptedException
{
try
(
DRIPCaller
planner
=
new
PlannerCaller
(
messageBrokerHost
))
{
Message
plannerInvokationMessage
=
buildPlannerMessage
(
toscaId
);
logger
.
log
(
Level
.
INFO
,
"Calling planner"
);
...
...
@@ -100,8 +100,9 @@ public class PlannerService {
jsonArrayString
.
append
(
jsonValue
);
}
jsonArrayString
.
append
(
"]"
);
String
cloudProvider
=
getBestCloudProvider
();
if
(
cloudProvider
==
null
)
{
cloudProvider
=
getBestCloudProvider
();
}
String
domainName
=
getBestDomain
(
cloudProvider
);
// SimplePlanContainer simplePlan = P2PConverter.convert(jsonArrayString.toString(), "vm_user", "Ubuntu 16.04", clusterType);
...
...
drip-api/src/main/java/nl/uva/sne/drip/api/v0/rest/PlannerController0.java
View file @
a93108ad
...
...
@@ -65,7 +65,7 @@ public class PlannerController0 {
String
yaml
=
plan0
.
file
;
yaml
=
yaml
.
replaceAll
(
"\\\\n"
,
"\n"
);
String
id
=
toscaService
.
saveYamlString
(
yaml
,
null
);
nl
.
uva
.
sne
.
drip
.
drip
.
commons
.
data
.
v1
.
external
.
PlanResponse
plan1
=
plannerService
.
getPlan
(
id
);
nl
.
uva
.
sne
.
drip
.
drip
.
commons
.
data
.
v1
.
external
.
PlanResponse
plan1
=
plannerService
.
getPlan
(
id
,
null
);
Result
r
=
new
Result
();
r
.
info
=
(
"INFO"
);
r
.
status
=
(
"Success"
);
...
...
drip-api/src/main/java/nl/uva/sne/drip/api/v1/rest/PlannerController.java
View file @
a93108ad
...
...
@@ -61,7 +61,6 @@ public class PlannerController {
// @Autowired
// private ToscaService toscaService;
/**
* verifies plan. Checks if this is a concrete plan
*
...
...
@@ -87,7 +86,7 @@ public class PlannerController {
String
plan
(
@PathVariable
(
"tosca_id"
)
String
toscaId
)
{
try
{
PlanResponse
plan
=
plannerService
.
getPlan
(
toscaId
);
PlanResponse
plan
=
plannerService
.
getPlan
(
toscaId
,
null
);
if
(
plan
==
null
)
{
throw
new
NotFoundException
(
"Could not make plan"
);
}
...
...
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