saltstack api

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

Use of the ssh-Based Cluster O & M tool ansible api [class saltstack]

to solve the problem of having at least APIs to focus on tools. In other words, ansible and saltstack are very similar. Apart from their processing models, one is paramilo-based and the other is zeromq's pubsub. In terms of configuration, ansible has a playbook, which is similar to the state of saltstack. Ansible is also the mode of yaml and jinja2. I will not talk about the installation and configuratio

Saltstack-api (12)

Saltstack-apiOfficial Document Https://docs.saltstack.com/en/latest/ref/netapi/all/salt.netapi.rest_cherrypy.htmlconditions of Use: 1) HTTPS call, need to generate certificate 2) configuration file 3) using PAM authentication 4) Start Salt-apiinstallationYum Install-y Salt-apiImplementation Method1) Create user useradd-m-s/sbin/nologin Saltapi2) Set Password passwd saltapi3) generate a self-signed certificateCd/etc/pki/tls/certsMV Localhost.crt/tmpMak

Saltstack API installation using

;-H'Accept:application/json'\ # Return JSON format, easy to parse ->-D username='Saltapi' ->-D password='Saltapi' ->-D eauth=Pam -{"return": [{"perms": [".*"],"Start":1511235669.459298,"token":"9374cd95e861ba80cda73375b50917446d7a45f2 '","expire":1511278869.459298,"User":"Saltapi","Eauth":"Pam"}]} -[[email protected] ~]# CURL-SSK https://192.168.56.11:8000 \ in>-H'Accept:application/json' ->-H'x-auth-token:9374cd95e861ba80cda73375b50917446d7a45f2' to>-D client=Local +>-D tgt='*' ->-D fun=te

Saltstack API and the corresponding Python template

Source: Python Automated operations developmentTest: Importsalt.clientclient=salt.client.localclient () ret=client.cmd (' * ', ') Test.ping ') Printret (1) Archive Module 1) function: To achieve the system level of compression package calls, support Gunzip, gzip, RAR, tar, Unrar, unzip and so on. 2) Example: #采用gzunzip解压/tmp/sourcefile.txt.gz package salt ' * ' archive.gunzip/tmp/sourcefile.txt.gz# with gzip compression /tmp/sourcefile.txt file salt ' * ' archive.gzip/tmp/sourcefile.txt3)

Saltstack some common modules and API call methods

(),‘meminfo‘: meminfo(),‘netdev‘: netdev(),‘netstats‘: netstats(),‘uptime‘: uptime(),‘vmstats‘: vmstats(),‘w‘: w()}How to use:[[email protected] python]# Salt ' * ' status.uptimeMonitor11:40:50 up, 23:24, 1 user, Load average:0.00, 0.00, 0.00API Interface Call Method:>>> client.cmd (' * ', ' status.uptime '){' Monitor ': ' 11:41:52 up ', 23:25, 1 user, Load average:0.00, 0.00, 0.00 '}3. SystemSystem module is mainly used for daily operation of computer maintenance records, the source code is als

Saltstack common modules and API view host supported modules list

View the list of modules supported by the host minion001Sys.list_modules[[emailprotected]~]#salt ' minion001 ' sys.list_modulesminion001: -acl-aliases-alternatives -apache-archive-at -blockdev-bridge-buildout -cloud-cmd-composer -config-cp-cron -daemontools-data-defaults -dig-disk-django -dnsmasq-dnsutil- Environ-etcd-event-extfs -file-gem-genesis- grains-group-grub- hashutil-hg-hosts- img-incron-ini- introspect-ip-iptables -key-kmod-locale -locate-logrotate-lowpkg -lvm-match-mine -modjk-mount-n

Saltstack API (i)

A), install the configuration API[[Email Protected]_master ~]# pipInstallpyopenssl #安装依赖包[[Email Protected]_master~]#Yum Installsalt-API #安装api服务[[Email Protected]_master~]# useradd username Echopassword |passwd--stdin $username #添加用户[[Email Protected]_master~]# Salt-call--local Tls.create_self_signed_cert#生成key, default directory/etc/pki/tls/ certs[[Email Protec

Saltstack Python API call

/index.htmlClient.cmd (' xn2016-02-04 ', ' cp.get_file ', [' salt://path/to/file ', '/minion/dest '])4. File module1) Function: Common operation of controlled host files2) ExampleVerifies whether the MD5 of the/ETC/PADDWD file for all managed hosts is lkhwln423lkn4l23kjh42l3j4ml, and the same returns tureSalt ' * ' file.check_hash/etc/passwd md5=lkhwln423lkn4l23kjh42l3j4mlCreate directory on all managed hostsSalt ' * ' file.mkdir/opt/testChange the warn of the loglevel parameter of the/etc/httpd

Saltstack Study notes-12th: Saltstack Web Interface

Saltstack has its own Python-developed web interface Halite, the benefit is based on Python, can work seamlessly with the salt API, to determine the more obvious, the need to personalize the Web interface to customize the will be more troublesome, If you like to experience this interface, you can refer to the following article http://rfyiamcool.blog.51cto.com/1030776/1275443/I am using another python+php fo

Saltstack in-depth-test saltstack configuration Zabbix required Mysql-server

