-
Notifications
You must be signed in to change notification settings - Fork 787
[CI] Add AWS EC2 dynamic runner support #6471
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
Merged
Merged
Changes from all commits
Commits
Show all changes
52 commits
Select commit
Hold shift + click to select a range
eceed49
Added AWS EC2 dynamic runner support (#2)
apstasen 9efc4e2
Fixed indentation
apstasen 7a4e3ec
Fixed intendation
apstasen 3cd6efb
Remove whitespace
apstasen 23ab5a7
Clarified some messages text
apstasen 8fefd4f
Removed not needed setup line in comment
apstasen 3b828e6
Clarified description
apstasen 3cabe7b
Clarified description
apstasen 677ea19
Fixed typo in description
apstasen 596929a
Fixed --ephemeral option usage (should be in config.sh)
apstasen 565732b
Formatted text for lint
apstasen c9c40f6
Typo fix in description
apstasen df24c1a
Revert "Formatted text for lint"
apstasen 15deeae
Restored original formatting not warped by lint
apstasen 1be24bf
Removed not needed part of comment
apstasen 44fbad7
Merge branch 'sycl' into aws
apstasen 8f0c522
Added EOL
apstasen aa13988
Fixed indent
apstasen 50855fa
Remove trailing spaces
284fc39
Moved uniq into sycl_resolve_test_matrix.yml and removed max-parallel…
apstasen f761199
Do not create dummy aws start/stop runners
apstasen 2548f9d
Fixed indent
apstasen 9c883b5
Start all AWS instances on one job to avoid waiting for parallel jobs
apstasen 97cef06
Added extra debug info
apstasen e1a84f8
Fixed handling empty/undefined runs-on-list
apstasen 7befe33
Added extra debug message
apstasen 29fc79d
Fix nightly testing
apstasen 5777010
Revert "Fix nightly testing"
apstasen 1f4a076
Do not parse aws type JSON anymore and pass it directly
apstasen d5d187e
Add test AWS usage
apstasen 7b63970
Adjusted AWS action names
apstasen 6cf5781
Do not get Github reg token more than once
apstasen 3688399
Added option to understand label from array (of one element)
apstasen 513a6a3
Unified label handling code
apstasen bbf4490
Removed problem configs with too generic runner labels
apstasen 65f39d5
Revert "Removed problem configs with too generic runner labels"
apstasen 4be7006
Removed problem configs with too generic runner labels
apstasen d3cc81f
Resolved conflict and fixed potential issue with temporary AWS CI tes…
apstasen f0485f1
Merge branch 'sycl' into aws
apstasen 8404e91
Added more logs
apstasen c14f4db
More logging info
apstasen 7cd213a
More logging
apstasen 7b59505
Need target repo run context
apstasen fd24b2e
Revert "Add test AWS usage"
apstasen 0260be2
Preparing for merge
apstasen 152d0b7
Skip empty AWS start job
apstasen 025a2d9
Indent fix
apstasen 291bc39
Indent fix
apstasen 20e9fa9
Use target repo env
apstasen 6cd3733
Use exact package versions
apstasen c0187cc
Improved security
apstasen e47afb3
Enable target env for PR
apstasen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: aws-ec2 | ||
description: Start AWS EC2 instances with Github actions runner agent in it | ||
|
||
inputs: | ||
runs-on-list: | ||
description: "JSON string with array of objects with aws-type, runs-on, aws-ami, aws-spot, aws-disk, aws-timebomb, one-job properties" | ||
required: true | ||
# aws-type: AWS EC2 instance type. This property must be present if you want to trigger AWS EC2 instance start/stop. | ||
# runs-on: Name of the unique label assigned to the runner used as 'runs-on' property for the following jobs. Mandatory presence required. | ||
# aws-ami: AWS AMI id. Makes sense only for start mode. Default "ami-0966bccbb521ccb24". | ||
|
||
# ami-0966bccbb521ccb24: Ubuntu 22.04 (ami-02f3416038bdb17fb with /dev/sda1 disk) with docker installed and gh_runner (1001) like this: | ||
# sudo -s | ||
# apt-get update | ||
# curl -fsSL https://get.docker.com -o /tmp/get-docker.sh | ||
# sh /tmp/get-docker.sh | ||
# groupadd -g 1001 gh_runner; useradd gh_runner -u 1001 -g 1001 -m -s /bin/bash; usermod -aG docker gh_runner; usermod -aG video gh_runner | ||
# sync; shutdown -h now | ||
|
||
# ami-02ec0f344128253f9: Amazon Linux 2 AMI with NVIDIA TESLA GPU Driver (ami-06bf0a3f89fe08f0a with /dev/xvda disk) with docker installed and gh_runner (1001) like this: | ||
# sudo -s | ||
# yum update -y | ||
# amazon-linux-extras install docker | ||
# sudo systemctl --now enable docker | ||
# distribution=$(. /etc/os-release;echo $ID$VERSION_ID) && curl -s -L https://nvidia.github.io/libnvidia-container/$distribution/libnvidia-container.repo | sudo tee /etc/yum.repos.d/nvidia-container-toolkit.repo | ||
# yum-config-manager --disable amzn2-graphics; yum clean expire-cache; yum install -y nvidia-docker2; systemctl restart docker | ||
# groupadd -g 1001 gh_runner; useradd gh_runner -u 1001 -g 1001 -m -s /bin/bash; usermod -aG docker gh_runner; usermod -aG video gh_runner | ||
# sync; shutdown -h now | ||
|
||
# ami-0ccda708841dde988: Amazon Linux 2 AMI with AMD Radeon Pro Driver (ami-0bb1072e787242eb6 with /dev/xvda disk) with docker installed and gh_runner (1001) like this: | ||
# sudo -s | ||
# amazon-linux-extras install docker | ||
# sudo systemctl --now enable docker | ||
# groupadd -g 1001 gh_runner; useradd gh_runner -u 1001 -g 1001 -m -s /bin/bash; usermod -aG docker gh_runner; usermod -aG video gh_runner | ||
# sync; shutdown -h now | ||
|
||
# aws-spot: Enable usage of spot instances to save money (less reliable). Makes sense only for start mode. Default true. | ||
# aws-disk: AWS EC2 instance AMI specific disk device path and size in GB (8 by default). Makes sense only for start mode. Default "/dev/sda1:16". | ||
# aws-timebomp: AWS EC2 instance maximum live time. Makes sense only for start mode. Default "1h". | ||
# one-job: Will terminate AWS EC2 instance after one job (not waiting for stop job) saving money. Makes sense only for start mode. Default true. | ||
|
||
mode: | ||
description: "Mode of operation: start or stop" | ||
required: false | ||
default: start | ||
|
||
GH_PERSONAL_ACCESS_TOKEN: | ||
description: "Github personal access token with repo permission" | ||
required: true | ||
|
||
AWS_ACCESS_KEY: | ||
description: "AWS access id" | ||
required: true | ||
|
||
AWS_SECRET_KEY: | ||
description: "AWS access secret key" | ||
required: true | ||
|
||
aws-region: | ||
description: "AWS EC2 region" | ||
required: false | ||
default: "us-east-2" # Ohio | ||
|
||
runs: | ||
using: node12 | ||
main: ./aws-ec2.js |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.