Use credentials with SSH workflows
- UpdatedFeb 1, 2024
- 2 minutes to read
- Washington DC
- Cloud Management
Add an SSH workflow with a credentials tag.
Before you begin
- Orchestration must be installed.
- Role required: Cloud designer or sn_cmp.cloud_admin
About this task
You can use an expression to get the Credential alias tag. See Create an SSH activity for instructions.
This example uses a VM provisioned on an AWS LDC datacenter.
Procedure
- In the Cloud User Portal, click Launch a Stack and then select the AWS VM.
- On the General Info tab, enter a unique and meaningful Stack Name, select AWS Datacenter for the Location, and then click Next.
-
On the Provision tab, enter a Virtual Server Node Name (the name can be the same as the stack name) and then click Submit.
The Cloud Activities page displays the VM that you requested and the status of your request. The Request Status section displays Deployment Successful when complete.
-
In your instance, view the workflow:
- Filter for workflow and then click Workflow Editor.
-
At the right of the workflow list window, filter in the Workflows tab and select the workflow to work with.
When the workflow appears in the canvas, you can see the Execute SSH Command activity pill in the workflow.
-
To edit the activities in the workflow, click the workflow properties icon (circle containing an i) and perform the following:
-
On the Custom tab at the right, go to Custom Activities > Global and double-click the activity to modify.
When the new activity opens in the Activity Designer, you can use the form to create a reusable orchestration activity.
-
To change from the Cloud Provisioning and Governance application to the Global application to edit the record, click "here" in the menu bar.
The Global application makes the activities available across the entire platform.
-
On the Custom tab at the right, go to Custom Activities > Global and double-click the activity to modify.
- Edit the fields in each of the following activity tabs.
- Click Continue to move to the next tab.
-
Follow the field description below to populate Activity details.
Activity tab Field descriptions General Unique name for the activity Inputs Values for the host, type, and whether the activity is mandatory Execution Command To form the command to be executed, drag inputs from the list to the form. Available inputs:- Host, which is the IP address of the VM to connect to.
- Command, which is any script or command single line to be run on the VM.
- Credential tag, which is the alias for the sys_id of the VM. You can either enter the credential tag manually or provide an expression in the resource script, which then auto-populates the Credential tag field. Script: $(Script:CMPVMUtils.getCredentialAlias[arg=$[parameter.resourceID}])
Output Name of each output, and the type of each output, for example, string Conditions Any required conditions. Conditions are optional