-saltstack Configuration1, copy installation package to salt/redis/files/2, copy configuration file to salt/redis/files/3, copy startup script to salt/redis/files/directory, no to create;Install.sls is as follows:
File.managed:-Name:/usr/local/src/redis-3.0.7.tar.gz-Source:salt://redis/files/redis-3.0.7.tar.gz-User:root-Group:root-mode:755Cmd.run:-Name:cd/usr/local/src Tar XF redis-3.0.7.tar.gz cd redis-3.0.7 Prefix=/usr/local/redi s Install-Unles
Saltstack file synchronization and python callSaltstack file synchronization and python call
Saltstack was written in python2.6. It took a lot of effort to call it in python. first install salt-master (or salt-minion), and then enter the following command:
# Python2.6
>>> Import salt. config
No error. Now you can use python to call the salt api.1. Synchronize files
Slatsatck is used to synchronize the confi
I recently read the source code of saltstack, understand the process, and view the execution process of the salt command. Think about whether you can transform the source code, so you need it. Later I thought about whether I could specify the jid when executing the salt.
Let's talk about the following requirements:
Jid of the salt command
Similar to this:
650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/48/6D/wKioL1QIDsTRoHWYAADPA53FEF4
I. I have been busy with database platform testing recently. I'm so excited that it will be available after the National Day, but I still have some concerns. All the functions depend on this platform, including basic database operations, permission management, migration, monitoring, alarms, etc. If the platform crashes, the sky will collapse, so I made all the components of the platform ha, this article record the ha of the saltstack maser. There are
Basic principle:The saltstack uses the C/s mode, and the server side is the master,client end of the salt, which communicates between Minion,minion and master through ZEROMQ Message Queuing. Minion on-line after the first contact with the master, their pub key sent past, then the master side through the SALT-KEY-L command will see Minion key, accept the Minion-key, that is, master and Minion have mutual trust. Master can send any instruction for Minio
It has been more than a week since I studied saltstack. The probation period of a company is six months. The most difficult thing is that the company has no permissions in the past six months. For an O M Company, having no permissions is not the same as having no permissions. The landlord is bored, and he only has to make a small test on his own.
Reactor
Speaking of reactor, we should start with the events of salt. What is the events?
Speaking of eve
Tag: Target saltstack nodegroup Grains
Next to the previous article, we will explain the detailed usage of each classification method of target.
> Grains
First, it should be noted that the grains information of minion will be generated and loaded at minion startup, and then will exist in the form of static data.
Grains matching has been mentioned previously. The implementation principle is to read the grains dict data and then match with the TGT stri
Deploy returner on saltstackSentiment: Have you ever heard of Salt's minion too many times? It takes a long time to view the execution results and the screen is full. It is not convenient to check whether the execution is successful. At this time, saltsack's returner function was on the stage. We can save the execution command results to the database, which is convenient to view through the database. However, you may encounter many problems during installation and testing. I would like to thank
Company's existing monitoring using Zabbix,saltstack client server installed, the client does not need each machine to install, of course, modify the Zabbix configuration file, directly with salt to complete, today tested salt source installation zabbix_agent, the effect is OK;The ritual, Top.sls.[email protected] salt]# cat Top.slsBase‘*‘:-Zabbix#目录树[Email protected] salt]# tree zabbix/zabbix/├──conf.sls├──files│?? ├──conf.sh│?? ├──zabbix-2.4.7.tar.g
1.1MasternodeSalt Master you need to bind the system 2 a TCP ports, respectively, are 4505 and the 4506 . Yum Install Salt-masterConfiguration Master Boot auto Start :Chkconfig Salt-master onStart Master:Service Salt-master StartSalt Master can also be at the front desk to Debug mode starts, which greatly increases the command output :Salt-master-l Debug1.2MinionnodeYum Install Salt-minionConfiguration Minion Boot auto Start :Chkconfig salt-minion onStart Minion:Service Salt-minion StarModifying
are 200 servers, all the Minion services are hung up, then work is big.Skills:The principle is: in Minion, master key and Minion can not conflict, if the conflict minion will kill themselves.Method:1, first prepare the new master key, the original master key directly packaged, the Salt directory under the PKI directory all packaged, and then uploaded to the new master. Before this new master does not start the service. Place the original master key in the Salt directory of the new master and st
The recent Test team came a big wave, the most company test that must have a QA environment, Test team boss and I have a good relationship, they group many people to Linux also know very well, usually get a thing what can also do their own, Ruanmoyingpao plus recently really busy to them to configure the Jenkins and opened the QA Environment user rights, Let's say saltstack user management.Simply a small example, recorded. For the user management modu
Last article we talked about the deployment and configuration of HaproxyLet's talk about how to use keepalive and httpd to implement the Saltstack cluster deployment of the HAPROXY+KEEPALIVE+HTTPD Web architectureFirst of all our HTTP deployment, very simple answer oh, the direct yum installation is complete, but in our saltstack is to use the installed definition of the line.OK, let's get up.[email protect
Prior to Saltstack 2014.7, the execution results of the Minion end were to be stored in an external system, and by using returners, we could store the returned results in our designated storage system, but the Returners feature was directly connected to the corresponding store by the Minion side. , the use of specific returners may also require the installation of related software packages in Minion, which may not fully meet our requirements in a larg
Saltstack IntroductionSalt is:A configuration management system capable of maintaining a predefined state of a remote node (for example, ensuring that the specified newspaper is installed and the specified service is running);A distributed remote execution system for executing commands and querying data on a remote node (which can be a single node or a node selected by any rule);The purpose of development is to provide the best solution for remote exe
Saltstack Save the results of execution to MySQL for command security auditsMySQL is responsible for storing data, Mysql-python is responsible for collecting dataMaster needs to install MySQL and mysql-python,minion-side installation Mysql-pythonSystem environmentCentOS Linux Release 7.4Master 10.0.0.111Minion 10.0.0.1121, Master side operation:Reference URL: https://docs.saltstack.com/en/latest/ref/returners/all/salt.returners.mysql.htmlReference Blo
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.