Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Self-hosted EC2 Runners #3019

Merged
merged 3 commits into from
Apr 25, 2021
Merged

Self-hosted EC2 Runners #3019

merged 3 commits into from
Apr 25, 2021

Conversation

davinchia
Copy link
Contributor

@davinchia davinchia commented Apr 22, 2021

What

Use self-hosted ec2 runners for the main Airbyte build as discussed today. Will bring this up for evaluation after a week. Anecdotal testing shows builds generally finish in 9 - 10 mins vs 15 - 20 mins on the regular runner, even after accounting for the time taken to spin up the instance (about 1 min).

Removed this from the frontend tests since Cypress is running into an issue that seems to be related to how the tests are structured and I don't think we need to debug now.

The slash commands will continue running on the github runner.

How

  • Use https://github.com/machulav/ec2-github-runner to start and stop an individual instance per job we ran as part of the build.
  • This uses an 8 core EC2 machine (c5.2xlarge). This instance is cost/performance sweet spot from my testing. Cost is 0.34 cents an hour, which gives us 1000 USD / 0.34 USD * 60 mins ~= 177k mins/month of build time.

Recommended reading order

@davinchia
Copy link
Contributor Author

davinchia commented Apr 22, 2021

A single approval is sufficient. Tagging everyone so people are aware of what is going on.

Not merging this in until our request to increase our AWS vCPU limit is approved.

with:
mode: start
github-token: ${{ secrets.SELF_RUNNER_GITHUB_ACCESS_TOKEN }}
ec2-image-id: ami-0b39c2b1b65f75ca8
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these are all resources living in the aws dev account.

@sherifnada
Copy link
Contributor

only comment is that the checks are pretty muddled. (checkmark per start and stop) Can we just make starting the runner a step in the build?

@davinchia
Copy link
Contributor Author

Our limit got increased to 160 vCPU, which means we might run into issues if too many builds are triggered at once. AWS says we can request another limit increase when this happens.

@sherifnada I looked into trying to clean this up; I don't think it's straightforward since the all steps of a job need to run on the same instance. The start/stop jobs are on Github's instance, while the build steps aren't. Will merge for now and look into this if other people find this annoying.

@davinchia davinchia merged commit 2bbb9c8 into master Apr 25, 2021
@davinchia davinchia deleted the davinchia/self-hosted-ec2-runner branch April 25, 2021 09:22
@davinchia davinchia mentioned this pull request Jul 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants