Merge branch '18323-cwl-gpu' refs #18323
[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   },
23   "builders": [
24     {
25       "type": "azure-arm",
26       "cloud_environment_name": "{{user `cloud_environment_name`}}",
27
28       "client_id": "{{user `client_id`}}",
29       "client_secret": "{{user `client_secret`}}",
30       "subscription_id": "{{user `subscription_id`}}",
31       "tenant_id": "{{user `tenant_id`}}",
32
33       "managed_image_resource_group_name": "{{user `resource_group`}}",
34       "managed_image_name": "{{user `arvados_cluster`}}-compute-v{{ timestamp }}",
35
36       "ssh_username": "{{user `ssh_user`}}",
37       "ssh_private_key_file": "{{user `ssh_private_key_file`}}",
38
39       "image_publisher": "Canonical",
40       "image_offer": "UbuntuServer",
41       "image_sku": "{{user `image_sku`}}",
42
43       "os_type": "Linux",
44
45       "location": "{{user `location`}}",
46       "vm_size": "Standard_D1_v2"
47     }
48   ],
49
50   "provisioners": [{
51     "type": "file",
52     "source": "1078ECD7.asc",
53     "destination": "/tmp/1078ECD7.asc"
54   },{
55     "type": "file",
56     "source": "scripts/etc-cloud-cloud.cfg.d-07_compute_arvados_dispatch_cloud.cfg",
57     "destination": "/tmp/etc-cloud-cloud.cfg.d-07_compute_arvados_dispatch_cloud.cfg"
58   },{
59     "type": "file",
60     "source": "scripts/usr-local-bin-ensure-encrypted-partitions.sh",
61     "destination": "/tmp/usr-local-bin-ensure-encrypted-partitions.sh"
62   },{
63     "type": "file",
64     "source": "{{user `public_key_file`}}",
65     "destination": "/tmp/crunch-authorized_keys"
66   },{
67     "type": "shell",
68     "execute_command": "sudo -S env {{ .Vars }} /bin/bash '{{ .Path }}'",
69     "script": "scripts/base.sh",
70     "environment_vars": ["RESOLVER={{user `resolver`}}","REPOSUFFIX={{user `reposuffix`}}","MKSQUASHFS_MEM={{user `mksquashfs_mem`}}","NVIDIA_GPU_SUPPORT={{user `nvidia_gpu_support`}}","CLOUD=azure"]
71   }]
72 }