This repository has been archived by the owner on Feb 21, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
aws.json
65 lines (65 loc) · 2 KB
/
aws.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
{
"builders": [
{
"type": "amazon-ebs",
"access_key": "{{user `access_key`}}",
"secret_key": "{{user `secret_key`}}",
"region": "us-east-1",
"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": "t3.micro",
"ssh_username": "ubuntu",
"subnet_id": "subnet-1d089f37",
"security_group_id": "sg-00759f214e854239e",
"ami_name": "marketplace-snapshot-{{timestamp}}"
}
],
"provisioners": [
{
"type": "file",
"source": "files/etc/update-motd.d/99-one-click.sh",
"destination": "~/99-one-click.sh"
},
{
"type": "file",
"source": "files/var/lib/cloud/scripts/per-instance/001_onboot.sh",
"destination": "~/001_onboot.sh"
},
{
"type": "shell",
"inline": [
"cp ~/99-one-click.sh /etc/update-motd.d/99-one-click.sh",
"cp ~/001_onboot.sh /var/lib/cloud/scripts/per-instance/001_onboot.sh",
"chmod +x /var/lib/cloud/scripts/per-instance/001_onboot.sh",
"chmod +x /etc/update-motd.d/99-one-click.sh",
"cloud-init status --wait",
"sudo apt-get -qqy update",
"sudo DEBIAN_FRONTEND=noninteractive apt-get -qqy -o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confold' dist-upgrade"
],
"execute_command": "chmod +x {{ .Path }}; {{ .Vars }} sudo bash {{ .Path }}"
},
{
"type": "shell",
"scripts": [
"scripts/10-install_docker.sh",
"scripts/80-firewall.sh"
],
"execute_command": "chmod +x {{ .Path }}; {{ .Vars }} sudo bash {{ .Path }}"
},
{
"type": "shell",
"scripts": [
"scripts/90-cleanup.sh",
"scripts/99-img_check.sh"
],
"execute_command": "chmod +x {{ .Path }}; {{ .Vars }} sudo bash {{ .Path }}"
}
]
}