saltstack api

Learn about saltstack api, we have the largest and most updated saltstack api information on alibabacloud.com

Saltstack+python Batch Modify server password

Saltstack Installation: SkipPython Script Change Password:1 #-*-Coding Utf-8-*-2 ImportSocket3 ImportRe4 ImportOS5 ImportSYS6 ImportCrypt7 8 9Localip =Socket.gethostbyname (Socket.gethostname ())Ten One defpassword (): ALocalip = Socket.gethostbyname (Socket.gethostname ())#获取本地ip -A = Re.split ('[.]', Localip)#切割ip地址并生成列表 -addr = a[3] thePS ="[email protected]"+Addr - returnPS - -new_passwd = crypt.crypt (password (),"AB") #将生成的密码加密 +CHANGE_PAS

Saltstack Web Platform Cluster Deployment (3)---HAPROXY+KEEPALIVE+HTTPD deployment

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

Job-cache Management of Saltstack

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-Store execution results inside the MySQL service

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

Saltstack in-depth-management Python-pip

Saltstack in-depth-management Python-pipOperating content: First, the basic Environment 1, using Tvm-saltmaster operation 2, Network: eth0:host-only (for virtual intranet, manually fixed IP, so from the host can directly connect to this VM) Eth1:nat (for Sisu network, dynamic IP) [email protected]~]#cd/etc/sysconfig/network-scripts/[[emailprotected] network-scripts]#catifcfg-eth0device=eth0type=ethernetonboot=yesnm_controlled=yesbootproto= noneipaddr=

Source code of saltstack-start 1

'] = ip_bracket (self. config ['interface']) migrations. migrate_paths (self. config) # Late import so logging works correctly import salt. master self. master = salt. master. master (self. config) self. daemonize_if_required () self. set_pidfile () def start (Self): ''' start the actual master. if sub-classed, don't ** ever ** forget to run: Super (yoursubclass, self ). start () Note: run any required code before calling 'super ()'. '''self. prepare () # Call your own prepare method here if che

Saltstack Study Notes (i)

Salt Introduction:Salt (saltstack) is an infrastructure automation and configuration management tool, according to the official documentation, salt is a configuration management system capable of maintaining a remote node to a specified state (for example, to ensure that the specified package is installed and that the specified service is running). And can be distributed on the remote node to execute command and query data.InstallationThis document is

The multi-master of Saltstack

creates as many minions as is defined in the Master option and binds EAC H Minion object to a respective master. " " #Timeout for one of the minions to Auth with a masterMinion_connect_timeout = 5def __init__(Self, opts): Super (Multiminion, self).__init__(opts)defMinions (self):" "Return a dict of minion generators bound to the Tune_in method Dict of Master, Minion_mapping, the Mapping contains:opts:options used to create the Minion Last:last Auth attempt time a Uth_wait:time to wait for

Saltstack Series 1: Installation Configuration

Install installation Epel as a Yum source for installing ansible (CentOS6.4)RPM-UVH http://ftp.linux.ncsu.edu/pub/epel/6/i386/epel-release-6-8.noarch.rpmInstall Saltstack:Main control side:Yum Install salt-mastster-ychkconfig Salt-master onservice Salt-master startControlled End:Yum Install salt-minion-ychkconfig Salt-minion Onservice Salt-minion startFirewall:The main control side adds TCP 4505, 4506 port rules, the controlled side does not need to be configured, the principle is the control si

Zeromq in saltstack

uses _ return to first perform fire_event on the local event interface, the results are stored locally on the master. 8. because fire_event is carried out in 7, the get_cli_event_returns in 4 can be captured. Because the iterator is used, each received result can be immediately displayed, once the result of the captured minions is greater than or equal to the number of previously obtained minions, it means that all minions have returned results and quit. Summary Salt uses the flexible and eff

Saltstack Quick Start # Personal sorting

Saltstack Quick Start # Personal sortingGetting started using pip Because Salt has already entered PyPI, pip can be used for installation, although most users prefer RPMs (which can be installed from EPEL ). Installing from pip is simple: pip install saltWarning if you install from pip (or use Setup. pyinstallFrom the source code), pay attention Yum-utilsIt is depended on by Salt and used to manage software packages. Similarly, if Python dependencies

Source code parsing of SaltStack 1

