• Setup 2 Ubuntu 14.04 VMs – one as SaltMaster and other as minion
• Make sure you have root or sudo access on both
• Install the SaltMaster from the repository with the following apt-get command
sudo apt-get update
sudo apt-get install salt-master
• Install the Salt minion from the repository with the following apt-get command
sudo apt-get install salt-minion
• Install the Salt syndic from the repository with the following apt-get command.
sudo apt-get install salt-syndic
• The configuration files are installed in the ‘/etc/salt’ directory and are named after their respective components, such as − /etc/salt/master and /etc/salt/minion
#interface: 0.0.0.0
interface: <local ip address>
file_roots: base: - /root/srv/salt
• After updating the configuration file, restart the Salt master using the following command
sudo service salt-master restart
• By default a Salt Minion will try to connect to the DNS name “salt”; if the Minion is able to resolve that name correctly, no configuration is required. Redefine the “master” directive in the minion configuration file, which is typically /etc/salt/minion, as shown in the code below −
#master: salt
master: <local ip address>
id: min1
• After updating the configuration file, restart the Salt minion using the command below
sudo service salt-minion restart
• Salt uses AES Encryption for all the communication between the Master and the Minion.
• The communication between Master and Minion is authenticated through trusted, accepted keys.
salt-key –L
• Accept all keys by issuing the command below
sudo salt-key –A
• Now again issue the salt key listing command,
salt-key -L
• The communication between the Master and a Minion must be verified by running the test.ping command.
sudo salt '*' test.ping
• It will produce the following output
<local system name>
True
No comments:
Post a Comment