If you have a handful of servers you need to add to Saltstack for management purposes, and don’t want to spend 10 minutes per node setting it up the Saltstack minion, you normally do one of two things. One, create a script to automate the process for you or Two, streamline the process to a single command. Well I did the latter, and felt like sharing it so you don’t have to spend 5 minutes dealing with regular expressions and sed.
Note: This is made to be used on Debian Wheezy, and needs to be ran as root.
echo "deb http://debian.saltstack.com/debian wheezy-saltstack main" > /etc/apt/sources.list.d/saltstack.list && wget -q -O- "http://debian.saltstack.com/debian-salt-team-joehealy.gpg.key" | apt-key add - && apt-get update && apt-get -y install salt-minion && sed -i 's/#master: salt$/master: 111.222.333.444/' /etc/salt/minion && service salt-minion restart
The string of commands above will add the saltstack repo, update the package database, install salt-minion and all of the dependencies, set the saltstack daemon to use the IP of 111.222.333.444 as the master server, and then restart the saltstack minion service. Once the command is complete, you can finish adding the system by running salt-key -A on the saltstack master server. Remember to change the IP in the command to the hostname or IP of your master server first otherwise it will not be able to communicate with it properly.
Pingback: Installing Salt|Stack – Project Assistant Help Desk
i2eutb
I like what you guys are up also. Such clever work and reporting! Carry on the superb works guys I have incorporated you guys to my blogroll. I think it’ll improve the value of my site 🙂
awigy0
Thank you for your sharing. I am worried that I lack creative ideas. It is your article that makes me full of hope. Thank you. But, I have a question, can you help me?
Can you be more specific about the content of your article? After reading it, I still have some doubts. Hope you can help me. https://www.binance.com/register?ref=JW3W4Y3A
Can you be more specific about the content of your article? After reading it, I still have some doubts. Hope you can help me. https://accounts.binance.bh/es/register/person?ref=RQUR4BEO
rd0jb8