packaging.rst 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  1. =========================
  2. SaltStack Packaging Guide
  3. =========================
  4. Since Salt provides a powerful toolkit for system management and automation,
  5. the package can be spit into a number of sub-tools. While packaging Salt as
  6. a single package containing all components is perfectly acceptable, the split
  7. packages should follow this convention.
  8. Patching Salt For Distributions
  9. ===============================
  10. The occasion may arise where Salt source and default configurations may need
  11. to be patched. It is preferable if Salt is only patched to include platform
  12. specific additions or to fix release time bugs. It is preferable that
  13. configuration settings and operations remain in the default state, as changes
  14. here lowers the user experience for users moving across distributions.
  15. In the event where a packager finds a need to change the default configuration
  16. it is advised to add the files to the master.d or minion.d directories.
  17. Source Files
  18. ============
  19. Release packages should always be built from the source tarball distributed via
  20. pypi. Release packages should *NEVER* use a git checkout as the source for
  21. distribution.
  22. Single Package
  23. ==============
  24. Shipping Salt as a single package, where the minion, master, and all tools are
  25. together is perfectly acceptable and practiced by distributions such as
  26. FreeBSD.
  27. Split Package
  28. =============
  29. Salt Should always be split in a standard way, with standard dependencies, this lowers
  30. cross distribution confusion about what components are going to be shipped with
  31. specific packages. These packages can be defined from the Salt Source as of
  32. Salt 2014.1.0:
  33. Salt Common
  34. -----------
  35. The `salt-common` or `salt` package should contain the files provided by the
  36. salt python package, or all files distributed from the ``salt/`` directory in
  37. the source distribution packages. The documentation contained under the
  38. ``doc/`` directory can be a part of this package but splitting out a doc
  39. package is preferred.
  40. Since salt-call is the entry point to utilize the libs and is useful for all
  41. salt packages it is included in the salt-common package.
  42. Name
  43. ~~~~
  44. - `salt` OR `salt-common`
  45. Files
  46. ~~~~~
  47. - `salt/*`
  48. - `man/salt.7`
  49. - `scripts/salt-call`
  50. - `tests/*`
  51. - `man/salt-call.1`
  52. Depends
  53. ~~~~~~~
  54. - `Python 2.6-2.7`
  55. - `PyYAML`
  56. - `Jinja2`
  57. Salt Master
  58. -----------
  59. The `salt-master` package contains the applicable scripts, related man
  60. pages and init information for the given platform.
  61. Name
  62. ~~~~
  63. - `salt-master`
  64. Files
  65. ~~~~~
  66. - `scripts/salt-master`
  67. - `scripts/salt`
  68. - `scripts/salt-run`
  69. - `scripts/salt-key`
  70. - `scripts/salt-cp`
  71. - `pkg/<master init data>`
  72. - `man/salt.1`
  73. - `man/salt-master.1`
  74. - `man/salt-run.1`
  75. - `man/salt-key.1`
  76. - `man/salt-cp.1`
  77. - `conf/master`
  78. Depends
  79. ~~~~~~~
  80. - `Salt Common`
  81. - `ZeroMQ` >= 3.2
  82. - `PyZMQ` >= 2.10
  83. - `PyCrypto`
  84. - `M2Crypto`
  85. - `Python MessagePack` (Messagepack C lib, or msgpack-pure)
  86. Salt Syndic
  87. -----------
  88. The Salt Syndic package can be rolled completely into the Salt Master package.
  89. Platforms which start services as part of the package deployment need to
  90. maintain a separate `salt-syndic` package (primarily Debian based platforms).
  91. The Syndic may optionally not depend on the anything more than the Salt Master since
  92. the master will bring in all needed dependencies, but fall back to the platform
  93. specific packaging guidelines.
  94. Name
  95. ~~~~
  96. - `salt-syndic`
  97. Files
  98. ~~~~~
  99. - `scripts/salt-syndic`
  100. - `pkg/<syndic init data>`
  101. - `man/salt-syndic.1`
  102. Depends
  103. ~~~~~~~
  104. - `Salt Common`
  105. - `Salt Master`
  106. - `ZeroMQ` >= 3.2
  107. - `PyZMQ` >= 2.10
  108. - `PyCrypto`
  109. - `M2Crypto`
  110. - `Python MessagePack` (Messagepack C lib, or msgpack-pure)
  111. Salt Minion
  112. -----------
  113. The Minion is a standalone package and should not be split beyond the
  114. `salt-minion` and `salt-common` packages.
  115. Name
  116. ~~~~
  117. - `salt-minion`
  118. Files
  119. ~~~~~
  120. - `scripts/salt-minion`
  121. - `pkg/<minion init data>`
  122. - `man/salt-minion.1`
  123. - `conf/minion`
  124. Depends
  125. ~~~~~~~
  126. - `Salt Common`
  127. - `ZeroMQ` >= 3.2
  128. - `PyZMQ` >= 2.10
  129. - `PyCrypto`
  130. - `M2Crypto`
  131. - `Python MessagePack` (Messagepack C lib, or msgpack-pure)
  132. Salt SSH
  133. --------
  134. Since Salt SSH does not require the same dependencies as the minion and master, it
  135. should be split out.
  136. Name
  137. ~~~~
  138. - `salt-ssh`
  139. Files
  140. ~~~~~
  141. - `scripts/salt-ssh`
  142. - `man/salt-ssh.1`
  143. - `conf/cloud*`
  144. Depends
  145. ~~~~~~~
  146. - `Salt Common`
  147. - `Python MessagePack` (Messagepack C lib, or msgpack-pure)
  148. Salt Cloud
  149. ----------
  150. As of Salt 2014.1.0 Salt Cloud is included in the same repo as Salt. This
  151. can be split out into a separate package or it can be included in the
  152. salt-master package.
  153. Name
  154. ~~~~
  155. - `salt-cloud`
  156. Files
  157. ~~~~~
  158. - `scripts/salt-cloud`
  159. - `man/salt-cloud.1`
  160. Depends
  161. ~~~~~~~
  162. - `Salt Common`
  163. - `apache libcloud` >= 0.14.0
  164. Salt Doc
  165. --------
  166. The documentation package is very distribution optional. A completely split
  167. package will split out the documentation, but some platform conventions do not
  168. prefer this.
  169. If the documentation is not split out, it should be included with the
  170. `Salt Common` package.
  171. Name
  172. ----
  173. - `salt-doc`
  174. Files
  175. ~~~~~
  176. - `doc/*`
  177. Optional Depends
  178. ~~~~~~~~~~~~~~~~
  179. - `Salt Common`
  180. - `Python Sphinx`
  181. - `Make`