forked from getredash/redash
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpacker.json
More file actions
65 lines (65 loc) · 1.54 KB
/
packer.json
File metadata and controls
65 lines (65 loc) · 1.54 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
{
"variables": {
"redash_version": "",
"image_version": ""
},
"builders": [
{
"name": "redash-us-east-1",
"type": "amazon-ebs",
"region": "us-east-1",
"source_ami": "ami-0ac019f4fcb7cb7e6",
"instance_type": "t2.micro",
"ssh_username": "ubuntu",
"ami_name": "redash-{{user `image_version`}}-us-east-1"
},
{
"type": "googlecompute",
"project_id": "redash-bird-123",
"source_image_family": "ubuntu-1804-lts",
"zone": "us-central1-a",
"ssh_username": "arik"
}
],
"provisioners": [
{
"type": "shell",
"inline": [
"sleep 30"
]
},
{
"type": "shell",
"script": "setup.sh",
"execute_command": "{{ .Vars }} sudo -E -S bash '{{ .Path }}'",
"environment_vars": ["REDASH_VERSION={{user `redash_version`}}"]
},
{
"type": "shell",
"inline": "sudo rm /root/.ssh/authorized_keys || true"
},
{
"type": "shell",
"inline": "sudo rm /home/ubuntu/.ssh/authorized_keys || true"
},
{
"type": "file",
"source": "generate_key.sh",
"destination": "/tmp/rc.local"
},
{
"type": "shell",
"inline": ["sudo mv /tmp/rc.local /etc/rc.local", "sudo chown root /etc/rc.local", "sudo chmod 755 /etc/rc.local"]
}
],
"post-processors": [
{
"type": "googlecompute-export",
"only": ["googlecompute"],
"paths": [
"gs://redash-images/redash.{{user `redash_version`}}.tar.gz"
],
"keep_input_artifact": true
}
]
}