Installing Salt Master
-
Salt Open is the free, open source component of Salt Stack. Salt can be easily deployed to many different operating systems. In this example we will use CentOS 7, but essentially the same instructions will work across many operating systems.
First we will start with a basic CentOS 7 build. In this example I start with a minimum build, plus firewalld on a Scale HC3 cluster.
Now we can easily get Salt Master installed.
cd /tmp; curl -L https://bootstrap.saltstack.com -o install_salt.sh sh install_salt.sh -M
Now we need to open the firewall ports needed by the Salt Master, which is TCP 4505 and 4506.
Here are the commands for CentOS, RHEL or Fedora.
firewall-cmd --permanent --zone=public --add-port=4505-4506/tcp firewall-cmd --reload
And here are the commands for Ubuntu.
sudo ufw allow 4505 sudo ufw allow 4506
This script will detect our operating system and add proper repos, packages and get everything installed for us.
Lastly, for this example, we will change the default hostname of the box to salt which is what the Salt Minions expect.
echo 'salt' > /etc/hostname reboot
That's it, our Salt Master should be all up and running. Now our Minions can connect to it.
-
Thanks for this tutorial. Is changing the hostname to salt "required" or can I make whatever? Is there any downside to making it something else?
Edit - It appears to make a difference. I tried to use my own hostname and configured the minion with the other hostname and it didn't work. The master didn't pickup the minion in the list all key command. Once I changed the hostname of the master back to salt and rebooted, the minion appeared after running the list all keys command. That is interesting that they would have hard-coded the hostname. Hmmm...
-
I'd love to see a category created for all of these how-tos. I'm seriously running an ever growing bookmarks list and would love to be able to just refer to a category to look for these.
-
@NashBrydges said in Installing Salt Master:
I'd love to see a category created for all of these how-tos. I'm seriously running an ever growing bookmarks list and would love to be able to just refer to a category to look for these.
All of mine have the how to tag on them.
-
@scottalanmiller said in Installing Salt Master:
Now we can easily get Salt Master installed.
cd /tmp; curl -L https://bootstrap.saltstack.com -o install_salt.sh
sh install_salt.sh -MWhat's the difference between installing it like you mention above, or via the repository
apt-get install salt-master
for example?https://repo.saltstack.com/#ubuntu
Ubuntu because that's all I have available right now for testing, in case anyone has the urge to point that out. It's also the same for Fedora: https://docs.saltstack.com/en/latest/topics/installation/fedora.html
But that's besides the point. -
@tim_g said in Installing Salt Master:
@scottalanmiller said in Installing Salt Master:
Now we can easily get Salt Master installed.
cd /tmp; curl -L https://bootstrap.saltstack.com -o install_salt.sh
sh install_salt.sh -MWhat's the difference between installing it like you mention above, or via the repository
apt-get install salt-master
for example?https://repo.saltstack.com/#ubuntu
Ubuntu because that's all I have available right now for testing, in case anyone has the urge to point that out. It's also the same for Fedora: https://docs.saltstack.com/en/latest/topics/installation/fedora.html
But that's besides the point.In theory it handles grabbing the repos under the hood, but in a more universal way. And handles some distros that dont' necessarily have repos.