소스 검색

Reactor system, documentation fixes

Change-Id: Ic64656c6fc3d4f561226d884b8bfb535dd537e14
pr/fix/install_formulas_fix
Ales Komarek 7 년 전
부모
커밋
5474068a16
6개의 변경된 파일102개의 추가작업 그리고 57개의 파일을 삭제
  1. +72
    -56
      README.rst
  2. +9
    -0
      salt/files/_reactor.conf
  3. +3
    -0
      salt/master/init.sls
  4. +17
    -0
      salt/master/reactor.sls
  5. +1
    -1
      tests/pillar/master_acl.sls
  6. +0
    -0
      tests/pillar/master_log_handler.sls

+ 72
- 56
README.rst 파일 보기

@@ -1,24 +1,29 @@

====
Salt
====
============
Salt Formula
============

Salt is a new approach to infrastructure management. Easy enough to get running in minutes, scalable enough to manage tens of thousands of servers, and fast enough to communicate with them in seconds.
Salt is a new approach to infrastructure management. Easy enough to get
running in minutes, scalable enough to manage tens of thousands of servers,
and fast enough to communicate with them in seconds.

Salt delivers a dynamic communication bus for infrastructures that can be used for orchestration, remote execution, configuration management and much more.
Salt delivers a dynamic communication bus for infrastructures that can be used
for orchestration, remote execution, configuration management and much more.


Sample Metadata
===============

Sample pillars
==============

Salt master
-----------

Salt master with base production environment and pillar tree as metadata backend
Salt master with base formulas and pillar metadata backend

.. literalinclude:: tests/pillar/master_single_pillar.sls
:language: yaml

Salt master with reclass ENC as metadata backend
Salt master with reclass ENC metadata backend

.. literalinclude:: tests/pillar/master_single_reclass.sls
:language: yaml
@@ -43,7 +48,7 @@ Salt master with preset minions
minions:
- name: 'node1.system.location.domain.com'

Salt master with alternative installation source and version (optional) - pip
Salt master with pip based installation (optional)

.. code-block:: yaml

@@ -55,7 +60,7 @@ Salt master with alternative installation source and version (optional) - pip
engine: pip
version: 2016.3.0rc2

Salt master with specified formula to install through apt-get
Install formula through system package management

.. code-block:: yaml

@@ -102,40 +107,7 @@ Salt master with specified formula refs (for example for Gerrit review)
address: https://git.openstack.org/openstack/salt-formula-keystone
revision: refs/changes/56/123456/1

Salt syndic: Master of masters

.. code-block:: yaml

salt:
master:
enabled: true
order_masters: True

Salt syndic: Lower master

.. code-block:: yaml

salt:
syndic:
enabled: true
master:
host: master-of-master-host
timeout: 5

Salt syndic: Lower master with multi-master of masters

.. code-block:: yaml

salt:
syndic:
enabled: true
masters:
- host: master-of-master-host1
- host: master-of-master-host2
timeout: 5


Salt master with custom handlers
Salt master with logging handlers

.. code-block:: yaml

@@ -161,7 +133,7 @@ Salt master with custom handlers
host: 127.0.0.1
port: 9999

Salt master peer for remote certificate sign.
Salt master peer setup for remote certificate signing

.. code-block:: yaml

@@ -179,8 +151,55 @@ Configure verbosity of state output (used for `salt` command)
master:
state_output: changes

Salt proxy
----------
Salt Reactor system configuration

.. code-block:: yaml

salt:
master:
reactor:
salt/minion/*/start:
- salt://reactor/minion-started.sls


Salt syndic
-----------

The master of masters

.. code-block:: yaml

salt:
master:
enabled: true
order_masters: True

Lower syndicated master

.. code-block:: yaml

salt:
syndic:
enabled: true
master:
host: master-of-master-host
timeout: 5

Syndicated master with multiple master of masters

.. code-block:: yaml

salt:
syndic:
enabled: true
masters:
- host: master-of-master-host1
- host: master-of-master-host2
timeout: 5


Salt-minion proxy
-----------------

Salt proxy pillar

@@ -275,7 +294,7 @@ Salt minion with graphing dependencies
.. literalinclude:: tests/pillar/minion_graph.sls
:language: yaml

Salt minion behind http proxy
Salt minion behind HTTP proxy

.. code-block:: yaml

@@ -285,15 +304,12 @@ Salt minion behind http proxy
host: 127.0.0.1
port: 3128

PKI CA
~~~~~~

Salt minion with PKI CA
Salt minion with PKI certificate authority (CA)

.. literalinclude:: tests/pillar/minion_pki_ca.sls
:language: yaml

Salt minion with PKI certificate
Salt minion using PKI certificate

.. literalinclude:: tests/pillar/minion_pki_cert.sls
:language: yaml
@@ -334,8 +350,8 @@ Debug LIBCLOUD for salt-cloud connection
export LIBCLOUD_DEBUG=/dev/stderr; salt-cloud --list-sizes provider_name --log-level all


Read more
=========
More Information
================

* http://salt.readthedocs.org/en/latest/
* https://github.com/DanielBryan/salt-state-graph

+ 9
- 0
salt/files/_reactor.conf 파일 보기

@@ -0,0 +1,9 @@
{% from "salt/map.jinja" import master with context %}

reactor:
{%- for event, reactors in master.reactor.items() %}
- {{ event }}:
{%- for reactor in reactors %}
- {{ reactor }}
{%- endfor %}
{%- endfor %}

+ 3
- 0
salt/master/init.sls 파일 보기

@@ -1,5 +1,8 @@
include:
- salt.master.service
{%- if pillar.salt.master.reactor is defined %}
- salt.master.reactor
{%- endif %}
- salt.master.env
- salt.master.pillar
- salt.master.minion

+ 17
- 0
salt/master/reactor.sls 파일 보기

@@ -0,0 +1,17 @@
{%- from "salt/map.jinja" import master with context %}
{%- if master.enabled %}

include:
- salt.master.service

/etc/salt/master.d/_reactor.conf:
file.managed:
- source: salt://salt/files/_reactor.conf
- user: root
- template: jinja
- require:
- {{ master.install_state }}
- watch_in:
- service: salt_master_service

{%- endif %}

+ 1
- 1
tests/pillar/master_acl.sls 파일 보기

@@ -7,7 +7,7 @@ linux:
salt:
master:
command_timeout: 5
worker_threads: 2
worker_threads: 3
enabled: true
source:
engine: pkg

tests/pillar/master_custom_handler.sls → tests/pillar/master_log_handler.sls 파일 보기


Loading…
취소
저장