@@ -16,8 +16,8 @@ Available states
1616``postgres ``
1717------------
1818
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.
2121
2222``postgres.client ``
2323-------------------
@@ -27,8 +27,8 @@ Installs the PostgreSQL client binaries and libraries.
2727``postgres.manage ``
2828-------------------
2929
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.
3232
3333``postgres.python ``
3434-------------------
@@ -38,22 +38,48 @@ Installs the PostgreSQL adapter for Python.
3838``postgres.server ``
3939-------------------
4040
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.
4269
4370``postgres.upstream ``
4471---------------------
4572
4673Configures the PostgreSQL Official (upstream) repository on target system if
4774applicable.
4875
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:
5177
5278* ``True `` (default): adds the upstream repository to install packages from
5379* ``False ``: makes sure that the repository configuration is absent
5480
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 ``.
5783
5884Testing
5985=======
@@ -79,3 +105,5 @@ Builds and runs tests from scratch.
79105-----------------
80106
81107Gives 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