Automation Pipelines can integrate with VMware Aria Automation Orchestrator (Orchestrator) to extend its capability by running Orchestrator workflows. VMware Aria Automation Orchestrator includes many predefined workflows that can integrate with third-party tools. These workflows help to automate and manage your DevOps processes, automate bulk operations, and more.
For example, you can use a workflow in an Orchestrator task in your pipeline to enable a user, remove a user, move VMs, integrate with test frameworks to test your code as the pipeline runs, and much more. You can browse examples of code for VMware Aria Automation Orchestrator workflows in code.vmware.com.
With a VMware Aria Automation Orchestrator workflow, your pipeline can run an action as it builds, tests, and deploys your application. You can include predefined workflows in your pipeline, or you can create and use custom workflows. Each workflow includes inputs, tasks, and outputs.
To run an Orchestrator workflow in your pipeline, the workflow must appear in the list of available workflows in the Orchestrator task that you include in your pipeline.
Before the workflow can appear in the Orchestrator task in your pipeline, an administrator must perform the following steps in VMware Aria Automation Orchestrator:
- Apply the PIPELINES tag to the Orchestrator workflow.
- Mark the Orchestrator workflow as global.
As an on-premises endpoint, VMware Aria Automation Orchestrator must communicate with Automation Pipelines through a cloud proxy.
Prerequisites
- Verify that as an administrator you can access an on-premises instance of VMware Aria Automation Orchestrator. For help, see your own administrator and the vRealize Orchestrator documentation.
- Verify that you are a member of a project in Automation Pipelines. If you are not, ask a Automation Pipelines administrator to add you as a member of a project. See How do I add a project in Automation Pipelines.
- In VMware Aria Automation Assembler, create a cloud proxy that enables the communication between Automation Pipelines and the on-premises instance of VMware Aria Automation Orchestrator. For an example of how to create a cloud proxy, see Setting up Automation Pipelines to model my release process.
- Understand the importance of using a cloud proxy for an on-premises endpoint. See What are Endpoints in Automation Pipelines.
- In Automation Pipelines, create a pipeline and add a stage.
Procedure
- As an administrator, prepare a VMware Aria Automation Orchestrator workflow for your pipeline to run.
- In VMware Aria Automation Orchestrator, find the workflow that you need to use in your pipeline, such as a workflow to enable a user.
If you need a workflow that does not exist, you can create it.
- In the search bar, enter Tag workflow to find the workflow named Tag workflow.
- On the card named Tag workflow, click Run, which displays the configuration area.
- In the Tagged workflow text area, enter the name of the workflow to use in your Automation Pipelines pipeline, then select it from the list.
- In the Tag and Value text areas, enter PIPELINES in capital letters.
- Click the check box named Global tag.
- Click Run, which attaches the tag named PIPELINES to the workflow that you need to select in your Automation Pipelines pipeline.
- In the navigation pane, click Workflows and confirm that the tag named PIPELINES appears on the workflow card that your pipeline will run.
After you log in to Automation Pipelines, and add an Orchestrator task to your pipeline, the tagged workflow appears in the workflow list.
- In VMware Aria Automation Orchestrator, find the workflow that you need to use in your pipeline, such as a workflow to enable a user.
- In Automation Pipelines, create an endpoint for your VMware Aria Automation Orchestrator instance.
- Click .
- Select a project.
- Enter a relevant name.
- Enter the URL of the VMware Aria Automation Orchestrator endpoint.
Use this format: https://orchestrator-appliance.yourdomain.local:8281Do not use this format: https://orchestrator-appliance.yourdomain.local:8281/vco/apiThe URL for a VMware Aria Automation Orchestrator instance that is embedded in the VMware Aria Automation appliance, is the FQDN for the appliance without a port. For example: https://automation-appliance.yourdomain.local/vcoFor external VMware Aria Automation Orchestrator appliances starting with VMware Aria Automation 8.x, the FQDN for the appliance is https://orchestrator-appliance.yourdomain.localFor external VMware Aria Automation Orchestrator appliances included with VMware Aria Automation 7.x, the FQDN for the appliance is https://orchestrator-appliance.yourdomain.local:8281/vcoIf a problem occurs when you add the endpoint, you might need to import a YAML configuration with a SHA-256 certificate fingerprint with the colons removed. For example, B0:01:A2:72... becomes B001A272.... The sample YAML code resembles:
``` --- project: Demo kind: ENDPOINT name: external-orchestrator description: '' type: orchestrator properties: url: https://yourVROhost.yourdomain.local username: yourusername password: yourpassword fingerprint: <your_fingerprint> ```
- Select a cloud proxy.
- Click Accept Certificate in case the URL that you entered needs a certificate.
- If the VMware Aria Automation Orchestrator endpoint is version 8.0 to 8.7, you can select Basic Auth or Token for the Authentication type. If the VMware Aria Automation Orchestrator endpoint is version is 8.8 or later, you must select Token for the Authentication type.
Note: If the VMware Aria Automation Orchestrator endpoint is version 8.8 or later, do not select Basic Auth. Basic Auth is not supported and endpoint creation will fail.
- If you select Basic Auth, enter the user name and password for the VMware Aria Automation Orchestrator server.
If you're using a non-local user for authentication, you must omit the domain part of the user name. For example, to authenticate with [email protected] you must enter svc_vro in the Username text area.
- If you select Token for the authentication type, generate and paste the Private Token.
The VMware Cloud Services API token authenticates you for external API connections with Automation Pipelines. To obtain the API token:
- Sign in to VMware Aria Automation.
- Sign in to
- Click the drop-down arrow by your name.
- Click My Account.
- Click API Tokens.
- Click Generate a New API Token.
- Enter a Token Name.
- Under Organization Roles, click to expand All Organization Roles and select Organization Owner.
- Under Service Roles, click to expand Pipelines Administrator. and select
- Click Generate.
The Token Generated window displays a token with the name that you specified and the name of your organization.
- Click the COPY icon.
Clicking COPY ensures that you capture the exact string and is more reliable than using your pointer to copy the string.
- If you select Basic Auth, enter the user name and password for the VMware Aria Automation Orchestrator server.
- Prepare your pipeline to run the Orchestrator task.
- Add an Orchestrator task to your pipeline stage.
- Enter a relevant name.
- In the Workflow Properties area, select the VMware Aria Automation Orchestrator endpoint.
- Select the workflow that you tagged as PIPELINES in VMware Aria Automation Orchestrator.
If you select a custom workflow that you created, you might need to enter the input parameter values.
- For Execute task, click On condition.
- Enter the conditions that apply when the pipeline runs.
When to run pipeline... Select conditions... On Condition Runs the pipeline task only if the defined condition is evaluated as true. If the condition is false, the task is skipped.
The Orchestrator task allows you to include a boolean expression, which uses the following operands and operators.
- Pipeline variables such as ${pipeline.variableName}. Only use curly brackets when entering variables.
- Task output variables such as ${Stage1.task1.machines[0].value.hostIp[0]}.
- Default pipeline binding variables such as ${releasePipelineName}.
- Case insensitive Boolean values such as, true, false, 'true', 'false'.
- Integer or decimal values without quotation marks.
- String values used with single or double quotation marks such as "test", 'test'.
- String and Numeric types of values such as == Equals and != Not Equals.
- Relational operators such as >, >=, <, and <=.
- Boolean logic such as && and ||.
- Arithmetic operators such as +, -, *, and /.
- Nested expressions using round brackets.
- Strings that include the literal value ABCD are evaluated as false, and the task is skipped.
- Unary operators are not supported.
An example condition might be ${Stage1.task1.output} == “Passed” || ${pipeline.variableName} == 39
Always If you select Always, the pipeline runs the task without conditions. - Enter a message for the greeting.
- Click Validate Task, and correct any errors that occur.
- Save, enable, and run your pipeline.
- After the pipeline runs, examine the results.
- Click Executions.
- Click the pipeline.
- Click the task.
- Examine the results, input value, and properties.
You can identify the workflow execution ID, who responded to the task and when, and any comments they included.
Results
Congratulations! You tagged a VMware Aria Automation Orchestrator workflow for use in Automation Pipelines, and added an Orchestrator task in your Automation Pipelines pipeline so that it runs a workflow that automates an action in your DevOps environment.
Example: Orchestrator task output format
The output format for an Orchestrator task resembles this example.
[{ "name": "result", "type": "STRING", "description": "Result of workflow run.", "value": "" }, { "name": "message", "type": "STRING", "description": "Message", "value": "" }]
What to do next
Continue to include Orchestrator workflow tasks in your pipelines so that you can automate tasks in your development, test, and production environments.