Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
carsonip committed Feb 7, 2025
1 parent 94ddf7b commit 2849f20
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
required: false
type: boolean
default: false
standaloneInstanceSize:
description: 'AWS instance size of standalone APM Server, e.g. c6i.2xlarge'
required: false
type: string
enableTailSampling:
description: 'Enable tail-based sampling on the APM server'
required: false
Expand Down Expand Up @@ -67,6 +71,7 @@ jobs:
TF_VAR_private_key: ./id_rsa_terraform
TF_VAR_public_key: ./id_rsa_terraform.pub
TF_VAR_run_standalone: ${{ inputs.runStandalone || github.event.schedule=='0 0 1 * *' }}
TF_VAR_standalone_apm_server_instance_size: ${{ inputs.standaloneInstanceSize || 'c6i.2xlarge' }}
TF_VAR_apm_server_tail_sampling: ${{ inputs.enableTailSampling || 'false' }} # set the default again otherwise schedules won't work
TF_VAR_apm_server_tail_sampling_storage_limit: ${{ inputs.tailSamplingStorageLimit || '10GB' }} # set the default again otherwise schedules won't work
RUN_STANDALONE: ${{ inputs.runStandalone || github.event.schedule=='0 0 1 * *' }}
Expand Down
1 change: 1 addition & 0 deletions testing/benchmark/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ module "standalone_apm_server" {
apm_instance_type = var.standalone_apm_server_instance_size
apm_volume_type = var.standalone_apm_server_volume_type
apm_volume_size = var.apm_server_tail_sampling ? coalesce(var.standalone_apm_server_volume_size, 60) : var.standalone_apm_server_volume_size
apm_iops = var.standalone_apm_server_iops
apm_server_bin_path = var.apm_server_bin_path
ea_managed = false

Expand Down
6 changes: 6 additions & 0 deletions testing/benchmark/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,12 @@ variable "standalone_apm_server_volume_size" {
description = "Optional volume size in GB to use for APM Server VM"
}

variable "standalone_apm_server_iops" {
default = null
type = number
description = "Optional disk IOPS in GB to use for APM Server VM"
}

## VPC Network settings

variable "vpc_cidr" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ resource "aws_instance" "apm" {
root_block_device {
volume_type = var.apm_volume_type
volume_size = var.apm_volume_size
iops = var.apm_iops
}

connection {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ variable "apm_volume_size" {
description = "Optional apm server volume size in GB override"
}

variable "apm_iops" {
default = null
type = number
description = "Optional apm server disk IOPS override"
}

variable "vpc_id" {
description = "VPC ID to provision the EC2 instance"
type = string
Expand Down

0 comments on commit 2849f20

Please sign in to comment.