0.9.3.rst 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285
  1. ========================
  2. Salt 0.9.3 Release Notes
  3. ========================
  4. :release: 2011-11-05
  5. Salt 0.9.3 is finally arrived. This is another big step forward for Salt, new
  6. features range from proper FreeBSD support to fixing issues seen when
  7. attaching a minion to a master over the Internet.
  8. The biggest improvements in 0.9.3 though can be found in the state system, it
  9. has progressed from something ready for early testers to a system ready to
  10. compete with platforms such as Puppet and Chef. The backbone of the state
  11. system has been greatly refined and many new features are available.
  12. Download!
  13. ---------
  14. The Salt source can be downloaded from PyPI:
  15. https://pypi.python.org/packages/source/s/salt/salt-0.9.3.tar.gz
  16. For instructions on how to set up Salt please see the :ref:`installation`
  17. instructions.
  18. New Features
  19. ------------
  20. WAN Support
  21. ```````````
  22. Recently more people have been testing Salt minions connecting to Salt Masters
  23. over the Internet. It was found that Minions would commonly loose their
  24. connection to the master when working over the internet. The minions can now
  25. detect if the connection has been lost and reconnect to the master, making
  26. WAN connections much more reliable.
  27. State System Fixes
  28. ```````````````````
  29. Substantial testing has gone into the state system and it is ready for real
  30. world usage. A great deal has been added to the documentation for states and
  31. the modules and functions available to states have been cleanly documented.
  32. A number of State System bugs have also been founds and repaired, the output
  33. from the state system has also been refined to be extremely clear and concise.
  34. Error reporting has also been introduced, issues found in sls files will now
  35. be clearly reported when executing Salt States.
  36. Extend Declaration
  37. ``````````````````
  38. The Salt States have also gained the ``extend`` declaration. This declaration
  39. allows for states to be cleanly modified in a post environment. Simply said,
  40. if there is an apache.sls file that declares the apache service, then another
  41. sls can include apache and then extend it:
  42. .. code-block:: yaml
  43. include:
  44. - apache
  45. extend:
  46. apache:
  47. service:
  48. - require:
  49. - pkg: mod_python
  50. mod_python:
  51. pkg:
  52. - installed
  53. The notable behavior with the extend functionality is that it literally extends
  54. or overwrites a declaration set up in another sls module. This means that Salt
  55. will behave as though the modifications were made directly to the apache sls.
  56. This ensures that the apache service in this example is directly tied to all
  57. requirements.
  58. Highstate Structure Specification
  59. `````````````````````````````````
  60. This release comes with a clear specification of the Highstate data structure
  61. that is used to declare Salt States. This specification explains everything
  62. that can be declared in the Salt SLS modules.
  63. The specification is extremely simple, and illustrates how Salt has been able
  64. to fulfill the requirements of a central configuration manager within a simple
  65. and easy to understand format and specification.
  66. SheBang Renderer Switch
  67. ```````````````````````
  68. It came to our attention that having many renderers means that there may be a
  69. situation where more than one State Renderer should be available within a
  70. single State Tree.
  71. The method chosen to accomplish this was something already familiar to
  72. developers and systems administrators, a SheBang. The Python State Renderer
  73. displays this new capability.
  74. Python State Renderer
  75. `````````````````````
  76. Until now Salt States could only be declared in yaml or json using Jinja or
  77. Mako. A new, very powerful, renderer has been added, making it possible to
  78. write Salt States in pure Python:
  79. .. code-block:: python
  80. #!py
  81. def run():
  82. '''
  83. Install the python-mako package
  84. '''
  85. return {'include': ['python'],
  86. 'python-mako': {'pkg': ['installed']}}
  87. This renderer is used by making a run function that returns the Highstate data
  88. structure. Any capabilities of Python can be used in pure Python sls modules.
  89. This example of a pure Python sls module is the same as this example in yaml:
  90. .. code-block:: yaml
  91. include:
  92. - python
  93. python-mako:
  94. pkg:
  95. - installed
  96. FreeBSD Support
  97. ```````````````
  98. Additional support has been added for FreeBSD, this is Salt's first branch out
  99. of the Linux world and proves the viability of Salt on non-Linux platforms.
  100. Salt remote execution already worked on FreeBSD, and should work without issue
  101. on any Unix-like platform. But this support comes in the form of package
  102. management and user support, so Salt States also work on FreeBSD now.
  103. The new freebsdpkg module provides package management support for FreeBSD
  104. and the new pw_user and pw_group provide user and group management.
  105. Module and State Additions
  106. --------------------------
  107. Cron Support
  108. ````````````
  109. Support for managing the system crontab has been added, declaring a cron state
  110. can be done easily:
  111. .. code-block:: yaml
  112. date > /tmp/datestamp:
  113. cron:
  114. - present
  115. - user: fred
  116. - minute: 5
  117. - hour: 3
  118. File State Additions
  119. ````````````````````
  120. The file state has been given a number of new features, primarily the
  121. directory, recurse, symlink, and absent functions.
  122. file.directory
  123. Make sure that a directory exists and has the right permissions.
  124. .. code-block:: yaml
  125. /srv/foo:
  126. file:
  127. - directory
  128. - user: root
  129. - group: root
  130. - mode: 1755
  131. file.symlink
  132. Make a symlink.
  133. .. code-block:: yaml
  134. /var/lib/www:
  135. file:
  136. - symlink
  137. - target: /srv/www
  138. - force: True
  139. file.recurse
  140. The recurse state function will recursively download a directory on the
  141. master file server and place it on the minion. Any change in the files on
  142. the master will be pushed to the minion. The recurse function is very
  143. powerful and has been tested by pushing out the full Linux kernel source.
  144. .. code-block:: yaml
  145. /opt/code:
  146. file:
  147. - recurse
  148. - source: salt://linux
  149. file.absent
  150. Make sure that the file is not on the system, recursively deletes
  151. directories, files, and symlinks.
  152. .. code-block:: yaml
  153. /etc/httpd/conf.d/somebogusfile.conf:
  154. file:
  155. - absent
  156. Sysctl Module and State
  157. ```````````````````````
  158. The sysctl module and state allows for sysctl components in the kernel to be
  159. managed easily. the sysctl module contains the following functions:
  160. sysctl.show
  161. Return a list of sysctl parameters for this minion
  162. sysctl.get
  163. Return a single sysctl parameter for this minion
  164. sysctl.assign
  165. Assign a single sysctl parameter for this minion
  166. sysctl.persist
  167. Assign and persist a simple sysctl parameter for this minion
  168. The sysctl state allows for sysctl parameters to be assigned:
  169. .. code-block:: yaml
  170. vm.swappiness:
  171. sysctl:
  172. - present
  173. - value: 20
  174. Kernel Module Management
  175. ````````````````````````
  176. A module for managing Linux kernel modules has been added. The new functions
  177. are as follows:
  178. kmod.available
  179. Return a list of all available kernel modules
  180. kmod.check_available
  181. Check to see if the specified kernel module is available
  182. kmod.lsmod
  183. Return a dict containing information about currently loaded modules
  184. kmod.load
  185. Load the specified kernel module
  186. kmod.remove
  187. Unload the specified kernel module
  188. The kmod state can enforce modules be either present or absent:
  189. .. code-block:: yaml
  190. kvm_intel:
  191. kmod:
  192. - present
  193. Ssh Authorized Keys
  194. ```````````````````
  195. The ssh_auth state can distribute ssh authorized keys out to minions. Ssh
  196. authorized keys can be present or absent.
  197. .. code-block:: yaml
  198. AAAAB3NzaC1kc3MAAACBAL0sQ9fJ5bYTEyYvlRBsJdDOo49CNfhlWHWXQRqul6rwL4KIuPrhY7hBw0tV7UNC7J9IZRNO4iGod9C+OYutuWGJ2x5YNf7P4uGhH9AhBQGQ4LKOLxhDyT1OrDKXVFw3wgY3rHiJYAbd1PXNuclJHOKL27QZCRFjWSEaSrUOoczvAAAAFQD9d4jp2dCJSIseSkk4Lez3LqFcqQAAAIAmovHIVSrbLbXAXQE8eyPoL9x5C+x2GRpEcA7AeMH6bGx/xw6NtnQZVMcmZIre5Elrw3OKgxcDNomjYFNHuOYaQLBBMosyO++tJe1KTAr3A2zGj2xbWO9JhEzu8xvSdF8jRu0N5SRXPpzSyU4o1WGIPLVZSeSq1VFTHRT4lXB7PQAAAIBXUz6ZO0bregF5xtJRuxUN583HlfQkXvxLqHAGY8WSEVlTnuG/x75wolBDbVzeTlxWxgxhafj7P6Ncdv25Wz9wvc6ko/puww0b3rcLNqK+XCNJlsM/7lB8Q26iK5mRZzNsGeGwGTyzNIMBekGYQ5MRdIcPv5dBIP/1M6fQDEsAXQ==:
  199. ssh_auth:
  200. - present
  201. - user: frank
  202. - enc: dsa
  203. - comment: 'Frank's key'