Sets up boilerplate for Azure performance testing infra. They have some really interesting high performance VMs that would be fitting for our use cases, including [ones with RDMA-enabled Infiniband networking cards](https://learn.microsoft.com/en-us/azure/virtual-machines/extensions/enable-infiniband) if we really want to go wild.
Performance Terraform environment
This directory contains terraform examples for spinning up VMs on Azure to be used for performance testing.
This is primarily meant to be used internal by the Firezone Team at this time,
but anyone can use the scripts here by changing the variables in a local
terraform.tfvars as needed.
Get started
-
Install Terraform if you haven't already.
-
Install the Azure CLI if you haven't already.
-
Clone this repository, and
cdto this directory. -
Run
terraform initto initialize the directory. -
Login to Azure using the Azure CLI with
az login. -
Find the subscription ID you want to use with
az account subscription list. If unsure, contact your Azure admin to avoid incurring billing charges under the wrong billing subscription. -
Generate a keypair to use for your own admin SSH access (must be RSA):
ssh-keygen -t rsa -b 4096 -f ~/.ssh/id_rsa.azure -
Obtain
terraform.tfvarsusing one of the following methods:-
Your team's shared credentials vault (e.g. 1password)
-
Your Azure admin
-
Or, generate it by following the instructions at https://developer.hashicorp.com/terraform/tutorials/azure-get-started/azure-build and populating a
terraform.tfvarsfile in this directory:# Azure billing subscription ID subscription_id = "SUBSCRIPTION-ID-FROM-PREVIOUS-STEP" # Obtain these variables by following the guide above arm_client_id = "AZURE-SERVICE-PRINCIPAL-CLIENT-ID" arm_client_secret = "AZURE-SERVICE-PRINCIPAL-CLIENT-SECRET" arm_tenant_id = "AZURE-SERVICE-PRINCIPAL-TENANT-ID" # All VMs need a public RSA SSH key specified for the admin user. Insert yours below. admin_ssh_public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC7..." # Set your own naming prefix to avoid clobbering others' resources naming_prefix = "CHANGEME"
-
-
Run
terraform applyto create the resources. -
Done! You can now SSH into your VM like so:
# Login using the name of resources used in Terraform config above az ssh vm \ --resource-group CHANGEME-rg-westus2 \ --vm-name CHANGEME-vm-westus2 \ --private-key-file ~/.ssh/id_rsa.azure \ --local-user adminuser