Saltstock Multi-Master general user

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.