Update Saltify docs to be more accurate and helpful

This commit is contained in:
rallytime 2015-08-31 12:02:23 -06:00
parent 46a4bbd0e7
commit d53754f2b7
4 changed files with 131 additions and 36 deletions

View File

@ -479,35 +479,11 @@ And in the map file:
Saltify
-------
The Saltify driver is a new, experimental driver for installing Salt on
existing machines (virtual or bare metal). Because it does not use an actual
cloud provider, it needs no configuration in the main cloud config file.
However, it does still require a profile to be set up, and is most useful when
used inside a map file. The key parameters to be set are ``ssh_host``,
``ssh_username`` and either ``ssh_keyfile`` or ``ssh_password``. These may all
be set in either the profile or the map. An example configuration might use the
following in cloud.profiles:
.. code-block:: yaml
make_salty:
provider: saltify
And in the map file:
.. code-block:: yaml
make_salty:
- myinstance:
ssh_host: 54.262.11.38
ssh_username: ubuntu
ssh_keyfile: '/etc/salt/mysshkey.pem'
sudo: True
.. note::
In the cloud profile that uses this provider configuration, the syntax for the
``provider`` required field would be ``provider: make_salty``.
The Saltify driver is a new, experimental driver designed to install Salt on a remote
machine, virtual or bare metal, using SSH. This driver is useful for provisioning
machines which are already installed, but not Salted. For more information about using
this driver and for configuration examples, please see the
:ref:`Gettting Started with Saltify <getting-started-with-saltify>` documentation.
Extending Profiles and Cloud Providers Configuration

View File

@ -171,14 +171,12 @@ Cloud Provider Specifics
Getting Started With Parallels <parallels>
Getting Started With Proxmox <proxmox>
Getting Started With Rackspace <rackspace>
Getting Started With Saltify <saltify>
Getting Started With SoftLayer <softlayer>
Getting Started With Vexxhost <vexxhost>
Getting Started With vSphere <vsphere>
Miscellaneous Options
=====================

View File

@ -0,0 +1,121 @@
.. _getting-started-with-saltify:
============================
Getting Started With Saltify
============================
The Saltify driver is a new, experimental driver for installing Salt on existing
machines (virtual or bare metal).
Dependencies
============
The Saltify driver has no external dependencies.
Configuration
=============
Because the Saltify driver does not use an actual cloud provider host, it has a
simple provider configuration. The only thing that is required to be set is the
driver name, and any other potentially useful information, like the location of
the salt-master:
.. code-block:: yaml
# Note: This example is for /etc/salt/cloud.providers file or any file in
# the /etc/salt/cloud.providers.d/ directory.
my-saltify-config:
minion:
master: 111.222.333.444
provider: saltify
Profiles
========
Saltify requires a profile to be configured for each machine that needs Salt
installed. The initial profile can be set up at ``/etc/salt/cloud.profiles``
or in the ``/etc/salt/cloud.profiles.d/`` directory. Each profile requires
both an ``ssh_host`` and an ``ssh_username`` key parameter as well as either
an ``key_filename`` or a ``password``.
Profile configuration example:
.. code-block:: yaml
# /etc/salt/cloud.profiles.d/saltify.conf
salt-this-machine:
ssh_host: 12.34.56.78
ssh_username: root
key_filename: '/etc/salt/mysshkey.pem'
provider: my-saltify-config
The machine can now be "Salted" with the following command:
.. code-block:: bash
salt-cloud -p salt-this-machine my-machine
This will install salt on the machine specified by the cloud profile,
``salt-this-machine``, and will give the machine the minion id of
``my-machine``. If the command was executed on the salt-master, its Salt
key will automatically be signed on the master.
Once a salt-minion has been successfully installed on the instance, connectivity
to it can be verified with Salt:
.. code-block:: bash
salt my-machine test.ping
Using Map Files
---------------
The settings explained in the section above may also be set in a map file. An
example of how to use the Saltify driver with a map file follows:
.. code-block:: yaml
# /etc/salt/saltify-map
make_salty:
- my-instance-0:
ssh_host: 12.34.56.78
ssh_username: root
password: very-bad-password
- my-instance-1:
ssh_host: 44.33.22.11
ssh_username: root
password: another-bad-pass
Note: When using a cloud map with the Saltify driver, the name of the profile
to use, in this case ``make_salty``, must be defined in a profile config. For
example:
.. code-block:: yaml
# /etc/salt/cloud.profiles.d/saltify.conf
make_salty:
provider: my-saltify-config
The machines listed in the map file can now be "Salted" by applying the
following salt map command:
.. code-block:: bash
salt-cloud -m /etc/salt/saltify-map
This command will install salt on the machines specified in the map and will
give each machine their minion id of ``my-instance-0`` and ``my-instance-1``,
respectively. If the command was executed on the salt-master, its Salt key will
automatically be signed on the master.
Connectivity to the new "Salted" instances can now be verified with Salt:
.. code-block:: bash
salt 'my-instance-*' test.ping

View File

@ -6,13 +6,13 @@ The Saltify module is designed to install Salt on a remote machine, virtual or
bare metal, using SSH. This module is useful for provisioning machines which
are already installed, but not Salted.
Use of this module requires no configuration in the main cloud configuration
file. However, profiles must still be configured, as described in the
:ref:`core config documentation <config_saltify>`.
Use of this module requires some configuration in cloud profile and provider
files as described in the
:ref:`Gettting Started with Saltify <getting-started-with-saltify>` documentation.
'''
from __future__ import absolute_import
# Import python libs
from __future__ import absolute_import
import logging
# Import salt libs