Skip to content

Commit f1c0157

Browse files
committed
configurable server size and location
1 parent b025aa6 commit f1c0157

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

.github/workflows/actions/create-server-with-retry/action.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ inputs:
77
server_type:
88
description: 'Type of server to create'
99
required: true
10+
region:
11+
description: 'Region to create the server in'
12+
required: false
13+
default: 'fsn1'
1014
max_retries:
1115
description: 'Maximum number of retry attempts'
1216
required: false
@@ -25,12 +29,13 @@ runs:
2529
SERVER_NAME="${{ inputs.server_name }}"
2630
SERVER_TYPE="${{ inputs.server_type }}"
2731
MAX_RETRIES="${{ inputs.max_retries }}"
32+
SERVER_LOCATION="${{ inputs.region }}"
2833
RETRY_COUNT=0
2934
3035
while [ $RETRY_COUNT -lt $MAX_RETRIES ]; do
3136
echo "Creating server $SERVER_NAME (attempt $((RETRY_COUNT + 1))/$MAX_RETRIES)..."
3237
33-
if SERVER_NAME=$SERVER_NAME SERVER_TYPE=$SERVER_TYPE bash -x "tools/hetzner/create_and_install.sh"; then
38+
if SERVER_NAME=$SERVER_NAME SERVER_TYPE=$SERVER_TYPE SERVER_LOCATION=$SERVER_LOCATION bash -x "tools/hetzner/create_and_install.sh"; then
3439
echo "Successfully created server $SERVER_NAME"
3540
echo "success=true" >> $GITHUB_OUTPUT
3641
exit 0

.github/workflows/manual-benchmarks-cascade.yaml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,15 @@ on:
3434
machines_info:
3535
description: "Internal use, JSON array of machine pairs to use when machines_per_bench is false, e.g. '[{\"server_name\":\"server-0\",\"client_name\":\"client-0\"},{\"server_name\":\"server-1\",\"client_name\":\"client-1\"}]'"
3636
default: "[]"
37+
region:
38+
description: "Hetzner region to run the benchmarks in"
39+
default: "fsn1"
40+
server_machine_type:
41+
description: "Hetzner server machine type to run the benchmarks in"
42+
default: "cpx41"
43+
client_machine_type:
44+
description: "Hetzner server machine type to run the benchmarks in"
45+
default: "cpx31"
3746

3847
env:
3948
# Common environment variables
@@ -223,15 +232,17 @@ jobs:
223232
uses: ./.github/workflows/actions/create-server-with-retry
224233
with:
225234
server_name: ${{ steps.extract_names.outputs.server_name }}
226-
server_type: cpx41
235+
server_type: ${{ inputs.server_machine_type }}
236+
region: ${{ inputs.region }}
227237
max_retries: 5
228238

229239
- name: Create Client
230240
if: ${{ inputs.machines_per_bench == true || inputs.current_batch == 0 }}
231241
uses: ./.github/workflows/actions/create-server-with-retry
232242
with:
233243
server_name: ${{ steps.extract_names.outputs.client_name }}
234-
server_type: cpx31
244+
server_type: ${{ inputs.client_machine_type }}
245+
region: ${{ inputs.region }}
235246
max_retries: 5
236247
runBenchmarks:
237248
name: Run Benchmark ${{ matrix.config.index }}

0 commit comments

Comments
 (0)