Execution plans are a description of what should be executed on Murano Agent at VM to perform some deployment step.
Execution plans is a JSON document that has 3 keys:
Commands array - list of functions to be executed. Each function has a "Name" property and "Arguments" dictionary which maps function argument names to parameter values.
Scripts - list of PowerShell script file names to be included into execution plans. The scripts contain function implementations that can be referenced in Command array.Script files need to be located in data/templates/agent/scripts directory.
RebootOnCompletion - 0 = do not reboot, 1 = reboot only upon successful plan execution, 2 = reboot always. Murano Agent send execution result after system reboot.
As for other Murano JSON templates keys and values starting with $ sign will be replaced with a values provided in Workflow.
Example of execution plan:
{ "Scripts": [ "ImportCoreFunctions.ps1", "DeployWebApp.ps1" ], "Commands": [ { "Name": "Deploy-WebAppFromGit", "Arguments": { "URL": "$repository" } } ], "RebootOnCompletion": 0 }
Result of execution plan has the following format:
{ "IsException": false, "Result": [ { "IsException": false, "Result": [ "result value" ] } ] }
There are result entry for each source command. Each result can have many values - all the outputs of PowerShell function. If IsException is set to true then Result is an array in form of ["Exception type", "Error message"]
. IsException at command level means exception during function invocation while root IsException means that execution plan cannot be even started (corrupted data, PowerShell engine failure etc.)