Skip to content

Commit 6cf4cc3

Browse files
authored
ci: Fix benchmarks-matrix permissions, Remove ess region but add per-CSP profiles (elastic#17220)
* Fix benchmarks-matrix permissions * Remove benchmarks ess region but add per-CSP profiles
1 parent 8341b0a commit 6cf4cc3

14 files changed

+228
-98
lines changed

.github/workflows/benchmarks-matrix.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@ on:
77
description: 'JSON list of system profiles for benchmark, e.g. ["system-profiles/8GBx1zone.tfvars"]'
88
required: true
99
type: string
10-
essRegionsJSON:
11-
description: 'JSON list of ESS regions, e.g. ["gcp-us-west2", "azure-westus2", "us-west-2"]'
12-
required: true
13-
type: string
1410
runStandalone:
1511
description: 'Benchmark against standalone APM Server with Moxy'
1612
required: false
@@ -26,7 +22,7 @@ on:
2622
required: false
2723
type: string
2824
runOnStable:
29-
description: 'Benchmark on latest stable version'
25+
description: 'Benchmark on latest stable version instead of SNAPSHOT'
3026
required: false
3127
type: boolean
3228
default: false
@@ -48,18 +44,20 @@ permissions:
4844

4945
jobs:
5046
bench-matrix:
47+
permissions:
48+
contents: write
49+
id-token: write
5150
strategy:
5251
matrix:
5352
profile: ${{ fromJSON(inputs.profilesJSON)}}
54-
essRegion: ${{ fromJSON(inputs.essRegionsJSON)}}
5553
uses: ./.github/workflows/benchmarks.yml
5654
with:
5755
profile: ${{ matrix.profile }}
58-
essRegion: ${{ matrix.essRegion }}
5956
benchmarkAgents: ${{ inputs.benchmarkAgents }}
6057
runStandalone: ${{ inputs.runStandalone }}
6158
enableTailSampling: ${{ inputs.enableTailSampling }}
6259
tailSamplingStorageLimit: ${{ inputs.tailSamplingStorageLimit }}
6360
runOnStable: ${{ inputs.runOnStable }}
6461
benchmarkRun: ${{ inputs.benchmarkRun }}
6562
warmupTime: ${{ inputs.warmupTime }}
63+
secrets: inherit # Requires allowlist in https://github.com/elastic/oblt-infra/tree/main/conf/resources/repos/apm-server

.github/workflows/benchmarks.yml

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
name: benchmarks
22

3+
# Secret access requires allowlist in https://github.com/elastic/oblt-infra/tree/main/conf/resources/repos/apm-server
4+
35
on:
46
workflow_dispatch:
57
inputs:
@@ -23,13 +25,8 @@ on:
2325
required: false
2426
type: string
2527
# defaults set below (TFVARS_SOURCE)
26-
essRegion:
27-
description: 'ESS region of deployment, e.g. gcp-us-west2'
28-
required: false
29-
type: string
30-
# defaults set below
3128
runOnStable:
32-
description: 'Benchmark on latest stable version'
29+
description: 'Benchmark on latest stable version instead of SNAPSHOT'
3330
required: false
3431
type: boolean
3532
default: false
@@ -77,13 +74,8 @@ on:
7774
required: false
7875
type: string
7976
# defaults set below (TFVARS_SOURCE)
80-
essRegion:
81-
description: 'ESS region of deployment, e.g. gcp-us-west2'
82-
required: false
83-
type: string
84-
# defaults set below
8577
runOnStable:
86-
description: 'Benchmark on latest stable version'
78+
description: 'Benchmark on latest stable version instead of SNAPSHOT'
8779
required: false
8880
type: boolean
8981
default: false
@@ -138,7 +130,6 @@ jobs:
138130
TF_VAR_apm_server_tail_sampling_storage_limit: ${{ inputs.tailSamplingStorageLimit || '10GB' }} # set the default again otherwise schedules won't work
139131
RUN_STANDALONE: ${{ inputs.runStandalone || github.event.schedule=='0 0 1 * *' }}
140132
PGO_EXPORT: ${{ inputs.pgoExport || github.event.schedule=='0 0 1 * *' }}
141-
TF_VAR_ess_region: ${{ inputs.essRegion || 'gcp-us-west2' }}
142133
TFVARS_SOURCE: ${{ inputs.profile || 'system-profiles/8GBx1zone.tfvars' }} # set the default again otherwise schedules won't work
143134
TF_VAR_BUILD_ID: ${{ github.run_id }}
144135
TF_VAR_ENVIRONMENT: ci
@@ -181,15 +172,6 @@ jobs:
181172
echo "BENCHMARK_WARMUP_TIME=5m" >> "$GITHUB_ENV"
182173
fi
183174
184-
# Set deployment template for different CSPs
185-
if [ "${TF_VAR_ess_region:0:4}" = 'gcp-' ]; then
186-
echo "TF_VAR_deployment_template=gcp-cpu-optimized" >> "$GITHUB_ENV"
187-
elif [ "${TF_VAR_ess_region:0:6}" = 'azure-' ]; then
188-
echo "TF_VAR_deployment_template=azure-cpu-optimized" >> "$GITHUB_ENV"
189-
else
190-
echo "TF_VAR_deployment_template=aws-cpu-optimized-faster-warm" >> "$GITHUB_ENV"
191-
fi
192-
193175
# exclude BenchmarkTraces* from scheduled benchmarks
194176
- if: github.event_name == 'schedule'
195177
run: |
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
user_name = "USER"
2+
3+
# APM bench
4+
5+
worker_instance_type = "c6i.2xlarge"
6+
7+
# Elastic Cloud
8+
ess_region = "us-west-2"
9+
deployment_template = "aws-cpu-optimized-faster-warm"
10+
# The number of AZs the APM Server should span.
11+
apm_server_zone_count = 1
12+
# The Elasticsearch cluster node size.
13+
elasticsearch_size = "128g"
14+
# The number of AZs the Elasticsearch cluster should have.
15+
elasticsearch_zone_count = 2
16+
# APM server instance size
17+
apm_server_size = "16g"
18+
# Number of shards for the ES indices
19+
apm_shards = 4
20+
21+
# Standalone
22+
23+
standalone_apm_server_instance_size = "c6i.2xlarge"
24+
standalone_moxy_instance_size = "c6i.4xlarge"
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
user_name = "USER"
2+
3+
# APM bench
4+
5+
worker_instance_type = "c6i.2xlarge"
6+
7+
# Elastic Cloud
8+
ess_region = "azure-westus2"
9+
deployment_template = "azure-cpu-optimized"
10+
# The number of AZs the APM Server should span.
11+
apm_server_zone_count = 1
12+
# The Elasticsearch cluster node size.
13+
elasticsearch_size = "120g"
14+
# The number of AZs the Elasticsearch cluster should have.
15+
elasticsearch_zone_count = 2
16+
# APM server instance size
17+
apm_server_size = "15g"
18+
# Number of shards for the ES indices
19+
apm_shards = 4
20+
21+
# Standalone
22+
23+
standalone_apm_server_instance_size = "c6i.2xlarge"
24+
standalone_moxy_instance_size = "c6i.4xlarge"
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
user_name = "USER"
2+
3+
# APM bench
4+
5+
worker_instance_type = "c6i.2xlarge"
6+
7+
# Elastic Cloud
8+
ess_region = "gcp-us-west2"
9+
deployment_template = "gcp-cpu-optimized"
10+
# The number of AZs the APM Server should span.
11+
apm_server_zone_count = 1
12+
# The Elasticsearch cluster node size.
13+
elasticsearch_size = "128g"
14+
# The number of AZs the Elasticsearch cluster should have.
15+
elasticsearch_zone_count = 2
16+
# APM server instance size
17+
apm_server_size = "16g"
18+
# Number of shards for the ES indices
19+
apm_shards = 4
20+
21+
# Standalone
22+
23+
standalone_apm_server_instance_size = "c6i.2xlarge"
24+
standalone_moxy_instance_size = "c6i.4xlarge"

testing/benchmark/system-profiles/16GBx2zone.tfvars

Lines changed: 0 additions & 23 deletions
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
./16GBx2zone-gcp.tfvars
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
user_name = "USER"
2+
3+
# APM bench
4+
5+
worker_instance_type = "c6i.4xlarge"
6+
7+
# Elastic Cloud
8+
ess_region = "us-west-2"
9+
deployment_template = "aws-cpu-optimized-faster-warm"
10+
# The number of AZs the APM Server should span.
11+
apm_server_zone_count = 1
12+
# The Elasticsearch cluster node size.
13+
elasticsearch_size = "256g"
14+
# The number of AZs the Elasticsearch cluster should have.
15+
elasticsearch_zone_count = 2
16+
# Run the cluster with a dedicated master
17+
elasticsearch_dedicated_masters = true
18+
# APM server instance size
19+
apm_server_size = "32g"
20+
# Number of shards for the ES indices
21+
apm_shards = 4
22+
23+
# Standalone
24+
25+
standalone_apm_server_instance_size = "c6i.4xlarge"
26+
standalone_moxy_instance_size = "c6i.8xlarge"
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
user_name = "USER"
2+
3+
# APM bench
4+
5+
worker_instance_type = "c6i.4xlarge"
6+
7+
# Elastic Cloud
8+
ess_region = "azure-westus2"
9+
deployment_template = "azure-cpu-optimized"
10+
# The number of AZs the APM Server should span.
11+
apm_server_zone_count = 1
12+
# The Elasticsearch cluster node size.
13+
elasticsearch_size = "240g"
14+
# The number of AZs the Elasticsearch cluster should have.
15+
elasticsearch_zone_count = 2
16+
# Run the cluster with a dedicated master
17+
elasticsearch_dedicated_masters = true
18+
# APM server instance size
19+
apm_server_size = "30g"
20+
# Number of shards for the ES indices
21+
apm_shards = 4
22+
23+
# Standalone
24+
25+
standalone_apm_server_instance_size = "c6i.4xlarge"
26+
standalone_moxy_instance_size = "c6i.8xlarge"
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
user_name = "USER"
2+
3+
# APM bench
4+
5+
worker_instance_type = "c6i.4xlarge"
6+
7+
# Elastic Cloud
8+
ess_region = "gcp-us-west2"
9+
deployment_template = "gcp-cpu-optimized"
10+
# The number of AZs the APM Server should span.
11+
apm_server_zone_count = 1
12+
# The Elasticsearch cluster node size.
13+
elasticsearch_size = "256g"
14+
# The number of AZs the Elasticsearch cluster should have.
15+
elasticsearch_zone_count = 2
16+
# Run the cluster with a dedicated master
17+
elasticsearch_dedicated_masters = true
18+
# APM server instance size
19+
apm_server_size = "32g"
20+
# Number of shards for the ES indices
21+
apm_shards = 4
22+
23+
# Standalone
24+
25+
standalone_apm_server_instance_size = "c6i.4xlarge"
26+
standalone_moxy_instance_size = "c6i.8xlarge"

0 commit comments

Comments
 (0)