Topology: (master-minion communication)
For the above topology, you will need 4 machines, we will be using the scripted installer to install RAAS, REDIS and postgres for us.
the VM’s I am using:
note: My RHEL machine are already registered with RHEL subscription manager.
we start by updating the machine on all machine’s
Update OS to latest
yum update -y
Install Salt master and salt Minion
Add Salt stack repository:
Navigate to the above URL and select the correct repository for your OS:
install the repository on all four machines.
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
Clear expired cache (run on all 4 machine)
sudo yum clean expire-cache
we now install salt-master on the master VM:
sudo yum install salt-master
press y to continue
Salt master uses Port: 4505-4506, we add a firewall rule to allow traffic (run the below only on the master)
firewall-cmd --permanent --add-port=4505-4506/tcp --permanent firewall-cmd --reload
Enable and start services:
sudo systemctl enable salt-master && sudo systemctl start salt-master
on all 4 machines, we install salt-minion.
yum install salt-minion -y
we will now need to edit the minion configuration file and point it to the salt-master IP. (this needs to be done on all nodes)
I use the below command to add the master IP the config file:
echo "master: 172.16.120.113" >> /etc/salt/minion
Enable and start the minion: (run on all nodes)
sudo systemctl enable salt-minion && sudo systemctl start salt-minion
On a successful connection, when you run salt-key -L on the master, you should see all the minions listed:
Accept minion keys:
salt '*' test.ping
Troubleshooting minion/master :
Mar 04 12:05:26 xyzzzzy salt-minion: [ERROR ] Error while bringing up minion for multi-master. Is master at 172.16.120.113 responding?
Cause: minion Is not able to communicate with master. Either the master ports are not open or there is no master service running on the IP or network is unreachable.
The Salt Master has cached the public key for this node, this salt minion will wait for 10 seconds before attempting to re-authenticate
Minion keys are not accepted by the master