/opt/hostedtoolcache/terraform/0.12.24/x64/terraform init -backend-config=storage_account_name=terraform -backend-config=container_name=terraform-state -backend-config=key=seattle.tfstate -backend-config=resource_group_name=terraform -backend-config=arm_subscription_id=49de790a-c9d6-4a10-a2a1-1d5fcff06c86 -backend-config=arm_tenant_id=*** -backend-config=arm_client_id=*** -backend-config=arm_client_secret=***
2020/05/06 10:17:30 [INFO] Terraform version: 0.12.24
2020/05/06 10:17:30 [INFO] Go runtime version: go1.12.13
2020/05/06 10:17:30 [INFO] CLI args: []string{"/opt/hostedtoolcache/terraform/0.12.24/x64/terraform", "init", "-backend-config=storage_account_name=terraform", "-backend-config=container_name=terraform-state", "-backend-config=key=seattle.tfstate", "-backend-config=resource_group_name=terraform", "-backend-config=arm_subscription_id=49de790a-c9d6-4a10-a2a1-1d5fcff06c86", "-backend-config=arm_tenant_id=***", "-backend-config=arm_client_id=***", "-backend-config=arm_client_secret=***"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
GROUPNAME=cet-testing # Azure Resource Group | |
LOCATION=westeurope # Azure Location | |
LBFRONTEND=cet-testing-lb # Load Balancer Resource Name | |
VNETNAME=cet-testing-vnet # Virtual Network Name | |
# Create a Azure Resource Group | |
GROUP=`az group create --name $GROUPNAME --location $LOCATION --query name -o tsv` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Configure the Azure Stack Provider | |
# https://www.terraform.io/docs/providers/azurestack/index.html | |
provider "azurestack" { | |
# NOTE: we recommend pinning the version of the Provider which should be used in the Provider block | |
# https://github.com/terraform-providers/terraform-provider-azurestack/releases | |
version = "=0.9.0" | |
# Connection Details (can be provided via variables) | |
arm_endpoint = "" # https://management.local.azurestack.external (for ASDK) | |
client_id = "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "azurerm_container_group" "master" { | |
count = var.locustWorkerNodes >= 1 ? 1 : 0 | |
name = "${random_pet.deployment.id}-locust-master" | |
location = azurerm_resource_group.deployment.location | |
resource_group_name = azurerm_resource_group.deployment.name | |
ip_address_type = "Public" | |
dns_name_label = "${random_pet.deployment.id}-locust-master" | |
os_type = "Linux" | |
container { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "azurerm_container_group" "worker" { | |
count = var.locustWorkerNodes | |
name = "${random_pet.deployment.id}-locust-worker-${count.index}" | |
location = var.locustWorkerLocations[count.index % length(var.locustWorkerLocations)] | |
resource_group_name = azurerm_resource_group.deployment.name | |
ip_address_type = "Public" | |
os_type = "Linux" | |
container { | |
name = "${random_pet.deployment.id}-worker-${count.index}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
variable "location" { | |
description = "The Azure Region in which the master and the shared storage account will be provisioned." | |
type = string | |
default = "northeurope" | |
} | |
variable "environment" { | |
description = "Environment Resource Tag" | |
type = string | |
default = "dev" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "azurerm_linux_virtual_machine_scale_set" "deployment" { | |
name = "buildagent-vmss" | |
resource_group_name = azurerm_resource_group.deployment.name | |
location = azurerm_resource_group.deployment.location | |
sku = "Standard_F8s_v2" | |
instances = var.numberOfWorkerNodes # number of instances | |
overprovision = false | |
single_placement_group = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#cloud-config | |
apt: | |
preserve_sources_list: true | |
sources: | |
hashicorp.list: | |
source: "deb https://apt.releases.hashicorp.com focal main" | |
key: | | |
-----BEGIN PGP PUBLIC KEY BLOCK----- | |
mQINBF60TuYBEADLS1MP7XrMlRkn1Y54cb2UclUMH8HkIRfBrhk5Leo9kNZc/2QD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
prefix=tf71761 | |
location=eastus2 | |
# Create/Update an Azure Resource Group | |
resourceGroup=`az group create --name $prefix --location $location --query name -o tsv` | |
# Create/Update an Azure Virtual Network | |
virtualNetwork=`az network vnet create --name "$prefix-vnet" --resource-group $resourceGroup --address-prefixes 10.10.0.0/16 --query newVNet.name -o tsv` | |
# Create/Update an Azure Virtual Network Subnet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# see https://docs.locust.io/en/stable/configuration.html for details on individual Locust configuration options | |
environment_variables_common = { | |
"LOCUST_LOCUSTFILE" = "/home/locust/locust/${azurerm_storage_share_file.locustfile.name}" | |
} | |
# values which are needed when the Locust master schedules a load test | |
environment_variables_master = { | |
"LOCUST_HOST" = var.targeturl, | |
"LOCUST_MODE_MASTER" = "true" | |
"LOCUST_LOGFILE" = "/home/locust/locust/logs/${local.prefix}.log" |
OlderNewer