@@ -16,8 +16,8 @@ Available states
16
16
``postgres ``
17
17
------------
18
18
19
- Installs and configures both PostgreSQL server and client with creation of
20
- various DB objects in the cluster.
19
+ Installs and configures both PostgreSQL server and client with creation of various DB objects in
20
+ the cluster.
21
21
22
22
``postgres.client ``
23
23
-------------------
@@ -27,8 +27,8 @@ Installs the PostgreSQL client binaries and libraries.
27
27
``postgres.manage ``
28
28
-------------------
29
29
30
- Creates such DB objects as: users, tablespaces, databases, schemas and
31
- extensions. See ``pillar.example `` file for details.
30
+ Creates such DB objects as: users, tablespaces, databases, schemas and extensions.
31
+ See ``pillar.example `` file for details.
32
32
33
33
``postgres.python ``
34
34
-------------------
@@ -38,22 +38,48 @@ Installs the PostgreSQL adapter for Python.
38
38
``postgres.server ``
39
39
-------------------
40
40
41
- Installs the PostgreSQL server package and prepares the DB cluster.
41
+ Installs the PostgreSQL server package, prepares the DB cluster and starts the server using
42
+ packaged init script, job or unit.
43
+
44
+ ``postgres.server.image ``
45
+ -------------------------
46
+
47
+ Installs the PostgreSQL server package, prepares the DB cluster and starts the server by issuing
48
+ raw ``pg_ctl `` command. The ``postgres:bake_image `` Pillar toggles this behaviour. For example:
49
+
50
+ .. code :: yaml
51
+
52
+ postgres :
53
+ bake_image : True
54
+
55
+ If set ``True ``, then it becomes possible to fully provision PostgreSQL with all supported entities
56
+ from ``postgres.manage `` state during the build ("baking") of AMI / VM / Container images (using
57
+ Packer, Docker or similar tools), i.e. when OS ``init `` process is not available to start the
58
+ service and enable it on "boot" of resulting appliance.
59
+
60
+ Also it allows to make Docker images with PostgreSQL using functionality being available since Salt
61
+ 2016.11.0 release:
62
+
63
+ .. code :: console
64
+
65
+ salt 'minion.with.docker' dockerng.sls_build my-postgres base=centos/systemd mods=postgres
66
+
67
+ If a lookup dictionary or Pillar has ``postgres:bake_image `` set ``False `` (this is default), it is
68
+ equivalent of applying ``postgres.server `` state.
42
69
43
70
``postgres.upstream ``
44
71
---------------------
45
72
46
73
Configures the PostgreSQL Official (upstream) repository on target system if
47
74
applicable.
48
75
49
- The state relies on the ``postgres:use_upstream_repo `` Pillar value which could
50
- be set as following:
76
+ The state relies on the ``postgres:use_upstream_repo `` Pillar value which could be set as following:
51
77
52
78
* ``True `` (default): adds the upstream repository to install packages from
53
79
* ``False ``: makes sure that the repository configuration is absent
54
80
55
- The ``postgres:version `` Pillar controls which version of the PostgreSQL
56
- packages should be installed from the upstream repository. Defaults to ``9.5 ``.
81
+ The ``postgres:version `` Pillar controls which version of the PostgreSQL packages should be
82
+ installed from the upstream repository. Defaults to ``9.5 ``.
57
83
58
84
Testing
59
85
=======
@@ -79,3 +105,5 @@ Builds and runs tests from scratch.
79
105
-----------------
80
106
81
107
Gives you ssh to the vagrant machine for manual testing.
108
+
109
+ .. vim: fenc=utf-8 spell spl=en cc=100 tw=99 fo=want sts=2 sw=2 et
0 commit comments