SaltStack on CentOS 6.x
Had a play with SaltStack today, it’s a good way to manage multiple machines from a central location. It runs as a Server (master) and client (minion).
First we need to install the Salt-Master, this assumes you are installing on CentOS and don’t mind having EPEL installed on both the master and minion ….
# Install EPEL and Update on both the master and minionsyum update -yyum install http://ftp.linux.ncsu.edu/pub/epel/6/i386/epel-release-6-8.noarch.rpm
# Install the salt-masteryum install salt-masterchkconfig salt-master onsed -i ‘s/#interface: 0.0.0.0/interface: 0.0.0.0/g’ /etc/salt/masterservice salt-master start
# Install the salt-minion# Replace $salt-master.yourdomain.com with the FQDN of your salt-master
yum install salt-minionchkconfig salt-minion onsed -i ‘s/#master: salt/master: manager.yourdomain.com/g’ /etc/salt/minionservice salt-minion start
Now we have a minion talking to the master we need to accept the certificate;
salt-key -Lsalt-key -A [hostname]
Thats it, you can now run commands across all your machines e.g.
salt ‘*’ test.pingsalt ‘*’ grains.lssalt ‘*’ grains.itemssalt ‘*’ cmd.has_exec servicesalt ‘*’ cmd.run “service nginx stop”salt ‘*’ cmd.run “service nginx start”salt ‘*’ cmd.run “yum update -y”
For further reading RTFM.
Related Posts

First Steps with Ansible
Explore Ansible for AWS automation, transitioning from manual scripting. Initiate playbook for VPC and ELB deployment.

More Puppet
Efficient Puppet setup on CentOS with quick deployment scripts for Puppet Master and Agents, including a GitHub repo for easy configuration management.

Vagrant & Puppet
A deep dive into using Vagrant and Puppet for setting up reproducible development environments, mirroring production with local Virtualbox instances.