AWS AMI Deployments Overview
This topic describes the concept of a Harness AWS AMI deployment by describing the high-level steps involved.
For a quick tutorial, see the AWS AMI Quickstart.
For detailed instructions on using AWS AMI in Harness, see the AWS AMI How-tos.
Before You Begin
Before learning about Harness AWS AMI deployments, you should have an understanding of Harness Key Concepts
What Does Harness Need Before You Start?
A Harness AWS AMI deployment requires the following:
- A working AWS AMI that Harness will use to create your instances.
- A working Auto Scaling Group (ASG) that Harness will use as a template for the ASG that Harness will create. The template ASG is referred to as the base ASG in Harness documentation.
- An AWS Instance or ECS cluster in which to install a Harness Delegate.
- IAM Role for the Harness Cloud Provider connection to AWS.
What Does Harness Deploy?
Harness takes the AMI and base ASG you provide, and creates a new ASG and populates it with instances using the AMI. You can specify the desired, min, and max instances for the new ASG, resize strategy, and other settings in Harness.
What Does a Harness AWS AMI Deployment Involve?
The following list describes the major steps of a Harness AWS AMI deployment:
Description and Links
Install the Harness Shell Script or ECS Delegate in your target EC2 subnet.
Typically, the Shell Script or ECS Delegate is installed in the same subnet where you will deploy your application(s).
This is the same subnet as your base ASG, using the same security group and the same key pair.
Add an AWS Cloud Provider.
An AWS Cloud Provider is a connection to your AWS account.
The AWS Cloud Provider is used to obtain the AMI Harness will use to create new instances, the base ASG Harness will uses a template, and to deploy the new instances.
Create the Harness Application for your AMI CD Pipeline.
The Harness Application represents a group of microservices, their deployment pipelines, and all the building blocks for those pipelines. Harness represents your release process using a logical group of one or more entities: Services, Environments, Workflows, Pipelines, Triggers, and Infrastructure Provisioners. Applications organize all of the entities and configurations in Harness CD.
Create the Harness Service using the Amazon Machine Image Deployment Type.
Add an AMI as an artifact in a Harness Service, add any AMI User Data, and any config variables and files.
Create the Harness Environment and Infrastructure Definition for your deployment, and any overrides.
Using the Harness AWS Cloud Provider you set up, you can select the base ASG and target environment for your deployment.
You can also override any Service settings, such as User Data values. This enables you to use a single Service with multiple Harness Environments.
Create the Basic, Canary, and Blue/Green deployments in Harness Workflows.
The Workflow deploys the new ASG and AMI instances defined in the Harness Service to the environment in the Harness Infrastructure Definition.
Deploy the Workflow.
Once you've deployed a Workflow, learn how to improve your AWS AMI CD:
Read the following topics to build on what you've learned: