-
Notifications
You must be signed in to change notification settings - Fork 661
Feat/windows support #1476
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
npalm
merged 76 commits into
github-aws-runners:develop
from
ScottGuymer:feat/windows-support
Dec 9, 2021
Merged
Feat/windows support #1476
Changes from all commits
Commits
Show all changes
76 commits
Select commit
Hold shift + click to select a range
736a854
fix(scale): Refactor Runner Type and Owner (#871)
mcaulifn 6e35845
feat: support multiple instance types (#898)
mcaulifn a768687
docs: fix lambda_security_group_ids incorrect description #738 (#902)
npalm 5b5ee3b
fix: scale down runners (#905)
npalm 8746249
chore: group upgrade lambda dependencies (#906)
npalm 95a3ab6
chore: Bump aws-sdk (#752) (#909)
dependabot[bot] c1e7bf3
chore: Bump aws-sdk (#752) (#908)
dependabot[bot] b860437
chore: Bump aws-sdk (#752) (#887)
dependabot[bot] cd88e3d
chore: Bump aws-sdk (#752) (#885)
dependabot[bot] fae4839
chore: Bump aws-sdk (#752) (#889)
dependabot[bot] b62b63e
chore: Bump aws-sdk (#752) (#892)
dependabot[bot] 5ae4a4d
chore: Bump aws-sdk (#752) (#907)
dependabot[bot] 744d977
chore: Bump aws-sdk (#752) (#864)
dependabot[bot] 118c5d3
feat: support windows binary in cache lambda
RichiCoder1 ecff591
add variable to control runner os
RichiCoder1 40f334c
update docs
RichiCoder1 6a41c42
feat: add windows instance support
npalm f39dcfd
docs
RichiCoder1 e21476a
update docs
npalm 0a1f706
fix zip name to include correct os name
RichiCoder1 8d46612
add powershell closing tag for userdata
RichiCoder1 8a061b1
add transcript
RichiCoder1 210b251
fix alias and add more verbose logging
RichiCoder1 50112c3
tweak install cmdlets
RichiCoder1 822eacc
add some robustness to userdata
RichiCoder1 890e26c
fix a number of typos and bugs and restart
RichiCoder1 f632dd3
try and make run better in weird environment
RichiCoder1 289d90e
use containers image and kill docker install
RichiCoder1 7697b00
fix cloudagent log paths
RichiCoder1 47644c3
update default
RichiCoder1 83a1c42
give windows runners more time to spin up
RichiCoder1 9d528e9
fix trigger syntax
RichiCoder1 df38f3b
move restart before transcript stop
RichiCoder1 b740451
skip restart
RichiCoder1 20dbe40
fix container ami filter
RichiCoder1 dce7292
address pr feedback, add example, and fix ami_filter
npalm 98e8324
fix issue with cloudwatch
RichiCoder1 e8d889e
remove syntax error highlights in template
RichiCoder1 093d620
fix win log path
RichiCoder1 5d3912b
run as administrator
npalm 0f49f9b
Merge branch 'develop' into feat/windows-support
ScottGuymer e47e726
Get the example working OOTB
ScottGuymer d9ebb4c
Fixes from the merge
ScottGuymer 713b902
Fix readme
ScottGuymer 2a54b31
Fixes to align with develop
ScottGuymer 6b01760
Make the example work for testing
ScottGuymer a6342ab
Fix the passthrough of the boot time to the runner module
ScottGuymer 323efc9
Extend the boot time so a machine has time to boot.
ScottGuymer b1d6981
Remove the default AMI from the main module.
ScottGuymer 61f0caf
Added more documentation to the windows example
ScottGuymer 9a7b10a
Format typescript
ScottGuymer fb61a51
Fix formatting
ScottGuymer febcad9
Reset default example
ScottGuymer 33ea24b
Improve readability
ScottGuymer 0c5cdb9
Add some validation for the runner_os variable
ScottGuymer 5872b09
Merge branch 'develop' into feat/windows-support
ScottGuymer ae61125
Added logging change
ScottGuymer 0a77a00
Some further refactoring
ScottGuymer 64b348a
Add a windows start-runner.ps1
ScottGuymer 5a68873
Add more validation
ScottGuymer a165182
Upgrade the provider
ScottGuymer add16c2
Add time since boot to script
ScottGuymer 6a5e083
Merge remote-tracking branch 'upstream/develop' into feat/windows-sup…
ScottGuymer 84042c6
Refactoring to use tag/parameter based config
ScottGuymer 648131d
Tweaks from testing
ScottGuymer 72c1a09
Runners only have PS5 where get-uptime might not be available
ScottGuymer 8cd699a
Some more small refactoring.
ScottGuymer d930490
Fix config access and remove packages that are no longer needed.
ScottGuymer 1078dfc
Set the value of runner_log_files as null so it can be defaulted.
ScottGuymer 86767e7
Merge remote-tracking branch 'upstream/develop' into feat/windows-sup…
ScottGuymer 582ee83
Fix failing tests
ScottGuymer 177bf53
Update modules/runners/variables.tf
ScottGuymer d6e2926
Updates the github secrets to use hex values rather than strings.
ScottGuymer 37b3984
Merge remote-tracking branch 'origin/feat/windows-support' into feat/…
ScottGuymer 923b681
Updates based on PR feedback
ScottGuymer 1f698f2
Updated byte length to 20
ScottGuymer 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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,26 @@ | ||
# Action runners deployment windows example | ||
|
||
This module shows how to create GitHub action runners using an Windows Runners. Lambda release will be downloaded from GitHub. | ||
|
||
## Usages | ||
|
||
Steps for the full setup, such as creating a GitHub app can be found in the root module's [README](../../README.md). First, download the Lambda releases from GitHub. Alternatively you can build the lambdas locally with Node or Docker, for which there is a build script available at `<root>/.ci/build.sh`. In the `main.tf` you can remove the location of the lambda zip files, the default location will work in this case. | ||
|
||
> Ensure you have set the version in `lambdas-download/main.tf` for running the example. The version needs to be set to a GitHub release version, see <https://github.com/philips-labs/terraform-aws-github-runner/releases> | ||
|
||
|
||
```pwsh | ||
cd lambdas-download | ||
terraform init | ||
terraform apply | ||
cd .. | ||
``` | ||
|
||
Before running Terraform, ensure the GitHub app is configured. | ||
|
||
```bash | ||
terraform init | ||
terraform apply | ||
``` | ||
|
||
_**Note**_: It can take upwards of ten minutes for a runner to start processing jobs, and about as long for logs to start showing up. It's recommend that scale the runners via a warm-up job and then keep them idled. |
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,25 @@ | ||
locals { | ||
version = "<REPLACE_BY_GITHUB_RELEASE_VERSION>" | ||
} | ||
|
||
module "lambdas" { | ||
source = "../../../modules/download-lambda" | ||
lambdas = [ | ||
{ | ||
name = "webhook" | ||
tag = local.version | ||
}, | ||
{ | ||
name = "runners" | ||
tag = local.version | ||
}, | ||
{ | ||
name = "runner-binaries-syncer" | ||
tag = local.version | ||
} | ||
] | ||
} | ||
|
||
output "files" { | ||
value = module.lambdas.files | ||
} |
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,48 @@ | ||
locals { | ||
environment = "windows" | ||
aws_region = "eu-west-1" | ||
} | ||
|
||
resource "random_id" "random" { | ||
byte_length = 20 | ||
} | ||
|
||
module "runners" { | ||
source = "../../" | ||
|
||
aws_region = local.aws_region | ||
vpc_id = module.vpc.vpc_id | ||
subnet_ids = module.vpc.private_subnets | ||
environment = local.environment | ||
|
||
github_app = { | ||
key_base64 = var.github_app_key_base64 | ||
id = var.github_app_id | ||
webhook_secret = random_id.random.hex | ||
} | ||
|
||
# Grab the lambda packages from local directory. Must run /.ci/build.sh first | ||
webhook_lambda_zip = "../../lambda_output/webhook.zip" | ||
runner_binaries_syncer_lambda_zip = "../../lambda_output/runner-binaries-syncer.zip" | ||
runners_lambda_zip = "../../lambda_output/runners.zip" | ||
|
||
enable_organization_runners = false | ||
# no need to add extra windows tag here as it is automatically added by GitHub | ||
runner_extra_labels = "default,example" | ||
|
||
# Set the OS to Windows | ||
runner_os = "win" | ||
# we need to give the runner time to start because this is windows. | ||
runner_boot_time_in_minutes = 20 | ||
|
||
# enable access to the runners via SSM | ||
enable_ssm_on_runners = true | ||
|
||
instance_types = ["m5.large", "c5.large"] | ||
|
||
# override delay of events in seconds for testing | ||
delay_webhook_event = 5 | ||
|
||
# override scaling down for testing | ||
scale_down_schedule_expression = "cron(* * * * ? *)" | ||
} |
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,15 @@ | ||
output "runners" { | ||
value = { | ||
lambda_syncer_name = module.runners.binaries_syncer.lambda.function_name | ||
} | ||
} | ||
|
||
output "webhook_endpoint" { | ||
value = module.runners.webhook.endpoint | ||
} | ||
|
||
output "webhook_secret" { | ||
sensitive = true | ||
value = random_id.random.hex | ||
} | ||
|
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,3 @@ | ||
provider "aws" { | ||
region = local.aws_region | ||
} |
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,4 @@ | ||
|
||
variable "github_app_key_base64" {} | ||
|
||
variable "github_app_id" {} |
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,7 @@ | ||
module "vpc" { | ||
source = "git::https://github.com/philips-software/terraform-aws-vpc.git?ref=2.2.0" | ||
|
||
environment = local.environment | ||
aws_region = local.aws_region | ||
create_private_hosted_zone = false | ||
} |
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
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.