5 - Deploy Workflow

Updated 2 months ago by Michael Cretzman

The Deploy Workflow takes the artifact build you built in the Build Workflow by using the Service you created for the Artifact Source. Then the Deploy Workflow installs the build into the nodes in the Environment.

To set up the Deploy Workflow, do the following:

  1. In your Application, click Workflows.
  2. In Workflows, click Add Workflow. The Workflow dialog appears.
  3. In Name, enter a name for the Deploy Workflow. For example, Deploy File.
  4. In Workflow Type, select Basic Deployment.
  5. In Environment, select the Environment you created earlier.
  6. In Service, select the Service you created earlier.
  7. In Infrastructure Definition, select the Infrastructure Definition you created earlier. If the Infrastructure Definition does not appear, ensure that you added the Service to the Infrastructure Definition Scope to specific Services setting.

    When you are done, the dialog will look something like this:

Click SUBMIT. The Deploy Workflow is created.

Let's look at the two commands created automatically.

Select Nodes

The Select Nodes command simply selects the nodes in your Infrastructure Definition. 

You can specify specific hosts in the Host Name(s) field. Harness will add whatever hosts it can find using the criteria in your Infrastructure Definition. For example, the following image shows how the criteria in your Infrastructure Definition locates an EC2 instance, which is then displayed in Node Select:

In most cases, you can simply specify the number of instances you want:


The Install step installs the artifact onto the nodes you selected.

The Install step uses the artifact build number obtained in the Artifact Collection step and the Artifact Source in the Harness Service. Basically, the Install step looks in the Artifact Source for the build number obtained by Artifact Collection by using artifact metadata. The logs for the step display the artifact copy to the target nodes:

Begin file transfer harness7cbd2fa8dc9e2d9f634205b288811b27 to ip-10-0-0-87.ec2.internal:/tmp/AC3HcFy1QByir0UGIR09Zg

File successfully transferred

Connecting to ip-10-0-0-87.ec2.internal ....

Connection to ip-10-0-0-87.ec2.internal established

Next, the Install step runs the scripts in the Harness Service to install and run the artifact in its runtime environment. For details about common script steps, see Traditional Deployments Overview.

Now that both Workflows are set up, you can create the Artifact Build and Deploy Pipeline.

Next Step

How did we do?