diff --git a/doc/contents.rst b/doc/contents.rst index fe3c4a88e55d..cb1e3e52a26d 100644 --- a/doc/contents.rst +++ b/doc/contents.rst @@ -23,6 +23,7 @@ Salt Table of Contents ref/index topics/api topics/topology/index + topics/cache/index topics/windows/index topics/development/index topics/releases/index diff --git a/doc/ref/cache/all/index.rst b/doc/ref/cache/all/index.rst new file mode 100644 index 000000000000..9a9cdcf64239 --- /dev/null +++ b/doc/ref/cache/all/index.rst @@ -0,0 +1,14 @@ +.. _all-salt.cache: + +============= +cache modules +============= + +.. currentmodule:: salt.cache + +.. autosummary:: + :toctree: + :template: autosummary.rst.tmpl + + localfs + consul diff --git a/doc/ref/cache/all/salt.cache.consul.rst b/doc/ref/cache/all/salt.cache.consul.rst new file mode 100644 index 000000000000..516a3b8f62f8 --- /dev/null +++ b/doc/ref/cache/all/salt.cache.consul.rst @@ -0,0 +1,5 @@ +salt.cache.consul module +======================== + +.. automodule:: salt.cache.consul + :members: diff --git a/doc/ref/cache/all/salt.cache.localfs.rst b/doc/ref/cache/all/salt.cache.localfs.rst new file mode 100644 index 000000000000..b8867cbe162d --- /dev/null +++ b/doc/ref/cache/all/salt.cache.localfs.rst @@ -0,0 +1,5 @@ +salt.cache.localfs module +========================= + +.. automodule:: salt.cache.localfs + :members: diff --git a/doc/ref/index.rst b/doc/ref/index.rst index ac7ae4616343..f05ecb67e3fd 100644 --- a/doc/ref/index.rst +++ b/doc/ref/index.rst @@ -10,6 +10,7 @@ This section contains a list of the Python modules that are used to extend the v ../ref/auth/all/index ../ref/beacons/all/index + ../ref/cache/all/index ../ref/engines/all/index ../ref/file_server/all/index ../ref/grains/all/index diff --git a/doc/topics/cache/index.rst b/doc/topics/cache/index.rst new file mode 100644 index 000000000000..fa6d04a87b43 --- /dev/null +++ b/doc/topics/cache/index.rst @@ -0,0 +1,33 @@ +.. _cache: + +================= +Minion Data Cache +================= + +The Minion Data Cache contains the Salt Mine data and other minion info cached +on the Salt master. By default Salt uses the `localfs` cache module to save +the data in a msgpack file on the Salt master. Other external data stores can +also be used to store this data such as the `Consul` module. + +See :ref:`cache modules ` for a current list. + + +Configuring the Minion Data Cache +================================= + +The default `localfs` Minion data cache module doesn't require any +configuration. External data cache modules with external data stores such as +Consul require a configuration setting in the master config. + +Here's an exampls config for Consul: + +.. code-block:: yaml + + consul.host: 127.0.0.1 + consul.port: 8500 + consul.token: None + consul.scheme: http + consul.consistency: default + consul.dc: dc1 + consul.verify: True + diff --git a/salt/cache/consul.py b/salt/cache/consul.py index 090bab3a73a7..f89ad821544e 100644 --- a/salt/cache/consul.py +++ b/salt/cache/consul.py @@ -21,7 +21,7 @@ consul.token: None consul.scheme: http consul.consistency: default - consul.dc: None + consul.dc: dc1 consul.verify: True Related docs could be found here: diff --git a/salt/cache/localfs.py b/salt/cache/localfs.py index 46c1d16e8fda..b641b52dc647 100644 --- a/salt/cache/localfs.py +++ b/salt/cache/localfs.py @@ -4,6 +4,9 @@ .. versionadded:: 2016.11.0 +The `localfs` Minion cache module is the default cache module and does not +require any configuration. + Expirations can be set in the relevant config file (``/etc/salt/master`` for the master, ``/etc/salt/cloud`` for Salt Cloud, etc). '''