| { |
| "variables":{ |
| "region":"us-west-2", |
| "source_ami":"ami-4e6ea82e", |
| "source_image_name":"X.vmx", |
| "image_name":"build-windows", |
| "gemfire_archive": "gemfire.zip" |
| }, |
| "builders":[ |
| { |
| "type":"amazon-ebs", |
| "instance_type":"t2.large", |
| "ami_name":"native-{{user `version`}}-{{user `image_name`}} {{timestamp}}", |
| "access_key":"{{user `aws_access_key`}}", |
| "secret_key":"{{user `aws_secret_key`}}", |
| "region":"{{user `region`}}", |
| "source_ami":"{{user `source_ami`}}", |
| "subnet_id":"{{user `subnet_id`}}", |
| "vpc_id":"{{user `vpc_id`}}", |
| "tags":{ |
| "team":"native", |
| "version":"{{user `version`}}", |
| "source_ami":"{{user `source_ami`}}" |
| }, |
| "communicator":"ssh", |
| "ssh_username":"Administrator", |
| "ssh_handshake_attempts":100, |
| "ssh_timeout":"15m", |
| "launch_block_device_mappings":[ |
| { |
| "device_name":"/dev/sda1", |
| "delete_on_termination":true, |
| "volume_size":100 |
| } |
| ] |
| } |
| ], |
| "provisioners": [ |
| { |
| "pause_before":"60s", |
| "type": "powershell", |
| "scripts": [ |
| "windows/install-dependencies.ps1" |
| ] |
| }, |
| { |
| "type": "powershell", |
| "scripts": [ |
| "windows/install-activeperl.ps1" |
| ] |
| }, |
| { |
| "type": "file", |
| "source": "{{user `gemfire_archive`}}", |
| "destination": "gemfire.tar.gz" |
| }, |
| { |
| "type": "powershell", |
| "scripts": [ |
| "windows/install-gemfire.ps1" |
| ] |
| }, |
| { |
| "type":"file", |
| "source":"windows/Packer.psm1", |
| "destination":"Documents/WindowsPowerShell/Modules/Packer/Packer.psm1" |
| }, |
| { |
| "type": "powershell", |
| "scripts": [ |
| "windows/install-openssl.ps1" |
| ] |
| }, |
| { |
| "type": "powershell", |
| "scripts": [ |
| "windows/add-user-build.ps1" |
| ] |
| }, |
| { |
| "type": "file", |
| "source": "windows/init-user-build.ps1", |
| "destination": "C:/Users/build/init-user-build.ps1" |
| }, |
| { |
| "type": "powershell", |
| "scripts": [ |
| "windows/cleanup.ps1" |
| ] |
| }, |
| { |
| "type": "powershell", |
| "scripts": [ |
| "windows/setup-ec2launch.ps1" |
| ], |
| "only": [ |
| "amazon-ebs" |
| ] |
| } |
| ] |
| } |