orchestrator-setup/resources/workflows/ccp_demo/deploy-methods.json

55 lines
1.6 KiB
JSON

{
"ownerApp" : "Cloud Computation Platform",
"name" : "ccp-deploy-method",
"createBy" : "Marco Lettere",
"description": "Common workflow for cleaning an instance",
"version" : 1,
"ownerEmail" : "m.lettere@gmail.com",
"inputParameters" : ["method", "method-endpoint", "instance", "instance-endpoint"],
"tasks" : [
{
"name" : "pyrest",
"taskReferenceName" : "update-instance-status-deploying",
"type" : "SIMPLE",
"inputParameters" : {
"url" : "${workflow.input.instance-endpoint}/${workflow.input.instance}/status",
"method" : "PUT",
"body" : { "status" : "DEPLOYING"}
}
},
{
"name" : "pyrest",
"taskReferenceName" : "fetch-method",
"type" : "SIMPLE",
"accept" : "application/json",
"inputParameters" : {
"url" : "${workflow.input.method-endpoint}/${workflow.input.method}",
"method" : "GET",
"headers" : {
"Accept" : "application/json"
}
}
},
{
"name" : "pyexec",
"taskReferenceName" : "deploy-method-instance",
"type" : "SIMPLE",
"inputParameters" : {
"operation" : "Ansible",
"playbook" : "${fetch-method.output.body.deployscript}",
"extra_vars" : "${workflow.input}"
}
},
{
"name" : "pyrest",
"taskReferenceName" : "update-instance-status-deployed",
"type" : "SIMPLE",
"inputParameters" : {
"url" : "${workflow.input.instance-endpoint}/${workflow.input.instance}/status",
"method" : "PUT",
"body" : { "status" : "DEPLOYED"}
}
}
]
}