Commit 77a2f914 authored by Joe Healy's avatar Joe Healy

Imported Upstream version 2014.7.1+ds

parent 8e2c682a
Metadata-Version: 1.1
Metadata-Version: 1.0
Name: salt
Version: 2014.7.0
Version: 2014.7.1
Summary: Portable, distributed, remote execution and configuration management system
Home-page: http://saltstack.org
Author: Thomas S Hatch
Author-email: thatch45@gmail.com
License: UNKNOWN
License: Apache Software License 2.0
Description: UNKNOWN
Platform: UNKNOWN
Classifier: Programming Language :: Python
Classifier: Programming Language :: Cython
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: POSIX :: Linux
Classifier: Topic :: System :: Clustering
Classifier: Topic :: System :: Distributed Computing
......@@ -327,6 +327,14 @@
# If set to 'changes', the output will be full unless the state didn't change.
#state_output: full
# Automatically aggregate all states that have support for mod_aggregate by
# setting to True. Or pass a list of state module names to automatically
# aggregate just those types.
#
# state_aggregate:
# - pkg
#
#state_aggregate: False
##### File Server settings #####
##########################################
......@@ -591,6 +599,7 @@
# The level of messages to send to the log file.
# One of 'garbage', 'trace', 'debug', info', 'warning', 'error', 'critical'.
# If using 'log_granular_levels' this must be set to the highest desired level.
#log_level_logfile: warning
# The date and time format used in log messages. Allowed date/time formating
......@@ -607,7 +616,7 @@
# example sets the main salt library at the 'warning' level, but sets
# 'salt.modules' to log at the 'debug' level:
# log_granular_levels:
# 'salt': 'warning',
# 'salt': 'warning'
# 'salt.modules': 'debug'
#
#log_granular_levels: {}
......
......@@ -368,6 +368,14 @@
# Top file to execute if startup_states is 'top':
#top_file: ''
# Automatically aggregate all states that have support for mod_aggregate by
# setting to True. Or pass a list of state module names to automatically
# aggregate just those types.
#
# state_aggregate:
# - pkg
#
#state_aggregate: False
##### File Directory Settings #####
##########################################
......@@ -488,6 +496,7 @@
# The level of messages to send to the log file.
# One of 'garbage', 'trace', 'debug', info', 'warning', 'error', 'critical'.
# If using 'log_granular_levels' this must be set to the highest desired level.
# Default: 'warning'
#log_level_logfile:
......@@ -505,7 +514,7 @@
# example sets the main salt library at the 'warning' level, but sets
# 'salt.modules' to log at the 'debug' level:
# log_granular_levels:
# 'salt': 'warning',
# 'salt': 'warning'
# 'salt.modules': 'debug'
#
#log_granular_levels: {}
......
......@@ -4844,3 +4844,33 @@ source_file = _build/locale/topics/releases/2014.1.11.pot
source_lang = en
source_name = topics/releases/2014.1.11.rst
[salt.ref--cli--salt-unity]
file_filter = locale/<lang>/LC_MESSAGES/ref/cli/salt-unity.po
source_file = _build/locale/ref/cli/salt-unity.pot
source_lang = en
source_name = ref/cli/salt-unity.rst
[salt.topics--development--architecture]
file_filter = locale/<lang>/LC_MESSAGES/topics/development/architecture.po
source_file = _build/locale/topics/development/architecture.pot
source_lang = en
source_name = topics/development/architecture.rst
[salt.topics--releases--2014_1_12]
file_filter = locale/<lang>/LC_MESSAGES/topics/releases/2014.1.12.po
source_file = _build/locale/topics/releases/2014.1.12.pot
source_lang = en
source_name = topics/releases/2014.1.12.rst
[salt.topics--releases--2014_1_13]
file_filter = locale/<lang>/LC_MESSAGES/topics/releases/2014.1.13.po
source_file = _build/locale/topics/releases/2014.1.13.pot
source_lang = en
source_name = topics/releases/2014.1.13.rst
[salt.topics--releases--2014_7_1]
file_filter = locale/<lang>/LC_MESSAGES/topics/releases/2014.7.1.po
source_file = _build/locale/topics/releases/2014.7.1.pot
source_lang = en
source_name = topics/releases/2014.7.1.rst
......@@ -8,7 +8,3 @@
<a href="http://salt.readthedocs.org">salt.rtfd.org</a>.</p>
<p>Latest Salt release: <a href="{{ pathto('topics/releases/{0}'.format(release)) }}">{{ release }}</a></p>
<p>Try the shiny new release candidate of Salt,
<a href="{{ pathto('topics/releases/2014.7.0') }}">v2014.7.0rc6</a>! More info
<a href="{{ pathto('topics/releases/releasecandidate') }}">here</a>.</p>
......@@ -53,6 +53,7 @@ MOCK_MODULES = [
'yaml.nodes',
'yaml.scanner',
'zmq',
'zmq.eventloop',
# third-party libs for cloud modules
'libcloud',
......@@ -154,6 +155,8 @@ version = salt.version.__version__
#release = '.'.join(map(str, salt.version.__version_info__))
release = '2014.1.13'
needs_sphinx = '1.3'
spelling_lang = 'en_US'
language = 'en'
locale_dirs = [
......@@ -200,7 +203,7 @@ extlinks = {
'blob': ('https://github.com/saltstack/salt/blob/%s/%%s' % 'develop', None),
'download': ('https://cloud.github.com/downloads/saltstack/salt/%s', None),
'issue': ('https://github.com/saltstack/salt/issues/%s', 'issue '),
'formula': ('https://github.com/saltstack-formulas/%s', ''),
'formula_url': ('https://github.com/saltstack-formulas/%s', ''),
}
......@@ -213,7 +216,7 @@ gettext_compact = False
### HTML options
html_theme = 'saltstack'
html_theme_path = ['_themes']
html_title = None
html_title = u''
html_short_title = 'Salt'
html_static_path = ['_static']
......
......@@ -203,8 +203,7 @@ Linux/Unix
.. code-block:: yaml
salt-minion-reload:
cmd:
- run
cmd.run:
- name: echo service salt-minion restart | at now + 1 minute
- order: last
......@@ -215,26 +214,35 @@ distro the minion is running, in case they differ from the example below.
.. code-block:: yaml
at:
pkg:
- installed
service:
- running
pkg.installed:
- name: at
service.running:
- name: atd
- enable: True
An alternatvie to using the :program:`atd` daemon is to fork and disown the
process.
.. code-block:: yaml
restart_minion:
cmd.run:
- name: |
nohup /bin/sh -c 'sleep 10 && salt-call --local service.restart salt-minion'
- python_shell: True
- order: last
Windows
*******
.. code-block:: yaml
schedule-start:
cmd:
- run
cmd.run:
- name: at (Get-Date).AddMinutes(1).ToString("HH:mm") cmd /c "net start salt-minion"
- shell: powershell
- order: last
service:
- dead
service.dead:
- name: salt-minion
- require:
- cmd: schedule-start
......
=============
============
rest_tornado
=============
============
.. automodule:: salt.netapi.rest_tornado.saltnado
.. automodule:: salt.netapi.rest_tornado.saltnado_websockets
.. ............................................................................
REST URI Reference
==================
.. py:currentmodule:: salt.netapi.rest_tornado.saltnado
.. contents::
:local:
``/``
-----
.. autoclass:: SaltAPIHandler
:members: get, post, disbatch
``/login``
----------
.. autoclass:: SaltAuthHandler
:members: get, post
``/minions``
------------
.. autoclass:: MinionSaltAPIHandler
:members: get, post
``/jobs``
---------
.. autoclass:: JobsSaltAPIHandler
:members: get
``/run``
--------
.. autoclass:: RunSaltAPIHandler
:members: post
``/events``
-----------
.. autoclass:: EventsSaltAPIHandler
:members: get
``/hook``
---------
.. autoclass:: WebhookSaltAPIHandler
:members: post
......@@ -13,44 +13,71 @@ all, it makes Salt much more dynamic.
How it Works
============
The best example is the `pkg` state. One of the major requests in Salt has long
The best example is the ``pkg`` state. One of the major requests in Salt has long
been adding the ability to install all packages defined at the same time. The
mod_aggregate system makes this a reality. While executing Salt's state system,
when a `pkg` state is reached the ``mod_agregate`` function in the state module
is called. For `pkg` this function scans all of the other states that are slated
when a ``pkg`` state is reached the ``mod_aggregate`` function in the state module
is called. For ``pkg`` this function scans all of the other states that are slated
to run, and picks up the references to ``name`` and ``pkgs``, then adds them to
``pkgs`` in the first state. The result is calling yum/apt-get/pacman etc. just
once to install of the packages as part of the first package install.
``pkgs`` in the first state. The result is a single call to yum, apt-get,
pacman, etc as part of the first package install.
How to Use it
=============
.. note::
Since this option changes the basic behavior of the state runtime, after
it is enabled states should be executed using `test=True` to ensure that
the desired behavior is preserved.
Since this behavior can dramatically change the flow of configuration
management inside of Salt it is disabled by default. But enabling it is easy.
In config files
---------------
The first way to enable aggregation is with a configuration option in either
the master or minion configuration files. Salt will invoke ``mod_aggregate``
the first time it encounters a state module that has aggregate support.
If this option is set in the master config it will apply to all state runs on
all minions, if set in the minion config it will only apply to said minion.
To enable for all states just add:
Enable for all states:
.. code-block:: yaml
state_aggregate: True
Similarly only specific states can be enabled:
Enable for only specific state modules:
.. code-block:: yaml
state_aggregate:
- pkg
To the master or minion config and restart the master or minion, if this option
is set in the master config it will apply to all state runs on all minions, if
set in the minion config it will only apply to said minion.
In states
---------
The second way to enable aggregation is with the state-level ``aggregate``
keyword. In this configuration, Salt will invoke the ``mod_aggregate`` function
the first time it encounters this keyword. Any additional occurances of the
keyword will be ignored as the aggregation has already taken place.
The following example will trigger ``mod_aggregate`` when the ``lamp_stack``
state is processed resulting in a single call to the underlying package
manager.
.. code-block:: yaml
lamp_stack:
pkg.installed:
- pkgs:
- php
- mysql-client
- aggregate: True
memcached:
pkg.installed:
- name: memcached
Adding mod_aggregate to a State Module
======================================
......
......@@ -57,16 +57,17 @@ As an example, a state written thusly:
.. code-block:: yaml
apache:
pkg:
- installed
service:
- running
pkg.installed:
- name: httpd
service.running:
- name: httpd
- watch:
- file: /etc/httpd/conf.d/httpd.conf
- file: apache_conf
- pkg: apache
/etc/httpd/conf.d/httpd.conf:
file:
- managed
apache_conf:
file.managed:
- name: /etc/httpd/conf.d/httpd.conf
- source: salt://apache/httpd.conf
Will have High Data which looks like this represented in json:
......@@ -76,41 +77,50 @@ Will have High Data which looks like this represented in json:
{
"apache": {
"pkg": [
{
"name": "httpd"
},
"installed",
{
"order": 10000
}
],
"service": [
"running",
{
"name": "httpd"
},
{
"watch": [
{
"file": "/etc/httpd/conf.d/httpd.conf"
"file": "apache_conf"
},
{
"pkg": "apache"
}
]
},
"running",
{
"order": 10001
}
],
"__sls__": "apache",
"__sls__": "blah",
"__env__": "base"
},
"/etc/httpd/conf.d/httpd.conf": {
"apache_conf": {
"file": [
"managed",
{
"name": "/etc/httpd/conf.d/httpd.conf"
},
{
"source": "salt://apache/httpd.conf"
},
"managed",
{
"order": 10002
}
],
"__sls__": "apache",
"__sls__": "blah",
"__env__": "base"
}
}
......@@ -121,19 +131,19 @@ The subsequent Low Data will look like this:
[
{
"name": "apache",
"name": "httpd",
"state": "pkg",
"__id__": "apache",
"fun": "installed",
"__env__": "base",
"__sls__": "apache",
"__sls__": "blah",
"order": 10000
},
{
"name": "apache",
"name": "httpd",
"watch": [
{
"file": "/etc/httpd/conf.d/httpd.conf"
"file": "apache_conf"
},
{
"pkg": "apache"
......@@ -143,22 +153,21 @@ The subsequent Low Data will look like this:
"__id__": "apache",
"fun": "running",
"__env__": "base",
"__sls__": "apache",
"__sls__": "blah",
"order": 10001
},
{
"name": "/etc/httpd/conf.d/httpd.conf",
"source": "salt://apache/httpd.conf",
"state": "file",
"__id__": "/etc/httpd/conf.d/httpd.conf",
"__id__": "apache_conf",
"fun": "managed",
"__env__": "base",
"__sls__": "apache",
"__sls__": "blah",
"order": 10002
}
]
This tutorial discusses the Low Data evaluation and the state runtime.
Ordering Layers
......@@ -235,8 +244,8 @@ ordering can be explicitly overridden using the `order` flag in states:
.. code-block:: yaml
apache:
pkg:
- installed
pkg.installed:
- name: httpd
- order: 1
This order flag will over ride the definition order, this makes it very
......
......@@ -103,8 +103,8 @@ declaration that will restart Apache whenever the Apache configuration file,
- file: mywebsite
mywebsite:
file:
- managed
file.managed:
- name: /var/www/mysite
.. seealso:: watch_in and require_in
......@@ -168,10 +168,10 @@ For example, the following state declaration calls the :mod:`installed
.. code-block:: yaml
httpd:
pkg.installed
pkg.installed: []
The function can be declared inline with the state as a shortcut, but
the actual data structure is better referenced in this form:
The function can be declared inline with the state as a shortcut.
The actual data structure is compiled to this form:
.. code-block:: yaml
......@@ -203,10 +203,8 @@ VALID:
.. code-block:: yaml
httpd:
pkg:
- installed
service:
- running
pkg.installed: []
service.running: []
Occurs as the only index in the :ref:`state-declaration` list.
......@@ -280,8 +278,7 @@ easier to specify ``mywebsite`` than to specify
- file: mywebsite