-
Notifications
You must be signed in to change notification settings - Fork 33
/
Packerfile.json
76 lines (76 loc) · 2.35 KB
/
Packerfile.json
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
{
"builders": [
{
"ami_description": "Snowplow Mini - The Snowplow Pipeline in a box",
"ami_groups": [
"all"
],
"ami_name": "snowplow-mini-{{user `aws_version`}}-{{user `sp_mini_size`}}-{{ timestamp }}-hvm-ebs-amd64",
"ami_regions": "us-east-2,us-west-1,us-west-2,ca-central-1,eu-west-1,eu-central-1,eu-west-2,ap-southeast-1,ap-southeast-2,ap-northeast-2,ap-northeast-1,ap-south-1,sa-east-1",
"instance_type": "{{user `aws_instance_type`}}",
"region": "us-east-1",
"source_ami_filter": {
"filters": {
"virtualization-type": "hvm",
"architecture": "x86_64",
"name": "ubuntu/images/hvm-ssd/ubuntu-bionic-18.04-amd64-server-*",
"root-device-type": "ebs"
},
"owners": ["099720109477"],
"most_recent": true
},
"ssh_username": "ubuntu",
"tags": {
"OS_Version": "Ubuntu-18.04",
"Release": "{{user `aws_version`}}"
},
"type": "amazon-ebs"
},
{
"type": "googlecompute",
"image_description": "Snowplow Mini - The Snowplow Pipeline in a box",
"image_name": "{{user `gcp_image_name`}}",
"machine_type": "{{user `gcp_machine_type`}}",
"project_id": "snowplow-images",
"source_image_family": "ubuntu-1804-lts",
"ssh_username": "ubuntu",
"zone": "us-central1-a"
}
],
"post-processors": [
[
{
"type": "googlecompute-export",
"only": ["googlecompute"],
"paths": [
"gs://snowplow-mini/{{user `gcp_image_name`}}.tar.gz"
],
"keep_input_artifact": true
},
{
"type": "shell-local",
"only": ["googlecompute"],
"inline": [
"gsutil acl ch -u AllUsers:R gs://snowplow-mini/{{user `gcp_image_name`}}.tar.gz"
]
}
]
],
"provisioners": [
{
"playbook_file": "provisioning/publish.yml",
"type": "ansible",
"extra_arguments": [
"--become"
]
}
],
"variables": {
"aws_version": "{{env `AWS_SP_MINI_VERSION`}}",
"gcp_version": "{{env `GCP_SP_MINI_VERSION`}}",
"gcp_image_name": "snowplow-mini-{{user `gcp_version`}}-{{user `sp_mini_size`}}-{{timestamp}}",
"gcp_machine_type": "{{env `GCP_MACHINE_TYPE`}}",
"aws_instance_type": "{{env `AWS_INSTANCE_TYPE`}}",
"sp_mini_size": "{{env `SP_MINI_SIZE`}}"
}
}