Steps to configure Salt Syndic node:
The Salt Syndic interface is a powerful tool which allows for the construction of Salt command topologies.
A basic Salt setup has a Salt Master commanding a group of Salt Minions. The Syndic interface is a special pass-through minion, it is run on a master and connects to another master, then the master that the Syndic minion is listening to can control the minions attached to the master running the syndic.
Salt syndic topology:
Topology:
· A Master node (a node which is itself not a Syndic to another higher level Master node) must run a salt-master daemon and optionally a salt-minion daemon.
· A Syndic node must run salt-syndic and salt-master daemons and optionally a salt-minion daemon.
· A Minion node must run a salt-minion daemon.
When a salt-master daemon issues a command, it will be received by the Syndic and Minion nodes directly connected to it. A Minion node will process the command in the way it ordinarily would. On a Syndic node, the salt-syndic daemon will relay the command to the salt-master daemon running on the Syndic node, which then propagates the command to to the Minions and Syndics connected to it.
When events and job return data are generated by salt-minion daemons, they are aggregated by the salt-master daemon they are connected to, which salt-master daemon then relays the data back through its salt-syndic daemon until the data reaches the Master or Syndic node that issued the command.
Let’s start the syndic node configuration:
Below are the nodes and its IPs we are going to use for salt-syndic configuration.
Saltmaster: 192.168.233.20
Saltclient: 192.168.233.21
Syndicnode1: 192.168.233.22
Syndic-client: 192.168.233.23
On the Syndic node:
Modify the below lines in file: /etc/salt/master.
Interface: 192.168.233.22
syndic_master: 192.168.233.20 ( masterofmasters )
Modify the below lines in file: /etc/salt/minion ( on the syndic node ).
master: 192.168.233.22 (syndic master node ip)
id: syndic_node1
On the Master node:
Modify the below line in file: /etc/salt/master
order_masters: True
On the Syndic node:
# salt-syndic
or
# systemctl restart salt-syndic
Now check on the master node:
# salt-key -L
Now you can find the Syndic node id here(in our case ‘syndic_node1’)
Let us accept and test the syndic node setup:
From syndic node:
From the salt-master node(masterofmasters):
( NOTE: Each Syndic must provide its own file_roots directory. Files will not be automatically transferred from the Master node.)