Salt Installation On Centos 5.5
When you follow the instruction step in the installation guide for Centos 5.5, the package manager automatically installs ZeroMQ in version 2.2. This ZeroMQ version makes some troubles. Therefore, Salt recommends using ZeroMQ in version >= 3.2. There is no ZeroMQ package for this version available in the official Centos 5 repositories, neither in EPEL. So the community prepares some RPMs for Centos 5 for installing ZeroMQ in version 18.104.22.168. This post describes which steps has to be done to install Salt 2014.1.11 on a Centos 5.5 64bit.
Common Installation Steps on Salt Master Node and Salt Minion Nodes
- EnableEPEL repository
sudo yum install epel-release
- Install the Python 2.6 development package
sudo yum install python26-devel.x86_64
- Installl all RPMs listed on this site.
1sudo rpm -Uvh http://docs.saltstack.com/downloads/cent5/libzmq3-3.2.2-13.1.x86_64.rpm 2sudo rpm -Uvh http://docs.saltstack.com/downloads/cent5/python-zmq-debuginfo-13.1.0-1.x86_64.rpm 3sudo rpm -Uvh http://docs.saltstack.com/downloads/cent5/python26-zmq-13.1.0-1.x86_64.rpm 4sudo rpm -Uvh http://docs.saltstack.com/downloads/cent5/python26-zmq-tests-13.1.0-1.x86_64.rpm 5sudo rpm -Uvh http://docs.saltstack.com/downloads/cent5/zeromq-3.2.2-13.1.x86_64.rpm 6sudo rpm -Uvh http://docs.saltstack.com/downloads/cent5/zeromq-debuginfo-3.2.2-13.1.x86_64.rpm 7sudo rpm -Uvh http://docs.saltstack.com/downloads/cent5/zeromq-devel-3.2.2-13.1.x86_64.rpm
Specific Installation Steps on Salt Master Node
Now, we can follow the official installation steps.
- Install Salt Master
sudo yum install salt-master
Specific Installation Steps on Salt Minion Node
Again, we can follow the official installation step.
- Install Salt Minion
sudo yum install salt-minion
This section describes only the important configuration issues for running the first command from a master to its minions. For the whole configuration possibilities, please check the Salt configuration documentation. For a successful communication between master and minions, two configuration are important.
- Set up the firewall on the master side and
- key exchange between master and minions (because the communication is encrypted).
By default Salt listens on ports 4505 and 4506. Therefore, the firewall has to be configured to accept incoming communication on these ports.
/etc/sysconfig/iptablesas root with your favourite editor.
- Add following lines
-A INPUT -m state --state new -m tcp -p tcp --dport 4505 -j ACCEPT -A INPUT -m state --state new -m tcp -p tcp --dport 4506 -j ACCEPT
- Restart the service iptables
sudo service iptables restart
Key Exchange Configuration
The master can only send commands to minion whose keys are accepted by the master.
- Start the minion on the minion node.
- Ensure that the master runs on the master node.
- On the master node, look which keys aren't accepted
- To accept all unaccepted key call on the master node
- To test whether the minion is available by the master, call on the master node
salt name-of-minion test.ping