Skip to content

Commit fcbfae7

Browse files
committed
Switch from spot to on-demand instances
1 parent 35d9045 commit fcbfae7

File tree

9 files changed

+52
-8
lines changed

9 files changed

+52
-8
lines changed

examples/multi-runner-cppal/templates/runner-configs/ubuntu-bionic-arm64.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ redrive_build_queue:
1010
runner_config:
1111
create_service_linked_role_spot: true
1212
enable_ephemeral_runners: true
13-
instance_target_capacity_type: "spot"
13+
instance_target_capacity_type: "on-demand"
1414
enable_userdata: false
1515
runner_os: linux
1616
runner_architecture: arm64

examples/multi-runner-cppal/templates/runner-configs/ubuntu-bionic.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ redrive_build_queue:
1010
runner_config:
1111
create_service_linked_role_spot: true
1212
enable_ephemeral_runners: true
13-
instance_target_capacity_type: "spot"
13+
instance_target_capacity_type: "on-demand"
1414
enable_userdata: false
1515
runner_os: linux
1616
runner_architecture: x64

examples/multi-runner-cppal/templates/runner-configs/ubuntu-focal-arm64.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ redrive_build_queue:
1010
runner_config:
1111
create_service_linked_role_spot: true
1212
enable_ephemeral_runners: true
13-
instance_target_capacity_type: "spot"
13+
instance_target_capacity_type: "on-demand"
1414
enable_userdata: false
1515
runner_os: linux
1616
runner_architecture: arm64

examples/multi-runner-cppal/templates/runner-configs/ubuntu-focal.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ redrive_build_queue:
1010
runner_config:
1111
create_service_linked_role_spot: true
1212
enable_ephemeral_runners: true
13-
instance_target_capacity_type: "spot"
13+
instance_target_capacity_type: "on-demand"
1414
enable_userdata: false
1515
runner_os: linux
1616
runner_architecture: x64

examples/multi-runner-cppal/templates/runner-configs/ubuntu-jammy-arm64.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ redrive_build_queue:
1111
runner_config:
1212
create_service_linked_role_spot: true
1313
enable_ephemeral_runners: true
14-
instance_target_capacity_type: "spot"
14+
instance_target_capacity_type: "on-demand"
1515
enable_userdata: false
1616
runner_os: linux
1717
runner_architecture: arm64

examples/multi-runner-cppal/templates/runner-configs/ubuntu-jammy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ redrive_build_queue:
1111
runner_config:
1212
create_service_linked_role_spot: true
1313
enable_ephemeral_runners: true
14-
instance_target_capacity_type: "spot"
14+
instance_target_capacity_type: "on-demand"
1515
enable_userdata: false
1616
runner_os: linux
1717
runner_architecture: x64

examples/multi-runner-cppal/templates/runner-configs/windows-2019.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ delay_webhook_event: 0
77
runner_config:
88
create_service_linked_role_spot: true
99
enable_ephemeral_runners: true
10-
instance_target_capacity_type: "spot"
10+
instance_target_capacity_type: "on-demand"
1111
enable_userdata: false
1212
runner_os: windows
1313
runner_run_as: Administrator

examples/multi-runner-cppal/templates/runner-configs/windows-2022.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ delay_webhook_event: 0
88
runner_config:
99
create_service_linked_role_spot: true
1010
enable_ephemeral_runners: true
11-
instance_target_capacity_type: "spot"
11+
instance_target_capacity_type: "on-demand"
1212
enable_userdata: false
1313
runner_os: windows
1414
runner_run_as: Administrator

scripts/capacitytype.sh

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
#!/bin/bash
2+
3+
# instance_target_capacity_type: "spot"
4+
5+
# ubuntu-bionic-arm64-cppal
6+
# ubuntu-bionic-cppal
7+
# ubuntu-focal-arm64-cppal
8+
# ubuntu-focal-cppal
9+
# ubuntu-jammy-arm64-cppal
10+
# ubuntu-jammy-cppal
11+
# windows-2019-cppal
12+
# windows-2022-cppal
13+
14+
imagestobuild="
15+
ubuntu-bionic-arm64-cppal
16+
ubuntu-bionic-cppal
17+
ubuntu-focal-arm64-cppal
18+
ubuntu-focal-cppal
19+
ubuntu-jammy-arm64-cppal
20+
ubuntu-jammy-cppal
21+
windows-2019-cppal
22+
windows-2022-cppal
23+
"
24+
25+
timestamp=$(date +%Y%m%d_%H%M%S)
26+
cd ..
27+
mainfolder=$(pwd)
28+
29+
task(){
30+
set -xe
31+
thisimage=$1
32+
echo "Updating $thisimage"
33+
runnertemplatefolder="${mainfolder}/examples/multi-runner-cppal/templates/runner-configs"
34+
bckfolder="${runnertemplatefolder}/bcks"
35+
runnertemplate="${thisimage%-cppal}.yaml"
36+
# backup. perhaps not needed.
37+
cp ${runnertemplatefolder}/${runnertemplate} ${bckfolder}/${runnertemplate}.${timestamp}
38+
newline="instance_target_capacity_type: \"on-demand\""
39+
sed -i "s/instance_target_capacity_type:.*/$newline/g" ${runnertemplatefolder}/${runnertemplate}
40+
}
41+
42+
for image in $imagestobuild; do
43+
task "$image" &
44+
done

0 commit comments

Comments
 (0)