This article analyzes the running process of saltstack from the perspective of sal command line execution. The code analysis process is parsed by running logs. Command Execution Process Enter salt '*' cmd. run ls command on the terminal #salt "*" cmd.run lscloudstack-agent_4.2.0_all.debcloudstack-common_4.2.0_all.debzmq Let's take a look at the output log of the salt master. 14:28:36, 087 [master. py] [_ handle_clear] [640] [master] [-1221166

Saltstack Management Starts Here

compression.Because gzip-cpu-intensive, this should only being used in scenarios whereThe compression ratio is very high (e.g. pretty-printed JSON or YAMLfiles).Use the *gzip* named argument to enable it. Valid values is 1..9, where 1Is the lightest compression and 9 the heaviest. 1 uses the least CPU onThe Master (and Minion), 9 uses the most.States1: View all States List: Salt ' jcfx-4 ' sys.list_state_modulesJcfx-4:-ACL-Alias-Alternatives-Apache-Archive-Artifactory-At-Beacon-Blockdev-Buildou

Saltstack State Management

1. State moduleDescription format: Yaml format, file with. SLS EndUnderstanding yamlhttps://www.unixhot.com/docs/saltstack/topics/yaml/index.htmlYaml KickFirst: Indent. Note that it must be two spaces. Indentation represents a hierarchical relationship.Second: Colon. Combine with spaces to indicate indentation.The second use of a colon is to represent a key-value pairThird: The dash indicates the list. There are spaces behind the dash.[email protected

The use of Saltstack/salt's State.sls

' State.sls nginx test=true The output information is omitted here summary------------succeeded:8failed: 0------------Total: When pushing the minion above, the general Salt ' sa10-003 ' state.sls this command; Of course, you can also perform salt sa10-003 state.highstate This command will match all of the STATE.SLS modules by default. where test=true refers to a test installation, that is, no actual operation, just to see the test results. List of logical relationships for state:In

Saltstack Source Installation Zabbix_agent Client

Saltstack Source Installation Zabbix_agent ClientInstallation and environment brief, directly on the topic:First, the tree-like chart.[Email protected] salt]# pwd/srv/salt[Email protected] salt]# tree. ├──init│└──init.sls├──top.sls└──zabbix├──conf.sls├──files│├──zabbix_agentd│├──zabbix_age NTD.CONF│└──ZABBIX.TAR.GZ├──INIT.SLS└──INSTALL.SLS3 directories, 8 filesSecond, initialize the system firstHere is just to tell the client to install vim-enhanced,

Saltstack--grains

GrainsGrains is a collection of information that is collected at Minion startup, such as the operating system type, network card IP, and so on. Using CommandsSalt ' client.aming.com ' grains.ls lists all grains project namesSalt ' client.aming.com ' grains.items lists all grains items and valuesgrains information is not dynamic and is not always changed, it is only collected at minion startup. grains can do configuration management. Custom Grainsvim/etc/salt/minionAdd or change:Grains:role:-Ngin

Comparison of grains and pillar in Saltstack

1. Storage locationGrains:minion EndPillar:master End2. Data typeGrains: Static dataPillar: Dynamic Data3. Data collection and Update methodGrains:minion is collected at startup, or it can be refreshed with salt ' * ' saltutil.sync_grainsPillar: Defined on the master side, assigned to the corresponding minion. You can refresh with salt ' * ' saltutil.refresh_pillar4. ApplicationGrains: Storage Minion basic protective gear, such as for matching minion, its own receipts can be used to do asset man

Preliminary study on Saltstack

machineState moduleSLS methodApache indicates which state file needs to be executed############################################################################################################### ########################################################################################################################################################################### ####################################################################################################################################

The pillar of Saltstack data system

] pillar]# Salt ' * ' Pillar.items ========> get pillar valueLinux-node2.example.com:----------Apache:httpdLinux-node1.example.com:----------Apache:httpdExample 2: Locating the host[[email protected] pillar]# Salt ' * ' Saltutil.refresh_pillar =======> refresh pillarLinux-node1.example.com:TrueLinux-node2.example.com:True[[email protected] pillar]# salt-i ' apache:httpd ' test.ping =========> Locate hostLinux-node2.example.com:TrueLinux-node1.example.com:TrueOld boy Website: http://www.etiantian

Total Pages: 15 1 .... 9 10 11 12 13 .... 15 Go to: Go

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.