Skip to content

Commit

Permalink
Add documentation for the Minion data cache
Browse files Browse the repository at this point in the history
Includes docs for localfs and consul minion data cache modules
  • Loading branch information
UtahDave committed Jan 19, 2017
1 parent d489e05 commit a643340
Show file tree
Hide file tree
Showing 8 changed files with 63 additions and 1 deletion.
1 change: 1 addition & 0 deletions doc/contents.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
14 changes: 14 additions & 0 deletions doc/ref/cache/all/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.. _all-salt.cache:

=============
cache modules
=============

.. currentmodule:: salt.cache

.. autosummary::
:toctree:
:template: autosummary.rst.tmpl

localfs
consul
5 changes: 5 additions & 0 deletions doc/ref/cache/all/salt.cache.consul.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
salt.cache.consul module
========================

.. automodule:: salt.cache.consul
:members:
5 changes: 5 additions & 0 deletions doc/ref/cache/all/salt.cache.localfs.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
salt.cache.localfs module
=========================

.. automodule:: salt.cache.localfs
:members:
1 change: 1 addition & 0 deletions doc/ref/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
33 changes: 33 additions & 0 deletions doc/topics/cache/index.rst
Original file line number Diff line number Diff line change
@@ -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 <all-salt.cache>` 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
2 changes: 1 addition & 1 deletion salt/cache/consul.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 3 additions & 0 deletions salt/cache/localfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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).
'''
Expand Down

0 comments on commit a643340

Please sign in to comment.