<commit_before>.. _proxy-minion:

=================
Salt Proxy Minion
=================

Proxy minions are a developing Salt feature that enables controlling devices
that, for whatever reason, cannot run a standard salt-minion.  Examples include
network gear that has an API but runs a proprietary OS, devices with limited
CPU or memory, or devices that could run a minion, but for security reasons,
will not.

*Proxy minions are not an "out of the box" feature*.  Because there are an
infinite number of controllable devices, you will most likely have to write the
interface yourself. Fortunately, this is only as difficult as the actual
interface to the proxied device.  Devices that have an existing Python module
(PyUSB for example) would be relatively simple to interface.  Code to control a
device that has an HTML REST-based interface should be easy.  Code to control
your typical housecat would be excellent source material for a PhD thesis.

Salt proxy-minions provide the 'plumbing' that allows device enumeration
and discovery, control, status, remote execution, and state management.

See the :ref:`Proxy Minion Walkthrough <proxy-minion-end-to-end-example>` for an end-to-end
demonstration of a working REST-based proxy minion.

See the :ref:`Proxy Minion SSH Walkthrough <proxy-minion-ssh-end-to-end-example>` for an end-to-end
demonstration of a working SSH proxy minion.


See :ref:`Proxyminion States <proxy-minion-states>` to configure and
run ``salt-proxy`` on a remote minion. Specify all your master side
proxy (pillar) configuration and use this state to remotely configure proxies on one
or more minions.

See :ref:`Proxyminion Beacon <proxy-minion-beacon>` to help
with easy configuration and management of ``salt-proxy`` processes.

New in Nitrogen
---------------

The connection with the remote device is kept alive by default, when the
module implements the ``alive`` function and :conf_proxy:`proxy_keep_alive`
is set to ``True``. The polling interval is set using the
:conf_proxy:`proxy_keep_alive_interval` option which defaults to 1 minute.

The developers are also able to use the :conf_proxy:`proxy_always_alive`,
when designing a proxy module flexible enough to open the
connection with the remote device only when required.

New in 2016.11.0
----------------

Proxy minions now support configuration files with names ending in '*.conf'
and placed in /etc/salt/proxy.d.

Proxy minions can now be configured in /etc/salt/proxy or /etc/salt/proxy.d
instead of just pillar.  Configuration format is the same as it would be in pillar.

<commit_msg>Note proxy_merge_grains_in_module<commit_after>.. _proxy-minion:

=================
Salt Proxy Minion
=================

Proxy minions are a developing Salt feature that enables controlling devices
that, for whatever reason, cannot run a standard salt-minion.  Examples include
network gear that has an API but runs a proprietary OS, devices with limited
CPU or memory, or devices that could run a minion, but for security reasons,
will not.

*Proxy minions are not an "out of the box" feature*.  Because there are an
infinite number of controllable devices, you will most likely have to write the
interface yourself. Fortunately, this is only as difficult as the actual
interface to the proxied device.  Devices that have an existing Python module
(PyUSB for example) would be relatively simple to interface.  Code to control a
device that has an HTML REST-based interface should be easy.  Code to control
your typical housecat would be excellent source material for a PhD thesis.

Salt proxy-minions provide the 'plumbing' that allows device enumeration
and discovery, control, status, remote execution, and state management.

See the :ref:`Proxy Minion Walkthrough <proxy-minion-end-to-end-example>` for an end-to-end
demonstration of a working REST-based proxy minion.

See the :ref:`Proxy Minion SSH Walkthrough <proxy-minion-ssh-end-to-end-example>` for an end-to-end
demonstration of a working SSH proxy minion.


See :ref:`Proxyminion States <proxy-minion-states>` to configure and
run ``salt-proxy`` on a remote minion. Specify all your master side
proxy (pillar) configuration and use this state to remotely configure proxies on one
or more minions.

See :ref:`Proxyminion Beacon <proxy-minion-beacon>` to help
with easy configuration and management of ``salt-proxy`` processes.

New in Nitrogen
---------------

The :conf_proxy:`proxy_merge_grains_in_module` configuration variable
introduced in 2016.3, has been changed, defaulting to ``True``.

The connection with the remote device is kept alive by default, when the
module implements the ``alive`` function and :conf_proxy:`proxy_keep_alive`
is set to ``True``. The polling interval is set using the
:conf_proxy:`proxy_keep_alive_interval` option which defaults to 1 minute.

The developers are also able to use the :conf_proxy:`proxy_always_alive`,
when designing a proxy module flexible enough to open the
connection with the remote device only when required.

New in 2016.11.0
----------------

Proxy minions now support configuration files with names ending in '*.conf'
and placed in /etc/salt/proxy.d.

Proxy minions can now be configured in /etc/salt/proxy or /etc/salt/proxy.d
instead of just pillar.  Configuration format is the same as it would be in pillar.


{'fraction_non_alphanumeric': 0.08130999435347261, 'fraction_numerical': 0.003952569169960474, 'mean_word_length': 4.50103519668737, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2341145', 'n_tokens_mistral': 1462, 'n_tokens_neox': 1369, 'n_words': 726}