Ansible is based on modularity, with specific modules to complete specific tasksBased on the Python language implementation, implemented by three key modules of Paramiko, Pyyaml and JINJA2Simple deployment, agentless (no client deployment, client management via SSH protocol)Based on master-slave modeSupports custom modules (other programming language-written modules can also be called via Ansible interface)
Ansible Getting Started experience
What does Ansible do? Why does it need to be used in a distributed system?If I have a Java service a now, you can deploy only one server when the volume of traffic is small and availability requirements are not high. When service A to launch online, you can log in directly to the server to publish work. But because of the growth in business volume and the need for availab
public keys for a considerable month: "--list all"-a ACCEPT,--accept=accept the public key specified by the license (using--include-all option to specify the public key of all reject states except the suspended key)-A,--accept-all license all pending public keys-R REJect,--reject=reject denies the specified public key (use the--include-all option to specify the public key of all accept states except the suspended key )-R,--reject-all rejects all pending public key--include-all with accepting/re
/mysqld.pidSlow-query-log-file =/var/log/mysql_slow_querys.logSkip-name-resolveSkip-grant-tables2.6 MySQL startup script to add the following path[email protected] files]# cat mysqld#!/bin/shbasedir=/usr/local/mysql-5.6/datadir=/usr/local/mysql-5.6/data/2.7 Simulated execution salt1[[email protected] salt]# Salt ' node2 ' state.highstate test=true-no error[[email protected] salt]# Salt ' node2 ' state.highstate start installing MySQLThis article is from the "Bill Linux Operations Notes" blog, pl
Deploying the lamp architecture with SaltstackSteps:(1) Install package pkg(2) Modify the profile file(3) Start service services(1) PKG Module learningHttps://www.unixhot.com/docs/saltstack/ref/states/all/salt.states.pkg.html#module-salt.states.pkgNote: Under an ID declaration, the status module cannot be reusedPkg.installed #安装pkg. Latest #确保最新版本pkg. Remove #卸载pkg. Purge #卸载并删除配置文件 # Install multiple packages at the same time common_packages:pkg.inst
Brief description
This series of articles is not saltstack primer to give up series, just contact salt players please from the "Saltstack Technology Introduction and Combat", "proficient in saltstack" and other books to get started, written very easy to understand and comprehensive.
Undeniable saltstack
First,saltstack IntroductionSaltstack is an open source automation deployment and management tool written in Python with good extensibility and excellent execution efficiency, simple configuration, can work on multiple platforms, and is often described as Func Plus + Puppet Lite version. SALTSATCK Advantages: First, fast, based on the message queue + thread, run a number of devices, are millisecond level; second, very flexible, the source code is py
Automated O M: website svn Code Update (flask + saltstack) and svnflaskPeriodic summary: It took about a week to complete the automatic website upgrade function. Many problems were encountered and many problems were learned. Here is a summary. 1. Overall architecture: backend: nginx + uwsgi # nginx provides web Services. uwsgi parses python code. Foreground: flask + bootstrap + html # flask is a set of web development tools for python, bootstrap is a
This article summarizes how saltstack locates the target host and introduces some common examples.
> Why do I need to locate the host?
As a configuration management software, the first thing to solve is how to determine the push host, or the push target of a specific configuration. If you cannot determine the target of one or more pushes, how can we automate the classification configuration management of a large number of hosts?
> What is the target m
Tags: salt saltstack salt-key salt-Minion salt-Master
Saltstack is an open-source software. Salt has two main functions: configuration management and remote execution. The saltstack configuration file format is simple and easy to write. At the same time, saltstack runs very fast remotely. The following describes the im
Let's start with an example of adding a task:Note: Although you can create a delete here, but the author does not recommend such use, management complex, recommended the bottom of the file Management Timing task method/usr/sbin/ntpdatepool.ntp.org>>/dev/null2>1:cron.present: -user:root-minute:10[[emailprotected] base]#salt ' saltstack-node2.example.com ' state.highstatesaltstack-node2.example.com:---- ------id:/usr/sbin/ntpdatepool.ntp.org >>/dev/null
Modules in the Saltstack library:in Saltstack, each subsystem plug-in (plug-in) is a Python Module. Therefore, the Module in the Saltstack library can be seen as a set of functions (for example: aka command); it can be seen as an application (e.g. MySQL, Docker); can be seen as a system component (e.g. disk, file) ; it can also be seen as an external system (GITF
Batch manage remote servers using AnsibleBackground
Local management of a batch of remote servers is required, mainly to execute the following tasks:
1) Copy local files to all remote servers;2) execute commands on the remote server;
The paths of the remote server are not completely consistent. Generally, access is performed through the variable paths defined in the environment variables;For example, define $ app_path =/opt/app/bin in. bashrc.
Finally, ansib
First, the basic introduction of Ansible:
What's the ansible type?Ansible is a very simple IT operations automation tool engine for configuration management, application deployment, internal service orchestration, and more, for hundreds of thousands of managed nodes, based on Python development. She does not need an agent and is easy to deploy, with no other
Ansible playbook component, ansibleplaybook
Core elements of playbook:
Tasks: Task
Variables: Variable
Templates: Template
Handlers: Processor
Roles: Role
Organization format: YAML (also known as a Markup Language)
Syntax: (the list is represented by a horizontal bar. Key-value pairs are separated by colons, and other key-value pairs can be nested in key-value pairs)
Example: name: tom
Age: 21
Gender: Male
Spourse:
Name: lily
Gender: female
Children:
Common ansible module usage
Ansible provides many modules by default. In Linux, we can run the ansible-doc-l command to check which modules are supported by ansible, you can use the ansible-doc-s Module name to view the parameters available for this module.
The following des
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.