allows you to call any number of external pillar interfaces when collecting pillar data. This configuration is based on the ext_pillar function from which you can find this function https://github.com/saltstack/salt/blob/develop/salt/pillarBy default, this ext_pillar interface is not configured to run.Default Value: None
ext_pillar: - hiera: /etc/hiera.yaml - cmd_yaml: cat /etc/salt/yaml - reclass: inventory_base_uri: /etc/reclass
Here we can f
to none if func is not none and func not in instance. _ mixin_after_parsed_funcs: instance. _ mixin_after_parsed_funcs.append (func) # This list is empty if it is started, however, the # MARK process _
The next step is to call the _ init _ () method of optionparser to initializeNext, call the parse_args method of optionparser.
Def parse_args (self, argS = none, values = none): Options, argS = optparse. optionparser. parse_args (self, argS, values) # The options value above is {'daemon': false,
Configure the saltstack module for normal users.
Use client_acl1. Overview: enable special modules on the master for non-root system users. These module names can be expressed using regular expressions and cannot be specified for which minion commands are executed. To execute a command, you only need to switch to a specific user without authentication. 2. Enable Configuration:
Vim/etc/salt/masterclient_acl: test:-test. ping-cmd .*
Configuration exp
Preface:
I am working on a cluster configuration platform recently. I have also done a similar demo before. I remember that I used the paramiko module last year. I first said that I used ssh to configure the connection, pexpect is also sometimes used for interaction. In complex configurations, problems often occur. The configuration mainly involves the regular expression matching.
Now we are in a new company. The first thing we need to do is to refactor the code to build a configuration tool fo
Syndic is used by saltstack for cluster deployment. The general structure Syndic is a special Minion. The syndic class inherits from the minion class. syndic can be regarded as a proxy and only performs data transmission. Syndic has been installed when the master is installed on centos. You only need to set order_master of the topmaster to true, and set syndic_master of syndic to the hostname or IP address of the topmaster. The following is an in
following options:
Name: Specifies the username to be deleted.
Purge: Set to clear User Files (Home Directory)
Force: if the user is currently logged on, the absent state will fail. If the _ force _ option is set to true, the user will be deleted even if the user is currently logged on.
When managing users, you must specify at least _ User. Present _ or _ User. Absent _. Other options are optional, such as _ uid _, _ GID _, and _ home.
Users. SLS
The following is an example of a State Decl
-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
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
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 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.