saltstack tutorial

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

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.

Saltstack Pillar Components (6)

Pillar is also one of the most important components of saltstack, and its role is to define any data related to the controlled host, and the defined data can be used by other components such as templates, State, API, etc. The data defined in pillar is associated with the minion of different business features so that different minion can only see their own matching data, so pillar security is very high, suitable for some more sensitive data, which is t

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

Third, Saltstack certificate management

protected] master]# LLTotal 28-R--------1 root 1675 Sep 09:19 Master.pem ( own public key )-rw-r--r--1 root root 451 Sep 09:19 master.pub (Own private key)Drwxr-xr-x 2 root root 4096 Sep 09:32 Minions (already certified key)Drwxr-xr-x 2 root root 4096 Sep 09:19 minions_autosignDrwxr-xr-x 2 root root 4096 Sep 09:19 minions_deniedDrwxr-xr-x 2 root root 4096 Sep 09:32 minions_pre (no certified key)Drwxr-xr-x 2 root root 4096 Sep 09:19 minions_rejectedMinion End:To view certificate-related files:[E

(Reprinted) Chinese translation of the saltstack master configuration file

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

Saltstack user management

Yunwei: Group. Present: -Gid: 602 Running result: [[Email protected] salt] # Salt '192. 168.2.99 'state. SLS user. addgroup 192.168.2.99: ---------- ID: devgroup Function: group. Present Omitted ---------- ID: yunwei Function: group. Present Omitted Summary ------------ Succeeded: 2 Failed: 0 ------------ Total: 2 [[Email protected] salt] # Salt '192. 168.2.99 'cmd. Run 'grep-e "(devgroup | yunwei)"/etc/group' 192.168.2.99: Devgroup: X: 601: Yunwei: X: 602: 7. delete a user group: Delgroup. S

Saltstack source code-start 2-parsers.py option initialization 1

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.

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

Use Saltstack to deploy ganglia clients gmond and gangliagmond

Use Saltstack to deploy ganglia clients gmond and gangliagmond Process: 1. install some dependent packages 2. Compile and install the libconfuse package 3. Compile and install ganglia 4. Configure gmond and start gmond Preparation: 1. One master 2. source file: Salt: // tools/Ganglia/package/ganglia-3.6.0.tar.gz Salt: // tools/Ganglia/package/confuse-2.7.tar.gz 3. Eight minion servers Software is installed in/usr/local/ Start: (Here I write sls file

O & M platform-based saltstack and jinja2 templates to build a high-availability cluster configuration platform

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

Saltstack installation configuration (syndic)

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

Use saltstack to Manage Users

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 Learning -8:web Management page (halite)

Installation Halite Method One: failed, unknown origin cause 1, install and start Salt-api yum installsalt-api –y service salt-api start chkconfig salt-api on 2. Installing halite and its dependent files yum installpython-pip –y pip install--upgrade pip pip install-U halite pip installcherrypy pip installpaste yum installpython-devel gcc –y pip installgevent pip installpyopenssl Pip Install tornado 创建登录用户 Useradd Sal

Saltstack exploration-using pillar to improve VIM deployment

Saltstack exploration-using pillar to improve VIM deployment[[emailprotected]srv]#pwd/srv[[emailprotected]srv]#lspillar salt[[emailprotected]srv]#catpillar/data.slspkg/ top.slsusers/[[emailprotected]srv]#cat pillar/pkg/init.slspkgs:{%ifgrains[' os_family ']== ' RedHat ' %}vim:vim-enhanced{%elifgrains[' os_family ']== ' Debian ' %}vim:vim{%elifgrains[' os ']== ' Arch ' %} vim:vim{%endif%}[[emailprotected]srv]#cat pillar/top.slsbase: ' * ':-data- Users-

Redis compile installation and saltstack simple configuration

-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

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.