Skip to content

Commit

Permalink
use x86_64 for standalone apm-server benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
1pkg committed Sep 13, 2024
1 parent b81bf55 commit 3fc850b
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ jobs:
if: ${{ inputs.runStandalone }}
run: |
make moxy
cd ../.. && make build/apm-server-linux-arm64
cd ../.. && make build/apm-server-linux-amd64 && mv build/apm-server-linux-amd64 build/apm-server
- name: Override docker committed version
if: ${{ ! inputs.runOnStable && ! inputs.runStandalone}}
Expand Down
2 changes: 1 addition & 1 deletion testing/benchmark/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ module "standalone_apm_server" {
count = var.run_standalone ? 1 : 0
source = "../infra/terraform/modules/standalone_apm_server"

aws_os = "amzn2-ami-kernel-5.10"
aws_os = "amzn2-ami-hvm-*-x86_64-ebs"
ea_managed = false
apm_server_bin_path = var.apm_server_bin_path
apm_instance_type = var.worker_instance_type
Expand Down
2 changes: 1 addition & 1 deletion testing/benchmark/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ variable "drop_pipeline" {
}

variable "apm_server_bin_path" {
default = "../../build/apm-server-linux-amd64"
default = "../../build"
type = string
description = "Optional path to the apm-server binary"
}
Expand Down
2 changes: 1 addition & 1 deletion testing/infra/terraform/modules/moxy/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ resource "aws_instance" "moxy" {
}

provisioner "file" {
source = var.moxy_bin_path
source = "${var.moxy_bin_path}/moxy"
destination = local.bin_path
}
provisioner "remote-exec" {
Expand Down
2 changes: 1 addition & 1 deletion testing/infra/terraform/modules/moxy/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
output "moxy_url" {
value = "${aws_instance.moxy.public_ip}:${local.moxy_port}"
value = "http://${aws_instance.moxy.public_ip}:${local.moxy_port}"
description = "The Moxy Server URL"
}
16 changes: 15 additions & 1 deletion testing/infra/terraform/modules/standalone_apm_server/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ locals {
"debian-10-arm64" = "136693071363" # debian
"debian-11-arm64" = "136693071363" # debian
"amzn2-ami-kernel-5.10" = "137112412989" # amazon
"amzn2-ami-hvm-*-x86_64-ebs" = "137112412989" #amazon
"al2023-ami-2023" = "137112412989" # amazon
"RHEL-7" = "309956199498" # Red Hat
"RHEL-8" = "309956199498" # Red Hat
Expand All @@ -18,6 +19,7 @@ locals {
"debian-10-arm64" = "t4g.nano"
"debian-11-arm64" = "t4g.nano"
"amzn2-ami-kernel-5.10" = "t4g.nano"
"amzn2-ami-hvm-*-x86_64-ebs" = "t4g.nano"
"al2023-ami-2023" = "t4g.nano"
"RHEL-7" = "t3a.micro" # RHEL-7 doesn't support arm
"RHEL-8" = "t4g.micro" # RHEL doesn't support nano instances
Expand All @@ -30,6 +32,7 @@ locals {
"debian-10-arm64" = "arm64"
"debian-11-arm64" = "arm64"
"amzn2-ami-kernel-5.10" = "arm64"
"amzn2-ami-hvm-*-x86_64-ebs" = "x86_64"
"al2023-ami-2023" = "arm64"
"RHEL-7" = "x86_64" # RHEL-7 doesn't support arm
"RHEL-8" = "arm64"
Expand Down Expand Up @@ -66,6 +69,7 @@ locals {
"debian-10-arm64" = "admin"
"debian-11-arm64" = "admin"
"amzn2-ami-kernel-5.10" = "ec2-user"
"amzn2-ami-hvm-*-x86_64-ebs" = "ec2-user"
"al2023-ami-2023" = "ec2-user"
"RHEL-7" = "ec2-user"
"RHEL-8" = "ec2-user"
Expand Down Expand Up @@ -103,6 +107,16 @@ data "aws_ami" "os" {
owners = [local.image_owners[var.aws_os]]
}

data "aws_ami" "worker_ami" {
owners = ["amazon"]
most_recent = true

filter {
name = "name"
values = ["amzn2-ami-hvm-*-x86_64-ebs"]
}
}

resource "aws_security_group" "main" {
egress = [
{
Expand Down Expand Up @@ -156,7 +170,7 @@ resource "aws_instance" "apm" {
}

provisioner "file" {
source = var.apm_server_bin_path
source = "${var.apm_server_bin_path}/apm-server"
destination = local.bin_path
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ output "apm_secret_token" {
}

output "apm_server_url" {
value = "${aws_instance.apm.public_ip}:${local.apm_port}"
value = "http://${aws_instance.apm.public_ip}:${local.apm_port}"
description = "The APM Server URL"
}

0 comments on commit 3fc850b

Please sign in to comment.