Skip to content

Commit

Permalink
chore(ci): spot capacity and reaping (#6561)
Browse files Browse the repository at this point in the history
  • Loading branch information
ludamad committed May 21, 2024
1 parent 797115b commit 8c639b5
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/ensure-builder/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ runs:
echo "spot_strategy=BestEffort" >> $GITHUB_OUTPUT
echo "runner_label=$USERNAME-$runner_type" >> $GITHUB_OUTPUT
if [[ $TYPE == builder-x86 ]]; then
# 128-core x86 instance types with least evictions
# 128-core x86 instance types, aws chooses for us based on capacity
echo "instance_type=i4i.32xlarge m6a.32xlarge m6i.32xlarge m6id.32xlarge m6idn.32xlarge m6in.32xlarge m7a.32xlarge r6a.32xlarge r6i.32xlarge r6id.32xlarge r6in.32xlarge r7iz.32xlarge" >> $GITHUB_OUTPUT
echo "ami_id=ami-04d8422a9ba4de80f" >> $GITHUB_OUTPUT
echo "ebs_cache_size=256" >> $GITHUB_OUTPUT
Expand Down
2 changes: 1 addition & 1 deletion .github/ensure-tester/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ runs:
ec2_subnet_id: subnet-4cfabd25
ec2_security_group_id: sg-0ccd4e5df0dcca0c9
ec2_key_name: "build-instance"
ec2_instance_tags: '[{"Key": "Keep-Alive", "Value": "true"}]'
ec2_instance_tags: '[]'

# Set up a context for this run
- name: Copy Repo to Tester
Expand Down
2 changes: 1 addition & 1 deletion .github/spot-runner-action/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ class Ec2Instance {
LaunchTemplateConfigs: [fleetLaunchConfig],
ClientToken: clientToken,
SpotOptions: {
AllocationStrategy: "capacity-optimized",
AllocationStrategy: "price-capacity-optimized",
},
TargetCapacitySpecification: {
TotalTargetCapacity: 1,
Expand Down
2 changes: 1 addition & 1 deletion .github/spot-runner-action/src/ec2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ export class Ec2Instance {
LaunchTemplateConfigs: [fleetLaunchConfig],
ClientToken: clientToken,
SpotOptions: {
AllocationStrategy: "capacity-optimized",
AllocationStrategy: "price-capacity-optimized",
},
TargetCapacitySpecification: {
TotalTargetCapacity: 1,
Expand Down
2 changes: 1 addition & 1 deletion scripts/run_on_builder
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ set -eu
# Enter the repo root
cd "$(dirname "$0")/.."

ssh -o ControlMaster=auto -o ControlPath=~/.ssh_mux_%h_%p_%r -o ControlPersist=10m -o TCPKeepAlive=no -o ServerAliveCountMax=20 -o ServerAliveInterval=30 -o StrictHostKeyChecking=no -i "$BUILDER_SPOT_KEY" ubuntu@"$BUILDER_SPOT_IP" "$@"
ssh -o ControlMaster=auto -o ControlPath=~/.ssh_mux_%h_%p_%r -o ControlPersist=30s -o TCPKeepAlive=no -o ServerAliveCountMax=5 -o ServerAliveInterval=30 -o StrictHostKeyChecking=no -i "$BUILDER_SPOT_KEY" ubuntu@"$BUILDER_SPOT_IP" "$@"
2 changes: 1 addition & 1 deletion scripts/run_on_tester
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ set -eu
# Enter the repo root
cd "$(dirname "$0")/.."

ssh -o ControlMaster=auto -o ControlPath=~/.ssh_mux_%h_%p_%r -o ControlPersist=10m -o TCPKeepAlive=no -o ServerAliveCountMax=20 -o ServerAliveInterval=30 -o StrictHostKeyChecking=no -i "$SPOT_KEY" ubuntu@"$SPOT_IP" "$@"
ssh -o ControlMaster=auto -o ControlPath=~/.ssh_mux_%h_%p_%r -o ControlPersist=30s -o TCPKeepAlive=no -o ServerAliveCountMax=5 -o ServerAliveInterval=30 -o StrictHostKeyChecking=no -i "$SPOT_KEY" ubuntu@"$SPOT_IP" "$@"

0 comments on commit 8c639b5

Please sign in to comment.