beacon.rst 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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 this file:
  19. .. code-block:: yaml
  20. p8000.sls
  21. ---------
  22. proxy:
  23. # set proxytype for your proxymodule
  24. proxytype: ssh_sample
  25. host: saltyVM
  26. username: salt
  27. password: badpass
  28. This should complete the proxy setup for ``p8000``
  29. 3. `Configure`_ the ``salt_proxy`` beacon
  30. .. code-block:: yaml
  31. beacons:
  32. salt_proxy:
  33. - proxies:
  34. p8000: {}
  35. p8001: {}
  36. Once this beacon is configured it will automatically start the ``salt-proxy``
  37. process. If the ``salt-proxy`` process is terminated the beacon will
  38. re-start it.
  39. 4. Accept your proxy's key on your salt-master
  40. .. code-block:: bash
  41. salt-key -y -a p8000
  42. The following keys are going to be accepted:
  43. Unaccepted Keys:
  44. p8000
  45. Key for minion p8000 accepted.
  46. 5. Now you should be able to run commands on your proxy.
  47. .. code-block:: bash
  48. salt p8000 pkg.list_pkgs
  49. .. _Configure: https://docs.saltstack.com/en/latest/topics/beacons/#configuring-beacons