beacon.rst 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. .. _proxy-minion-beacon:
  2. .. versionadded:: 2015.8.3
  3. ===================
  4. Proxy Minion Beacon
  5. ===================
  6. The salt proxy beacon is meant to facilitate configuring
  7. multiple proxies on one or many minions. This should simplify
  8. configuring and managing multiple ``salt-proxy`` processes.
  9. 1. On your salt-master, ensure that pillar is configured properly. Select an ID
  10. for your proxy (in this example we will name the proxy 'p8000').
  11. In your pillar topfile, place an entry for your proxy:
  12. .. code-block:: yaml
  13. base:
  14. 'p8000':
  15. - p8000
  16. This says that Salt's pillar should load some values for the proxy ``p8000``
  17. from the file ``/srv/pillar/p8000.sls`` (if you have not changed your default pillar_roots)
  18. 2. In the pillar root for your base environment, create the ``p8000.sls`` file with the
  19. following contents:
  20. .. code-block:: yaml
  21. proxy:
  22. # set proxytype for your proxymodule
  23. proxytype: ssh_sample
  24. host: saltyVM
  25. username: salt
  26. password: badpass
  27. This should complete the proxy setup for ``p8000``
  28. 3. `Configure`_ the ``salt_proxy`` beacon
  29. .. code-block:: yaml
  30. beacons:
  31. salt_proxy:
  32. - proxies:
  33. p8000: {}
  34. p8001: {}
  35. Once this beacon is configured it will automatically start the ``salt-proxy``
  36. process. If the ``salt-proxy`` process is terminated the beacon will
  37. re-start it.
  38. 4. Accept your proxy's key on your salt-master
  39. .. code-block:: bash
  40. salt-key -y -a p8000
  41. The following keys are going to be accepted:
  42. Unaccepted Keys:
  43. p8000
  44. Key for minion p8000 accepted.
  45. 5. Now you should be able to run commands on your proxy.
  46. .. code-block:: bash
  47. salt p8000 pkg.list_pkgs
  48. .. _Configure: https://docs.saltstack.com/en/latest/topics/beacons/#configuring-beacons