Skip to content

Commit 02c8f84

Browse files
committed
Merge branch 'release/v0.7.0' into master
2 parents 93fbea2 + c69b16d commit 02c8f84

File tree

37 files changed

+1650
-1118
lines changed

37 files changed

+1650
-1118
lines changed

CHANGELOG.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
11+
## [0.7.0] - 2020-12-04
12+
### Changed
13+
- Small clarifications in the README #368 @lrytz
14+
15+
### Added
16+
- Allow operator to pass in a list of managed IAM policy ARNs for the runner role #361 @jpalomaki
17+
- expand options for sourcing lambda to include S3 #292 @eky5006
18+
1019
## [0.6.0] - 2020-10-10
1120

1221
### Added
@@ -30,6 +39,7 @@ terraform import module.runners.module.runners.aws_cloudwatch_log_group.scale_up
3039
terraform import module.runners.module.runners.aws_cloudwatch_log_group.scale_down "/aws/lambda/default-scale-down"
3140
terraform import module.runners.module.webhook.aws_cloudwatch_log_group.webhook "/aws/lambda/default-webhook"
3241
```
42+
- feat: Expose ami-filters and user-data template file location to users to allow use of custom AMIs
3343

3444
- feat: Added option to binaries syncer to upgrade to pre-releases, preventing any auto-updating on startup. Option `runner_allow_prerelease_binaries` is disabled by default. (#141, #165) @sjagoe
3545

@@ -80,7 +90,8 @@ terraform import module.runners.module.webhook.aws_cloudwatch_log_group.webhook
8090

8191
- First release.
8292

83-
[unreleased]: https://github.com/philips-labs/terraform-aws-github-runner/compare/v0.6.0..HEAD
93+
[unreleased]: https://github.com/philips-labs/terraform-aws-github-runner/compare/v0.7.0..HEAD
94+
[0.7.0]: https://github.com/philips-labs/terraform-aws-github-runner/releases/tag/v0.6.0..v0.7.0
8495
[0.6.0]: https://github.com/philips-labs/terraform-aws-github-runner/releases/tag/v0.5.0..v0.6.0
8596
[0.5.0]: https://github.com/philips-labs/terraform-aws-github-runner/releases/tag/v0.4.0..v0.5.0
8697
[0.4.0]: https://github.com/philips-labs/terraform-aws-github-runner/releases/tag/v0.3.0..v0.4.0

CONTRIBUTING.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ If your issue appears to be a bug, and hasn't been reported, open a new issue. H
5252
**If you get help, help others. Good karma rulez!**
5353

5454
### Submitting a Merge Request
55+
5556
Before you submit your merge request consider the following guidelines:
5657

5758
* Make your changes in a new git branch:
@@ -63,6 +64,7 @@ Before you submit your merge request consider the following guidelines:
6364
* Create your patch, **including appropriate test cases**.
6465
* Run the test suite and ensure that all tests pass.
6566
* Add a line in the CHANGELOG.md under Unreleased. This will be used form generating the release notes.
67+
* Install [pre-commit hooks](https://pre-commit.com/). The hooks runs some basic checks and update the docs. The commit will run the hooks, you can invoke the hooks manually `pre-commit run --all-files` as well.
6668
* Commit your changes using a descriptive commit message.
6769

6870
```shell

README.md

Lines changed: 109 additions & 87 deletions
Large diffs are not rendered by default.

examples/default/lambdas-download/main.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ module "lambdas" {
33
lambdas = [
44
{
55
name = "webhook"
6-
tag = "v0.6.0"
6+
tag = "v0.7.0"
77
},
88
{
99
name = "runners"
10-
tag = "v0.6.0"
10+
tag = "v0.7.0"
1111
},
1212
{
1313
name = "runner-binaries-syncer"
14-
tag = "v0.6.0"
14+
tag = "v0.7.0"
1515
}
1616
]
1717
}

examples/default/main.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,7 @@ module "runners" {
4545

4646
# disable KMS and encryption
4747
# encrypt_secrets = false
48+
49+
# Let the module manage the service linked role
50+
# create_service_linked_role_spot = true
4851
}

