User Tools

Site Tools


linux:salt-stack:installation

Salt Installation

Install Salt-Master

Salt packages are available from most repositories. Also, the last stable version can be installed from salt bootstrap this way:

# Download and install
curl -L https://bootstrap.saltstack.com -o install_salt.sh
sudo sh install_salt.sh -P -M
 
# Open firewall ports
firewall-cmd --permanent --zone=public --add-port=4505-4506/tcp

-P installs 'pip' as dependency. Otherwhise install may fail.
-M means that it will install the 'master' daemon aswell.

Install Salt-Minion

# Download and install
curl -L https://bootstrap.saltstack.com -o install_salt.sh
sudo sh install_salt.sh -P

Currently, there is a CNAME registry named 'salt' in ciberterminal.net zone, so further configuration shouldn't be needed.

In case that a server where not using ciberterminal.net DNS and search domain, the salt-master address can be specified in the configuration file /etc/salt/minion:

master: salt.ciberterminal.net

Accept minion keys (from master)

To list all keys:

sudo salt-key --list all

To accept ALL keys:

sudo salt-key --accept-all

Testing (ping) minions and running commands

To test connectivity with minions you can ping them from the master:

sudo salt '*' test.ping

As minions are usually named by its DNS resolved name and are by default case sensitive, you can use regex to specify the minion id:

sudo salt -E '(?i)av*' grains.get hostname
linux/salt-stack/installation.txt · Last modified: 2022/02/11 11:36 by 127.0.0.1