1
0

config.rst 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. .. _spm-config:
  2. =================
  3. SPM Configuration
  4. =================
  5. There are a number of options that are specific to SPM. They may be configured
  6. in the ``master`` configuration file, or in SPM's own ``spm`` configuration
  7. file (normally located at ``/etc/salt/spm``). If configured in both places, the
  8. ``spm`` file takes precedence. In general, these values will not need to be
  9. changed from the defaults.
  10. spm_logfile
  11. -----------
  12. Default: ``/var/log/salt/spm``
  13. Where SPM logs messages.
  14. spm_repos_config
  15. ----------------
  16. Default: ``/etc/salt/spm.repos``
  17. SPM repositories are configured with this file. There is also a directory which
  18. corresponds to it, which ends in ``.d``. For instance, if the filename is
  19. ``/etc/salt/spm.repos``, the directory will be ``/etc/salt/spm.repos.d/``.
  20. spm_cache_dir
  21. -------------
  22. Default: ``/var/cache/salt/spm``
  23. When SPM updates package repository metadata and downloads packaged, they will
  24. be placed in this directory. The package database, normally called
  25. ``packages.db``, also lives in this directory.
  26. spm_db
  27. ------
  28. Default: ``/var/cache/salt/spm/packages.db``
  29. The location and name of the package database. This database stores the names of
  30. all of the SPM packages installed on the system, the files that belong to them,
  31. and the metadata for those files.
  32. spm_build_dir
  33. -------------
  34. Default: ``/srv/spm_build``
  35. When packages are built, they will be placed in this directory.
  36. spm_build_exclude
  37. -----------------
  38. Default: ``['.git']``
  39. When SPM builds a package, it normally adds all files in the formula directory
  40. to the package. Files listed here will be excluded from that package. This
  41. option requires a list to be specified.
  42. .. code-block:: yaml
  43. spm_build_exclude:
  44. - .git
  45. - .svn
  46. Types of Packages
  47. =================
  48. SPM supports different types of formula packages. The function of each package
  49. is denoted by its name. For instance, packages which end in ``-formula`` are
  50. considered to be Salt States (the most common type of formula). Packages which
  51. end in ``-conf`` contain configuration which is to be placed in the
  52. ``/etc/salt/`` directory. Packages which do not contain one of these names are
  53. treated as if they have a ``-formula`` name.
  54. formula
  55. -------
  56. By default, most files from this type of package live in the ``/srv/spm/salt/``
  57. directory. The exception is the ``pillar.example`` file, which will be renamed
  58. to ``<package_name>.sls`` and placed in the pillar directory (``/srv/spm/pillar/``
  59. by default).
  60. reactor
  61. -------
  62. By default, files from this type of package live in the ``/srv/spm/reactor/``
  63. directory.
  64. conf
  65. ----
  66. The files in this type of package are configuration files for Salt, which
  67. normally live in the ``/etc/salt/`` directory. Configuration files for packages
  68. other than Salt can and should be handled with a Salt State (using a ``formula``
  69. type of package).