more comments; changed superuser name
[slapos.git] / software / postgres / instance.cfg.in
1 [buildout]
2 parts =
3   symlinks
4   publish
5   postgres-instance
6   postgres-promise
7
8
9 # Define egg directories to be the one from Software Release
10 # (/opt/slapgrid/...)
11 eggs-directory = ${buildout:eggs-directory}
12 develop-eggs-directory = ${buildout:develop-eggs-directory}
13 offline = true
14
15
16 [directories]
17 recipe = slapos.cookbook:mkdirectory
18 bin = $${buildout:directory}/bin
19 etc = $${buildout:directory}/etc
20 services = $${directories:etc}/service
21 promises = $${directories:etc}/promise
22 var = $${buildout:directory}/var
23
24
25 #----------------
26 #--
27 #-- Creates a Postgres cluster, configuration files, and a database.
28
29 [postgres-instance]
30 recipe = slapos.cookbook:postgres
31
32 # Options
33 ipv6 = $${instance-parameters:ipv6}
34 ipv4 = $${instance-parameters:ipv4}
35 ipv6_random = $${instance-parameters:ipv6_random}
36 superuser = postgres
37 port = 5432
38 dbname = db
39 # pgdata_directory is created by initdb, and should not exist beforehand.
40 pgdata-directory = $${directories:var}/data
41 bin = $${directories:bin}
42 services = $${directories:services}
43
44
45 #----------------
46 #--
47 #-- Creates symlinks from the instance to the software release.
48
49 [symlinks]
50 recipe = cns.recipe.symlink
51 symlink_target = $${directories:bin}
52 symlink_base = ${postgresql:location}/bin
53
54
55 #----------------
56 #--
57 #-- Deploy promise scripts.
58
59 [postgres-promise]
60 recipe = slapos.cookbook:check_port_listening
61 path = $${directories:promises}/postgres
62 hostname = $${instance-parameters:ipv6_random}
63 port = $${postgres-instance:port}
64
65
66 #----------------
67 #--
68 #-- Publish instance parameters.
69
70 [publish]
71 recipe = slapos.cookbook:publish
72 url = $${postgres-instance:url}
73
74
75 #----------------
76 #--
77 #-- Fetches parameters defined in SlapOS Master for this instance
78
79 [instance-parameters]
80 recipe = slapos.cookbook:slapconfiguration
81 computer = $${slap-connection:computer-id}
82 partition = $${slap-connection:partition-id}
83 url = $${slap-connection:server-url}
84 key = $${slap-connection:key-file}
85 cert = $${slap-connection:cert-file}
86