{ "variables": { "aws_access_key": "{{env `AWS_ACCESS_KEY_ID`}}", "aws_secret_key": "{{env `AWS_SECRET_ACCESS_KEY`}}", "aws_region": "{{env `AWS_REGION`}}", "aws_source_ami": "ami-8e0b9499", "azure_client_id": "{{env `AZURE_CLIENT_ID`}}", "azure_tenant_id": "{{env `AZURE_TENANT_ID`}}", "azure_client_secret": "{{env `AZURE_CLIENT_SECRET`}}", "azure_subscription_id": "{{env `AZURE_SUBSCRIPTION_ID`}}", "azure_storage_account": "{{env `AZURE_STORAGE_ACCOUNT`}}", "azure_resource_group": "{{env `AZURE_RESOURCE_GROUP`}}", "azure_object_id": "{{env `AZURE_OBJECT_ID`}}", "azure_location": "", "azure_image_publisher": "Canonical", "azure_image_offer": "UbuntuServer", "azure_image_sku": "14.04.5-LTS", "azure_image_version": "latest", "gce_account_file": "{{env `GCE_ACCOUNT_FILE`}}", "gce_project_id": "{{env `GCE_PROJECT_ID`}}", "gce_zone": "{{env `GCE_ZONE`}}", "gce_source_image": "ubuntu-1404-trusty-v20160809a", "build-nodes": "1", "chef_channel": "stable", "chef_install_url": "curl -L https://omnitruck.chef.io/install.sh", "chef_ver": "latest", "chef-server": "stable-latest", "domain": "animals.biz", "domain_prefix": "", "enterprise": "mammals", "manage": "stable-latest", "org": "marsupials", "push-jobs-server": "stable-latest", "ssh_username": "ubuntu", "workstations": "1" }, "builders": [ { "type": "amazon-ebs", "access_key": "{{user `aws_access_key`}}", "secret_key": "{{user `aws_secret_key`}}", "region": "{{user `aws_region`}}", "source_ami": "{{user `aws_source_ami`}}", "instance_type": "m4.large", "communicator": "ssh", "associate_public_ip_address": true, "ssh_username": "{{user `ssh_username`}}", "ssh_pty": true, "ami_name": "chef-{{timestamp}}" }, { "type": "azure-arm", "subscription_id": "{{user `azure_subscription_id`}}", "client_id": "{{user `azure_client_id`}}", "client_secret": "{{user `azure_client_secret`}}", "tenant_id": "{{user `azure_tenant_id`}}", "resource_group_name": "{{user `azure_resource_group`}}", "storage_account": "{{user `azure_storage_account`}}", "object_id": "{{user `azure_object_id`}}", "capture_container_name": "images", "capture_name_prefix": "chef-server", "os_type": "Linux", "image_publisher": "{{ user `azure_image_publisher` }}", "image_offer": "{{ user `azure_image_offer` }}", "image_sku": "{{ user `azure_image_sku` }}", "image_version": "{{ user `azure_image_version` }}", "location": "{{user `azure_location`}}", "vm_size": "Standard_DS3_v2", "ssh_username": "{{user `ssh_username`}}", "ssh_pty": true }, { "type": "googlecompute", "account_file": "{{user `gce_account_file`}}", "project_id": "{{user `gce_project_id`}}", "source_image": "{{user `gce_source_image`}}", "zone": "{{user `gce_zone`}}", "disk_type": "pd-ssd", "disk_size": "80", "image_name": "chef-{{timestamp}}", "machine_type": "n1-standard-2", "ssh_username": "{{user `ssh_username`}}", "ssh_pty": true } ], "provisioners": [ { "type": "file", "source": "{{pwd}}/files/", "destination": "/tmp" }, { "type": "file", "source": "{{pwd}}/keys/", "destination": "/tmp" }, { "type": "chef-solo", "install_command": "{{user `chef_install_url`}} | sudo bash -s -- -c {{user `chef_channel`}} -v {{user `chef_ver`}}", "cookbook_paths": [ "{{pwd}}/vendored-cookbooks/chef_server" ], "run_list": [ "chef_server", "wombat::authorized-keys", "wombat::etc-hosts" ], "json": { "demo": { "admin-user": "{{user `ssh_username`}}", "domain_prefix": "{{user `domain_prefix`}}", "domain": "{{user `domain`}}", "enterprise": "{{user `enterprise`}}", "org": "{{user `org`}}", "build-nodes": "{{user `build-nodes`}}", "workstations": "{{user `workstations`}}", "versions": { "chef-server": "{{user `chef-server`}}", "push-jobs-server": "{{user `push-jobs-server`}}", "manage": "{{user `manage`}}" } } } }, { "only": [ "azure-arm" ], "execute_command": "chmod +x {{ .Path }}; {{ .Vars }} sudo -E sh '{{ .Path }}'", "inline": [ "/usr/sbin/waagent -force -deprovision+user && export HISTSIZE=0 && sync" ], "inline_shebang": "/bin/sh -x", "type": "shell", "skip_clean": true } ] }