examples/permissions-boundary/lambdas-download/main.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ module "lambdas" {
33
lambdas = [
44
{
55
name = "webhook"
6-
tag = "v0.6.0"
6+
tag = "v0.7.0"
77
},
88
{
99
name = "runners"
10-
tag = "v0.6.0"
10+
tag = "v0.7.0"
1111
},
1212
{
1313
name = "runner-binaries-syncer"
14-
tag = "v0.6.0"
14+
tag = "v0.7.0"
1515
}
1616
]
1717
}

examples/ubuntu/README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Action runners deployment ubuntu example
2+
3+
This modules shows how to create GitHub action runners using an Ubuntu AMI. Lambda release will be downloaded from GitHub.
4+
5+
## Usages
6+
7+
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, there is a simple build script in `<root>/.ci/build.sh`. In the `main.tf` you can simple remove the location of the lambda zip files, the default location will work in this case.
8+
9+
```bash
10+
cd lambdas-download
11+
terraform init
12+
terraform apply
13+
cd ..
14+
```
15+
16+
Before running Terraform, ensure the GitHub app is configured.
17+
18+
```bash
19+
terraform init
20+
terraform apply
21+
```
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
module "lambdas" {
2+
source = "../../../modules/download-lambda"
3+
lambdas = [
4+
{
5+
name = "webhook"
6+
tag = "v0.5.0"
7+
},
8+
{
9+
name = "runners"
10+
tag = "v0.5.0"
11+
},
12+
{
13+
name = "runner-binaries-syncer"
14+
tag = "v0.5.0"
15+
}
16+
]
17+
}
18+
19+
output "files" {
20+
value = module.lambdas.files
21+
}

examples/ubuntu/main.tf

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
locals {
2+
environment = "ubuntu"
3+
aws_region = "eu-west-1"
4+
}
5+
6+
resource "random_password" "random" {
7+
length = 28
8+
}
9+
10+
module "runners" {
11+
source = "../../"
12+
13+
aws_region = local.aws_region
14+
vpc_id = module.vpc.vpc_id
15+
subnet_ids = module.vpc.private_subnets
16+
17+
environment = local.environment
18+
tags = {
19+
Project = "ProjectX"
20+
}
21+
22+
github_app = {
23+
key_base64 = var.github_app_key_base64
24+
id = var.github_app_id
25+
client_id = var.github_app_client_id
26+
client_secret = var.github_app_client_secret
27+
webhook_secret = random_password.random.result
28+
}
29+
30+
webhook_lambda_zip = "lambdas-download/webhook.zip"
31+
runner_binaries_syncer_lambda_zip = "lambdas-download/runner-binaries-syncer.zip"
32+
runners_lambda_zip = "lambdas-download/runners.zip"
33+
34+
enable_organization_runners = false
35+
runner_extra_labels = "ubuntu,example"
36+
37+
# enable access to the runners via SSM
38+
enable_ssm_on_runners = true
39+
40+
userdata_template = "./templates/user-data.sh"
41+
ami_owners = ["099720109477"] # Canonical's Amazon account ID
42+
43+
ami_filter = {
44+
name = ["ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-*"]
45+
}
46+
47+
block_device_mappings = {
48+
# Set the block device name for Ubuntu root device
49+
device_name = "/dev/sda1"
50+
}
51+
52+
# Uncommet idle config to have idle runners from 9 to 5 in time zone Amsterdam
53+
# idle_config = [{
54+
# cron = "* * 9-17 * * *"
55+
# timeZone = "Europe/Amsterdam"
56+
# idleCount = 1
57+
# }]
58+
59+
# disable KMS and encryption
60+
# encrypt_secrets = false
61+
}

examples/ubuntu/outputs.tf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
output "runners" {
2+
value = {
3+
lambda_syncer_name = module.runners.binaries_syncer.lambda.function_name
4+
}
5+
}
6+
7+
output "webhook" {
8+
value = {
9+
secret = random_password.random.result
10+
endpoint = module.runners.webhook.endpoint
11+
}
12+
}

0 commit comments

Comments
 (0)