-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpacker.json
61 lines (61 loc) · 1.53 KB
/
packer.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
{
"variables": {
"aws_access_key_id": "{{env `AWS_ACCESS_KEY_ID`}}",
"aws_secret_key_id": "{{env `AWS_SECRET_KEY_ID`}}",
"aws_session_token": "{{env `AWS_SESSION_TOKEN`}}",
"time_zone": "{{env `TIME_ZONE`}}"
},
"builders": [
{
"type": "amazon-ebs",
"access_key": "{{user `aws_access_key_id`}}",
"secret_key": "{{user `aws_secret_key_id`}}",
"token": "{{user `aws_session_token`}}",
"region": "eu-west-1",
"source_ami": "ami-0c15700b4e6bf474e",
"instance_type": "t2.micro",
"ssh_username": "ec2-user",
"associate_public_ip_address": "true",
"ami_name": "docker-production-aws-ecs-base {{timestamp}}",
"tags": {
"Name": "Docker Production AWS ECS Base Image",
"SourceAMI": "ami-0c15700b4e6bf474e",
"DockerVersion": "1.12.6",
"ECSAgentVersion": "1.13.1"
}
}
],
"provisioners": [
{
"type": "shell",
"script": "scripts/configure-timezone.sh",
"environment_vars": [
"TIME_ZONE={{user `time_zone`}}"
]
},
{
"type": "shell",
"script": "scripts/install-os-packages.sh"
},
{
"type": "shell",
"script": "scripts/cloud-init-options.sh"
},
{
"type": "shell",
"script": "scripts/cleanup.sh"
},
{
"type": "file",
"source": "files/firstrun.sh",
"destination": "/home/ec2-user/firstrun.sh"
}
],
"post-processors": [
{
"type": "manifest",
"output": "manifest.json",
"strip_path": true
}
]
}