You can create a workflow by using the default workflows, existing workflows, or by writing the YAML code.
Procedure
- Log in to the VMware Telco Cloud Automation.
- Click Workflow Hub > Workflows > New Workflow.
- In the New Workflow window, enter the workflow name and description.
- To create a workflow by using the prebuilt workflows, do the following:
- Click Pre-built Workflows.
- Drag and drop the required workflows into the canvas and connect them together.
- To create a workflow by using the existing user workflows, do the following:
- Click User.
- Drag and drop the required workflows into the canvas and connect them together.
Note: To create a workflow from the existing workflows, you can also clone the required workflow. - To create a workflow by writing the code in YAML or JSON, do the following:
- Click Code.
- Write the YAML or JSON code for the workflow that you want to create.
Following is a sample YAML code to upgrade your nodepools:
id: upgrade-set-of-nodepools version: 0.1.0 specVersion: 0.7.0 name: Upgrade Set of Nodepools description: Workflow to upgrade set of nodepools start: Initialize functions: - name: failWorkflow operation: failWorkflow type: custom states: - name: Initialize type: switch dataConditions: - name: invalid_payload condition: '${ .nodepoolsUpgrade==null }' transition: ERROR_INVALID_PAYLOAD defaultCondition: transition: Upgrade_Nodepools - name: Upgrade_Nodepools type: foreach inputCollection: "${ [.timeouts as $timeouts | .nodepoolsUpgrade[] | .timeouts=$timeouts] }" iterationParam: nodepool outputCollection: "${ .results }" actions: - subFlowRef: workflowId: upgrade-nodepool version: 0.1.0 actionDataFilter: fromStateData: '${ .nodepool }' transition: NODEPOOLS_UPGRADE_SUCCEEDED - name: ERROR_INVALID_PAYLOAD type: operation actions: - functionRef: refName: failWorkflow arguments: errorMessage: "invalid payload: nodepoolsUpgrade is required field." end: true - name: NODEPOOLS_UPGRADE_SUCCEEDED type: operation end: true
- Click Save.