Draft of saltstack installation configuration (Master & minion)

Source: Internet
Author: User
Tags saltstack

The operating system is centos6.3, centos6.4, and Windows server2008r2.

The download link in this article may be updated with the version on the official saltstack website, but there may be changes or errors. Please refer to the version link you need to install. I wrote a specific link to facilitate repeated operations in the near future.

In this article, Linux uses epel for installation, and Windows selects the EXE installation package.

1. in your system, if the current epel is not in the enabled status, you can use the following command to enable it.

For RHEL 5:

rpm -Uvh http://mirror.pnl.gov/epel/5/i386/epel-release-5-4.noarch.rpm

For RHEL 6:

rpm -Uvh http://ftp.linux.ncsu.edu/pub/epel/6/i386/epel-release-6-8.noarch.rpm

2. For centos, saltstack packages are divided into five types: salt, salt-master, salt-Minion, salt-API, and salt-halite. The stable version installed during this period is 2014.1.7.

Generally, master and Minion are structured.

Run on Salt-master,

yum install salt-master

Run on Salt-Minion,

yum install salt-minion

3. simple configuration after installation.

You only need to modify the minion configuration file. On MINION:

vim /etc/salt/minion

Set the master value to the master's hostname or IP address. If the hostname is set, Minion must be able to parse the hostname.

4. Set a firewall. Linux SELinux should be disabled.

The salt-master service needs to listen to ports 4045 and 4046. Therefore, you need to open these two ports.

iptables -A INPUT -p tcp --dport 4045 -j ACCEPTiptables -A INPUT -p tcp --dport 4046 -j ACCEPT

If you do not want to set the firewall to turn it off, test the environment: Service iptables stop.

5. Start master and Minion and set startup.

Start master:

service salt-master start

To view the operations performed by saltstack at startup, you can start it in debug mode:

salt-master -l debug

Configure Automatic master startup:

chkconfig salt-master on

Start MINION:

service salt-minion start

Debug mode startup:

salt-minion -l debug

Configure minion to automatically start upon startup:

chkconfig salt-minion on

5. Authentication.

On the master

Salt-key-l view the ID of the current authentication and the ID to be authenticated
Salt-key-a "minion ID"
Salt-key-A accepts all authenticated nodes
Salt-key-D Delete All authenticated IDS
Salt-key-d "Minion ID" delete a specified Node

The master configuration file contains an autoaccept parameter. The default value is false. If it is set to true, automatic authentication is enabled.

After successful authentication, test:

salt "*" test.pingsalt "minion id" test.pingsalt "*" cmd.run "uname -a"slat "*" grains.items

6. Install minion on Windows Server 2008. Only minion can be installed on Windows, and only Windows Server 2008 and Windows 7 are tested officially.

Download list: http://docs.saltstack.com/en/latest/topics/installation/windows.html. Download salt-minion-2014.1.7-amd64-setup.exe.

For Windows, you also need to set the hostname. The installation is simple. You can set the host name or IP address of the master. After installation, you can find salt-Minion in the Windows service. Start the service and then perform Step 1 authentication.

7. Example.

 

Complete!

 

Reference: http://docs.saltstack.cn/topics/installation/rhel.html

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.