Setup Salt master and minion -architecture.
Create a module for the minions.
SaltStack installed on the machines.
Three virtual machines.
VM1: Running Mint 17.2, Salt master || specs
VM2: Running Mint 17.2, Salt minion
VM3: Running Mint 17.2, Salt minion
SETTING UP SALT MASTER AND MINIONS
I started setting up my master and minions following the walk-through in doc.saltstack.
First I started the salt master -service.
sudo service salt-master start
I started the minion with
sudo salt-minion -d
This will generate a minion id, which will be stored in /etc/salt/ as shown in the pictures bellow
I accepted the pending key with
sudo salt-key -A
The master can now start sending command to the minion! Installation successful!
I created a top.sls file, in which I set states to be installed to my slaves. The file looks a little something like this:
In the top.sls -file, I set Apache -state to be installed on all the slaves and specified the other packages to certain individual slaves.
I tested that all my states work on my master VM:
Running the top file
All the individual states worked fine, so I ran the top file!
sudo salt '*' state.highstate
I ran the highstate again to confirm the results, and everything seemed to have worked fine.
- Copying, modifying and redistributing this and all the other documents in this blog is allowed according to the GNU General Public License (version 2 or newer).http://www.gnu.org/licenses/gpl.html
Based on the Linux course by Tero Karvinen 2015: terokarvinen.com