-
Notifications
You must be signed in to change notification settings - Fork 1
/
packer-ubuntu-core.json
50 lines (49 loc) · 1.98 KB
/
packer-ubuntu-core.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
{
"min_packer_version": "0.7.5",
"variables": {
"ssh_private_key": "{{env `PACKER_SSH_KEYFILE`}}",
"aws_access_key": "{{env `AWS_ACCESS_KEY`}}",
"aws_secret_key": "{{env `AWS_SECRET_KEY`}}",
"encryption_key_arn": "{{env `AWS_GENERATION_ENCRYPTION_KEY`}}",
"jenkins_host_fqdn": "{{env `JENKINS_HOST`}}",
"jenkins_token": "{{env `JENKINS_TOKEN`}}",
"jenkins_credentials": "{{env `JENKINS_CREDS`}}",
"revision": "{{env `PACKER_REVISION`}}"
},
"builders": [
{
"type": "amazon-ebs",
"access_key": "{{user `aws_access_key`}}",
"secret_key": "{{user `aws_secret_key`}}",
"region": "us-west-2",
"vpc_id": "vpc-011a9d6a",
"availability_zone": "us-west-2b",
"source_ami": "ami-33566d03",
"instance_type": "m3.medium",
"ssh_private_ip": "true",
"ssh_username": "ubuntu",
"ami_name": "ubuntu-15.04-encrypted-root-{{user `revision`}}",
"ami_description": "Encrypted Root Volume Ubuntu 15.04 Built by Omada Health Packer Revision 1a. For more information: https://github.com/keyboardscience/packer/README.md",
"ssh_timeout": "15m",
"subnet_id": "subnet-071a9d6c",
"user_data_file": "cloud.cfg",
"ami_block_device_mappings": []
}
],
"provisioners": [
{
"type": "shell",
"environment_vars": ["ACCESS_KEY={{user `aws_access_key`}}","SECRET_KEY={{user `aws_secret_key`}}"],
"script": "packs/install-cli-tools"
},
{
"type": "shell",
"environment_vars": ["KEYID={{user `encryption_key_arn`}}","JENKINS_HOST={{user `jenkins_host_fqdn`}}","TOKEN={{user `jenkins_token`}}","JENKINS_CREDS={{user `jenkins_credentials`}}"],
"script": "packs/encrypt-provision"
},
{
"type": "shell",
"inline": "sleep 15"
}
]
}