saltstack api

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

Deploy SaltStack in CentOS 6.5

Deploy SaltStack in CentOS 6.5 (1) install python 2.7Https://www.python.org/ftp/python/2.7.8/Python-2.7.8.tgz #tarxvzfPython-2.7.8.tgz#cdPython-2.7.8#./configure--prefix=/usr/local#make--jobs=`grepprocessor/proc/cpuinfo|wc-l`#makeinstall# Copy the python header file to the standard directory to avoid missing the required header file when compiling the saltstack.#cd/usr/local/include/python2.7#cp-a./*/usr/lo

Saltstack Study Notes 6-module

The module is used to manage object operations, which is also an entry for Saltstack to be managed via push, such as executing commands, viewing package installations, viewing service runs, and so on, all via the Saltstack module.After installing master and Minion, many module will be installed and the supported module list can be viewed by the following commandSalt ' minion1 ' sys.list_modulesMinion1:-ACL-

Preliminary study on Saltstack

1.1 Installing the Epel source# cd/usr/local/src/# wget http://mirrors.sohu.com/fedora-epel/6/x86_64/epel-release-6-8.noarch.rpm# RPM-IVH epel-release-6-8.noarch.rpm1.2 installation RpmforgeThis step is important, there is no python-jinja2 on the Epel source of Redhat 6 and CentOS 6, and a change card is installed at the beginning .1 wgethttp://apt.sw.be/redhat/el6/en/x86_64/rpmforge/rpms/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpmRPM-UVH rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm2. Installing de

Saltstack webtatic RPM Installation

Webtatic: The main supply of the latest lamp and other software sources (official website: https://www.webtatic.com/)Today, I use Saltstack to install its software, that is, to extend a Yum repository. To facilitate the installation/updating of lamp-related software.No nonsense, direct sticker configuration Yum/init.sls:Clean_yum_cache:Cmd.wait:-Name:yum Clean AllWEBATIC_RPM:File.managed:-Name:/soft/latest.rpm-source:salt://yum/files/latest.rpm-mode:6

Saltstack working with Windows visual interface

  When installing salt-minion through Salt-minion-xxxx.xx.x-amd64-setup.exe under Windows, the default is to install and boot the Salt-minion service. However, if the salt-minion is started as a service, the visual operation of Windows cannot be controlled . In order to be able to manipulate the visual interface of Windows through salt-minion, you need to disable the Salt-minion service and start salt-minion in a process way.The solution is as follows:1. Start >> run >>services.msc to stop the S

Installing Saltstack automation software

:18851errors:0dropped:0 overruns:0carrier:0 collisions:0txqueuelen:1000 RXbytes:336733440 (321.1NBSP;MIB) TXbytes:1832351 (1.7 NBSP;MIB) lo linkencap:localloopback inetaddr:127.0.0.1mask:255.0.0.0 inet6addr:::1/128Scope:Host uploopbackrunningmtu:65536metric :1rxpackets:0 errors:0dropped:0overruns:0frame:0 txpackets:0errors:0dropped:0overruns:0carrier:0 collisions:0 txqueuelen:0rx bytes:0 (0.0b) TXbytes:0 (0.0b) [[emailprotected]~]##至此, your salt has been installed successfully!!#更多的使用方法请查官网文档!!!

Automatic expansion based on ETCD plus Saltstack

:8080WEB-NODE3:10.0.0.7:8080WEB-NODE4:10.0.0.7:8080WEB-NODE5:10.0.0.7:8080Web-node55:10.0.0.7:8080Zabbix-agent:----------Zabbix_server:10.0.0.7Linux-node2.example.com:----------Backend_www_oldboyedu_com:----------Web-node1:10.0.0.7:8080Web-node2:10.0.0.7:8080WEB-NODE3:10.0.0.7:8080WEB-NODE4:10.0.0.7:8080WEB-NODE5:10.0.0.7:8080Web-node55:10.0.0.7:8080Zabbix-agent:----------Zabbix_server:10.0.0.7At this point in the browser to see that n nodes have been addedOld boy Website: http://www.etiantian.o

Saltstack File/directory synchronization update

Saltstack Master-side configuration fileCat/etc/salt/master | Egrep-v ' ^$|^# ' worker_threads:60cachedir:/data1/var/cache/salt/master # #存储缓存信息, especially salt work executes the command Timeout:30open_mode : trueauto_accept:trueautosign_timeout:0modules:-Cmdrunner_dirs: []file_roots:base:-/srv/salt/dev:-/SRV/salt/dev/services-/srv/salt/dev/states prod:-/srv/salt/prod/services-/srv/salt/prod/statespillar_roots: Base:-/srv/pillarlog_level:infolog_leve

Saltstack ending a task that is being performed

Saltstack in the Minion side of the task, sometimes there are problems, such as hang, not the end.For example, we execute the following Salt command:Salt ' * ' cmd.run ' ping outofmemory.cn 'ping outofmemory.cnThis command will continue to ping under Linux, we do not give -c 4 the parameters, this time we need to end this command.First you need to find the job_id of this task, which can be done by running on the master side:Salt-run jobs.activeDisplay

2.3-saltstack Grains

Grains #收集设备的所有信息Grains is a collection of information that is collected at Minion startup, such as the operating system type, network card IP, kernel version, CPU architecture, and so on.Using commandsSalt ' client.wyp.com ' grains.ls lists all grains project namesSalt ' client.wyp.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.We can do configuration management according to some information

Centralized management platform Saltstack remote execution commands

' group2: ' minion002 ' group3: ' minion001,minion002 ' group4: ' * ' GROUP5: ' [email protected]^minion '[Email protected] ~]# salt-n group1 test.pingminion001:true[[email protected] ~]# salt-n group2 test.pingminion002:True[[email protected] ~]# salt-n group3 test.pingminion002:trueminion001:true[[email protected] ~]# salt-nGROUP4 test.ping minion001:trueminion002:true[[email protected] ~]# salt-n group5 test.pingminion002: Trueminion001:true[[email protected] ~]#7.-c,--compound, matching hos

Saltstack of operation and maintenance Automation (V) configuration management

Minion end needs to match which environment (typically the environment directory name) executes the corresponding stateStatus: Is the related state defined in the files in the environment directory that end with. SLS, for example: pgk.installed file.managed service.runing3. In the state file declared in the Top.sls file, configure the actual state to minion the end match4. When Minion finds the corresponding. sls file, the Minion side performs the related functions (so-called states) provided b

Saltstack know this is good.

"Salt's directory Structure"The environment has a default, but you can change the configuration in the/etc/salt/master file file_rootsFile_roots:Base-/data1/salt/base/Db:-/data1/salt/db/Dev-/data1/salt/dev/Prod-/data1/salt/prod/650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/82/7D/wKioL1dWxk6RXYN4AABVqeZqhCQ679.jpg "title=" Saltstack directory structure. jpg "alt=" wkiol1dwxk6rxyn4aabvqezqhcq679.jpg "/>"Mastering Saltstack's SLS file namesp

Saltstack file issued and pulled

Saltstack file issued and pulledSalt file issued, using the Cp.get_file function, empty file is not in effect[emailprotected]base]#salt ' * ' cmd.run ' ls/root/' hadm.com: anaconda-ks.cfginstall.log install.log.sysloghad6.com:abcanaconda-ks.cfg dump.rdbinstall.loginstall.log.syslog put1puth1testtest1had5.com :abcanaconda-ks.cfginstall.log install.log.syslogput1test test1[[emailprotected]base]#salt ' * ' cp.get_filesalt://files/test1 /root/test_00hadm.

