New features:
2015-03-11
Everything is automated except pass (Backup and update) and start (Start service).
Note: Pass and start are set as business classes and cannot be automated due to different types of business. Other than the same kind of business, such as the update is Tomcat war package, etc...
Added "list" shortcut keys to quickly manipulate the list rules file.
Simplify code redundancy and spell out the original Exec tool class to tools.
Fixed a bug with the previous version of the configuration file garbled.
The system version monitoring feature was added after successful deployment.
2015-01-28
Logic and business separation , perfect logic and business separation, business implementation of unified shell script development, unified call by the framework.
concurrent Multi-threaded deployment , regardless of how many servers, how many services, while initiating threads to update, deploy, start.
improve the DIY degree of list rules files , reduce the modification code brought by new services, and implement scan list Automation installation deployment.
Perfect rollback mechanism , can be rolled back according to the time period, realize instant rollback instant use.
1 Introduction
Automated deployment and unified installation upgrades for multi-resource distributed/detached deployment projects.
As the service/business is becoming more and more, the profile is more dazzling, each time not knowing how much time is wasted due to deployment/installation issues, and not knowing how many problems have been caused by configuration problems. Multiple servers to switch back and forth, if the service needs to rely on, startup is a problem.
How to implement an automated installation upgrade, one click to perform a unified installation.
For a multi-resource distributed deployment project, with more and more services, the configuration file is more dazzling, each time do not know because the deployment problem is wasted time, but also do not know how many problems due to configuration problems. Multiple servers to switch back and forth, if the service needs to rely on, startup is a problem.
1.1 Purpose
Unified installation, batch deployment, unified monitoring.
1.2 Range
The scope of use of this project includes:
-based on multi-resource development projects
-wide range of project-related services
-Service multi-dependency relationship
1.3 Readers
The reader or other document stakeholders of the requirements specification are platform directors, product managers, project directors, project managers, developers, testers, OPS, UX designers, and so on.
2 overall Project Description 2.1 system overall functional framework
Before performing a unified installation, first back up the previous project and extract the involved configuration file, then check the SVN update version, and then perform a unified installation.
Implementation of a single key to perform a unified installation, the completion of the display service process and related versions.
2.2 List of system functions
Number |
Module |
Function |
Description |
unifydeploy_0.1 |
Exec |
Build trust, initial command |
Initial |
unifydeploy_0.2 |
Tools |
Service Intervention List Rule |
Scan to provide a list of services, get configuration information |
unifydeploy_0.3 |
Conf |
Profile Processing Optimization Show |
Automatically generated |
unifydeploy_0.4 |
Bin |
Execution tools |
Provides total execution and single execution |
unifydeploy_0.5 |
New |
Storing the modified configuration file |
inversely proportional to bak retention file |
unifydeploy_0.6 |
Bak |
Storing the original configuration file |
Easy problem Analysis |
unifydeploy_0.7 |
Temp |
Storing temporary files |
Temporary files will be deleted without any redundancy |
unifydeploy_0.8 |
Workapp |
Storing the installation package |
Uploading the installation package |
unifydeploy_0.9 |
Workbak |
Backup installation Package |
Unified Rollback |
3 Function Description 3.1 get configuration file
Unified installation through the system is very simple deployment, only the user according to the list template to provide the service lists, the other do not need to operate. The list of services is as follows:
Noun Explanation:
Server: Service Name IP : server IP pointing to Path: deployment path to config: Configuration item cfpath: Configuration path
Execute the script, "conf" directory automatically generate the user needs to modify the configuration file, profile is generated by processing filtering, so a service no matter how many files need to be configured, here only one, easy to modify and management. The configuration file follows the previous version of the configuration file, and in the new version there is no additional configuration item, skip this step without modification.
3.2 Automated Unified Installation Deployment
Automated unified installation deployment, including: Host Trust, SVN installation package download, upload decompression installation package, sync configuration, previous round of installation backup, start-up service, monitoring service, etc.
list.sh init.sh pass.war startup.sh syn.sh exec.sh thread.py
Deployment supports unified installation in a distributed installation, and each script can be split into any combination, such as:
1) a new set of environments has not yet deployed the service, only need to adjust the upload package script sequence, first upload the installation package, the subsequent operation is performed normally.
2) Iteration Update, the function is slightly modified, the original configuration item does not need to modify, also simply adjusts the upload installs the package script sequence, obtains the original configuration first, then uploads the update installs the package, the subsequent operation normal execution.
3.3 Comparison of advantages and disadvantages of ansible
Advantages:
1) Framework open source, business scripts based on shell development, not as serious as the Ansible package, can only be written in his format
2) processing multiple configuration files under one service into a configuration template, which is more convenient to modify and check than Ansible.
3) Support more DIY functions, better monitor process, check version, etc.
4) can be rolled back according to time period for instant rollback instant use
5) Not only for the update deployment but also for the first deployment
Disadvantages:
1) ansible commercialization for a long time, more people in use
Automated deployment and unified installation upgrade-class Ansible Tools unifyDeploy0.3 release (Updated 2014-12-24)
unifyDeploy0.4 Download
Automated deployment deployment with automated installation unifyDeploy1.0, which is more than ansible automation operations tools