Saltstack in-depth-test saltstack configuration Zabbix required Mysql-serverOperation content: First, basic Environment 1, use Tvm-cobbler to install a Tvm-zabbix virtual machine to do the experiment. 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) [[emailprotected]~]# cd/etc/sysconfig/network-scri

Detailed deployment of automated O & M tool SaltStack _ tutorial on installing SaltStack on yum on CentOS6.5

SaltStack is a centralized server infrastructure management platform that provides configuration management, remote execution, monitoring, and other functions. Generally, it can be understood as a simplified version of puppet and an enhanced version of func. SaltStack is implemented based on the Python language and combined with the lightweight Message Queue (ZeroMQ) and Python third-party modules (Pyzmq, P

Saltstack Quick Start summary and saltstack Quick Start

Saltstack Quick Start summary and saltstack Quick Start Saltstack is an open-source automated deployment and management tool written in python. It has good scalability and excellent execution efficiency, simple configuration, and can work on multiple platforms, it is often described as Func enhanced version + Puppet Lite version. Saltsatck advantages: first, the

Saltstack (Fri) Saltstack and Zeromq

I. Description of ZEROMQWe carry out automated operations in most cases, the number of our servers has far exceeded the scope of human SSH maintenance, Saltstack can support thousands or even more servers, these performance is mainly from the ZEROMQ, Because Saltstack is based on ZEROMQ for efficient network communication, ZMQ is used for communication between node and node, and node can be either a host or

Boss said Saltstack, this girl dare not to comply with "1"----saltstack installation

Our server, back and forth, left and right, up and down, bent finger toe arithmetic, exactly right, and then the difference between the diameter of my math course is also the language supplement imparted, the girl never understand why the boss just like to use Saltstack.Hearsay, who who recommended to Bluff boss, days ignore, I just want to hit a soy sauce.Life is helpless, it is strange to blame this girl chose it, miserable, who come who know, who roll who clear.Revolt, flowers fall off, days

Saltstack one of the Getting Started: Saltstack installation

First,salt IntroductionSaltstack is a centralized management platform based on C/s architecture with configuration management, remote execution, monitoring and other functions. With Saltstack, You can deploy services in a single click, execute commands remotely, and greatly increase the productivity of operations personnel in large-scale service clusters. Saltstack is based on Python language development an

Saltstack Learning 01:saltstack Quick Installation

# cat /etc/salt/minion | grep "^ Master" master:192.168.0.2I see it clearly. Master There are two spaces in front of , This line of code means that I want to connect Saltstack of the Master is a 192.168.0.24.2 MasterConfiguration# Cat/etc/salt/master | grep ' ^ interface ' interface:192.168.0.2Master Monitor 192.168.0.2, There are two spaces in front of the old, otherwise the error will be started. .5.StartSaltstack5.1StartMaster# service Salt-master

Saltstack (v) state management of Saltstack

: apache:pkg.installed:-name:httpdfile. Managed:-Name:/etc/httpd/conf/httpd.conf-Source:salt://apache/httpd.conf-require:-Pkg:apache-Template:jinja-defaults: {%ifGrains.ID=="10.13.41.80"%} port:8080 {%elifGrais.ID=="10.13.41.81"%} port:8081 {%Else%} port: the {% ENDIF%} service.running:-enable:true-name:httpd-Watch:-Pkg:apache-file: ApacheIn order for SLS files to be non-mixed with business data, business data should be stored independently, and it is time for the pillar to take t

Saltstack managing the directory structure of the five Saltstack

Directory Structure of the SaltstackDescribe:When we are learning automation operations tools, whether it is puppet or saltstack, to be proficient in use, we must first understand their directory structure, overall: Puppet and salt directory structure is very similarThe first part:File_roots configuration-Managed directory structure:Premise:Using the configuration-managed directory structure, first configure it in the configuration file:Vi/etc/salt/ma

Saltstack Road--saltstack Use command (2)

] ~]# Salt ' web01 ' test.ping #salt ' * ' test.pingweb01:True#salt command# * for the goal#test is a module command (method)#ping是test的一个参数 test that all hosts are alive--master communication with Minion is not the same as ping IP. Ping to ICMP1.1. Run the shell commandCmd.run cannot perform interactive commands, such as vim,ssh[[emailprotected]~]#salt ' * ' cmd.run ' df-h ' web02: filesystemsizeusedavailuse% mountedon/dev/sda219g1.6g 17G9%/tmpfs 491m12k491m1%/dev/shm/dev/ sda1190m33m147m19%/

Saltstack series: Saltstack's Grains and pillar

' node2 ' grains.get kernelreleasenode2:2.6.32-431.el 6.x86_64Simple use of 2.Pallir#需要创建目录 [[emailprotected]pillar]#pwd/srv/pillar[[emailprotected]pillar]# TREENBSP;-NNBSP, .... ├──info.sls└──top.sls0directories,2files# Create an info file for testing [[email protected]pillar]#catinfo.sls #判断系统是否为CentOS {%ifgrains.os== ' CentOS ' %} #如果为CentOS, print Nginx version [content customization]nginx:nginx-1.4.7{%endif%}# This file must be top.sls[[emailprotected]pillar]#cattop.slsbase: ' Node2 ': #对

Total Pages: 15 1 2 3 4 5 .... 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.