saltstack tutorial

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

Saltstack common modules and API view host supported modules list

View the list of modules supported by the host minion001Sys.list_modules[[email protected] ~]# salt  ' minion001 '  sys.list_modulesminion001:     - acl    - aliases    - alternatives     - apache    - archive    - at     - blockdev    - bridge    - 

Saltstack some common modules and API call methods

When we study the executable module, we find that many of our modules are well-established, which can help us to do our daily work, and write our own record operation:1, using Salt.clien Invoke interface Operation Example:>>> Import Salt.client>>>

Saltstack API and the corresponding Python template

Source: Python Automated operations developmentTest: Import salt.clientclient = salt.client.localclient () ret = client.cmd (' * ',  ') Test.ping ') Print ret (1) Archive Module 1) function: To achieve the system level of compression package calls,

Saltstack (a) system environment and local Yum source

1. Server environmentnode1:192.168.3.1node2:192.168.3.22. Host name and Hosts fileNode1:node1.xkops.com--Host name[Email protected] ~]# tail-n 2/etc/hosts192.168.3.1 node1.xkops.com192.168.3.2 node2.xkops.comNode2:node2.xkops.com--Host name[Email

Saltstack (ii) package download and installation

Because the salt component is more dependent on installation, it is best to use the Yum source installation (not recommended for source installation). Because the test environment is limited, the network cannot be used, so the experiment is more

Using Saltstack's SLS function

SLS File compilation[[email protected] ~]# vim /etc/salt/master# adds the following in the master profile File_roots:  base:     - /srv/salt[[email protected] ~]# mkdir -p /srv/salt[[

Saltstack Configuration Management System initialization

[Email protected] ~]# cd/srv/salt/base/[[email protected] base]# lsApache.sls Dns.sls Files Top.sls[[email protected] base]# mkdir Init[Email protected] base]# mv Apache.sls Dns.sls files//tmp/[email protected] base]# LLTotal Dosage 8Drwxr-xr-x 2

Saltstack Configuration Management-Business reference keepalived

Configuration file for ================>keepalived[Email protected] cluster]# cat/srv/salt/prod/cluster/files/haproxy-outside-keepalived.conf! Configuration File for KeepalivedGlobal_defs {Notification_email {[Email

Saltstack Bulk Add Bulk Delete users

Bulk Add Users[email protected] init]# cat Useradds.sls{% Set users = [' name1,name2 ']%}{% for user in users%}{{User}}:User.present:-Shell:/bin/bash-Home:/home/{{User}}-Password: ' $1$sbvwg7.v$r/nwds7g0yynb1cvsfupa/'-Groups:-{{User}}-Require:-Group:

Saltstack's Pillar Components

I've seen it for a long time. Pillar This component, search a lot, still do not understand the role of this component, probably I understand, pillar this component is more flexible, can define their own minion information, can also combine Jinjia.On-

Saltstack Job management and runner (eight)

Job management and runner of SaltstackConfiguration file/etc/salt/masterCachedir:/var/cache/salt/master # cache path keep_jobs:24 # Job Save timeSalt Execution Module Official document

Saltstack-job Management

First, salt execution results are returned by default to master side 1, job cacheStorage location# directory to store job and cache data:# This directory may contain sensitive data and should be protected accordingly.##

saltstack-System Initialization

1. Writing resolv.conf (DNS) files[Email protected] ~]# Cat/srv/salt/system/dns/dns.sls/etc/resolv.conf:File.managed:-Source:salt://system/dns/resolv.conf-User:root-Group:root-mode:6442. Add time to historical command (history)[Email protected] ~]#

Saltstack's Jinja Template

How to use the Jinja templates:1. File status using template parameter-Template:jinja2, template file inside variable use {{name}}, for example {{PORT}}Variable using grains:{{grains[' FQDN_IP4 '}}Variable using execution module: {{salt[' network.hw_

Saltstack installation deployment and NTP service batch deployment process instances

Server-side Installation Salt-masterYum Install Salt-master-yClient Installation Salt-minionYum Install Salt-minion-yStart the service:Server start Mode:/etc/init.d/salt-master startClient startup mode:/etc/init.d/salt-minion startMaster-side

Saltstack Configuration Management

3. Configuration Managementon the server:vim/etc/salt/master//Search Find File_rootsOpen a comment that reads:file_roots:Base:-/srv/saltMkdir/srv/saltCd/srv/saltVim/srv/salt/top.sls//Add the following:Base:' * ':-ApacheThis means that the Apache

Saltstack-gdlwolf Self-study summary fourth: Salt-master and salt-minion configuration file options Description

Not all of the options for the master and Minion end profiles are described here, but rather the usual ones.I. Description ofMaster Common configuration optionsCat/etc/salt/master Interface : Specify the address of bind (default is 0.0.0.0)

Saltstack the use of Logrotate module for source code analysis

Logrotate module for processing log file rotation related tasks#-*-Coding:utf-8-*-"Module for managing Logrotate." # import Python libsimport osimport logging# Import salt libsimport salt.utilslog = Logging.getlogger (__name__) Default_co NF = '/etc/

Saltstack virt module Creating virtual Machine Analysis II

That's the 2nd one today. The command execution format is as follows:Salt ' kvm.tiancity.com ' virt.init web20 4 nic=nics Disk=systemHere, we need to be aware that the KVM/QEMU is not allowed to use the profile, we need to change the virt.py code:650

STAE usage in saltstack

# Salt '*' state. SLS httpd This command will first find httpd in the directory/srv/salt. SLS (written in yml syntax) file. If yes, the content of the Installation File is executed. If not, locate init in the/srv/salt/httpd directory. SLS, find

Total Pages: 15 1 .... 11 12 13 14 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.