forked from nickodell/github-runner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaws-root.json
69 lines (69 loc) · 2.38 KB
/
aws-root.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
{
"variables": {
"access_key": "{{env `AWS_ACCESS_KEY_ID`}}",
"secret_key": "{{env `AWS_SECRET_ACCESS_KEY`}}",
"subnet_id": "{{env `PACKER_SUBNET_ID`}}",
"aws_account": "{{env `PACKER_AWS_ACCOUNT`}}"
},
"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": "ubuntu",
"subnet_id": "{{user `subnet_id`}}",
"source_ami_filter": {
"filters": {
"virtualization-type": "hvm",
"name": "ubuntu/images/*ubuntu-focal-20.04-amd64-server-*",
"root-device-type": "ebs"
},
"owners": [
"099720109477"
],
"most_recent": true
},
"instance_type": "m5.xlarge",
"ami_name": "root-focal",
"force_deregister": true,
"force_delete_snapshot": true,
"ami_regions": [
"us-east-1"
],
"tags": {
"Name": "root-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",
"sed -i 's/disable_root: true/disable_root: false/g' /etc/cloud/cloud.cfg",
"sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin prohibit-password/g' /etc/ssh/sshd_config",
"cp -fv /home/ubuntu/.ssh/authorized_keys /root/.ssh/"
],
"environment_vars": [
"DEBIAN_FRONTEND=noninteractive"
],
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
}
]
}