mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Add docs
This commit is contained in:
parent
e14f60b75c
commit
b3fdce7b75
3 changed files with 74 additions and 2 deletions
70
doc/topics/proxyminion/beacon.rst
Normal file
70
doc/topics/proxyminion/beacon.rst
Normal file
|
@ -0,0 +1,70 @@
|
|||
.. versionadded:: 2015.8.3
|
||||
|
||||
===================
|
||||
Proxy Minion Beacon
|
||||
===================
|
||||
|
||||
|
||||
The salt proxy beacon is meant to facilitate configuring
|
||||
multiple proxies on one or many minions. This should simplify
|
||||
configuring and managing multiple ``salt-proxy`` processes.
|
||||
|
||||
1. On your salt-master, ensure that pillar is configured properly. Select an ID
|
||||
for your proxy (in this example we will name the proxy 'p8000').
|
||||
In your pillar topfile, place an entry for your proxy:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
base:
|
||||
'p8000':
|
||||
- p8000
|
||||
|
||||
This says that Salt's pillar should load some values for the proxy ``p8000``
|
||||
from the file /srv/pillar/p8000.sls (if you have not changed your default pillar_roots)
|
||||
|
||||
2. In the pillar root for your base environment, create this file:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
p8000.sls
|
||||
---------
|
||||
|
||||
proxy:
|
||||
# set proxytype for your proxymodule
|
||||
proxytype: ssh_sample
|
||||
host: saltyVM
|
||||
username: salt
|
||||
password: badpass
|
||||
|
||||
This should complete the proxy setup for ``p8000``
|
||||
|
||||
3. `Configure`_ the ``salt_proxy`` beacon
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
beacons:
|
||||
salt_proxy:
|
||||
- p8000: {}
|
||||
|
||||
|
||||
Once this beacon is configured it will automatically start the ``salt-proxy``
|
||||
process. If the ``salt-proxy`` process is terminated the beacon will
|
||||
re-start it.
|
||||
|
||||
4. Accept your proxy's key on your salt-master
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
salt-key -y -a p8000
|
||||
The following keys are going to be accepted:
|
||||
Unaccepted Keys:
|
||||
p8000
|
||||
Key for minion p8000 accepted.
|
||||
|
||||
5. Now you should be able to run commands on your proxy.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
salt p8000 pkg.list_pkgs
|
||||
|
||||
.. _Configure: https://docs.saltstack.com/en/latest/topics/beacons/#configuring-beacons
|
|
@ -33,6 +33,8 @@ 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 :doc:`Proxyminion Beacon </topics/proxyminion/beacon>` to help
|
||||
with easy configuration and management of ``salt-proxy`` processes.
|
||||
|
||||
New in 2015.8.2
|
||||
---------------
|
||||
|
|
|
@ -155,7 +155,7 @@ def is_running(proxyname):
|
|||
Returns True if the process is running
|
||||
False otherwise
|
||||
|
||||
Paramters:
|
||||
Parameters:
|
||||
proxyname:
|
||||
String name of the proxy (p8000 for example)
|
||||
|
||||
|
@ -163,6 +163,6 @@ def is_running(proxyname):
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
salt deviceminion salt_proxy.is_running
|
||||
salt deviceminion salt_proxy.is_running p8000
|
||||
'''
|
||||
return {'result': _is_proxy_running(proxyname)}
|
||||
|
|
Loading…
Add table
Reference in a new issue