Install or upgrade Salt¶
Installing or upgrading Salt and Python are required as part of the pre-installation process. This page explains how to:
- Install the dependencies needed for the SaltStack Config installer
- Install Salt and Python
- Upgrade Salt and Python
Regardless of which installation scenario you are using, you need to install or update Salt and the SaltStack Config installer dependencies on all nodes that are involved in the installation scenario. The installation will fail if Salt and the installer’s dependencies are not installed on your nodes.
Consider also installing Salt on the infrastructure that will be managed by SaltStack Config before you begin your installation. For an explanation of why you are encouraged to install Salt beforehand, see Do you need to install Salt prior to installation?.
SaltStack Config is powered by Salt. Consult these guides to ensure your environment is following best practices when implementing Salt in your infrastructure:
The pages in the SaltStack Config installation process are intended to be read and followed in a specific order. Before reading this page, ensure that you have first read the following pages:
As part of VMware’s initiative to remove problematic terminology, the term Salt master will be replaced with Salt controller in SaltStack Config and related products and documentation. This terminology update may take a few release cycles before it is fully complete.
Install the SaltStack Config installer dependencies¶
The SaltStack Config installer requires a few important packages in order to run correctly:
- Extra Packages for Enterprise Linux (EPEL)
- Python cryptography
- Python OpenSSL library
These dependencies must be installed on all nodes that are involved in the installation:
- In a Single-node installation, you must install these dependencies on the node that will host the Salt master, the RaaS, a Redis database, and a PostgreSQL database.
- In a Multi-node installation, you must install these dependencies on all nodes that will host the Salt master, the RaaS, the Redis database, and the PostgreSQL database.
If you don’t install these dependencies, the SaltStack Config installer will fail during either installation scenarios.
To check that these dependencies are present:
In the terminal, verify that these dependencies are installed on each node:
sudo yum list installed | grep openssl sudo yum list installed | grep epel-release sudo yum list installed | grep python36-cryptography sudo yum list installed | grep python36-pyOpenSSL
If the dependencies are not present, install the dependencies:
sudo yum install openssl sudo yum install epel-release -y sudo yum install python36-cryptography sudo yum install python36-pyOpenSSL
Ensure that you install the
python36-pyOpenSSLpackage. It is necessary to configure SSL after installation, but this step must be complete before installation.
After all dependencies are installed, proceed to the next section.
If you are installing SaltStack Config on an existing Salt infrastructure, Salt is already installed. In this case, instead refer to the instructions about how to Upgrade Salt and Python.
With that in mind, ensure that Salt is installed on any nodes that are directly involved in your SaltStack Config installation or else the installation will fail. For a description of the different nodes involved in the installation process, see Which installation scenario should you use?.
Installing Salt involves three main tasks:
- Install Salt on the Salt master or masters
- Install Salt on the minions
- Accept the minion keys on the master or masters
The following sections explain how to do these tasks.
If you are running a Single-node installation scenario, you only need to install Salt on the master. The other two steps can be skipped.
Install Salt on the Salt master(s)¶
In both a single-node and multi-node installation, you need to install both the Salt master service and the minion service on the Salt master host:
- In a Single-node installation scenario, the master is the node on which you will install all the SaltStack Config architectural components (master, RaaS, a Redis database, and a PostgreSQL database).
- In a Multi-node installation scenario, this is the node that will become the master or masters.
To install Salt on the master node:
Install the Salt project repository and key:
sudo rpm --import https://repo.saltproject.io/py3/redhat/7/x86_64/latest/SALTSTACK-GPG-KEY.pub curl -fsSL https://repo.saltproject.io/py3/redhat/7/x86_64/latest.repo | sudo tee /etc/yum.repos.d/salt.repo
This script installs the latest Salt release on Redhat/Centos 7 PY3. If your machine is running a different operating system or version of Python, the script will not work. For information about installing Salt on other operating systems or Python versions, see the SaltStack Package Repo.
Clear the cache:
sudo yum clean expire-cache
Install the Salt master service and the minion service on the master node:
sudo yum install salt-master sudo yum install salt-minion
During a single-node installation, if either the master or the minion services are installed, but not both, the SaltStack Config installation script will terminate. The script terminates as a safeguard to prevent the user from accidentally disrupting an existing installation.
For that reason, ensure that you install both the master and the minion services.
master.conffile in the
/etc/salt/miniondirectory. In this file, set the master’s IP address to point to itself:
Start the Salt master service and minion service:
sudo systemctl start salt-master sudo systemctl enable salt-minion sudo systemctl start salt-minion
service salt-minion restartto restart the minions if needed.
If you are running a Multi-node installation scenario, proceed to the next section.
Install Salt on the Salt minions¶
This section is only required for multi-node installations. After installing Salt on the master as described in the previous section, the next step is to install the minion service (not the Salt master service) on the three nodes that will become the RaaS, a Redis database, and a PostgreSQL database.
Then, you need to configure the minions to communicate with the master. For more detailed information about installing the minion service, see Minion Configuration in the Salt documentation.
To install the minion service:
Install only the minion service by running the following command:
sudo yum install salt-minion
yto all prompts to accept all changes.
Configure each minion to communicate with the master by editing the
master.conffile in the
/etc/salt/miniondirectory. In this file, provide the master’s IP address. For example:
Start the minion service:
sudo systemctl enable salt-minion sudo systemctl start salt-minion
service salt-minion restartto restart the minions if needed.
Repeat the previous steps for all remaining nodes.
After successfully installing the minion service on all nodes, proceed to the next section.
Accept the minion keys on the master(s)¶
This section is only needed for multi-node installations. At this point, you have installed the Salt master service and minion service, and you have provided your minions with the master’s IP address. Now, in order for the master to send commands to the minions, the next step to accept the minion keys on the master.
- Ensure the Salt master service is enabled and started (see the final step in the Install Salt on the Salt Master(s) section if needed).
- Ensure the minion is enabled and started on all the nodes (see the final step in the Install Salt on the Salt Minions section if needed).
To accept the keys:
In the master’s terminal, list all the keys that are on master:
Check that all the minion IDs are listed in
If they appear in
Accepted keys, no further action is needed as this is the end goal.
Accept each minion ID using the following command, replacing the <your-minion-id> with the ID from your network:
salt-key -a <your-minion-ID>
salt-key -Aaccepts all keys.
yto all prompts.
salt-key -Lcommand a second time to confirm all minions appear in
After all minion keys are accepted, you have successfully installed Salt and can proceed to the next pre-installation step. For more information, see Next steps.
Upgrade Salt and Python¶
To upgrade Salt and Python to the latest stable versions on RedHat and CentOS:
In the terminal, check whether Python 3 is running on this node:
If needed, install or update to Python 3 using the following command:
sudo yum upgrade python3
Update Salt by running the following commands:
sudo yum install https://repo.ius.io/ius-release-el7.rpm https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm sudo yum install python36-pyOpenSSL
Restart all upgraded services:
sudo systemctl restart salt-minion
For information about upgrading Salt on other operating systems, see the SaltStack Package Repo.
Once you have installed or updated Salt and its dependencies, you must complete additional pre-installation steps. The next step is to download, verify, and transfer the installation files for your installation scenario. To continue the pre-installation process, see Transfer and import files.