Saltstack Installation and Testing

Source: Internet
Author: User
Tags saltstack

Saltstack is a centralized management platform for the (c/s) architecture, saltstack based on the Python language and uses ZEROMQ Message Queuing for communication (TCP,IPC). I. Basic environment 1, role, IP, version, kernel mastera 10.1.10.117 3.2.0-4-amd64 7.8 masterminionb 10.1.10.185  3.2.0-4-amd64 7.8 minion2, installing the dependent package Apt-get -y install python python-dateutil  python-jinja2 python-apt python-yaml python-pkg-resources python-six  Ca-certificates python-chardet openssl python-m2crypto python-crypto msgpack-python  python-zmq python-support libgmp10 python-git python-gitdb git  libjs-jquery libzmq1 libcurl3-gnutls perl-modules liberror-perl git-man  Dctrl-tools Second, install Saltstack (mastera) 1, install salt-masterdpkg -i python-urllib3_1.7.1-1~bpo70+1_all.debdpkg  -i python-requests_2.0.0-1~bpo70+1_all.debdpkg -i salt-common_2015.5.3+ds-1~bpo70+2_ All.debdpkg -i libzmq3_3.2.3+dfsg-1~bpo70~dst+1_amd64.debdpkg -i python-zmq_13.1.0-1~bpo70~dst+1_amd64.deb dpkg -i salt-master_2015.5.3+ds-1~bpo70+2_all.debps: I'm here to download the Deb package by adding the source to the other machine first deb http://debian.saltstack.com/debian wheezy-saltstack mainwget -q  -O -  "Http://debian.saltstack.com/debian-salt-team-joehealy.gpg.key"  | apt-key  Add -2, configuration 1) backup under configuration Cp /etc/salt/master /etc/salt/master.bak2) echo  "default_include:  Master.d/*.conf " >> /etc/salt/master3" Add the following cat /etc/salt/master.d/master.confinterface:  10.1.10.117publish_port: 4505ret_port: 4506pidfile: /var/run/salt-master.pidsock_dir:  /var/run/salt/masterlog_file: /var/log/salt/masterkey_logfile: /var/log/salt/key3, restart service/etc/ Init.d/salt-master restart[ ok ] restarting salt master control daemon :  salt-master.4, viewing ports, and process 1) view process ps -ef |grep saltroot        9078      1  0 14:18 ?        00:00:00 /usr/ bin/python /usr/bin/salt-master -droot       9079    9078  3 14:18 ?        00:00:00 /usr/ bin/python /usr/bin/salt-master -droot       9080    9078  0 14:18 ?        00:00:00 /usr/ bin/python /usr/bin/salt-master -droot       9081    9078  0 14:18 ?        00:00:00 /usr/ bin/python /usr/bin/salt-master -droot       9086    9078  0 14:18 ?        00:00:00 /usr/ Bin/python /usr/bin/salt-masteR -droot       9087   9086  5 14:18  ?        00:00:00 /usr/bin/python /usr/bin/salt-master  -droot       9088   9086  4 14:18  ?        00:00:00 /usr/bin/python /usr/bin/salt-master  -droot       9093   9086  5 14:18 ?         00:00:00 /usr/bin/python /usr/bin/salt-master - droot       9094   9086  5 14:18 ?         00:00:00 /usr/bin/python /usr/bin/salt-master -droot        9099   9086  4 14:18 ?         00:00:00 /usr/bin/python /usr/bin/salt-master -droot        9100   9086  0 14:18 ?         00:00:00 /USR/BIN/PYTHON /USR/BIN/SALT-MASTER -D2) View Port NETSTAT -TUPNL  |grep pythontcp        0       0 10.1.10.117:4505        0.0.0.0:*                LISTEN       9517/python     tcp        0       0 10.1.10.117:4506        0.0.0.0:*                LISTEN       9539/python  Three, install Saltstack (MINIONB) 1, install Salt-minion package dpkg -i python-urllib3_1.7.1-1~bpo70+1_all.debdpkg -i  python-requests_2.0.0-1~bpo70+1_all.debdpkg -i salt-common_2015.5.3+ds-1~bpo70+2_all.debdpkg  -i libzmq3_3.2.3+dfsg-1~bpo70~dst+1_amd64.debdpkg -i python-zmq_13.1.0-1~bpo70~dst+1_ AMD64.DEBDPKG -I SALT-MINION_2015.5.3+DS-1~BPO70+2_ALL.DEB2, configuration 1) backup under Configuration cp /etc/salt/minion / ETC/SALT/MINION.BAK2) echo  "default_include: minion.d/*.conf"  >> /etc/salt/minion3) Add the following content cat /etc/salt/minion.d/minion.confmaster: 10.1.10.117id: 10.1.10.1853, restart the service/etc/init.d/ salt-minion restart[ ok ] restarting salt minion control daemon:  salt-minion.4, viewing process ps -ef |grep minroot       8135       1  0 14:27 ?         00:00:00 /usr/bin/python&nBSP;/USR/BIN/SALT-MINION -D5, test salt-minion -l debug[debug  &nbsp with salt-minion command;]  Reading configuration from /etc/salt/minion[DEBUG   ] Including  configuration from  '/etc/salt/minion.d/minion.conf ' [debug   ] reading  configuration from /etc/salt/minion.d/minion.conf[debug   ] configuration  File path: /etc/salt/minion[info    ] setting up the salt  Minion  "10.1.10.185" [debug   ] created pidfile: /var/run/ Salt-minion.pid[debug   ] reading configuration from /etc/salt/minion[debug    ] Including configuration from  '/etc/salt/minion.d/minion.conf ' [DEBUG    ] Reading configuration from /etc/salt/minion.d/minion.conf[DEBUG    ] attempting to&nBSP;AUTHENTICATE WITH THE SALT MASTER AT 10.1.10.117[DEBUG   ]  Initializing new SAuth for  ('/etc/salt/pki/minion ',  ' 10.1.10.185 ',  ' tcp:// 10.1.10.117:4506 ') [error   ] the salt master has cached the  Public key for this node, this salt minion will wait for  10 SECONDS BEFORE ATTEMPTING TO RE-AUTHENTICATE[INFO    ]  waiting 10 seconds before retry. [Error   ] the salt master has cached the public key  for this node, this salt minion will wait for 10  Seconds before attempting to re-authenticate[info    ] waiting  10 seconds before retry. [ERROR   ] THE&NBSp Salt master has cached the public key for this node, this  salt minion will wait for 10 seconds before attempting to  re-authenticate[info    ] waiting 10 seconds before retry. Four , sign and test 1, see 10.1.10.185 has not been verified by Salt-key listaccepted keys:denied keys:unaccepted keys : 10.1.10.185rejected keys:2, verify through Salt-key -a 10.1.10.185the following keys are  going to be accepted:Unaccepted Keys:10.1.10.185Proceed? [n/Y] yKey  For minion 10.1.10.185 accepted.3, under review, has passed validation salt-key listaccepted keys : 10.1.10.185denied keys:unaccepted keys:rejected keys: Five, Test 1, cat 1.txt10.1.10.1852, salt   ' cat 1.txt '  cmd.run  ' uptime ' 10.1.10.185:     16:07:42 up  36 min,  2 users,  load average: 0.00, 0.01, 0.05 has been able to see the minion end of the uptime information of the six, reference article https:// docs.saltstack.com/en/latest/topics/installation/index.htmlhttp://docs.saltstack.com/https://pypi.python.org/ pypi/salthttp://debian.saltstack.com/


This article is from the "7928217" blog, please be sure to keep this source http://7938217.blog.51cto.com/7928217/1698333

Saltstack Installation and Testing

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.