Source Installation Saltstack

/./configure MAKENBSP;AMP;AMP;NBSP;MAKENBSP;INSTALLCDNBSP, .... #installswigtarxzvfswig-2.0.11.tar.gzcdswig-2.0.11/./configure NBSP;MAKENBSP;AMP;AMP;NBSP;MAKENBSP;INSTALLCDNBSP, .... #installcythontarxzvfcython-0.22.1.tar.gzcdcython-0.22.1$pythonsetup.py NBSP;INSTALLCDNBSP, .... #installm2cryptotarxzvfm2crypto-0.22.3.tar.gzcdm2crypto-0.22.3/$PYTHON setup.pyinstall#installzeromqtarxzvfzeromq-3.2.5.tar.gzcdzeromq-3.2.5/./configuremake MAKENBSP;INSTALLCDNBSP, .... #installpyzmqtarxzvfpyzmq-14.0.0.

User module of Saltstack

default shell Unique Requirement is unique UID, default is True System Select UID between First_system_uid and last_system_uid, default = False FullName User's full name Roomnumber User Room Number Workphone User Work Phone HomePhone User Home Phone Da

Further understanding of Saltstack (Basic use)

result:truecomment:thefollowingpackages wereinstalled/updated:apache2.Started:11:30:40.994840 Duration:103211.119msChanges: omitted ..... Summary------------succeeded:1 (changed=1) failed:0------------totalstates run:1host2:----------id:httpdfunction:pkg.installed Name:apache2result:truecomment:the followingpackageswereinstalled/updated:apache2.started: 11:30:41.458100Duration:122426.802msChanges: omitted ..... Summary------------succeeded:1 (changed=1) failed:0------------totalstates run:1

The deep-highstate concept of Saltstack

status statements You cannot declare/ETC/MOTD as an ID at the same time: motd_perms:file.managed:Nbsp;-name:/etc/motd-mode:644motd_quote: file.append:-name:/etc/motd-text : "Ofallsmells,bread;ofalltastes,salt." Another common reason is that if the ID declaration is long, it needs to be referenced in multiple places. For example, the following example, use mywebsite to replace /etc/apache2/sites-available/mywebsite.com can be:mywebsite: file.managed:-name:/etc/apache2/sites-available/mywebsite.c

Configuration management tools Saltstack custom Grains

(Os.path.dirname (Os.path.dirnam E (files))+'/logs/access.log') grains['Nginx_dir'] =Nginx_dir grains['Nginx_log'] =Nginx_logreturnGrainsif __name__=='__main__': Nginx ()Synchronizing and viewing grains information for a definition # Salt 192.168 .xxx.xxx saltutil.sync_grains 192.168 .xxx.xxx: - Grains.nginx 192.168 . xxx.xxx grains.item nginx_conf nginx_log nginx_bin 192.168 . Xxx.xxx: ---------- nginx_bin: -/data/prg/nginx-magicube/sbin/nginx -/data/prg/ tengine-pla

Ansible and Saltstack simple to use

cause Minion end to be added to master's minions_denied directory, delete/etc/salt/pki/master/minions and/etc/salt/pki/master/ This node IP in the minions_denied directory/var/log/salt/minion logs to see the cause of the errorThe-n parameter specifies a set of IPs, which need to be configured with the group name and the included ip:nodegroups in the/etc/salt/master fileSalt "*" Cmd.run "W" executes commands on the nodeThe Salt "*" Cmd.script salt://test.sh executes the test.sh script on the nod

Total Pages: 15 1 .... 7 8 9 10 11 .... 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.