-
-
Notifications
You must be signed in to change notification settings - Fork 223
Expand file tree
/
Copy pathaws-image.json
More file actions
76 lines (76 loc) · 2.08 KB
/
aws-image.json
File metadata and controls
76 lines (76 loc) · 2.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
{
"variables": {
"aws_access_key": "{{env `AWS_ACCESS_KEY_ID`}}",
"aws_secret_key": "{{env `AWS_SECRET_ACCESS_KEY`}}",
"region": "eu-west-1",
"ssh_username": "ubuntu",
"base_ami": "ami-0bc691261a82b32bc",
"instance_type": "c5.large",
"subnet_id": "subnet-c39cb6a5",
"docker_version": "",
"build_prefix": "",
"ami_regions": "",
"ami_groups": "",
"image_repo": "",
"image_version": ""
},
"builders": [
{
"type": "amazon-ebs",
"access_key": "{{user `aws_access_key`}}",
"secret_key": "{{user `aws_secret_key`}}",
"region": "{{user `region`}}",
"subnet_id": "{{user `subnet_id`}}",
"source_ami": "{{user `base_ami`}}",
"instance_type": "{{user `instance_type`}}",
"ssh_username": "{{user `ssh_username`}}",
"ami_name": "{{user `build_prefix`}}dstack-{{user `image_version` | clean_resource_name}}",
"associate_public_ip_address": true,
"ami_regions": "{{user `ami_regions`}}",
"ami_groups": "{{user `ami_groups`}}",
"tags": {
"Name": "DSTACK"
},
"launch_block_device_mappings": [
{
"device_name": "/dev/sda1",
"volume_size": 100,
"volume_type": "gp2",
"delete_on_termination": true
}
]
}
],
"provisioners": [
{
"type": "shell",
"inline": ["cloud-init status --long --wait"]
},
{
"type": "shell",
"scripts": [
"provisioners/kernel/apt-upgrade.sh",
"provisioners/kernel/apt-daily.sh",
"provisioners/kernel/apt-packages.sh",
"provisioners/kernel/kernel-tuning.sh"
]
},
{
"type": "file",
"source": "provisioners/install-docker.sh",
"destination": "/tmp/install-docker.sh"
},
{
"type": "file",
"source": "provisioners/run-docker",
"destination": "/tmp/run-docker"
},
{
"type": "shell",
"inline": [
"cd /tmp",
"chmod +x install-docker.sh",
"./install-docker.sh --version {{user `docker_version`}}"]
}
]
}