Ansible-Bulk Linux management tools"Ansible is easy it Automation"--simple automated IT tools.
Batch execution of commands on a remote server
Automating the deployment of apps
Automation Management Configuration Items
Automated Cloud service Management
Install (Ubuntu)Rely on SSH and python
Apt-get Install Ansible
Co
From http://blog.chinaunix.net/uid-20642150-id-4096719.htmlansible-Batch Linux management toolsHttps://github.com/ansible/ansibleInadvertently see this project, feel very similar to puppet, take the time to understand, found is very good, and support the use of Python to add their own modules, very simple.and relatively speaking, Ansible has the following advantages:1, lightweight, he does not need to go to
Tags: SCP type HTTP D3D firewalld non-dense dir rip colProcedure Note: First stop the Selinx and iptables and make sure that the server CD-ROM has a disc and is linked/etc/init.d/iptables Stop (C6)Systemctl Stop Firewalld (C7)Setenforce 0 temporarily close SELinux
1: Install Epel source1:yum-y Install Lrzsz2:rz + Epel with script and source database binaries3: InstallationExample: Rpm-ivh epel-release-latest-6.noarch (C6)
2: Install AnsibleYum-y Install
Tag: Equals line chown Package date file Service Playbook Word1.1 Synchronizing the MySQL package to the client server for pre-installationPs:mysql Install the package line to the/ansible/roles/mysql/files directory on the ansible server vim/ansible/roles/mysql/tasks/main.yml
- name:copy mysql_tar_gz to client
copy:src= mysql-5.6. tar.gz dest=/tmp/mysql-5.6.
Topology:650) this.width=650; "src=" https://s5.51cto.com/wyfs02/M00/8D/6D/wKioL1icKkeBk9nMAADZROqP5lk658.jpg "title=" b.jpg "alt=" Wkiol1ickkebk9nmaadzroqp5lk658.jpg "/>Topology Description:
Two servers configured Keepalived+nginx to do the load Balance of the dual master model, with the host name LB1 and LB2
Two servers configure lamp to handle dynamic resource requests with host name LAMP1 and LAMP2
Two servers configured varnish as a static resource cache server with host na
This article source: http://sofar.blog.51cto.com/353572/1579894/ObjectiveA powerful configuration management solution written by Python. Although there are already many alternative configuration management solutions available, they have advantages and disadvantages, and ansible is characterized by its simplicity. One thing that makes Ansible unique in the mainstream configuration management system is that i
Ansible advantages over other automated operations tools (Saltstack, puppet):Ansible is a lightweight framework that enables a variety of functions based on individual modules, which can be developed on demandAgentless no need to install agent, according to the specific situation to establish a machineSupport Playbook ScriptPython language development, do operations are more acceptable languageOther and so
AnsiblePython-based Paramiko development, distributed, no client-side, lightweight, configuration syntax using Ymal and JINJA2Template language, stronger remote command to perform operationsAnsible working mechanismAnsible the Ansible module via the SSH protocol (or Kerberos, LDAP) on the management nodeLine, automatically delete after execution, can use SVN to manage the custom module and orchestrationFive componentsAnsible: CoreModules: Core modules
Deploy containers using atomic hosts, Ansible, and CockpitGuideAn atomic host from an atomic project is a lightweight container operating system that can run Linux containers in Docker format. It is specially tailored to improve efficiency and makes it an ideal choice for the Docker runtime system used in the cloud environment.
We are lucky to find a good way to manage the containers running on the host: Cockpit. It is a GNU/Linux Server Remote Manage
Use ansible to compile and install the O M tools tmux and ansibletmux
Experimental System: CentOS 6.6 _ x86_64
Prerequisites: Prepare the compiling environment in advance, and disable both firewall and selinux.
Software Introduction: tmux is an excellent terminal multiplexing software, similar to GNU Screen, but comes from OpenBSD and adopts BSD authorization. The most intuitive advantage of using it is that after logging on to the remote host throug
I. Description of the EnvironmentServer with Ansible installed: 192.168.13.45Test environment server: 192.168.13.49/home/app/api-tomcat/webapps/api.war a new version of the war package location for the test environmentProduction Environment server: 192.168.13.51/home/app/api-tomcat/webapps/api.war for production Environment War package location/HOME/APP/API-TOMCAT/WEBAPPS/API for production environment Project location/home/app/tomcat.bak/ api/webapps
Achieve true automation, expect scripting language useSeveral important sentences in the expect:The core of expect is spawn expect send setSpawn calling the command to executeExpect waits for the command prompt to appear, which is the prompt to capture user input:Send sends values that need to be interacted with instead of manually entering content by the userSet
Shell script implementation SSH Automatic login remote Server example:#!/usr/bin/expectspawn ssh [email protected]expect "*password:"send "123\r"expect "*#"interact Original link: http://www.xuanhao360.com/linux-expects/Expect is a command to handle interactions . With expect, we can write the interactive process on a
The core of expect is spawn expect send setSpawn calling the command to executeExpect waits for the command prompt to appear, which is the prompt to capture user input:Send sends values that need to be interacted with instead of manually entering content by the userSet Variable ValueInteract after the completion of the implementation of the interactive State, the control to the console, this time can be man
The script consists of four files, which are as follows, the execution is tar.sh->loop.sh->loginfo.exp, and the relationship is called in turn. The script completes log in sequentially to each switch and executes the "TFTP 192.168.36.44 put vrpcfg.zip" command on each switch and then changes the saved profile to the appropriate switch IP address. Finally, the file is packaged as a file with the day date to complete all operations. Where SH is the shell script,. Exp is the
In my last blog post , SSH key authentication for Linux has been used to authenticate each other, but each time I use SSH to log on to another server or enter a password. Expect is a tool that provides automatic interaction, automatically connects to managed servers, and does not require a password to be entered manually.1, installation expect[email protected] ~]# Yum install-y expect2, write
What's a expect?1Expect isA tool for Automating Interactive ApplicationsSuch astelnet, FTP,2passwd, fsck, rlogin, Tip, etc. Expect really makes Thisstuff trivial. Expect3 isAlso useful fortesting these same applications. and by adding Tk, you4can also wrap interactive applicationsinchX11 GUIs.5 6 Expect can make easy all sorts of the tasks that is prohibitively
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.