Automated operation and maintenance tools Saltstack Learning notes (i)

Source: Internet
Author: User
Tags in python saltstack

1.Saltstack Introduction
Saltstack is a centralized, lightweight automated operational management tool with Puppet and Func functions, written in Python and powerful, and can be used for epel quick installation. Compared with puppet, installation and configuration are easier and simpler. The following is the Saltstack installation and infrastructure configuration documentation. (Official document: http://docs.saltstack.com/topics/installation/rhel.html)

2. Physical environment

3. Pre-Installation Preparation

Modify the server's hostname and hosts so that it can resolve and ping each other, taking Saltmaster as an example below.

#修改主机名vim/etc/sysconfig/network
Hostname=saltmaster
#查看主机名
[Root@saltmaster ~]# hostname
Saltmaster
#修改/etc/hosts file, add the following
192.168.1.235 Saltmaster
192.168.1.248 WEB248
192.168.1.244 DB244

4. Install Saltstack

Install Saltstack with Epel source.

#导入EPEL Yum Source
RPM-UVH http://mirror.pnl.gov/epel/5/i386/epel-release-5-4.noarch.rpm
#服务器master的安装
Yum-y Install Salt-master
#客户端minon安装
Yum-y Install Salt-minion

5.Saltstack Configuration

#服务器master的配置, Vim/etc/salt/master adds the IP address that master listens on.
# The address of the ' interface to ' bind to
interface:192.168.1.235
#客户端minion的配置, vim/etc/salt/minion, add the master IP address and Minion ID number.
# Set The location of the Salt master server
master:192.168.1.235
# clusters.
id:web2013-10-023

6. Start Saltstack Service

#saltstack Master to start and set up automatic boot
/etc/init.d/salt-master start
Chkconfig Salt-master on
#Saltstck minion start and set up automatic boot
/etc/init.d/salt-minion start
Chkconfig salt-minion on

7.Saltstack Master Certified Minion KEY

Saltstack uses public key cryptography to ensure secure communication between master and minions. When installed, the salt automatically generates these certificates, but requires that the Minion certificate be validated at the master side to confirm that the master and minion are trusted.

#salt-key-l to view all certificates that have not been certified, certified and rejected.
[Root@saltmast ~]# Salt-key List
Accepted Keys:
unaccepted Keys:
db2012-08-001
web2013-10-023
Rejected Keys:

See more highlights of this column: http://www.bianceng.cn/Programming/project/

#证书认证用命令salt-key-a ID
[Root@saltmast ~]# salt-key-a db2012-08-001
The following keys are going to be accepted:
unaccepted Keys:
db2012-08-001
Proceed? [n/y] Y
Key for Minion Db2012-08-001 accepted.
[Root@saltmast ~]# salt-key-a web2013-10-023
The following keys are going to be accepted:
unaccepted Keys:
web2013-10-023
Proceed? [n/y] Y
Key for Minion web2013-10-023 accepted.
#查看认证通过的证书
[Root@saltmast ~]# Salt-key List
Accepted Keys:
db2012-08-001
web2013-10-023
unaccepted Keys:
Rejected Keys:

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.