Saltstack multiple master && permissions control
=============================================================================================================== ==============
Scenario: 192.168.163.129 (Our Master Master)
192.168.163.130 (customers need their own master)
192.168.163.131 (minion of the Little Donkey)
192.168.163.132 (in the Minion of thinking)
=============================================================================================================== ==============
Add firewalls to all servers
Iptables-a input-m State--state new-m tcp-p TCP--dport 4505-j ACCEPT
Iptables-a input-m State--state new-m tcp-p TCP--dport 4506-j ACCEPT
=============================================================================================================== ==============
192.168.163.129 (our Master Master)
RPM-IVH https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
Yum Install Salt-master-y
[Email protected] ~]# Less/etc/salt/master | GREP-VP "^$|^#"
Client_acl:
ZHAOCC:
-xml-*:
- .*
Jiankong:
-zsk-*:
- .*
Nodegroups:
ZHAOCC: ' [email protected]* '
Jiankong: ' [email protected]* '
chmod +r/etc/salt/master
chmod +x/var/run/salt
chmod +x/var/cache/salt
=============================================================================================================== ==============
192.168.163.130 (customers need their own master)
RPM-IVH https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
Yum Install Salt-master-y
/etc/init.d/salt-master start
/etc/init.d/salt-master stop
Copy 192.168.163.129 (our Master master) in the
/etc/salt/pki/master/master.pem
Etc/salt/pki/master/master.pub
To the relative directory of this server, the permissions of the file remain consistent with the permissions of 192.168.163.129 (our Master master).
=============================================================================================================== ==============
192.168.163.131 (minion of the Little Donkey)
RPM-IVH https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
Yum Install Salt-minion-y
[Email protected] ~]# Less/etc/salt/minion | GREP-VP "^$|^#"
Master
-192.168.163.129
-192.168.163.130
Id:xml-web-01
/etc/init.d/salt-minion restart
=============================================================================================================== ==============
192.168.163.132 (in the Minion of thinking)
RPM-IVH https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
Yum Install Salt-minion-y
[Email protected] ~]# Less/etc/salt/minion | GREP-VP "^$|^#"
Master
-192.168.163.129
Id:zsk-db-01
=============================================================================================================== ==============
Due to the grouping of user controls, the rules for Minion names are: Project name-Application name-number example: xml-web-01 (Small donkey-website -01) zsk-db-01 (in thinking-database-01)
The role of the Master profile grouping allows you to do a full online check of your own project:
[Email protected] ~]# SU-ZHAOCC
[Email protected] ~]$ salt-n ZHAOCC test.ping
XML-WEB-01:
True
[Email protected] ~]$ Logout
[Email protected] ~]# Su-jiankong
[Email protected] ~]$ salt-n Jiankong test.ping
ZSK-DB-01:
True
[Email protected] ~]$
This article is from the "Freeterman" blog, make sure to keep this source http://myunix.blog.51cto.com/191254/1706447
Saltstock Multi-Master general user