mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
parent
992edc3bb8
commit
0ec036350d
6 changed files with 110 additions and 50 deletions
|
@ -15,6 +15,27 @@ Description
|
|||
Salt-key executes simple management of Salt server public keys used for
|
||||
authentication.
|
||||
|
||||
On initial connection, a Salt minion sends its public key to the Salt
|
||||
master. This key must be accepted using the ``salt-key`` command on the
|
||||
Salt master.
|
||||
|
||||
Salt minion keys can be in one of the following states:
|
||||
|
||||
- **unaccepted**: key is waiting to be accepted.
|
||||
- **accepted**: key was accepted and the minion can communicate with the Salt
|
||||
master.
|
||||
- **rejected**: key was rejected using the ``salt-key`` command. In
|
||||
this state the minion does not receive any communication from the Salt
|
||||
master.
|
||||
- **denied**: key was rejected automatically by the Salt master.
|
||||
This occurs when a minion has a duplicate ID, or when a minion was rebuilt or
|
||||
had new keys generated and the previous key was not deleted from the Salt
|
||||
master. In this state the minion does not receive any communication from the
|
||||
Salt master.
|
||||
|
||||
To change the state of a minion key, use ``-d`` to delete the key and then
|
||||
accept or reject the key.
|
||||
|
||||
Options
|
||||
=======
|
||||
|
||||
|
@ -163,4 +184,4 @@ See also
|
|||
|
||||
:manpage:`salt(7)`
|
||||
:manpage:`salt-master(1)`
|
||||
:manpage:`salt-minion(1)`
|
||||
:manpage:`salt-minion(1)`
|
||||
|
|
|
@ -249,6 +249,21 @@ on.
|
|||
The platform field is a comma-delimited list of platforms that this module is
|
||||
known to run on.
|
||||
|
||||
Log Output
|
||||
==========
|
||||
|
||||
You can call the logger from custom modules to write messages to the minion
|
||||
logs. The following code snippet demonstrates writing log messages:
|
||||
|
||||
.. code-block:: python
|
||||
import logging
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
log.info('Here is Some Information')
|
||||
log.warning('You Should Not Do That')
|
||||
log.error('It Is Busted')
|
||||
|
||||
Private Functions
|
||||
=================
|
||||
|
||||
|
|
|
@ -200,6 +200,22 @@ prepared to refresh, then return True and the mod_init will not be called
|
|||
the next time a pkg state is evaluated, otherwise return False and the mod_init
|
||||
will be called next time a pkg state is evaluated.
|
||||
|
||||
Log Output
|
||||
==========
|
||||
|
||||
You can call the logger from custom modules to write messages to the minion
|
||||
logs. The following code snippet demonstrates writing log messages:
|
||||
|
||||
.. code-block:: python
|
||||
import logging
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
log.info('Here is Some Information')
|
||||
log.warning('You Should Not Do That')
|
||||
log.error('It Is Busted')
|
||||
|
||||
|
||||
Full State Module Example
|
||||
=========================
|
||||
|
||||
|
|
|
@ -2,21 +2,4 @@
|
|||
Logging Internals
|
||||
=================
|
||||
|
||||
You can call the logger from custom modules to write messages to the minion
|
||||
logs. The following code snippet demonstrates getting access to the logger:
|
||||
|
||||
.. code-block:: python
|
||||
import logging
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
log.info('here is some information')
|
||||
log.warning('you should not do that')
|
||||
log.error('it is busted')
|
||||
|
||||
For example, to write data to the minion log from a custom state:
|
||||
|
||||
1. Place the snippet above in a file called ``/srv/salt/_states/my_state.py``
|
||||
2. Sync states to your minion, ``salt <minion> saltutil.sync_states``.
|
||||
3. Apply the state, ``salt <minion> state.apply my_state``. This prints the
|
||||
messages to the minion logs.
|
||||
TODO
|
||||
|
|
38
doc/topics/ssh/index.html
Normal file
38
doc/topics/ssh/index.html
Normal file
|
@ -0,0 +1,38 @@
|
|||
|
||||
<row class="intro-row">
|
||||
<div class="col-sm-6">
|
||||
<div class="intro-text">Execute salt commands and states over ssh without installing a salt-minion.</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-6">
|
||||
<div class="embed-responsive embed-responsive-16by9">
|
||||
<iframe class="embed-responsive-item" src="https://www.youtube.com/embed/F3WZKhKKhz0"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</row>
|
||||
|
||||
<row class="intro-row">
|
||||
<div class="col-sm-12"><br />
|
||||
</div>
|
||||
</row>
|
||||
|
||||
<row class="intro-row">
|
||||
<div class="col-sm-6">
|
||||
<div class="embed-responsive embed-responsive-16by9">
|
||||
<iframe class="embed-responsive-item" src="https://www.youtube.com/embed/qWG5pI8Glbs"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-6">
|
||||
<div class="embed-responsive embed-responsive-16by9">
|
||||
<iframe class="embed-responsive-item" src="https://www.youtube.com/embed/d1Q1g5AFHbk"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</row>
|
||||
|
||||
<row class="intro-row">
|
||||
<div class="col-sm-12"><br />
|
||||
</div>
|
||||
</row>
|
|
@ -2,43 +2,30 @@
|
|||
Salt SSH
|
||||
========
|
||||
|
||||
.. note::
|
||||
.. raw:: html
|
||||
:file: index.html
|
||||
|
||||
Salt ssh is considered production ready in version 2014.7.0
|
||||
|
||||
.. note::
|
||||
|
||||
On many systems, the ``salt-ssh`` executable will be in its own package, usually named
|
||||
``salt-ssh``.
|
||||
|
||||
In version 0.17.0 of Salt a new transport system was introduced, the ability
|
||||
to use SSH for Salt communication. This addition allows for Salt routines to
|
||||
be executed on remote systems entirely through ssh, bypassing the need for
|
||||
a Salt Minion to be running on the remote systems and the need for a Salt
|
||||
Master.
|
||||
|
||||
.. note::
|
||||
|
||||
The Salt SSH system does not supercede the standard Salt communication
|
||||
systems, it simply offers an SSH based alternative that does not require
|
||||
ZeroMQ and a remote agent. Be aware that since all communication with Salt SSH is
|
||||
executed via SSH it is substantially slower than standard Salt with ZeroMQ.
|
||||
Getting Started
|
||||
===============
|
||||
|
||||
Salt SSH is very easy to use, simply set up a basic `roster` file of the
|
||||
systems to connect to and run ``salt-ssh`` commands in a similar way as
|
||||
standard ``salt`` commands.
|
||||
|
||||
.. note::
|
||||
|
||||
The Salt SSH eventually is supposed to support the same set of commands and
|
||||
functionality as standard ``salt`` command.
|
||||
|
||||
At the moment fileserver operations must be wrapped to ensure that the
|
||||
relevant files are delivered with the ``salt-ssh`` commands.
|
||||
The state module is an exception, which compiles the state run on the
|
||||
master, and in the process finds all the references to ``salt://`` paths and
|
||||
copies those files down in the same tarball as the state run.
|
||||
However, needed fileserver wrappers are still under development.
|
||||
- Salt ssh is considered production ready in version 2014.7.0
|
||||
- Python is required on the remote system (unless using the ``-r`` option to send raw ssh commands)
|
||||
- On many systems, the ``salt-ssh`` executable will be in its own package, usually named
|
||||
``salt-ssh``
|
||||
- The Salt SSH system does not supercede the standard Salt communication
|
||||
systems, it simply offers an SSH-based alternative that does not require
|
||||
ZeroMQ and a remote agent. Be aware that since all communication with Salt SSH is
|
||||
executed via SSH it is substantially slower than standard Salt with ZeroMQ.
|
||||
- At the moment fileserver operations must be wrapped to ensure that the
|
||||
relevant files are delivered with the ``salt-ssh`` commands.
|
||||
The state module is an exception, which compiles the state run on the
|
||||
master, and in the process finds all the references to ``salt://`` paths and
|
||||
copies those files down in the same tarball as the state run.
|
||||
However, needed fileserver wrappers are still under development.
|
||||
|
||||
Salt SSH Roster
|
||||
===============
|
||||
|
|
Loading…
Add table
Reference in a new issue