Skip to content

Commit

Permalink
chore(ci): Test lowering of non-persistent ebs provisions (#8360)
Browse files Browse the repository at this point in the history
- lower ebs for test instances, doesnt seem to affect test times much
- hopefully fix race condition on startup 'command not found: brotli'
  • Loading branch information
ludamad authored Sep 4, 2024
1 parent 4dbad01 commit 8ee8595
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 7 deletions.
5 changes: 4 additions & 1 deletion .github/ensure-tester/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,10 @@ runs:

- name: Print Startup Log
shell: bash
run: cat /run/log.out || true # don't fail
run:
# Try 6 times to see if .user-data-finished has been written to
for i in {0..6} ; do scripts/run_on_tester "cat /home/ubuntu/.user-data-finished" && break ; sleep 5 ; done ;
scripts/run_on_tester "cat /run/log.out"

# Set up a context for this run
- name: Copy Repo to Tester
Expand Down
13 changes: 10 additions & 3 deletions .github/spot-runner-action/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,8 @@ class Ec2Instance {
Ebs: {
VolumeSize: 64,
VolumeType: 'gp3',
Throughput: 1000,
Iops: 5000
Throughput: 250,
Iops: 3000
},
},
],
Expand Down Expand Up @@ -1040,7 +1040,14 @@ class UserData {
`sudo service docker restart`,
"sudo wget -q https://github.com/earthly/earthly/releases/download/v0.8.10/earthly-linux-$(dpkg --print-architecture) -O /usr/local/bin/earthly",
"sudo chmod +x /usr/local/bin/earthly",
`sudo bash -c 'echo \'Acquire::Retries "3"; Acquire::https::Timeout "240"; Acquire::http::Timeout "240"; APT::Get::Assume-Yes "true"; APT::Install-Recommends "false"; APT::Install-Suggests "false";\' > /etc/apt/apt.conf.d/99-aztec-build'`,
`sudo bash -c 'cat <<EOF > /etc/apt/apt.conf.d/99-aztec-build
Acquire::Retries "3";
Acquire::https::Timeout "240";
Acquire::http::Timeout "240";
APT::Get::Assume-Yes "true";
APT::Install-Recommends "false";
APT::Install-Suggests "false";
EOF'`,
"sudo apt install -y brotli",
'echo "MaxStartups 1000" >> /etc/ssh/sshd_config',
'echo "ClientAliveInterval=30" >> /etc/ssh/sshd_config',
Expand Down
4 changes: 2 additions & 2 deletions .github/spot-runner-action/src/ec2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,8 @@ export class Ec2Instance {
Ebs: {
VolumeSize: 64,
VolumeType: 'gp3',
Throughput: 1000,
Iops: 5000
Throughput: 250,
Iops: 3000
},
},
],
Expand Down
9 changes: 8 additions & 1 deletion .github/spot-runner-action/src/userdata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,14 @@ export class UserData {
`sudo service docker restart`,
"sudo wget -q https://github.com/earthly/earthly/releases/download/v0.8.10/earthly-linux-$(dpkg --print-architecture) -O /usr/local/bin/earthly",
"sudo chmod +x /usr/local/bin/earthly",
`sudo bash -c 'echo \'Acquire::Retries "3"; Acquire::https::Timeout "240"; Acquire::http::Timeout "240"; APT::Get::Assume-Yes "true"; APT::Install-Recommends "false"; APT::Install-Suggests "false";\' > /etc/apt/apt.conf.d/99-aztec-build'`,
`sudo bash -c 'cat <<EOF > /etc/apt/apt.conf.d/99-aztec-build
Acquire::Retries "3";
Acquire::https::Timeout "240";
Acquire::http::Timeout "240";
APT::Get::Assume-Yes "true";
APT::Install-Recommends "false";
APT::Install-Suggests "false";
EOF'`,
"sudo apt install -y brotli",
'echo "MaxStartups 1000" >> /etc/ssh/sshd_config',
'echo "ClientAliveInterval=30" >> /etc/ssh/sshd_config',
Expand Down

0 comments on commit 8ee8595

Please sign in to comment.