You can create a workflow by using the default workflows, existing workflows, or by writing the YAML code.

Procedure

  1. Log in to the VMware Telco Cloud Automation.
  2. Click Workflow Hub > Workflows > New Workflow.
  3. In the New Workflow window, enter the workflow name and description.
  4. To create a workflow by using the prebuilt workflows, do the following:
    1. Click Prebuilt Workflows.
    2. Drag and drop the required workflows into the canvas and connect them together.
  5. To create a workflow by using the existing user workflows, do the following:
    1. Click Workflows.
    2. 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.
  6. To create a workflow by writing the code in YAML or JSON, do the following:
    1. Click Code.
    2. 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
  7. Click Save.