mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge freeze into master (#61310)
* Redirect imports of ``salt.ext.six`` to ``six``
Fixes #60966
* Latest changelog update for 3004
* Handle signals and properly exit, instead of raising exceptions.
This was introduced in 26fcda5074
Fixes #60391
Fixes #60963
* Add test for #61003
* Fix #61003
Restored the previously shifted check for version_to_remove in
old[target]. This had been extracted along with the correctly extracted
double pkg_params[target] lookup, but that lost the `target in old`
guard.
Putting the check back here prevents KeyError when looking for a
non-existent target in `old`.
* Handle various architecture formats in aptpkg module
* Write file even if does not exist
* only run test on debian based platforms
* remove extra space for arch
* convert pathlib to string for pkgrepo test
* Use temporary files first then copy to sources files
* fixes saltstack/salt#59182 fix handling of duplicate keys in rest_cherrypy data
* added changelog
* remove log messages to prevent leaks of sensitive info
* Reverting changes in PR #60150. Updating installed and removed functions to return changes when test=True.
* Adding changelog.
* Add a test and fix for extra-filerefs
* Do not break master_tops for minion with version lower to 3003
* Add changelog file
* Add extra comment to clarify discussion
* Update changelog file
* Add deprecated changelog
* Assert that the command didn't finish
Refs https://github.com/saltstack/salt/pull/60972
* Always restore signals, even when exceptions occur
* Reset signal handlers before starting the process
* Make sure that the `ProcessManager` doesn't always ignore signals
* Provide valid default value for bootstrap_delay
* Update changelog for 3004
* Update changelog and release notes for 3004
* Add PR 61020 to changelog
* Update release notes index file and create 3005 file
* Update docs
* bad merge from master, redoing the PR for adding the Deltaproxy documentation.
* Adding doc/ref/configuration/delta_proxy.rst.
* cleaning up this paragraph, adding in network administrators in addition to system administrators.
Co-authored-by: Pedro Algarvio <pedro@algarvio.me>
Co-authored-by: ScriptAutomate <derek@icanteven.io>
Co-authored-by: Wayne Werner <wwerner@vmware.com>
Co-authored-by: Megan Wilhite <mwilhite@vmware.com>
Co-authored-by: nicholasmhughes <nicholasmhughes@gmail.com>
Co-authored-by: Daniel A. Wozniak <dwozniak@saltstack.com>
Co-authored-by: Pablo Suárez Hernández <psuarezhernandez@suse.com>
Co-authored-by: Alyssa Rock <arock@saltstack.com>
Co-authored-by: Twangboy <shane.d.lee@gmail.com>
This commit is contained in:
parent
87197fbea9
commit
0ae12d2d66
7 changed files with 550 additions and 66 deletions
427
doc/ref/configuration/delta_proxy.rst
Normal file
427
doc/ref/configuration/delta_proxy.rst
Normal file
|
@ -0,0 +1,427 @@
|
|||
.. _delta-proxy-information:
|
||||
|
||||
.. _delta-proxy-intro:
|
||||
|
||||
===================
|
||||
Delta proxy minions
|
||||
===================
|
||||
|
||||
Welcome to the delta proxy minion installation guide. This installation
|
||||
guide explains the process for installing and using delta proxy minion
|
||||
which is available beginning in version 3004.
|
||||
|
||||
This guide is intended for system and network administrators with the general
|
||||
knowledge and experience required in the field. This guide is also intended for
|
||||
users that have ideally already tested and used standard Salt proxy minions in
|
||||
their environment before deciding to move to a delta proxy minion environment.
|
||||
See `Salt proxy minions <https://docs.saltstack.com/en/latest/topics/proxyminion/index.html>`_ for more information.
|
||||
|
||||
.. Note::
|
||||
If you have not used standard Salt proxy minions before, consider testing
|
||||
and deploying standard Salt proxy minions in your environment first.
|
||||
|
||||
|
||||
Proxy minions vs. delta proxy minions
|
||||
=====================================
|
||||
Salt can target network devices through `Salt proxy minions
|
||||
<https://docs.saltstack.com/en/latest/topics/proxyminion/index.html>`_,
|
||||
Proxy minions allow you to control network devices that, for whatever reason,
|
||||
cannot run the standard Salt minion. Examples include:
|
||||
|
||||
* Network gear that has an API but runs a proprietary operating system
|
||||
* Devices with limited CPU or memory
|
||||
* Devices that could run a minion but will not for security reasons
|
||||
|
||||
A proxy minion acts as an intermediary between the Salt master and the
|
||||
device it represents. The proxy minion runs on the Salt master and then
|
||||
translates commands from the Salt master to the device as needed.
|
||||
|
||||
By acting as an intermediary for the actual minion, proxy minions eliminate
|
||||
the need to establish a constant connection from a Salt master to a minion. Proxy
|
||||
minions generally only open a connection to the actual minion when necessary.
|
||||
|
||||
Proxy minions also reduce the amount of CPU or memory the minion must spend
|
||||
checking for commands from the Salt master. Proxy minions use the Salt master's CPU
|
||||
or memory to check for commands. The actual minion only needs to use CPU or
|
||||
memory to run commands when needed.
|
||||
|
||||
.. Note::
|
||||
For more information about Salt proxy minions, see:
|
||||
|
||||
* `Salt proxy minions
|
||||
<https://docs.saltstack.com/en/latest/topics/proxyminion/index.html>`_
|
||||
|
||||
* `Salt proxy modules
|
||||
<https://docs.saltstack.com/en/latest/ref/proxy/all/index.html#all-salt-proxy>`_
|
||||
|
||||
|
||||
When delta proxy minions are needed
|
||||
-----------------------------------
|
||||
Normally, you would create a separate instance of proxy minion for each device
|
||||
that needs to be managed. However, this doesn't always scale well if you have
|
||||
thousands of devices. Running several thousand proxy minions can require a lot
|
||||
of memory and CPU.
|
||||
|
||||
A delta proxy minion can solve this problem: it makes it possible to run one
|
||||
minion that acts as the intermediary between the Salt master and the many network
|
||||
devices it can represent. In this scenario, one device (the delta proxy minion
|
||||
on the Salt master) runs several proxies. This configuration boosts performance and
|
||||
improves the overall scalability of the network.
|
||||
|
||||
|
||||
Key terms
|
||||
=========
|
||||
The following lists some important terminology that is used throughout this
|
||||
guide:
|
||||
|
||||
.. list-table::
|
||||
:widths: 25 75
|
||||
:header-rows: 1
|
||||
|
||||
* - Term
|
||||
- Definition
|
||||
|
||||
* - Salt master
|
||||
- The Salt master is a central node running the Salt master server.
|
||||
The Salt master issues commands to minions.
|
||||
|
||||
* - minion
|
||||
- Minions are nodes running the Salt minion service. Minions listen
|
||||
to commands from a Salt master and perform the requested tasks, then return
|
||||
data back to the Salt master as needed.
|
||||
|
||||
* - proxy minion
|
||||
- A Salt master that is running the proxy-minion service. The proxy minion
|
||||
acts as an intermediary between the Salt master and the device it represents.
|
||||
The proxy minion runs on the Salt master and then translates commands from
|
||||
the Salt master to the device. A separate instance of proxy minion is
|
||||
needed for each device that is managed.
|
||||
|
||||
* - delta proxy minion
|
||||
- A Salt master that is running the delta proxy-minion service. The
|
||||
delta proxy minion acts as the intermediary between the Salt master and the
|
||||
many network devices it can represent. Only one instance of the delta
|
||||
proxy service is needed to run several proxies.
|
||||
|
||||
* - control proxy
|
||||
- The control proxy runs on the Salt master. It manages a list of devices and
|
||||
issues commands to the network devices it represents. The Salt master needs
|
||||
at least one control proxy, but it is possible to have more than one
|
||||
control proxy, each managing a different set of devices.
|
||||
|
||||
* - managed device
|
||||
- A device (such as Netmiko) that is managed by proxy minions or by a
|
||||
control proxy minion. The proxy minion or control proxy only creates
|
||||
a connection to the actual minion it needs to issue a command.
|
||||
|
||||
* - pillar file
|
||||
- Pillars are structures of data (files) defined on the Salt master and passed
|
||||
through to one or more minions when the minion needs access to the
|
||||
pillar file. Pillars allow confidential, targeted data to be securely sent
|
||||
only to the relevant minion. Because all configurations for
|
||||
delta proxy minions are done on the Salt master (not on the minions), you
|
||||
use pillar files to configure the delta proxy-minion service.
|
||||
|
||||
* - top file
|
||||
- The top file is a pillar file that maps which states should be applied to
|
||||
different minions in certain environments.
|
||||
|
||||
.. _delta-proxy-preinstall:
|
||||
|
||||
Pre-installation
|
||||
================
|
||||
|
||||
Before you start
|
||||
----------------
|
||||
Before installing the delta proxy minion, ensure that:
|
||||
|
||||
* Your network device and firmware are supported.
|
||||
* The Salt master that is acting as the control proxy minion has network
|
||||
access to the devices it is managing.
|
||||
* You have installed, configured, and tested standard Salt proxy minions in
|
||||
your environment before introducing delta proxy minions into your
|
||||
environment.
|
||||
|
||||
|
||||
Install or upgrade Salt
|
||||
-----------------------
|
||||
Ensure your Salt masters are running at least Salt version 3004. For instructions
|
||||
on installing or upgrading Salt, see `repo.saltstack.com
|
||||
<http://repo.saltstack.com/>`_. For RedHat systems, see `Install or Upgrade Salt
|
||||
<https://enterprise.saltstack.com/en/latest/docs/install-salt.html>`_.
|
||||
|
||||
|
||||
|
||||
.. _delta-proxy-install:
|
||||
|
||||
Installation
|
||||
============
|
||||
|
||||
Before you begin the delta proxy minion installation process, ensure you
|
||||
have read and completed the :ref:`delta-proxy-preinstall` steps.
|
||||
|
||||
|
||||
Overview of the installation process
|
||||
------------------------------------
|
||||
Similar to proxy minions, all the delta proxy minion configurations are done
|
||||
on the Salt master rather than on the minions that will be managed. The
|
||||
installation process has the following phases:
|
||||
|
||||
#. `Configure the master to use delta proxy`_ - Create a
|
||||
configuration file on the Salt master that defines its proxy settings.
|
||||
#. `Create a pillar file for each managed device`_ - Create a
|
||||
pillar file for each device that will be managed by the delta proxy minion
|
||||
and reference these minions in the top file.
|
||||
#. `Create a control proxy configuration file`_ - Create a control proxy file
|
||||
that lists the devices that it will manage. Then, reference this file in the
|
||||
top file.
|
||||
#. `Start the delta proxy minion`_ - Start the delta proxy-minion service and
|
||||
validate that it has been set up correctly.
|
||||
|
||||
|
||||
Configure the master to use delta proxy
|
||||
---------------------------------------
|
||||
In this step, you'll create a configuration file on the Salt master that defines
|
||||
its proxy settings. This is a general configuration file that tells the Salt master
|
||||
how to handle all proxy minions.
|
||||
|
||||
To create this configuration:
|
||||
|
||||
#. On the Salt master, navigate to the ``/etc/salt`` directory. In this directory,
|
||||
create a file named ``proxy`` if one doesn't already exist.
|
||||
|
||||
#. Open the file in your preferred editor and add the following configuration
|
||||
information:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
# Use delta proxy metaproxy
|
||||
metaproxy: deltaproxy
|
||||
|
||||
# Disable the FQDNS grain
|
||||
enable_fqdns_grains: False
|
||||
|
||||
# Enabled multprocessing
|
||||
multiprocessing: True
|
||||
|
||||
.. Note::
|
||||
See the following section about `delta proxy configuration options`_ for
|
||||
a more detailed description of these configuration options.
|
||||
|
||||
#. Save the file.
|
||||
|
||||
Your Salt master is now configured to use delta proxy. Next, you need to
|
||||
`Create a pillar file for each managed device`_.
|
||||
|
||||
|
||||
Delta proxy configuration options
|
||||
---------------------------------
|
||||
The following table describes the configuration options used in the delta
|
||||
proxy configuration file:
|
||||
|
||||
.. list-table::
|
||||
:widths: 25 75
|
||||
:header-rows: 1
|
||||
|
||||
* - Field
|
||||
- Description
|
||||
|
||||
* - metaproxy
|
||||
- Set this configuration option to ``deltaproxy``. If this option is set to
|
||||
``proxy`` or if this line is not included in the file, the Salt master will
|
||||
use the standard proxy service instead of the delta proxy service.
|
||||
|
||||
* - enable_fqdns_grains
|
||||
- If your router does not have the ability to use Reverse DNS lookup to
|
||||
obtain the Fully Qualified Domain Name (fqdn) for an IP address, you'll
|
||||
need to change the ``enable_fqdns_grains`` setting in the pillar
|
||||
configuration file to ``False`` instead.
|
||||
|
||||
* - multiprocessing
|
||||
- Multi-processing is the ability to run more than one task or process at
|
||||
the same time. A delta proxy minion has the ability to run with
|
||||
multi-processing turned off.
|
||||
|
||||
If you plan to run with multi-processing enabled, you should also enable
|
||||
the ``skip_connect_on_init`` setting to ``True``.
|
||||
|
||||
* - skip_connect_on_init
|
||||
- This setting tells the control proxy whether or not it should make a
|
||||
connection to the managed device when it starts. When set to ``True``, the
|
||||
delta proxy minion will only connect when it needs to issue commands to
|
||||
the managed devices.
|
||||
|
||||
|
||||
Create a pillar file for each managed device
|
||||
--------------------------------------------
|
||||
Each device that needs to be managed by delta proxy needs a separate pillar
|
||||
file on the Salt master. To create this file:
|
||||
|
||||
#. Navigate to the ``/srv/pillar`` directory.
|
||||
|
||||
#. In this directory create a new pillar file for a minion. For example,
|
||||
``my_managed_device_pillar_file_01.sls``.
|
||||
|
||||
#. Open the new file in your preferred editor and add the necessary
|
||||
configuration information for that minion and your environment. The
|
||||
following is an example pillar file for a Netmiko device:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
proxy:
|
||||
proxytype: netmiko
|
||||
device_type: arista_eos
|
||||
host: 192.0.2.1
|
||||
username: myusername
|
||||
password: mypassword
|
||||
always_alive: True
|
||||
|
||||
|
||||
.. Note::
|
||||
The available configuration options vary depending on the proxy type (in
|
||||
other words, the type of device it is). To read a detailed explanation of
|
||||
the configuration options, refer to the proxy module documentation for
|
||||
the type of device you need to manage. See:
|
||||
|
||||
* `Salt proxy modules
|
||||
<https://docs.saltstack.com/en/latest/ref/proxy/all/index.html#all-salt-proxy>`_
|
||||
* `Netmiko Salt proxy module
|
||||
<https://docs.saltstack.com/en/latest/ref/proxy/all/salt.proxy.netmiko_px.html#module-salt.proxy.netmiko_px>`_
|
||||
|
||||
#. Save the file.
|
||||
|
||||
#. In an editor, open the top file: ``/srv/pillar/top.sls``.
|
||||
|
||||
#. Add a section to the top file that indicates the minion ID of the device
|
||||
that will be managed. Then, list the name of the pillar file you created in
|
||||
the previous steps. For example:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
my_managed_device_minion_ID:
|
||||
- my_managed_device_pillar_file_01
|
||||
|
||||
#. Repeat the previous steps for each minion that needs to be managed.
|
||||
|
||||
You've now created the pillar file for the minions that will be managed by the
|
||||
delta proxy minion and you have referenced these files in the top file.
|
||||
Proceed to the next section.
|
||||
|
||||
|
||||
Create a control proxy configuration file
|
||||
-----------------------------------------
|
||||
On the Salt master, you'll need to create or edit a control proxy file for each
|
||||
control proxy. The control proxy manages several devices and issues commands to
|
||||
the network devices it represents. The Salt master needs at least one control
|
||||
proxy, but it is possible to have more than one control proxy, each managing a
|
||||
different set of devices.
|
||||
|
||||
To configure a control proxy, you'll create a file that lists the minion IDs
|
||||
of the minions that it will manage. Then you will reference this control proxy
|
||||
configuration file in the top file.
|
||||
|
||||
To create a control proxy configuration file:
|
||||
|
||||
#. On the Salt master, navigate to the ``/srv/pillar`` directory. In this
|
||||
directory, create a new proxy configuration file. Give this file a
|
||||
descriptive name, such as ``control_proxy_01_configuration.sls``.
|
||||
|
||||
#. Open the file in your preferred editor and add a list of the minion IDs for
|
||||
each device that needs to be managed. For example:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
proxy:
|
||||
proxytype: deltaproxy
|
||||
ids:
|
||||
- my_managed_device_01
|
||||
- my_managed_device_02
|
||||
- my_managed_device_03
|
||||
|
||||
#. Save the file.
|
||||
|
||||
#. In an editor, open the top file: ``/srv/pillar/top.sls``.
|
||||
|
||||
#. Add a section to the top file that indicates references the delta proxy
|
||||
control proxy. For example:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
base:
|
||||
my_managed_device_minion_01:
|
||||
- my_managed_device_pillar_file_01
|
||||
my_managed_device_minion_02:
|
||||
- my_managed_device_pillar_file_02
|
||||
my_managed_device_minion_03:
|
||||
- my_managed_device_pillar_file_03
|
||||
delta_proxy_control:
|
||||
- control_proxy_01_configuration
|
||||
|
||||
#. Repeat the previous steps for each control proxy if needed.
|
||||
|
||||
|
||||
Now that you have created the necessary configurations, proceed to the next
|
||||
section.
|
||||
|
||||
|
||||
Start the delta proxy minion
|
||||
----------------------------
|
||||
After you've successfully configured the delta proxy minion, you need to
|
||||
start the proxy minion service for each managed device and validate that it is
|
||||
working correctly.
|
||||
|
||||
.. Note::
|
||||
This step explains the process for starting a single instance of a
|
||||
delta proxy minion. Because starting each minion individually can
|
||||
potentially be very time-consuming, most organizations use a script to start
|
||||
their delta proxy minions since there are typically many devices being
|
||||
managed. Consider implementing a similar script for your environment to save
|
||||
time in deployment.
|
||||
|
||||
To start a single instance of a delta proxy minion and test that it is
|
||||
configured correctly:
|
||||
|
||||
#. In the terminal for the Salt master, run the following command, replacing the
|
||||
placeholder text with the actual minion ID:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sudo salt-proxy --proxyid=my_managed_device_minion_ID
|
||||
|
||||
|
||||
#. To test the delta proxy minion, run the following ``test.version`` command
|
||||
on the Salt master and target a specific minion. For example:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
salt my_managed_device_minion_ID test.version
|
||||
|
||||
This command returns an output similar to the following:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
local:
|
||||
3004
|
||||
|
||||
After you've successfully started the delta proxy minions and verified that
|
||||
they are working correctly, you can now use these minions the same as standard
|
||||
proxy minions.
|
||||
|
||||
.. _delta-proxy-additional-resources:
|
||||
|
||||
Additional resources
|
||||
====================
|
||||
|
||||
This reference section includes additional resources for delta proxy minions.
|
||||
|
||||
For reference, see:
|
||||
|
||||
* `Salt proxy minions
|
||||
<https://docs.saltstack.com/en/latest/topics/proxyminion/index.html>`_
|
||||
|
||||
* `Salt proxy modules
|
||||
<https://docs.saltstack.com/en/latest/ref/proxy/all/index.html#all-salt-proxy>`_
|
||||
|
||||
* `Netmiko Salt proxy module
|
||||
<https://docs.saltstack.com/en/latest/ref/proxy/all/salt.proxy.netmiko_px.html#module-salt.proxy.netmiko_px>`_
|
||||
|
|
@ -19,6 +19,12 @@ By default, the salt-proxy configuration will be in :file:`/etc/salt/proxy`.
|
|||
A notable exception is FreeBSD, where the configuration will be in
|
||||
:file:`/usr/local/etc/salt/proxy`.
|
||||
|
||||
With the Salt 3004 release, the ability to configure proxy minions using the delta proxy
|
||||
was introduced. The delta proxy provides the ability for a single control proxy
|
||||
minion to manage multiple proxy minions.
|
||||
|
||||
.. seealso::
|
||||
:ref:`Installing and Using Deltaproxy <delta-proxy-information>`
|
||||
|
||||
|
||||
Proxy-specific Configuration Options
|
||||
|
|
|
@ -12,6 +12,7 @@ secure and troubleshoot, and how to perform many other administrative tasks.
|
|||
../../ref/configuration/master
|
||||
../../ref/configuration/minion
|
||||
../../ref/configuration/proxy
|
||||
../../ref/configuration/delta_proxy
|
||||
../../ref/configuration/examples
|
||||
../blackout/index
|
||||
../eauth/access_control
|
||||
|
|
|
@ -24,7 +24,7 @@ corresponding md5 file.
|
|||
|
||||
There are installers available for Python 3. Starting with Salt 3001, only
|
||||
Python 3 builds of the Windows Salt Minion will be built. Python 2 builds
|
||||
exist for earlier Salt Minion versions.
|
||||
exist for earlier versions of Salt Minion.
|
||||
|
||||
.. note::
|
||||
- `Earlier builds from supported branches
|
||||
|
@ -37,7 +37,7 @@ exist for earlier Salt Minion versions.
|
|||
|
||||
.. note::
|
||||
|
||||
The installation executable installs dependencies that the Salt minion
|
||||
The installation executable installs all dependencies that the Salt minion
|
||||
requires.
|
||||
|
||||
The 64bit and 32bit installers have been tested on Windows 8.1, Windows Server
|
||||
|
@ -45,34 +45,87 @@ The 64bit and 32bit installers have been tested on Windows 8.1, Windows Server
|
|||
installers have only been tested on 64bit systems. Please file a bug report on
|
||||
our GitHub repo if issues for other platforms are found.
|
||||
|
||||
The installer will detect previous installations of Salt and ask if you would
|
||||
like to remove them. Clicking OK will remove the Salt binaries and related files
|
||||
but leave any existing config, cache, and PKI information.
|
||||
|
||||
Salt Minion Installation
|
||||
========================
|
||||
|
||||
Prerequisites and Checks
|
||||
------------------------
|
||||
|
||||
Before the installation starts the installer does a few checks for prerequisites
|
||||
and security issues.
|
||||
|
||||
Existing Salt Installation check
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
If Salt is already installed on the system the user will be prompted to remove
|
||||
the previous installation. Click ``OK`` to remove the Salt binaries and related
|
||||
files but leave any existing config, cache, and PKI information. Click
|
||||
``Cancel`` to abort the installation before making any modifications to the
|
||||
system.
|
||||
|
||||
Visual C++ Redistributable check
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
If the system is missing the appropriate version of the Visual C++
|
||||
Redistributable (vcredist) the user will be prompted to install it. Click ``OK``
|
||||
to install the vcredist. Click ``Cancel`` to abort the installation without
|
||||
making modifications to the system.
|
||||
|
||||
If Salt is already installed on the system the user will be prompted to remove
|
||||
the previous installation. Click ``OK`` to uninstall Salt without removing the
|
||||
configuration, PKI information, or cached files. Click ``Cancel`` to abort the
|
||||
installation before making any modifications to the system.
|
||||
Insecure configuration check
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
After the Welcome and the License Agreement, the installer asks for two bits of
|
||||
information to configure the minion; the master hostname and the minion name.
|
||||
The installer will update the minion config with these options.
|
||||
Since existing configuration that may be present on the system can be used by
|
||||
the installer to configure the minion we need to make sure it is trusted. This
|
||||
is done by verifying that the owner of the ``conf`` directory is either System
|
||||
or Administrators. If an insecure ``conf`` directory is found, a dialog box will
|
||||
be displayed warning the user that an insecure config directory has been found.
|
||||
Click ``Yes`` to rename the insecure directory and continue the installation.
|
||||
Click ``No`` to abort the installation.
|
||||
|
||||
If the installer finds an existing minion config file, these fields will be
|
||||
populated with values from the existing config, but they will be grayed out.
|
||||
There will also be a checkbox to use the existing config. If you continue, the
|
||||
existing config will be used. If the checkbox is unchecked, default values are
|
||||
displayed and can be changed. If you continue, the existing config file in
|
||||
``c:\salt\conf`` will be removed along with the ``c:\salt\conf\minion.d``
|
||||
directory. The values entered will be used with the default config.
|
||||
Installation
|
||||
------------
|
||||
After the Welcome and the License Agreement the user will be prompted to choose
|
||||
a destination directory. Starting in version 3004, the binary data has been
|
||||
separated from the configuration data. The user is allowed to choose the install
|
||||
directory for Salt. The default is ``%ProgramFiles%\Salt Project\salt``. All
|
||||
Salt binaries will be installed into the installation directory. Configuration
|
||||
data is stored in the ``root_dir`` which has been changed from ``C:\salt`` to
|
||||
``%ProgramData\Salt Project\Salt``. The ``root_dir`` can be changed from the
|
||||
default by setting the ``root_dir`` value in the minion config and then
|
||||
specifying that config when starting the salt minion using the ``-c`` option.
|
||||
|
||||
.. code-block:: bat
|
||||
|
||||
salt-minion -c C:\my\custom\root_dir
|
||||
|
||||
.. note::
|
||||
If the installer finds config data in the old location, the user is prompted
|
||||
to move the ``root_dir`` to the new location. The default is to leave
|
||||
existing config in place.
|
||||
|
||||
Next the installer will gather information needed to configure the minion. There
|
||||
are three config scenarios handled by the installer:
|
||||
|
||||
=============== ===========
|
||||
Option Description
|
||||
=============== ===========
|
||||
Default Config A default config will be laid down and updated from the values
|
||||
in the Master and Minion Name fields
|
||||
Custom Config The user is allowed to choose a custom config file which will
|
||||
be copied to the config directory and updated with the values
|
||||
in the Master and Minion Name fields
|
||||
Existing Config An existing config is found and its values are displayed in the
|
||||
Master and Minion Name fields. The user is not allowed to
|
||||
modify these options. This option is only present if an
|
||||
existing config is found on the system.
|
||||
=============== ===========
|
||||
|
||||
If an existing config is found in the old location (``C:\salt``), there is an
|
||||
additional option to move the ``root_dir`` to the new location
|
||||
(``%ProgramData%\Salt Project\Salt``). The default is to leave the ``root_dir``
|
||||
unchanged.
|
||||
|
||||
Click the ``Install`` button to install using these settings.
|
||||
|
||||
The final page allows you to start the minion service and optionally change its
|
||||
startup type. By default, the minion is set to ``Automatic``. You can change the
|
||||
|
@ -94,8 +147,8 @@ be managed there or from the command line like any other Windows service.
|
|||
sc start salt-minion
|
||||
net start salt-minion
|
||||
|
||||
Installation Prerequisites
|
||||
--------------------------
|
||||
Prerequisites
|
||||
-------------
|
||||
|
||||
Most Salt functionality should work just fine right out of the box. A few Salt
|
||||
modules rely on PowerShell. The minimum version of PowerShell required for Salt
|
||||
|
@ -104,8 +157,8 @@ minimum.
|
|||
|
||||
.. _windows-installer-options:
|
||||
|
||||
Silent Installer Options
|
||||
========================
|
||||
Installer Options
|
||||
=================
|
||||
|
||||
The installer can be run silently by providing the ``/S`` option at the command
|
||||
line. The installer also accepts the following options for configuring the Salt
|
||||
|
@ -138,15 +191,16 @@ Option Description
|
|||
path to a custom config file. If ``/master`` and/or
|
||||
``/minion-name`` is passed, those values will be used
|
||||
to update the new custom config.
|
||||
``/install-dir=`` Specify the installation location for the Salt
|
||||
binaries. This will be ignored for existing
|
||||
installations.
|
||||
``/move-config`` If config is found at ``C:\salt`` it will be moved to
|
||||
``%ProgramData%\Salt Project\Salt``
|
||||
``/S`` Runs the installation silently. Uses the above
|
||||
settings or the defaults.
|
||||
``/?`` Displays command line help.
|
||||
========================= =====================================================
|
||||
|
||||
.. note::
|
||||
``/start-service`` has been deprecated but will continue to function as
|
||||
expected for the time being.
|
||||
|
||||
.. note::
|
||||
``/default-config`` and ``/custom-config=`` will backup an existing config
|
||||
if found. A timestamp and a ``.bak`` extension will be added. That includes
|
||||
|
@ -280,12 +334,10 @@ Scripts:
|
|||
=================== ===========
|
||||
Script Description
|
||||
=================== ===========
|
||||
``build_env_2.ps1`` A PowerShell script that sets up a Python 2 build
|
||||
environment
|
||||
``build_env_3.ps1`` A PowerShell script that sets up a Python 3 build
|
||||
``build_env.ps1`` A PowerShell script that sets up a Python 3 build
|
||||
environment
|
||||
``build_pkg.bat`` A batch file that builds a Windows installer based on the
|
||||
contents of the ``C:\Python27`` directory
|
||||
contents of the ``C:\Python3`` directory
|
||||
``build.bat`` A batch file that fully automates the building of the
|
||||
Windows installer using the above two scripts
|
||||
=================== ===========
|
||||
|
@ -295,9 +347,6 @@ Script Description
|
|||
specify the version of Salt that will be displayed in the Windows installer.
|
||||
If no version is passed, the version will be determined using git.
|
||||
|
||||
Both scripts also accept an additional parameter to specify the version of
|
||||
Python to use. The default is 2.
|
||||
|
||||
Prerequisite Software
|
||||
---------------------
|
||||
|
||||
|
@ -330,7 +379,7 @@ Go into the ``salt`` directory and checkout the version of salt to work with
|
|||
.. code-block:: bat
|
||||
|
||||
cd salt
|
||||
git checkout 2017.7.2
|
||||
git checkout 3004
|
||||
|
||||
2. Setup the Python Environment
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -341,14 +390,14 @@ PowerShell script.
|
|||
.. code-block:: bat
|
||||
|
||||
cd pkg\windows
|
||||
powershell -file build_env_2.ps1
|
||||
powershell -file build_env.ps1
|
||||
|
||||
.. note::
|
||||
You can also do this from Explorer by navigating to the ``pkg\windows``
|
||||
directory, right clicking the **build_env_2.ps1** powershell script and
|
||||
directory, right clicking the **build_env.ps1** powershell script and
|
||||
selecting **Run with PowerShell**
|
||||
|
||||
This will download and install Python 2 with all the dependencies needed to
|
||||
This will download and install Python with all the dependencies needed to
|
||||
develop and build Salt.
|
||||
|
||||
.. note::
|
||||
|
@ -383,25 +432,26 @@ with ``pip``
|
|||
|
||||
.. note::
|
||||
If ``pip`` is still not recognized make sure that the Python Scripts folder
|
||||
is in the System ``%PATH%``. (``C:\Python2\Scripts``)
|
||||
is in the System ``%PATH%``. (``C:\Python3\Scripts``)
|
||||
|
||||
4. Setup Salt Configuration
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Salt requires a minion configuration file and a few other directories. The
|
||||
default config file is named ``minion`` located in ``C:\salt\conf``. The
|
||||
easiest way to set this up is to copy the contents of the
|
||||
``salt\pkg\windows\buildenv`` directory to ``C:\salt``.
|
||||
default config file is named ``minion`` located in
|
||||
``%ProgramData%\Salt Project\Salt\conf``. The easiest way to set this up is to
|
||||
copy the contents of the ``salt\pkg\windows\buildenv`` directory to
|
||||
``%ProgramData%\Salt Project\Salt``.
|
||||
|
||||
.. code-block:: bat
|
||||
|
||||
cd \
|
||||
md salt
|
||||
xcopy /s /e \Salt-Dev\salt\pkg\windows\buildenv\* \salt\
|
||||
xcopy /s /e \Salt-Dev\salt\pkg\windows\buildenv\* "%ProgramData%\Salt Project\Salt"
|
||||
|
||||
Now go into the ``C:\salt\conf`` directory and edit the minion config file named
|
||||
``minion`` (no extension). You need to configure the master and id parameters in
|
||||
this file. Edit the following lines:
|
||||
Now go into the ``%ProgramData%\Salt Project\Salt\conf`` directory and edit the
|
||||
minion config file named ``minion`` (no extension). You need to configure the
|
||||
master and id parameters in this file. Edit the following lines:
|
||||
|
||||
.. code-block:: bat
|
||||
|
||||
|
@ -432,20 +482,16 @@ Navigate to the root ``salt`` directory and install Salt.
|
|||
-------------------------------
|
||||
|
||||
Navigate to the ``pkg\windows`` directory and run the ``build_pkg.bat``
|
||||
with the build version (2017.7.2) and the Python version as parameters.
|
||||
with the build version (3004) and the Python version as parameters.
|
||||
|
||||
.. code-block:: bat
|
||||
|
||||
cd pkg\windows
|
||||
build_pkg.bat 2017.7.2 2
|
||||
^^^^^^^^ ^
|
||||
| |
|
||||
# build version -- |
|
||||
# python version ------
|
||||
build_pkg.bat 3004
|
||||
|
||||
.. note::
|
||||
If no version is passed, the ``build_pkg.bat`` will guess the version number
|
||||
using git. If the python version is not passed, the default is 2.
|
||||
using git.
|
||||
|
||||
.. _create-windows-installer-easy:
|
||||
|
||||
|
@ -468,7 +514,7 @@ build.
|
|||
.. code-block:: bat
|
||||
|
||||
cd salt
|
||||
git checkout 2017.7.2
|
||||
git checkout 3004
|
||||
|
||||
Then navigate to ``pkg\windows`` and run the ``build.bat`` script with the
|
||||
version you're building.
|
||||
|
@ -476,11 +522,7 @@ version you're building.
|
|||
.. code-block:: bat
|
||||
|
||||
cd pkg\windows
|
||||
build.bat 2017.7.2 3
|
||||
^^^^^^^^ ^
|
||||
| |
|
||||
# build version |
|
||||
# python version --
|
||||
build.bat 3004
|
||||
|
||||
This will install everything needed to build a Windows installer for Salt using
|
||||
Python 3. The binary will be in the ``salt\pkg\windows\installer`` directory.
|
||||
|
@ -490,12 +532,12 @@ Python 3. The binary will be in the ``salt\pkg\windows\installer`` directory.
|
|||
Testing the Salt minion
|
||||
=======================
|
||||
|
||||
1. Create the directory ``C:\salt`` (if it doesn't exist already)
|
||||
1. Create the directory ``%ProgramData\Salt Project\Salt`` (if it doesn't exist already)
|
||||
|
||||
2. Copy the example ``conf`` and ``var`` directories from
|
||||
``pkg\windows\buildenv`` into ``C:\salt``
|
||||
``pkg\windows\buildenv`` into ``%ProgramData\Salt Project\Salt``
|
||||
|
||||
3. Edit ``C:\salt\conf\minion``
|
||||
3. Edit ``%ProgramData\Salt Project\Salt\conf\minion``
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
|
@ -505,7 +547,7 @@ Testing the Salt minion
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
cd C:\Python27\Scripts
|
||||
cd C:\Python3\Scripts
|
||||
python salt-minion -l debug
|
||||
|
||||
5. On the salt-master accept the new minion's key
|
||||
|
|
7
doc/topics/releases/3005.rst
Normal file
7
doc/topics/releases/3005.rst
Normal file
|
@ -0,0 +1,7 @@
|
|||
.. _release-3005:
|
||||
|
||||
=============================================
|
||||
Salt 3005 Release Notes - Codename Phosphorus
|
||||
=============================================
|
||||
|
||||
Salt 3005 is currently under development.
|
|
@ -20,6 +20,7 @@ Previous Releases
|
|||
:maxdepth: 1
|
||||
:glob:
|
||||
|
||||
3004*
|
||||
3003*
|
||||
3002*
|
||||
3001*
|
||||
|
@ -42,7 +43,7 @@ Upcoming Release
|
|||
:maxdepth: 1
|
||||
:glob:
|
||||
|
||||
3004*
|
||||
3005*
|
||||
|
||||
.. seealso:: :ref:`Legacy salt-cloud release docs <legacy-salt-cloud-release-notes>`
|
||||
|
||||
|
|
|
@ -1837,7 +1837,7 @@ Function parseInstallerCommandLineSwitches
|
|||
FileWrite $0 "$\t$\t$\ta timestamp and a .bak extension. That includes$\n"
|
||||
FileWrite $0 "$\t$\t$\tthe minion file and the minion.d directory$\n"
|
||||
FileWrite $0 "$\n"
|
||||
FileWrite $0 "/install-dir=$\tSpecify the installation location for the Salt binaries.$\n"
|
||||
FileWrite $0 "/install-dir=$\t$\tSpecify the installation location for the Salt binaries.$\n"
|
||||
FileWrite $0 "$\t$\t$\tThis will be ignored for existing installations.$\n"
|
||||
FileWrite $0 "$\n"
|
||||
FileWrite $0 "/move-config$\t$\tIf config is found at C:\salt it will be moved to %ProgramData%$\n"
|
||||
|
|
Loading…
Add table
Reference in a new issue