Documentation

{ "variables": { "azure_client_id": "{{env `AZURE_CLIENT_ID`}}", "azure_client_secret": "{{env `AZURE_CLIENT_SECRET`}}", "azure_tenant_id": "{{env `AZURE_TENANT_ID`}}", "azure_subscription_id": "{{env `AZURE_SUBSCRIPTION_ID`}}", "version": "9.1.0", "vlong": "910" }, "builders": [ { "type": "azure-arm", "client_id": "{{user `azure_client_id`}}", "client_secret": "{{user `azure_client_secret`}}", "tenant_id": "{{user `azure_tenant_id`}}", "subscription_id": "{{user `azure_subscription_id`}}", "managed_image_resource_group_name": "gurobi", "managed_image_name": "gurobi-server{{user `vlong`}}-{{timestamp}}", "os_type": "Linux", "image_publisher": "Canonical", "image_offer": "UbuntuServer", "image_sku": "16.04-LTS", "azure_tags": { "dept": "Engineering", "task": "Image deployment" }, "location": "eastus", "vm_size": "Basic_A0" } ], "provisioners": [ { "type": "file", "source": "gurobi_server{{user `version`}}_linux64.tar.gz", "destination": "gurobi_server{{user `version`}}_linux64.tar.gz" }, { "type": "shell", "inline": [ "sudo tar xfz gurobi_server{{user `version`}}_linux64.tar.gz -C /opt", "sudo cp /opt/gurobi_server{{user `vlong`}}/linux64/bin/grb_rs_azure.cnf /opt/gurobi_server{{user `vlong`}}/linux64/bin/grb_rs.cnf", "sudo /opt/gurobi_server{{user `vlong`}}/linux64/bin/grb_rs start" ] }, { "execute_command": "chmod +x {{ .Path }}; {{ .Vars }} sudo -E sh '{{ .Path }}'", "inline": [ "apt-get update", "apt-get upgrade -y", "apt-get -y remove unattended-upgrades", "/usr/sbin/waagent -force -deprovision+user && export HISTSIZE=0 && sync" ], "inline_shebang": "/bin/sh -x", "type": "shell" } ] }