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
842ff7bc
Commit
842ff7bc
authored
7 years ago
by
Spiros Koulouzis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
playbook is executed but we have a null exception in the response
parent
cb60db51
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
12 deletions
+15
-12
DeployService.java
.../main/java/nl/uva/sne/drip/api/service/DeployService.java
+6
-5
DeployController0.java
...n/java/nl/uva/sne/drip/api/v0/rest/DeployController0.java
+1
-1
DeployController.java
...in/java/nl/uva/sne/drip/api/v1/rest/DeployController.java
+1
-1
ansible_playbook.pyc
drip-deployer/ansible_playbook.pyc
+0
-0
rpc_server.py
drip-deployer/rpc_server.py
+7
-5
No files found.
drip-api/src/main/java/nl/uva/sne/drip/api/service/DeployService.java
View file @
842ff7bc
...
...
@@ -106,17 +106,18 @@ public class DeployService {
return
deployDao
.
save
(
clusterCred
);
}
public
DeployResponse
deploy
Cluster
(
DeployRequest
deployInfo
)
{
public
DeployResponse
deploy
Software
(
DeployRequest
deployInfo
)
{
try
(
DRIPCaller
deployer
=
new
DeployerCaller
(
messageBrokerHost
);)
{
Message
deployerInvokationMessage
=
buildDeployerMessage
(
deployInfo
.
getProvisionID
(),
deployInfo
.
getManagerType
().
toLowerCase
(),
deployInfo
.
getConfigurationID
());
// Message deployerInvokationMessage = MessageGenerator.generateArtificialMessage(System.getProperty("user.home")
// + File.separator + "workspace" + File.separator + "DRIP"
// + File.separator + "docs" + File.separator + "json_samples"
// + File.separator + "deployer_invocation.json");
Message
deployerInvokationMessage
=
MessageGenerator
.
generateArtificialMessage
(
System
.
getProperty
(
"user.home"
)
+
File
.
separator
+
"workspace"
+
File
.
separator
+
"DRIP"
+
File
.
separator
+
"docs"
+
File
.
separator
+
"json_samples"
+
File
.
separator
+
"deployer_invocation.json"
);
Message
response
=
(
deployer
.
call
(
deployerInvokationMessage
));
// Message response = generateFakeResponse();
List
<
MessageParameter
>
params
=
response
.
getParameters
();
...
...
This diff is collapsed.
Click to expand it.
drip-api/src/main/java/nl/uva/sne/drip/api/v0/rest/DeployController0.java
View file @
842ff7bc
...
...
@@ -73,7 +73,7 @@ public class DeployController0 {
private
Result
deploy
(
DeployRequest
deployReq
)
{
DeployResponse
key
=
deployService
.
deploy
Cluster
(
deployReq
);
DeployResponse
key
=
deployService
.
deploy
Software
(
deployReq
);
Result
res
=
new
Result
();
res
.
info
=
"INFO"
;
...
...
This diff is collapsed.
Click to expand it.
drip-api/src/main/java/nl/uva/sne/drip/api/v1/rest/DeployController.java
View file @
842ff7bc
...
...
@@ -62,7 +62,7 @@ public class DeployController {
if
(
deployRequest
.
getProvisionID
()
==
null
)
{
throw
new
BadRequestException
(
"Must provide provision ID"
);
}
DeployResponse
key
=
deployService
.
deploy
Cluster
(
deployRequest
);
DeployResponse
key
=
deployService
.
deploy
Software
(
deployRequest
);
return
key
.
getId
();
}
...
...
This diff is collapsed.
Click to expand it.
drip-deployer/ansible_playbook.pyc
View file @
842ff7bc
No preview for this file type
This diff is collapsed.
Click to expand it.
drip-deployer/rpc_server.py
View file @
842ff7bc
...
...
@@ -28,10 +28,11 @@ channel.queue_declare(queue='deployer_queue')
manager_type
=
""
done
=
False
def
threaded_function
(
args
):
while
Tru
e
:
#print "processing data events"
while
not
don
e
:
print
"Done:
%
r"
%
(
done
)
connection
.
process_data_events
()
sleep
(
30
)
...
...
@@ -125,11 +126,12 @@ channel.basic_qos(prefetch_count=1)
channel
.
basic_consume
(
on_request
,
queue
=
'deployer_queue'
)
#
thread = Thread(target = threaded_function, args = (1, ))
#
thread.start()
thread
=
Thread
(
target
=
threaded_function
,
args
=
(
1
,
))
thread
.
start
()
print
(
" [x] Awaiting RPC requests"
)
channel
.
start_consuming
()
#thread.stop()
\ No newline at end of file
done
=
True
thread
.
stop
()
\ No newline at end of file
This diff is collapsed.
Click to expand it.
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