Skip to content

Commit 434e334

Browse files
committed
Enable dev/prod environments
1 parent 635ebbb commit 434e334

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+455
-35
lines changed

examples/multi-runner-cppal/main.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ module "multi-runner" {
4444
# }
4545
# }
4646
aws_region = local.aws_region
47-
key_name = "cppalliance-us-west-2-kp"
47+
key_name = var.key_name
4848
vpc_id = module.base.vpc.vpc_id
4949
subnet_ids = module.base.vpc.private_subnets
5050
runners_scale_up_lambda_timeout = 60

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

+1-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ runner_config:
2525
runners_maximum_count: 50
2626
scale_down_schedule_expression: cron(* * * * ? *)
2727
# userdata_template: ./templates/user-data.sh
28-
ami_owners:
29-
- "047402373783"
28+
ami_owners: [ "047402373783" ]
3029
ami_filter: { 'name': ['github-runner-ubuntu-bionic-arm64-202306161254'] }
3130
block_device_mappings:
3231
- device_name: /dev/sda1

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

+1-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ runner_config:
2525
runners_maximum_count: 50
2626
scale_down_schedule_expression: cron(* * * * ? *)
2727
# userdata_template: ./templates/user-data.sh
28-
ami_owners:
29-
- "047402373783"
28+
ami_owners: [ "047402373783" ]
3029
ami_filter: { 'name': ['github-runner-ubuntu-bionic-amd64-202306161254'] }
3130
block_device_mappings:
3231
- device_name: /dev/sda1

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

+1-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ runner_config:
2525
runners_maximum_count: 50
2626
scale_down_schedule_expression: cron(* * * * ? *)
2727
# userdata_template: ./templates/user-data.sh
28-
ami_owners:
29-
- "047402373783"
28+
ami_owners: [ "047402373783" ]
3029
ami_filter: { 'name': ['github-runner-ubuntu-focal-arm64-202306161254'] }
3130
block_device_mappings:
3231
- device_name: /dev/sda1

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

+1-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ runner_config:
2525
runners_maximum_count: 200
2626
scale_down_schedule_expression: cron(* * * * ? *)
2727
# userdata_template: ./templates/user-data.sh
28-
ami_owners:
29-
- "047402373783"
28+
ami_owners: [ "047402373783" ]
3029
ami_filter: { 'name': ['github-runner-ubuntu-focal-amd64-202306161254'] }
3130
block_device_mappings:
3231
- device_name: /dev/sda1

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

+1-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ runner_config:
2626
runners_maximum_count: 50
2727
scale_down_schedule_expression: cron(* * * * ? *)
2828
# userdata_template: ./templates/user-data.sh
29-
ami_owners:
30-
- "047402373783"
29+
ami_owners: [ "047402373783" ]
3130
ami_filter: { 'name': ['github-runner-ubuntu-jammy-arm64-202306161254'] }
3231
block_device_mappings:
3332
- device_name: /dev/sda1

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

+1-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ runner_config:
2626
runners_maximum_count: 200
2727
scale_down_schedule_expression: cron(* * * * ? *)
2828
# userdata_template: ./templates/user-data.sh
29-
ami_owners:
30-
- "047402373783"
29+
ami_owners: [ "047402373783" ]
3130
ami_filter: { 'name': ['github-runner-ubuntu-jammy-amd64-202306161254'] }
3231
block_device_mappings:
3332
- device_name: /dev/sda1

examples/multi-runner-cppal/templates/runner-configs/windows-2019.yaml

+1-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ runner_config:
2222
runners_maximum_count: 100
2323
scale_down_schedule_expression: cron(* * * * ? *)
2424
runner_boot_time_in_minutes: 20
25-
ami_owners:
26-
- "047402373783"
25+
ami_owners: [ "047402373783" ]
2726
ami_filter: { 'name': ['github-runner-windows-2019-amd64-202307212221'] }
2827
block_device_mappings:
2928
- device_name: /dev/sda1

examples/multi-runner-cppal/templates/runner-configs/windows-2022.yaml

+1-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ runner_config:
2323
runners_maximum_count: 100
2424
scale_down_schedule_expression: cron(* * * * ? *)
2525
runner_boot_time_in_minutes: 20
26-
ami_owners:
27-
- "047402373783"
26+
ami_owners: [ "047402373783" ]
2827
ami_filter: { 'name': ['github-runner-windows-2022-amd64-202306202311'] }
2928
block_device_mappings:
3029
- device_name: /dev/sda1

examples/multi-runner-cppal/variables.tf

+5
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ variable "aws_region" {
1717
default = "us-west-2"
1818
}
1919

20+
variable "key_name" {
21+
type = string
22+
default = "cppalliance-us-west-2-kp"
23+
}
24+
2025
variable "aws_default_vpc" {
2126
type = string
2227
default = null
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
ssh_keypair_name = "tagr-us-west-2"
3+
ssh_private_key_file = "/home/sam/work/cppalliance/aws/boost.v2.account/tagr-us-west-2.pem"
4+
disable_docker_registry = true

images/ubuntu-bionic-arm64-cppal/github_agent.ubuntu.pkr.hcl

+21-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,24 @@ packer {
77
}
88
}
99

10+
variable "ssh_keypair_name" {
11+
description = "SSH keypair name"
12+
type = string
13+
default = null
14+
}
15+
16+
variable "ssh_private_key_file" {
17+
description = "SSH private key file"
18+
type = string
19+
default = null
20+
}
21+
22+
variable "disable_docker_registry" {
23+
description = "SSH private key file"
24+
type = string
25+
default = "false"
26+
}
27+
1028
variable "runner_version" {
1129
description = "The version (no v prefix) of the runner software to install https://github.com/actions/runner/releases. The latest release will be fetched from GitHub if not provided."
1230
default = null
@@ -135,11 +153,13 @@ build {
135153
]
136154
provisioner "shell" {
137155
environment_vars = [
138-
"DEBIAN_FRONTEND=noninteractive"
156+
"DEBIAN_FRONTEND=noninteractive",
157+
"DISABLE_DOCKER_REGISTRY=${var.disable_docker_registry}"
139158
]
140159
inline = concat([
141160
"sudo cloud-init status --wait",
142161
"sudo apt-get update",
162+
"env",
143163
"sudo apt-get -y install ca-certificates curl gnupg lsb-release",
144164
"sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg",
145165
"echo deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"builds": [
3+
{
4+
"name": "githubrunner",
5+
"builder_type": "amazon-ebs",
6+
"build_time": 1690935091,
7+
"files": null,
8+
"artifact_id": "us-west-2:ami-02f1d27de34ac7ae4",
9+
"packer_run_uuid": "2611bb8c-0f51-975e-5a9a-64f87224a5d2",
10+
"custom_data": null
11+
}
12+
],
13+
"last_run_uuid": "2611bb8c-0f51-975e-5a9a-64f87224a5d2"
14+
}

images/ubuntu-bionic-arm64-cppal/variables.auto.pkrvars.hcl

+5-1
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,12 @@
77
region = "us-west-2"
88
instance_type = "t4g.xlarge"
99
root_volume_size_gb = 30
10+
ssh_keypair_name = "cppalliance-us-west-2-kp"
11+
ssh_private_key_file = "/root/.ssh/cppalliance-us-west-2-kp.pem"
12+
1013
custom_shell_commands = [
1114
"set -xe",
15+
"env",
1216
"sudo mkdir -p /etc/apt/apt.conf.d/",
1317
"echo 'APT::Acquire::Retries \"10\";' | sudo tee /etc/apt/apt.conf.d/80-retries",
1418
"echo 'APT::Get::Assume-Yes \"true\";' | sudo tee /etc/apt/apt.conf.d/90assumeyes",
@@ -26,7 +30,7 @@ custom_shell_commands = [
2630
"sudo systemctl stop unattended-upgrades",
2731
"sudo systemctl disable unattended-upgrades",
2832
"sudo apt-get purge -y unattended-upgrades",
29-
"echo '{\n \"insecure-registries\":[\"docker-registry-lb-1.cpp.al\"],\n \"registry-mirrors\": [\"http://docker-registry-lb-1.cpp.al\"]\n }' | sudo tee /etc/docker/daemon.json"
33+
"$DISABLE_DOCKER_REGISTRY || echo '{\n \"insecure-registries\":[\"docker-registry-lb-1.cpp.al\"],\n \"registry-mirrors\": [\"http://docker-registry-lb-1.cpp.al\"]\n }' | sudo tee /etc/docker/daemon.json"
3034
]
3135

3236
# # Custom LLVM install. Switching to standard clang packages
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
ssh_keypair_name = "tagr-us-west-2"
3+
ssh_private_key_file = "/home/sam/work/cppalliance/aws/boost.v2.account/tagr-us-west-2.pem"
4+
disable_docker_registry = true

images/ubuntu-bionic-cppal/github_agent.ubuntu.pkr.hcl

+20-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,24 @@ packer {
77
}
88
}
99

10+
variable "ssh_keypair_name" {
11+
description = "SSH keypair name"
12+
type = string
13+
default = null
14+
}
15+
16+
variable "ssh_private_key_file" {
17+
description = "SSH private key file"
18+
type = string
19+
default = null
20+
}
21+
22+
variable "disable_docker_registry" {
23+
description = "SSH private key file"
24+
type = string
25+
default = "false"
26+
}
27+
1028
variable "runner_version" {
1129
description = "The version (no v prefix) of the runner software to install https://github.com/actions/runner/releases. The latest release will be fetched from GitHub if not provided."
1230
default = null
@@ -135,7 +153,8 @@ build {
135153
]
136154
provisioner "shell" {
137155
environment_vars = [
138-
"DEBIAN_FRONTEND=noninteractive"
156+
"DEBIAN_FRONTEND=noninteractive",
157+
"DISABLE_DOCKER_REGISTRY=${var.disable_docker_registry}"
139158
]
140159
inline = concat([
141160
"sudo cloud-init status --wait",

images/ubuntu-bionic-cppal/variables.auto.pkrvars.hcl

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
region = "us-west-2"
88
instance_type = "t2.xlarge"
99
root_volume_size_gb = 30
10+
ssh_keypair_name = "cppalliance-us-west-2-kp"
11+
ssh_private_key_file = "/root/.ssh/cppalliance-us-west-2-kp.pem"
12+
1013
custom_shell_commands = [
1114
"set -xe",
1215
"sudo mkdir -p /etc/apt/apt.conf.d/",
@@ -26,7 +29,7 @@ custom_shell_commands = [
2629
"sudo systemctl stop unattended-upgrades",
2730
"sudo systemctl disable unattended-upgrades",
2831
"sudo apt-get purge -y unattended-upgrades",
29-
"echo '{\n \"insecure-registries\":[\"docker-registry-lb-1.cpp.al\"],\n \"registry-mirrors\": [\"http://docker-registry-lb-1.cpp.al\"]\n }' | sudo tee /etc/docker/daemon.json"
32+
"$DISABLE_DOCKER_REGISTRY || echo '{\n \"insecure-registries\":[\"docker-registry-lb-1.cpp.al\"],\n \"registry-mirrors\": [\"http://docker-registry-lb-1.cpp.al\"]\n }' | sudo tee /etc/docker/daemon.json"
3033
]
3134

3235
# # Custom LLVM install. Switching to standard clang packages.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
ssh_keypair_name = "tagr-us-west-2"
3+
ssh_private_key_file = "/home/sam/work/cppalliance/aws/boost.v2.account/tagr-us-west-2.pem"
4+
disable_docker_registry = true

images/ubuntu-focal-arm64-cppal/github_agent.ubuntu.pkr.hcl

+20-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,24 @@ packer {
77
}
88
}
99

10+
variable "ssh_keypair_name" {
11+
description = "SSH keypair name"
12+
type = string
13+
default = null
14+
}
15+
16+
variable "ssh_private_key_file" {
17+
description = "SSH private key file"
18+
type = string
19+
default = null
20+
}
21+
22+
variable "disable_docker_registry" {
23+
description = "SSH private key file"
24+
type = string
25+
default = "false"
26+
}
27+
1028
variable "runner_version" {
1129
description = "The version (no v prefix) of the runner software to install https://github.com/actions/runner/releases. The latest release will be fetched from GitHub if not provided."
1230
default = null
@@ -135,7 +153,8 @@ build {
135153
]
136154
provisioner "shell" {
137155
environment_vars = [
138-
"DEBIAN_FRONTEND=noninteractive"
156+
"DEBIAN_FRONTEND=noninteractive",
157+
"DISABLE_DOCKER_REGISTRY=${var.disable_docker_registry}"
139158
]
140159
inline = concat([
141160
"sudo cloud-init status --wait",

images/ubuntu-focal-arm64-cppal/variables.auto.pkrvars.hcl

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
region = "us-west-2"
88
instance_type = "t4g.xlarge"
99
root_volume_size_gb = 30
10+
ssh_keypair_name = "cppalliance-us-west-2-kp"
11+
ssh_private_key_file = "/root/.ssh/cppalliance-us-west-2-kp.pem"
12+
1013
custom_shell_commands = [
1114
"set -xe",
1215
"sudo mkdir -p /etc/apt/apt.conf.d/",
@@ -28,7 +31,7 @@ custom_shell_commands = [
2831
"sudo systemctl stop unattended-upgrades",
2932
"sudo systemctl disable unattended-upgrades",
3033
"sudo apt-get purge -y unattended-upgrades",
31-
"echo '{\n \"insecure-registries\":[\"docker-registry-lb-1.cpp.al\"],\n \"registry-mirrors\": [\"http://docker-registry-lb-1.cpp.al\"]\n }' | sudo tee /etc/docker/daemon.json"
34+
"$DISABLE_DOCKER_REGISTRY || echo '{\n \"insecure-registries\":[\"docker-registry-lb-1.cpp.al\"],\n \"registry-mirrors\": [\"http://docker-registry-lb-1.cpp.al\"]\n }' | sudo tee /etc/docker/daemon.json"
3235
]
3336

3437
# # custom LLVM install. Switching to standard clang packages.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
ssh_keypair_name = "tagr-us-west-2"
3+
ssh_private_key_file = "/home/sam/work/cppalliance/aws/boost.v2.account/tagr-us-west-2.pem"
4+
disable_docker_registry = true

images/ubuntu-focal-cppal/github_agent.ubuntu.pkr.hcl

+20-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,24 @@ packer {
77
}
88
}
99

10+
variable "ssh_keypair_name" {
11+
description = "SSH keypair name"
12+
type = string
13+
default = null
14+
}
15+
16+
variable "ssh_private_key_file" {
17+
description = "SSH private key file"
18+
type = string
19+
default = null
20+
}
21+
22+
variable "disable_docker_registry" {
23+
description = "SSH private key file"
24+
type = string
25+
default = "false"
26+
}
27+
1028
variable "runner_version" {
1129
description = "The version (no v prefix) of the runner software to install https://github.com/actions/runner/releases. The latest release will be fetched from GitHub if not provided."
1230
default = null
@@ -135,7 +153,8 @@ build {
135153
]
136154
provisioner "shell" {
137155
environment_vars = [
138-
"DEBIAN_FRONTEND=noninteractive"
156+
"DEBIAN_FRONTEND=noninteractive",
157+
"DISABLE_DOCKER_REGISTRY=${var.disable_docker_registry}"
139158
]
140159
inline = concat([
141160
"sudo cloud-init status --wait",

images/ubuntu-focal-cppal/variables.auto.pkrvars.hcl

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ custom_shell_commands = [
2828
"sudo systemctl stop unattended-upgrades",
2929
"sudo systemctl disable unattended-upgrades",
3030
"sudo apt-get purge -y unattended-upgrades",
31-
"echo '{\n \"insecure-registries\":[\"docker-registry-lb-1.cpp.al\"],\n \"registry-mirrors\": [\"http://docker-registry-lb-1.cpp.al\"]\n }' | sudo tee /etc/docker/daemon.json"
31+
"$DISABLE_DOCKER_REGISTRY || echo '{\n \"insecure-registries\":[\"docker-registry-lb-1.cpp.al\"],\n \"registry-mirrors\": [\"http://docker-registry-lb-1.cpp.al\"]\n }' | sudo tee /etc/docker/daemon.json"
3232
]
3333

3434
# # custom LLVM install. Switching to standard clang packages.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
ssh_keypair_name = "tagr-us-west-2"
3+
ssh_private_key_file = "/home/sam/work/cppalliance/aws/boost.v2.account/tagr-us-west-2.pem"
4+
disable_docker_registry = true

images/ubuntu-jammy-arm64-cppal/github_agent.ubuntu.pkr.hcl

+20-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,24 @@ packer {
77
}
88
}
99

10+
variable "ssh_keypair_name" {
11+
description = "SSH keypair name"
12+
type = string
13+
default = null
14+
}
15+
16+
variable "ssh_private_key_file" {
17+
description = "SSH private key file"
18+
type = string
19+
default = null
20+
}
21+
22+
variable "disable_docker_registry" {
23+
description = "SSH private key file"
24+
type = string
25+
default = "false"
26+
}
27+
1028
variable "runner_version" {
1129
description = "The version (no v prefix) of the runner software to install https://github.com/actions/runner/releases. The latest release will be fetched from GitHub if not provided."
1230
default = null
@@ -135,7 +153,8 @@ build {
135153
]
136154
provisioner "shell" {
137155
environment_vars = [
138-
"DEBIAN_FRONTEND=noninteractive"
156+
"DEBIAN_FRONTEND=noninteractive",
157+
"DISABLE_DOCKER_REGISTRY=${var.disable_docker_registry}"
139158
]
140159
inline = concat([
141160
"sudo cloud-init status --wait",

0 commit comments

Comments
 (0)