Skip to content

Commit 35d9045

Browse files
committed
Manually applying various updates from upstream to the fork
1 parent efc5b56 commit 35d9045

File tree

24 files changed

+174
-95
lines changed

24 files changed

+174
-95
lines changed

README-CPP.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
2+
## CPPAlliance fork of terraform-aws-github-runner
3+
4+
Customizations have been made in various separate directories that do not conflict with philips to facilitate rebasing or keeping up to date with the upstream repository.
5+
6+
scripts/
7+
packerimages.sh: A script to rebuild the AMI images with packer.
8+
removeami.sh: A script to find and remove old AMIs and their associated snapshots.
9+
10+
images/ : The packer images are kept in subdirectories ending in -cppal.
11+
12+
examples/multi-runner-cppal/ : The main terraform directory. This is where "terraform apply" is run.
13+
examples/multi-runner-cppal/templates/runner-configs : Runner configs are maintained in this dir.
14+
15+
## Upgrading the repository fork
16+
17+
Rebase from main.
18+
19+
Check files and manually apply any updates from main:
20+
21+
examples/multi-runner/
22+
examples/multi-runner/templates/runner-configs/
23+
images/ubuntu-jammy/
24+
25+
Update the lambdas:
26+
```
27+
cd examples/lambdas-download-cppal
28+
terraform apply
29+
```
30+
31+
The typical procedure to make small updates:
32+
```
33+
cd examples/multi-runner-cppal/
34+
terraform apply
35+
```
36+
37+
During a major upgrade, the least error-prone method may be to rebuild the cloud from scratch:
38+
```
39+
cd examples/multi-runner-cppal/
40+
terraform destroy
41+
terraform apply
42+
43+
terraform output -raw webhook_secret
44+
```
45+

examples/lambdas-download-cppal/.terraform.lock.hcl

Lines changed: 17 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
2+
terraform init -upgrade
3+
terraform init
4+
# terraform apply -var=module_version=v3.3.0
5+
terraform apply -var=module_version=v3.4.2

examples/multi-runner-cppal/.terraform.lock.hcl

Lines changed: 43 additions & 46 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/multi-runner-cppal/additional.tf

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,21 @@
11

22
data "aws_route_table" "gha_public_rt" {
3-
vpc_id = module.vpc.vpc_id
3+
vpc_id = module.base.vpc.vpc_id
44
tags = {
5-
Name = "vpc-gha-public"
6-
Environment = "gha"
5+
Name = "gha-vpc-public"
76
}
87
}
98

109
data "aws_route_table" "gha_private_rt" {
11-
vpc_id = module.vpc.vpc_id
10+
vpc_id = module.base.vpc.vpc_id
1211
tags = {
13-
Name = "vpc-gha-private"
14-
Environment = "gha"
12+
Name = "gha-vpc-private"
1513
}
1614
}
1715

1816
resource "aws_vpc_peering_connection" "peering1" {
1917
peer_vpc_id = var.aws_default_vpc
20-
vpc_id = module.vpc.vpc_id
18+
vpc_id = module.base.vpc.vpc_id
2119
auto_accept = true
2220
}
2321

examples/multi-runner-cppal/main.tf

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@ resource "random_id" "random" {
1010
byte_length = 20
1111
}
1212

13+
module "base" {
14+
source = "../base"
15+
16+
prefix = local.environment
17+
aws_region = local.aws_region
18+
}
19+
1320
module "multi-runner" {
1421
source = "../../modules/multi-runner"
1522
multi_runner_config = local.multi_runner_config
@@ -38,8 +45,8 @@ module "multi-runner" {
3845
# }
3946
aws_region = local.aws_region
4047
key_name = "cppalliance-us-west-2-kp"
41-
vpc_id = module.vpc.vpc_id
42-
subnet_ids = module.vpc.private_subnets
48+
vpc_id = module.base.vpc.vpc_id
49+
subnet_ids = module.base.vpc.private_subnets
4350
runners_scale_up_lambda_timeout = 60
4451
runners_scale_down_lambda_timeout = 60
4552
prefix = local.environment

examples/multi-runner-cppal/templates/runner-configs/ubuntu-bionic-arm64.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ runner_config:
1818
runner_run_as: ubuntu
1919
runner_name_prefix: ubuntu-1804-arm64_
2020
enable_ssm_on_runners: true
21+
credit_specification: standard
2122
instance_types:
2223
- t4g.large
2324
- c6g.large

examples/multi-runner-cppal/templates/runner-configs/ubuntu-bionic.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ runner_config:
1818
runner_run_as: ubuntu
1919
runner_name_prefix: ubuntu-1804-x64_
2020
enable_ssm_on_runners: true
21+
credit_specification: standard
2122
instance_types:
2223
- m5ad.large
2324
- m5a.large

examples/multi-runner-cppal/templates/runner-configs/ubuntu-focal-arm64.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ runner_config:
1818
runner_run_as: ubuntu
1919
runner_name_prefix: ubuntu-2004-arm64_
2020
enable_ssm_on_runners: true
21+
credit_specification: standard
2122
instance_types:
2223
- t4g.large
2324
- c6g.large

examples/multi-runner-cppal/templates/runner-configs/ubuntu-focal.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ runner_config:
1818
runner_run_as: ubuntu
1919
runner_name_prefix: ubuntu-2004-x64_
2020
enable_ssm_on_runners: true
21+
credit_specification: standard
2122
instance_types:
2223
- m5ad.large
2324
- m5a.large

0 commit comments

Comments
 (0)