This file contains hidden or 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 "azapi_resource" "prometheus" { | |
type = "microsoft.monitor/accounts@2021-06-03-preview" | |
name = "prometheus-workspace" | |
parent_id = "/resource/group/resource/id" # replace with ResourceId | |
location = "uksouth" | |
response_export_values = ["*"] | |
} |
This file contains hidden or 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
terraform { | |
required_providers { | |
azurerm = { | |
source = "hashicorp/azurerm" | |
version = "2.98.0" | |
} | |
azuread = { | |
source = "hashicorp/azuread" | |
version = "~> 2.18.0" |
This file contains hidden or 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
name: Update Dependabot config | |
on: push | |
jobs: | |
UpdateDependabot: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 |
This file contains hidden or 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
[CmdletBinding()] # indicate that this is advanced function (with additional params automatically added) | |
param ( | |
[string] $outputFile, | |
[string] $targetBranch = "main" # default = main | |
) | |
$files = Get-Childitem -Recurse | |
function packageEcosystem() { |
This file contains hidden or 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
[ | |
{ | |
"name": "POST new game result", | |
"operator": "le", | |
"values": { | |
"Failure Count":"3", | |
"Average Response Time": "175", | |
"Median Response Time": "175" | |
} | |
}, |
This file contains hidden or 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
function Compare-LocustStats { | |
[CmdletBinding()] # indicate that this is advanced function (with additional params automatically added) | |
param ( | |
$statsFile, | |
$baselineFile | |
) | |
if (Test-Path -Path "$baselineFile") { |
This file contains hidden or 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
parameters: | |
- name: customPrefix | |
type: string | |
default: "" | |
- name: statsPath # this directory path contains the locust *_stats.csv | |
type: string | |
steps: | |
- task: PowerShell@2 | |
displayName: "Analyze Results from the load and chaos tests" |
This file contains hidden or 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
parameters: | |
- name: terraformWorkingDirectory | |
type: string | |
default: '' | |
- name: customPrefix | |
type: string | |
- name: locustTargetUrl | |
type: string | |
default: '' | |
- name: numberOfWorkerNodes |
This file contains hidden or 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.locust_workers >= 1 ? 1 : 0 | |
name = "${local.prefix}-loadtest-master-ci" | |
location = azurerm_resource_group.deployment.location | |
resource_group_name = azurerm_resource_group.deployment.name | |
ip_address_type = "Public" | |
dns_name_label = "${local.prefix}-loadtest-master" | |
os_type = "Linux" | |
restart_policy = "Never" # Locust stops the master once the test is done. A restart_policy other than 'Never' and ACI will restart the container - and the test would run again from start. |
This file contains hidden or 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" |
NewerOlder