2013-01-01 23:57:11 +00:00
|
|
|
====================
|
|
|
|
File Server Backends
|
|
|
|
====================
|
|
|
|
|
|
|
|
Salt version 0.12.0 introduced the ability for the Salt Master to integrate
|
|
|
|
different file server backends. File server backends allows the Salt file
|
|
|
|
server to act as a transparent bridge to external resources. The primary
|
|
|
|
example of this is the git backend which allows for all of the Salt formulas
|
|
|
|
and files to be maintained in a remote git repository.
|
|
|
|
|
|
|
|
The fileserver backend system can accept multiple backends as well. This makes
|
2014-01-02 16:31:15 +00:00
|
|
|
it possible to have the environments listed in the :conf_master:`file_roots`
|
|
|
|
configuration available in addition to other backends, or the ability to mix
|
|
|
|
multiple backends.
|
2013-01-01 23:57:11 +00:00
|
|
|
|
2014-01-02 16:31:15 +00:00
|
|
|
This feature is managed by the :conf_master:`fileserver_backend` option in the
|
|
|
|
master config. The desired backend systems are listed in order of search
|
|
|
|
priority:
|
2013-01-01 23:57:11 +00:00
|
|
|
|
|
|
|
.. code-block:: yaml
|
|
|
|
|
|
|
|
fileserver_backend:
|
|
|
|
- roots
|
|
|
|
- git
|
|
|
|
|
2014-01-02 16:31:15 +00:00
|
|
|
With this configuration, the environments and files defined in the
|
|
|
|
:conf_master:`file_roots` parameter will be searched first, if the referenced
|
|
|
|
environment and file is not found then the :mod:`git <salt.fileserver.gitfs>`
|
|
|
|
backend will be searched.
|
2013-01-01 23:57:11 +00:00
|
|
|
|
|
|
|
Environments
|
|
|
|
------------
|
|
|
|
|
|
|
|
The concept of environments is followed in all backend systems. The
|
2014-01-02 16:31:15 +00:00
|
|
|
environments in the classic :mod:`roots <salt.fileserver.roots>` backend are
|
|
|
|
defined in the :conf_master:`file_roots` option. Environments map differently
|
|
|
|
based on the backend, for instance the git backend translated branches and tags
|
|
|
|
in git to environments. This makes it easy to define environments in git by
|
|
|
|
just setting a tag or forking a branch.
|