-
Notifications
You must be signed in to change notification settings - Fork 0
/
packer.json
77 lines (77 loc) · 2.21 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
{
"variables": {
"USERNAME": "{{ env `USERNAME` }}",
"ACCESS_KEY": "{{ env `ACCESS_KEY` }}",
"SOURCE_AMI": "ami-0196cda9251876643",
"NAME": "mpatel-Windows-Crystal-Report-AMI",
"REGION": "{{ env `REGION` }}",
"SSH_KEY": "{{ env `SSH_KEY` }}",
"SECRET_KEY": "{{ env `SECRET_KEY` }}",
"PASSWORD": "{{ env `PASSWORD` }}",
"SITE_BINDING_NAME": "{{ env `SITE_BINDING_NAME` }}",
"DEPLOY_USER_PASSWORD": "{{ env `DEPLOY_USER_PASSWORD` }}",
"DESCRIPTION": "Windows Crystal Report AMI"
},
"provisioners": [
{
"source": "./resources/",
"destination": "c:\\resources\\",
"type": "file"
},
{
"inline": [
"dir c:\\\\"
],
"type": "powershell"
},
{
"type": "powershell",
"environment_vars": [
"PASSWORD={{ user `PASSWORD` }}",
"DEPLOY_USER_PASSWORD={{ user `DEPLOY_USER_PASSWORD` }}",
"SITE_BINDING_NAME={{ user `SITE_BINDING_NAME` }}"
],
"scripts": [
"./bin/setupTools.ps1",
"./bin/setupCrystal.ps1",
"./bin/setupIIS.ps1"
]
}
],
"builders": [
{
"winrm_password": "{{ user `PASSWORD` }}",
"tags": [
{
"Name": "{{ user `NAME` }}"
},
{
"Description": "{{ user `DESCRIPTION` }}"
}
],
"ami_virtualization_type": "hvm",
"ssh_private_key_file": "{{ user `SSH_KEY` }}",
"communicator": "winrm",
"security_group_ids": [
"<SECURITY_GROUP_IDS>"
],
"winrm_username": "{{ user `USERNAME` }}",
"access_key": "{{ user `ACCESS_KEY` }}",
"source_ami": "{{ user `SOURCE_AMI` }}",
"subnet_id": "<SUBNET_ID>",
"region": "{{ user `REGION` }}",
"ami_name": "mpatel-{{ user `SOURCE_AMI` }}-crystal-{{timestamp}}",
"ami_users": [
"<AWS_ACCOUNT_NUMBER>"
],
"instance_type": "t2.micro",
"ami_description": "{{ user `DESCRIPTION` }}",
"ssh_keypair_name": "<SSH Key Name>",
"associate_public_ip_address": false,
"vpc_id": "<VPC_ID>",
"secret_key": "{{ user `SECRET_KEY` }}",
"user_data_file": "./bin/bootstrap.txt",
"type": "amazon-ebs"
}
]
}