-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmaas-create.json
56 lines (56 loc) · 1.59 KB
/
maas-create.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
{
"variables": {
"base_image": "ubuntu:latest",
"maas_image": "okffi/maas"
},
"builders": [
{
"type": "docker",
"image": "{{user `base_image`}}",
"export_path": "/tmp/maas-docker.tar"
}
],
"provisioners": [
{
"type": "shell",
"inline": [
"sleep 30",
"sudo apt-get update",
"sudo apt-get install -y git",
"sudo apt-get install -y postgresql",
"sudo apt-get install -y postgis*",
"sudo apt-get install -y python",
"sudo apt-get install -y python-psycopg2",
"sudo apt-get install -y python-pip",
"sudo apt-get install python-lxml",
"sudo apt-get install python-shortuuid",
"sudo pip install PPyGIS",
"sudo mkdir /maas",
"sudo mkdir /maas/server",
"/etc/init.d/postgresql start"
]
},
{
"type": "file",
"source": "server",
"destination": "/maas"
},
{
"type": "shell",
"inline": [
"sudo chmod +x /maas/server/run.sh",
"sudo -u postgres createdb sujuvuusnavigaattori",
"sudo -u postgres psql -d sujuvuusnavigaattori -a -f /maas/server/create.sql"
]
}
],
"post-processors": [
[
{
"type": "docker-import",
"repository": "{{user `maas_image`}}",
"tag": "latest"
}
]
]
}