aboutsummaryrefslogtreecommitdiffstats
path: root/lib/deploy.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/deploy.js')
-rw-r--r--lib/deploy.js30
1 files changed, 15 insertions, 15 deletions
diff --git a/lib/deploy.js b/lib/deploy.js
index dfd73aa..ee31fd3 100644
--- a/lib/deploy.js
+++ b/lib/deploy.js
@@ -138,27 +138,27 @@ var delay = function(dtime) {
// Go through the Cloudify API call sequence to upload blueprint, create deployment, and launch install workflow
// (but don't wait for the workflow to finish)
const launchBlueprint = function(req, id, blueprint, inputs) {
- logger.debug(req.dcaeReqId, "deploymentId: " + id + " starting blueprint upload");
+ logger.info(req.dcaeReqId, "deploymentId: " + id + " starting blueprint upload");
// Upload blueprint
return cfy.uploadBlueprint(req, id, blueprint)
// Create deployment
.then (function(result) {
- logger.debug(req.dcaeReqId, "deploymentId: " + id + " blueprint uploaded");
+ logger.info(req.dcaeReqId, "deploymentId: " + id + " blueprint uploaded");
// Create deployment
return cfy.createDeployment(req, id, id, inputs);
})
// Launch the workflow, but don't wait for it to complete
.then(function(result){
- logger.debug(req.dcaeReqId, "deploymentId: " + id + " deployment created");
+ logger.info(req.dcaeReqId, "deploymentId: " + id + " deployment created");
return delay(DELAY_INSTALL_WORKFLOW)
.then(function(){
return cfy.initiateWorkflowExecution(req, id, 'install');
});
})
.catch(function(error) {
- logger.debug(req.dcaeReqId, "Error: " + error + " for launch blueprint for deploymentId " + id);
+ logger.info(req.dcaeReqId, "Error: " + JSON.stringify(error) + " for launch blueprint for deploymentId " + id);
throw normalizeError(error);
});
};
@@ -166,10 +166,10 @@ exports.launchBlueprint = launchBlueprint;
// Finish installation launched with launchBlueprint
const finishInstallation = function(req, deploymentId, executionId) {
- logger.debug(req.dcaeReqId, "finishInstallation: " + deploymentId + " -- executionId: " + executionId);
+ logger.info(req.dcaeReqId, "finishInstallation: " + deploymentId + " -- executionId: " + executionId);
return cfy.getWorkflowResult(req, executionId)
.then (function(result){
- logger.debug(req.dcaeReqId, "deploymentId: " + deploymentId + " install workflow successfully executed");
+ logger.info(req.dcaeReqId, "deploymentId: " + deploymentId + " install workflow successfully executed");
// Retrieve the outputs from the deployment, as specified in the blueprint
return delay(DELAY_RETRIEVE_OUTPUTS).then(function() {
return cfy.getOutputs(req, deploymentId);
@@ -186,11 +186,11 @@ const finishInstallation = function(req, deploymentId, executionId) {
}
}
}
- logger.debug(req.dcaeReqId, "output retrieval result for " + deploymentId + ": " + JSON.stringify(result));
+ logger.info(req.dcaeReqId, "output retrieval result for " + deploymentId + ": " + JSON.stringify(result));
return annotateOutputs(req, deploymentId, rawOutputs);
})
.catch(function(err) {
- logger.debug(req.dcaeReqId, "Error finishing install workflow: " + err + " -- " + JSON.stringify(err));
+ logger.info(req.dcaeReqId, "Error finishing install workflow: " + err + " -- " + JSON.stringify(err));
throw normalizeError(err);
});
};
@@ -198,31 +198,31 @@ exports.finishInstallation = finishInstallation;
// Initiate uninstall workflow against a deployment, but don't wait for workflow to finish
const launchUninstall = function(req, deploymentId) {
- logger.debug(req.dcaeReqId, "deploymentId: " + deploymentId + " starting uninstall workflow");
+ logger.info(req.dcaeReqId, "deploymentId: " + deploymentId + " starting uninstall workflow");
// Run uninstall workflow
return cfy.initiateWorkflowExecution(req, deploymentId, 'uninstall')
.then(function(result) {
return result;
})
.catch(function(err) {
- logger.debug(req.dcaeReqId, "Error initiating uninstall workflow: " + err + " -- " + JSON.stringify(err));
+ logger.info(req.dcaeReqId, "Error initiating uninstall workflow: " + err + " -- " + JSON.stringify(err));
throw normalizeError(err);
});
};
exports.launchUninstall = launchUninstall;
const finishUninstall = function(req, deploymentId, executionId) {
- logger.debug(req.dcaeReqId, "finishUninstall: " + deploymentId + " -- executionId: " + executionId);
+ logger.info(req.dcaeReqId, "finishUninstall: " + deploymentId + " -- executionId: " + executionId);
return cfy.getWorkflowResult(req, executionId)
.then (function(result){
- logger.debug(req.dcaeReqId, "deploymentId: " + deploymentId + " uninstall workflow successfully executed");
+ logger.info(req.dcaeReqId, "deploymentId: " + deploymentId + " uninstall workflow successfully executed");
// Delete the deployment
return delay(DELAY_DELETE_DEPLOYMENT).then(function() {
return cfy.deleteDeployment(req, deploymentId);
});
})
.then (function(result){
- logger.debug(req.dcaeReqId, "deploymentId: " + deploymentId + " deployment deleted");
+ logger.info(req.dcaeReqId, "deploymentId: " + deploymentId + " deployment deleted");
// Delete the blueprint
return delay(DELAY_DELETE_BLUEPRINT).then(function() {
return cfy.deleteBlueprint(req, deploymentId);
@@ -264,7 +264,7 @@ exports.getExecutionStatus = function (req, exid) {
if (res.json.error) {
result.error = res.json.error;
}
- logger.debug(req.dcaeReqId, "getExecutionStatus result: " + JSON.stringify(result));
+ logger.info(req.dcaeReqId, "getExecutionStatus result: " + JSON.stringify(result));
return result;
})
.catch(function(error) {
@@ -294,7 +294,7 @@ exports.deployBlueprint = function(req, id, blueprint, inputs) {
// Go through the Cloudify API call sequence to do an undeployment of a previously deployed blueprint
exports.undeployDeployment = function(req, id) {
- logger.debug(req.dcaeReqId, "deploymentId: " + id + " starting uninstall workflow");
+ logger.info(req.dcaeReqId, "deploymentId: " + id + " starting uninstall workflow");
// Run launch uninstall workflow
return launchUninstall(req, id)