Skip to content

Instantly share code, notes, and snippets.

@rj-reilly
Created February 9, 2017 14:34
Show Gist options
  • Save rj-reilly/be3dfa0f6c480d5b9f0bbf4d925cbd94 to your computer and use it in GitHub Desktop.
Save rj-reilly/be3dfa0f6c480d5b9f0bbf4d925cbd94 to your computer and use it in GitHub Desktop.
packer json
{
"variables": {
"version": ""
},
"builders": [
{
"type": "amazon-ebs",
"region": "us-east-1",
"instance_type": "m3.medium",
"source_ami": "ami-xxx",
"ami_name": "iGrid-v{{user `version`}}",
"user_data_file": "./bootstrap-aws.ps1",
"communicator": "winrm",
"winrm_username": "Administrator",
"winrm_password": "xxx",
"winrm_timeout": "4h",
"subnet_id": "subnet-xx",
"security_group_id": "sg-xx",
"access_key": "xx",
"secret_key": "xx",
"tags": {
"Name": "iGrid-v{{user `version`}}",
"Owner": "xxx - user"
}
}
],
"provisioners": [
{
"type": "file",
"source": "hosts",
"destination": "C:/Windows/System32/drivers/etc/hosts"
},
{
"type": "file",
"source": "/appbin/.chef/validation.pem",
"destination": "c:\\temp\\validation.pem"
},
{
"type": "powershell",
"scripts": [
"install-chef.ps1"
]
},
{
"type": "chef-client",
"guest_os_type": "windows",
"server_url": "https://xx.xxx.xxx.net/organizations/xxx",
"chef_environment": "prod",
"ssl_verify_mode": ":verify_none",
"node_name": "xxx-Packer01",
"run_list": [
"recipe[xxx_xxx::default]"
],
"skip_install": "true",
"validation_client_name": "xxx-validator",
"validation_key_path": "c:\\temp\\validation.pem"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment