Merge branch 'master' into 10477-upgrade-aws-s3-driver
[arvados.git] / tools / compute-images / arvados-images-azure.json
1 {
2   "variables": {
3     "storage_account": null,
4     "resource_group": null,
5     "client_id": "{{env `ARM_CLIENT_ID`}}",
6     "client_secret": "{{env `ARM_CLIENT_SECRET`}}",
7     "subscription_id": "{{env `ARM_SUBSCRIPTION_ID`}}",
8     "tenant_id": "{{env `ARM_TENANT_ID`}}",
9     "build_environment": "azure-arm",
10     "cloud_environment_name": "Public",
11     "location": "centralus",
12     "ssh_user": "packer",
13     "ssh_private_key_file": "{{env `PACKERPRIVKEY`}}",
14     "image_sku": "",
15     "arvados_cluster": "",
16     "project_id": "",
17     "account_file": "",
18     "fqdn": "",
19     "resolver": "",
20     "reposuffix": "",
21     "public_key_file": ""
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       "resource_group_name": "{{user `resource_group`}}",
34       "storage_account": "{{user `storage_account`}}",
35
36       "capture_container_name": "images",
37       "capture_name_prefix": "{{user `arvados_cluster`}}-compute",
38
39       "ssh_username": "{{user `ssh_user`}}",
40       "ssh_private_key_file": "{{user `ssh_private_key_file`}}",
41
42       "image_publisher": "Canonical",
43       "image_offer": "UbuntuServer",
44       "image_sku": "{{user `image_sku`}}",
45
46       "os_type": "Linux",
47
48       "location": "{{user `location`}}",
49       "vm_size": "Standard_D1_v2"
50     }
51   ],
52
53   "provisioners": [{
54     "type": "file",
55     "source": "1078ECD7.asc",
56     "destination": "/tmp/1078ECD7.asc"
57   },{
58     "type": "file",
59     "source": "scripts/etc-cloud-cloud.cfg.d-07_compute_arvados_dispatch_cloud.cfg",
60     "destination": "/tmp/etc-cloud-cloud.cfg.d-07_compute_arvados_dispatch_cloud.cfg"
61   },{
62     "type": "file",
63     "source": "scripts/usr-local-bin-ensure-encrypted-partitions.sh",
64     "destination": "/tmp/usr-local-bin-ensure-encrypted-partitions.sh"
65   },{
66     "type": "file",
67     "source": "{{user `public_key_file`}}",
68     "destination": "/tmp/crunch-authorized_keys"
69   },{
70     "type": "shell",
71     "execute_command": "sudo -S env {{ .Vars }} /bin/bash '{{ .Path }}'",
72     "script": "scripts/base.sh",
73     "environment_vars": ["ROLE=compute","RESOLVER={{user `resolver`}}","REPOSUFFIX={{user `reposuffix`}}"]
74   }]
75 }