forked from nickodell/github-runner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaws-ubuntu2004.json
91 lines (91 loc) · 3.31 KB
/
aws-ubuntu2004.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
{
"variables": {
"vcs_ref": "",
"runner_user": "runner",
"runner_home": "/home/runner",
"access_key": "{{env `AWS_ACCESS_KEY_ID`}}",
"secret_key": "{{env `AWS_SECRET_ACCESS_KEY`}}",
"image_folder": "/imagegeneration",
"commit_file": "/imagegeneration/commit.txt",
"imagedata_file": "/imagegeneration/imagedata.json",
"metadata_file": "/imagegeneration/metadatafile",
"installer_script_folder": "/imagegeneration/installers",
"helper_script_folder": "/imagegeneration/helpers",
"image_version": "dev",
"image_os": "ubuntu20",
"github_feed_token": "{{env `MEROXA_MACHINE`}}",
"go_default": "1.17",
"go_versions": "1.16 1.17",
"subnet_id": "{{env `PACKER_SUBNET_ID`}}",
"aws_account": "{{env `PACKER_AWS_ACCOUNT`}}"
},
"sensitive-variables": [
"access_key",
"secret_key",
"github_feed_token"
],
"builders": [
{
"name": "focal",
"region": "us-east-1",
"type": "amazon-ebs",
"access_key": "{{user `access_key`}}",
"secret_key": "{{user `secret_key`}}",
"ssh_keypair_name": "meroxa-aws-ci",
"ssh_agent_auth": true,
"ssh_username": "runner",
"subnet_id": "{{user `subnet_id`}}",
"source_ami_filter": {
"filters": {
"virtualization-type": "hvm",
"name": "github-runner-base-focal",
"root-device-type": "ebs"
},
"owners": [
"{{user `aws_account`}}"
],
"most_recent": true
},
"instance_type": "m5.xlarge",
"ami_name": "github-runner-focal-{{strftime \"%m-%d-%Y_%H-%M\"}}",
"force_deregister": true,
"force_delete_snapshot": true,
"ami_regions": [
"us-east-1"
],
"tags": {
"Name": "github-runner-focal-{{isotime \"20060102150405\"}}",
"os": "ubuntu",
"source": "github-runner",
"service": "ci",
"env": "dev"
},
"launch_block_device_mappings": [
{
"device_name": "/dev/sda1",
"volume_size": 100,
"volume_type": "gp2",
"delete_on_termination": true
}
]
}
],
"provisioners": [
{
"type": "shell",
"inline": [
"echo 127.0.0.1 $(hostname) >> /etc/hosts",
"apt-get update",
"apt-get -y install --no-install-recommends sudo apt-utils software-properties-common lsb-release rsync",
"apt-get -y install --no-install-recommends wget curl libunwind8 apt-transport-https ca-certificates",
"apt-get -y install --no-install-recommends git ruby ohai locales",
"locale-gen en_US.UTF-8",
"export LANG=en_US.UTF-8 | tee -a /etc/environment"
],
"environment_vars": [
"DEBIAN_FRONTEND=noninteractive"
],
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
}
]
}