5 - Deploy Workflow
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:
- In your Application, click Workflows.
- In Workflows, click Add Workflow. The Workflow dialog appears.
- In Name, enter a name for the Deploy Workflow. For example, Deploy File.
- In Workflow Type, select Basic Deployment.
- In Environment, select the Environment you created earlier.
- In Service Infrastructure, select the Service Infrastructure you created earlier. When you are done, the dialog will look something like this:
- Click SUBMIT. The Deploy Work is created.
Let's look at the two commands created automatically.
The Select Nodes command simply selects the nodes in your Service Infrastructure.
You can specify specific hosts in the Host Name(s) field. Harness will add whatever hosts it can find using the criteria in your Service Infrastructure. For example, the following image shows how the criteria in your Service Infrastructure 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.
Now that both Workflows are set up, you can create the Artifact Build and Deploy Pipeline.