Merge branch '18323-cwl-gpu' refs #18323
[arvados.git] / tools / compute-images / arvados-images-aws.json
1 {
2   "variables": {
3     "arvados_cluster": "",
4     "associate_public_ip_address": "true",
5     "aws_access_key": "",
6     "aws_profile": "",
7     "aws_secret_key": "",
8     "aws_source_ami": "ami-031283ff8a43b021c",
9     "build_environment": "aws",
10     "public_key_file": "",
11     "mksquashfs_mem": "",
12     "nvidia_gpu_support": "",
13     "reposuffix": "",
14     "resolver": "",
15     "ssh_user": "admin",
16     "subnet_id": "",
17     "vpc_id": ""
18   },
19   "builders": [{
20     "type": "amazon-ebs",
21     "profile": "{{ user `aws_profile`}}",
22     "access_key": "{{user `aws_access_key`}}",
23     "secret_key": "{{user `aws_secret_key`}}",
24     "region": "{{user `aws_default_region`}}",
25     "ena_support": "true",
26     "source_ami": "{{user `aws_source_ami`}}",
27     "instance_type": "m4.large",
28     "vpc_id": "{{user `vpc_id`}}",
29     "subnet_id": "{{user `subnet_id`}}",
30     "associate_public_ip_address": "{{user `associate_public_ip_address`}}",
31     "ssh_username": "{{user `ssh_user`}}",
32     "ami_name": "arvados-{{user `arvados_cluster`}}-compute-{{isotime \"20060102150405\"}}",
33     "launch_block_device_mappings": [{
34       "device_name": "/dev/xvda",
35       "volume_size": 20,
36       "volume_type": "gp2",
37       "delete_on_termination": true
38     }],
39     "ami_block_device_mappings": [
40       {
41         "device_name": "/dev/xvdb",
42         "encrypted": true,
43         "virtual_name": "ephemeral0"
44       },
45       {
46         "device_name": "/dev/xvdc",
47         "encrypted": true,
48         "virtual_name": "ephemeral1"
49       }
50     ],
51     "tags": {
52       "Name": "arvados-{{user `arvados_cluster`}}-compute",
53       "creation_date": "{{isotime \"20060102150405\"}}",
54       "packer": "true"
55     },
56     "run_tags": {
57       "Name": "packer-arvados-{{user `arvados_cluster`}}-compute-builder",
58       "creation_date": "{{isotime \"20060102150405\"}}",
59       "environment": "development"
60     },
61     "run_volume_tags": {
62       "Name": "packer-arvados-{{user `arvados_cluster`}}-compute-builder",
63       "creation_date": "{{isotime \"20060102150405\"}}",
64       "environment": "development"
65     }
66   }],
67   "provisioners": [{
68     "type": "file",
69     "source": "1078ECD7.asc",
70     "destination": "/tmp/1078ECD7.asc"
71   },{
72     "type": "file",
73     "source": "scripts/etc-cloud-cloud.cfg.d-07_compute_arvados_dispatch_cloud.cfg",
74     "destination": "/tmp/etc-cloud-cloud.cfg.d-07_compute_arvados_dispatch_cloud.cfg"
75   },{
76     "type": "file",
77     "source": "scripts/usr-local-bin-ensure-encrypted-partitions.sh",
78     "destination": "/tmp/usr-local-bin-ensure-encrypted-partitions.sh"
79   },{
80     "type": "file",
81     "source": "{{user `public_key_file`}}",
82     "destination": "/tmp/crunch-authorized_keys"
83   },{
84     "type": "shell",
85     "execute_command": "sudo -S env {{ .Vars }} /bin/bash '{{ .Path }}'",
86     "script": "scripts/base.sh",
87     "environment_vars": ["RESOLVER={{user `resolver`}}","REPOSUFFIX={{user `reposuffix`}}","MKSQUASHFS_MEM={{user `mksquashfs_mem`}}","NVIDIA_GPU_SUPPORT={{user `nvidia_gpu_support`}}","CLOUD=aws"]
88   }]
89 }