22206: Wrap environment_vars for better readability
[arvados.git] / tools / compute-images / arvados-images-azure.json
1 {
2   "variables": {
3     "account_file": "",
4     "arvados_cluster": "",
5     "build_environment": "azure-arm",
6     "client_id": "{{env `ARM_CLIENT_ID`}}",
7     "client_secret": "{{env `ARM_CLIENT_SECRET`}}",
8     "cloud_environment_name": "Public",
9     "image_sku": "",
10     "location": "centralus",
11     "project_id": "",
12     "public_key_file": "",
13     "mksquashfs_mem": "",
14     "nvidia_gpu_support": "",
15     "reposuffix": "",
16     "resolver": "",
17     "resource_group": null,
18     "ssh_private_key_file": "{{env `PACKERPRIVKEY`}}",
19     "ssh_user": "packer",
20     "subscription_id": "{{env `ARM_SUBSCRIPTION_ID`}}",
21     "tenant_id": "{{env `ARM_TENANT_ID`}}",
22     "workdir": "/tmp"
23   },
24   "builders": [
25     {
26       "type": "azure-arm",
27       "cloud_environment_name": "{{user `cloud_environment_name`}}",
28
29       "client_id": "{{user `client_id`}}",
30       "client_secret": "{{user `client_secret`}}",
31       "subscription_id": "{{user `subscription_id`}}",
32       "tenant_id": "{{user `tenant_id`}}",
33
34       "managed_image_resource_group_name": "{{user `resource_group`}}",
35       "managed_image_name": "{{user `arvados_cluster`}}-compute-v{{ timestamp }}",
36
37       "ssh_username": "{{user `ssh_user`}}",
38       "ssh_private_key_file": "{{user `ssh_private_key_file`}}",
39
40       "image_publisher": "Canonical",
41       "image_offer": "UbuntuServer",
42       "image_sku": "{{user `image_sku`}}",
43
44       "os_type": "Linux",
45
46       "location": "{{user `location`}}",
47       "vm_size": "Standard_D1_v2"
48     }
49   ],
50
51   "provisioners": [{
52     "type": "file",
53     "source": "1078ECD7.asc",
54     "destination": "/{{user `workdir`}}/1078ECD7.asc"
55   },{
56     "type": "file",
57     "source": "scripts/etc-cloud-cloud.cfg.d-07_compute_arvados_dispatch_cloud.cfg",
58     "destination": "/{{user `workdir`}}/etc-cloud-cloud.cfg.d-07_compute_arvados_dispatch_cloud.cfg"
59   },{
60     "type": "file",
61     "source": "scripts/etc-systemd-system-systemd-modules-load.service.d-detect-gpu.conf",
62     "destination": "{{user `workdir`}}/etc-systemd-system-systemd-modules-load.service.d-detect-gpu.conf"
63   },{
64     "type": "file",
65     "source": "scripts/usr-local-bin-detect-gpu.sh",
66     "destination": "{{user `workdir`}}/usr-local-bin-detect-gpu.sh"
67   },{
68     "type": "file",
69     "source": "scripts/usr-local-bin-ensure-encrypted-partitions.sh",
70     "destination": "/{{user `workdir`}}/usr-local-bin-ensure-encrypted-partitions.sh"
71   },{
72     "type": "file",
73     "source": "{{user `public_key_file`}}",
74     "destination": "/{{user `workdir`}}/crunch-authorized_keys"
75   },{
76     "type": "shell",
77     "execute_command": "sudo -S env {{ .Vars }} /bin/bash '{{ .Path }}'",
78     "script": "scripts/base.sh",
79     "environment_vars": [
80         "RESOLVER={{user `resolver`}}",
81         "REPOSUFFIX={{user `reposuffix`}}",
82         "MKSQUASHFS_MEM={{user `mksquashfs_mem`}}",
83         "NVIDIA_GPU_SUPPORT={{user `nvidia_gpu_support`}}",
84         "CLOUD=azure",
85         "WORKDIR={{user `workdir`}}"
86     ]
87   }]
88 }