Currently, this feature is behind the Feature Flag
AZURE_VMSS. Contact Harness Support to enable the feature. The target infrastructure for an Azure virtual machine scale set (VMSS) deployment is a base VMSS template you select in the Harness Infrastructure Definition.
During deployment, this template is used along with the image definition you selected in Add Your Azure VM Image for Deployment to create a new VMSS.
You select the VMSS to use as a template and provide the username and password/key to connect to the new VMs.
Once you have set up the target infrastructure, you select it when you set up your Harness Workflow, described in Create an Azure VMSS Basic Deployment, Create an Azure VMSS Canary Deployment, and Create an Azure VMSS Blue/Green Deployment.
In this topic:
- Before You Begin
- Supported Platforms and Technologies
- Step 1: Create an Environment
- Step 2: Create an Infrastructure Definition
- Option 1: Scope to Specific Services
- Next Steps
- Configure As Code
Before You Begin
- Azure Virtual Machine Scale Set Deployments Overview
- Add Your Azure VM Image for Deployment
- Connect to Azure for VMSS Deployments
- Harness Delegate Overview
- Harness Key Concepts
Supported Platforms and Technologies
Step 1: Create an Environment
Environments represent one or more of your deployment infrastructures, such as Dev, QA, Stage, Production, etc. Use Environments to organize your target cluster Infrastructure Definitions.
- In your Harness Application, click Environments. The Environments page appears.
- Click Add Environment. The Environment settings appear.
- In Name, enter a name that describes this group of target clusters, such as QA, Stage, Prod, etc.
- In Environment Type, select Non-Production or Production.
- Click SUBMIT. The new Environment page appears.
- Click Add Infrastructure Definition. The following section provide information on setting up different Add Infrastructure Definitions for different target clusters.
Step 2: Create an Infrastructure Definition
- In your Environment, click Add Infrastructure Definition.
- Enter the following settings.
Enter a name for the Infrastructure Definition. You will select this name when you set up the Infrastructure Definition in your Workflow.
Cloud Provider Type
Select Microsoft Azure.
Select Azure Virtual Machine Scale Set.
Select the Azure Cloud Provider you set up in Connect to Your Azure VMSS. The Cloud Provider is used to pull the Azure information you need to define the VMSS Harness will create.
Select the subscription to use for the new VMSS.
Select the resource group to use for the new VMSS.
Virtual Machine Scale Sets
Select the base VMSS to use as a template when the Harness Workflow creates a new VMSS using the image definition you selected in Add Your Azure VM Image for Deployment.
This is the username for connecting to the new VMs Harness will create. For example, connections over SSH or RDP. The Username setting is populated using the username taken from the base VMSS you selected. You can use the same username or replace it.
The username may contain letters, numbers, hyphens, and underscores. It may not start with a hyphen or number. Usernames must not include reserved words. The value must be between 1 and 64 characters long (Linux) or 20 characters (Windows).
Select Password or SSH Public Key.
For Password, enter the password for the new VMs Harness will create.
For SSH Public Key, select an SSH key that you have added to Harness. See Add SSH Keys.
Creating the SSH key in Azure is covered in Quick steps: Create and use an SSH public-private key pair for Linux VMs in Azure from Azure.
Option 1: Scope to Specific Services
The Scope to specific Services setting in the Infrastructure Definition enables you to scope this Infrastructure Definition to specific Harness Services.
- Create an Azure VMSS Basic Deployment
- Create an Azure VMSS Canary Deployment
- Create an Azure VMSS Blue/Green Deployment
Configure As Code
To see how to configure the settings in this topic using YAML, configure the settings in the UI first, and then click the YAML editor button.