Source Installation Ansible

Source: Internet
Author: User

I. Introduction of Ansible

Ansible is a new automated operation tools, based on Python development, the collection of a number of operations tools (puppet, Cfengine, Chef, func, fabric) The advantages of the implementation of batch system configuration, batch program deployment, batch Run command and other functions. Ansible is a module-based operation and does not have the capacity to deploy in bulk. The real batch deployment is the module that Ansible runs, and Ansible just provides a framework. Mainly include:

1, connection plug-in connection plugins: responsible for and be monitored to achieve communication;
2, Host Inventory: Specifies the operation of the master, is a configuration file inside the definition of monitoring host;
3, various module core module, command module, custom module;
4, through the use of plug-ins to complete log mail and other functions;
5. Playbook: When a script performs multiple tasks, it is not necessary to allow the node to run multiple tasks at once.

Second, ansible characteristics
1, no agents: do not need to be managed to install any client on the host;
2, no server: No servers, the use of direct command can be run;
3, modules in any languages: Based on module work, can use any language development module;
4, Yaml,not code: Use the Yaml language to customize the script playbook;
5, SSH By default: work based on SSH;
6, strong multi-tier solution: Multi-level command can be achieved.

Iii. Advantages of Ansible

1, lightweight, no need to install agent in the client, update, only need to make an update on the operating machine;
2, batch task execution can be written as script, and can be executed without distributing to remote;
3, the use of Python writing, maintenance more simple, ruby syntax is too complex;
4, support sudo.

Iv. Source Code Installation Ansible
The source installation needs python2.6 above version, its dependent module Paramiko, Pyyaml, JINJA2, Httplib2, Simplejson, Pycrypto and other modules, the above modules can be installed by PIP or Easy_install.

The package version is as follows:

python-2.7.8. TGZJINJA2-2.7.3.Tar. Gzmarkupsafe-0.9.3.Tar. Gzpyyaml-3.11.Tar. Gzansible-1.7.2.Tar. GZECDSA-0.11.Tar. Gzparamiko-1.15.1.Tar. Gzpycrypto-2.6.1.Tar. Gzsetuptools-7.0.Tar. Gzsimplejson-3.6.5.Tar. Gzyaml-0.1.5.Tar. gz

1, installation python2.7

#TarXvzf python-2.7.8. tgz# CD Python-2.7.8# ./configure--prefix=/usr/local# Make--jobs= 'grepProcessor/proc/cpuinfo |WC-l ' # Make Install# Copy the Python header file to the standard directory to avoid the need to find the required header file # CD when compiling ansible/usr/local/include/python2.7# CP-A./*/usr/local/include/# back up old versions of Python and symbolic links to new versions of python# cd/usr/bin# mv Python python2.6# ln-s/usr/local/bin/python PYT Hon

2. Installing the Setuptools module

tar xvzf setuptools-7.0. Tar . gz# CD setuptools-7.0Install

3. Installing the Pycrypto module

tar xvzf pycrypto-2.6. 1. Tar . gz# CD pycrypto-2.6. 1  Install

4. Installing the Pyyaml module

#TarXvzf yaml-0.1.5.Tar. gz# CD Yaml-0.1.5# ./configure--prefix=/usr/local# Make--jobs= 'grepProcessor/proc/cpuinfo |WC-l ' # Make Install# TarXvzf pyyaml-3.11.Tar. gz# CD Pyyaml-3.11# python setup.pyInstall

5. Installing the JINJA2 module

tar xvzf markupsafe-0.9. 3. Tar . gz# CD markupsafe-0.9. 3  installtar xvzf jinja2-2.7. 3. Tar . GZ # cd JINJA2-2.7. 3  Install

6. Installing the Paramiko module

tar xvzf ecdsa-0.11. Tar . gz# CD ECDSA-0.11installtar xvzf paramiko-1.15. 1. Tar . gz# CD Paramiko-1.15. 1  Install

7. Installing the Simplejson module

tar xvzf simplejson-3.6. 5. Tar . gz# CD Simplejson-3.6. 5  Install

8, installation Ansible

tar xvzf ansible-1.7. 2. Tar . gz# CD ansible-1.7. 2  Install

Source Installation Ansible

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.