22317: Get compute node settings from cluster configuration
[arvados.git] / tools / compute-images / azure_template.json
1 {
2   "variables": {
3     "ansible_command": "ansible-playbook",
4     "ansible_vars_file": "",
5     "account_file": "",
6     "arvados_cluster": "",
7     "build_environment": "azure-arm",
8     "client_id": "{{env `ARM_CLIENT_ID`}}",
9     "client_secret": "{{env `ARM_CLIENT_SECRET`}}",
10     "cloud_environment_name": "Public",
11     "image_sku": "",
12     "location": "centralus",
13     "project_id": "",
14     "resource_group": null,
15     "ssh_private_key_file": "{{env `PACKERPRIVKEY`}}",
16     "ssh_user": "packer",
17     "subscription_id": "{{env `ARM_SUBSCRIPTION_ID`}}",
18     "tenant_id": "{{env `ARM_TENANT_ID`}}"
19   },
20   "builders": [
21     {
22       "type": "azure-arm",
23       "cloud_environment_name": "{{user `cloud_environment_name`}}",
24
25       "client_id": "{{user `client_id`}}",
26       "client_secret": "{{user `client_secret`}}",
27       "subscription_id": "{{user `subscription_id`}}",
28       "tenant_id": "{{user `tenant_id`}}",
29
30       "managed_image_resource_group_name": "{{user `resource_group`}}",
31       "managed_image_name": "{{user `arvados_cluster`}}-compute-v{{ timestamp }}",
32
33       "ssh_username": "{{user `ssh_user`}}",
34       "ssh_private_key_file": "{{user `ssh_private_key_file`}}",
35
36       "image_publisher": "Canonical",
37       "image_offer": "UbuntuServer",
38       "image_sku": "{{user `image_sku`}}",
39
40       "os_type": "Linux",
41
42       "location": "{{user `location`}}",
43       "vm_size": "Standard_D1_v2"
44     }
45   ],
46   "provisioners": [{
47       "type": "ansible",
48       "command": "{{user `ansible_command`}}",
49       "playbook_file": "ansible/build-compute-image.yml",
50       "user": "{{user `ssh_user`}}",
51       "extra_arguments": [
52           "--extra-vars", "arvados_cluster_id={{ user `arvados_cluster` }}",
53           "--extra-vars", "@{{ user `ansible_vars_file` }}"
54       ]
55   }]
56 }