README.rst 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. ======
  2. Pepper
  3. ======
  4. .. image:: https://img.shields.io/pypi/v/salt-pepper.svg
  5. :target: https://pypi.org/project/salt-pepper
  6. .. image:: https://travis-ci.com/saltstack/pepper.svg?branch=develop
  7. :target: https://travis-ci.com/saltstack/pepper
  8. .. image:: https://img.shields.io/pypi/pyversions/salt-pepper.svg
  9. :target: https://pypi.org/project/salt-pepper
  10. .. image:: https://img.shields.io/badge/license-Apache2-blue.svg?maxAge=3600
  11. :target: https://pypi.org/project/salt-pepper
  12. .. image:: https://codecov.io/gh/saltstack/pepper/branch/develop/graph/badge.svg
  13. :target: https://codecov.io/gh/saltstack/pepper/branch/develop
  14. Pepper contains a Python library and CLI scripts for accessing a remote
  15. `salt-api`__ instance.
  16. ``pepperlib`` abstracts the HTTP calls to ``salt-api`` so existing Python
  17. projects can easily integrate with a remote Salt installation just by
  18. instantiating a class.
  19. The ``pepper`` CLI script allows users to execute Salt commands from computers
  20. that are external to computers running the ``salt-master`` or ``salt-minion``
  21. daemons as though they were running Salt locally. The long-term goal is to add
  22. additional CLI scripts maintain the same interface as Salt's own CLI scripts
  23. (``salt``, ``salt-run``, ``salt-key``, etc).
  24. It does not require any additional dependencies and runs on Python 2.5+ and
  25. Python 3. (Python 3 support is new, please file an issue if you encounter
  26. trouble.)
  27. .. __: https://github.com/saltstack/salt-api
  28. Installation
  29. ------------
  30. .. code-block:: bash
  31. pip install salt-pepper
  32. Usage
  33. -----
  34. Basic usage is in heavy flux.
  35. .. code-block:: bash
  36. export SALTAPI_USER=saltdev SALTAPI_PASS=saltdev SALTAPI_EAUTH=pam
  37. pepper '*' test.ping
  38. pepper '*' test.kwarg hello=dolly
  39. Examples leveraging the runner client.
  40. .. code-block:: bash
  41. pepper --client runner reactor.list
  42. pepper --client runner reactor.add event='test/provision/*' reactors='/srv/salt/state/reactor/test-provision.sls'
  43. Configuration
  44. -------------
  45. You can configure pepper through the command line, using environment variables
  46. or in a configuration file ``$HOME/.pepperrc`` with the following syntax :
  47. .. code-block::
  48. [main]
  49. SALTAPI_URL=https://localhost:8000/
  50. SALTAPI_USER=saltdev
  51. SALTAPI_PASS=saltdev
  52. SALTAPI_EAUTH=pam
  53. Contributing
  54. ------------
  55. Please feel free to get involved by sending pull requests or join us on the
  56. Salt mailing list or on IRC in #salt or #salt-devel.
  57. This repo follows the same `contributing guidelines`__ as Salt and uses
  58. separate develop and master branches for in-progress additions and bug-fix
  59. changes respectively.
  60. .. __: https://docs.saltstack.com/en/latest/topics/development/contributing.html