1
0

repo.rst 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. .. meta::
  2. :status: review
  3. .. _spm-repo:
  4. =========================
  5. Distributing SPM Packages
  6. =========================
  7. SPM packages can be distributed to Salt masters over HTTP(S), FTP, or through the
  8. file system. The SPM repo can be hosted on any system where you can install
  9. Salt. Salt is installed so you can run the ``spm create_repo`` command when you
  10. update or add a package to the repo. SPM repos do not require the salt-master,
  11. salt-minion, or any other process running on the system.
  12. .. note::
  13. If you are hosting the SPM repo on a system where you can not or do not
  14. want to install Salt, you can run the ``spm create_repo`` command on the
  15. build system and then copy the packages and the generated ``SPM-METADATA``
  16. file to the repo. You can also install SPM files :ref:`directly on a Salt
  17. master <spm-master-local>`, bypassing the repository completely.
  18. Setting up a Package Repository
  19. ===============================
  20. After packages are built, the generated SPM files are placed in the
  21. ``srv/spm_build`` folder.
  22. Where you place the built SPM files on your repository server depends on how
  23. you plan to make them available to your Salt masters.
  24. You can share the ``srv/spm_build`` folder on the network, or copy the files to
  25. your FTP or Web server.
  26. Adding a Package to the repository
  27. ==================================
  28. New packages are added by simply copying the SPM file to the repo folder, and then
  29. generating repo metadata.
  30. Generate Repo Metadata
  31. ======================
  32. Each time you update or add an SPM package to your repository, issue an ``spm
  33. create_repo`` command:
  34. .. code-block:: bash
  35. spm create_repo /srv/spm_build
  36. SPM generates the repository metadata for all of the packages in that directory
  37. and places it in an ``SPM-METADATA`` file at the folder root. This command is
  38. used even if repository metadata already exists in that directory.