More powerful than Ansible automated O & M tools, automated and unified installation and deployment _ automated deployment of unifyDeploy1.0, ansible
New features:
Septem
In addition to pass (backup and update) and start (start Service), all automation is achieved.
Note: pass and start are set as service classes. Because of different services, automation cannot be achieved. Except for similar businesses, such as updating tomcat war packages...
Add the "list" shortcut to quickly operate the list rule file.
Simplify code redundancy and combine the original exec tool class to tools.
Fixed the configuration file garbled in the previous version.
Added the system version monitoring function after the deployment is successful.
2015-01-28
Separation of logic and businessTo perfectly separate the logic from the business, and implement unified shell script development for the business, which is called by the framework in a unified manner.
Concurrent multi-thread deploymentNo matter how many servers and services are there, and initiate threads to update, deploy, and start them at the same time.
Increase the DIY level of list rule filesTo reduce the modification code of the new service and implement automatic installation and deployment of scan list.
Improve the rollback MechanismTo implement real-time rollback.
1 Introduction
Automated deployment and unified installation and upgrade are suitable for multi-resource distribution/separate deployment projects.
With the increasing number of services and services, configuration files are even more dazzling. You do not know how much time is wasted due to deployment/installation problems, or how many problems have occurred due to configuration problems. Multiple servers are switched back and forth. If the service needs to be dependent, the startup is even more problematic.
How to implement automated installation and upgrade, one-click unified installation.
It is applicable to multi-resource distributed deployment projects. With the increasing number of services, configuration files are even more dazzling. I don't know how much time is wasted due to deployment problems, but how many problems have occurred due to configuration problems. Multiple servers are switched back and forth. If the service needs to be dependent, the startup is even more problematic.
1.1 Purpose
Centralized installation, batch deployment, and monitoring.
Range: 1.2
The scope of use of this project includes:
-Multi-resource-based development projects
-Wide range of project-related services
-Service Multi-dependency
1.3 readers
Readers of this requirement specification or other stakeholders include the platform Director, product manager, Project Director, Project Manager, developer, tester, O & M personnel, and user experience designer.
2 Project Overview 2.1 system overall function framework
Before performing the unified installation, first back up the previous project and extract the configuration files involved, then check the SVN update version, and then perform the unified installation.
One-click unified installation and presentation of service processes and related versions after execution.
2.2 System Function list
No. |
Module |
Function |
Description |
UnifyDeploy_0.1 |
Exec |
Build trust and initial commands |
Initial |
UnifyDeploy_0.2 |
Tools |
List Rules for service intervention |
Scan the list of provided services to obtain configuration information |
UnifyDeploy_0.3 |
Conf |
Configuration File Processing Optimization presentation |
Automatic Generation |
UnifyDeploy_0.4 |
Bin |
Execution Tool |
Provides total execution and single execution |
UnifyDeploy_0.5 |
New |
Store the modified configuration file |
It is inversely proportional to the bak reserved File |
UnifyDeploy_0.6 |
Bak |
Store the original configuration file |
Easy Problem Analysis |
UnifyDeploy_0.7 |
Temp |
Store temporary files |
Temporary files will be deleted in time without any redundant parts |
UnifyDeploy_0.8 |
Workapp |
Store the installation package |
Upload the installation package |
UnifyDeploy_0.9 |
Workbak |
Backup installation package |
Unified rollback |
3 function description 3.1 get the configuration file
It is very easy to install and deploy the system in a unified manner. You only need to provide the service list based on the list template. The service list is as follows:
Glossary:
Server: Service name ip: server ip pointing to path: Deployment path pointing to config: configuration item cfpath: configuration path
Run the script. The "conf" directory automatically generates the configuration file to be modified. The configuration file is generated after filtering. Therefore, no matter how many files need to be configured for a service, only one file is generated here, easy to modify and manage. The Configuration File follows the configuration file of the previous version. If no configuration item is added in the new version, skip this step.
3.2 automated and unified installation and deployment
Automated and unified installation and deployment, including host Trust, SVN installation package downloading, uploading and unzipping the installation package, synchronous configuration, last-round installation and backup, startup service, and monitoring service.
list.sh init.sh pass.war startup.sh syn.sh exec.sh thread.py
Deployment supports uniform installation in Distributed installation. Each script can be split and used in any combination, for example:
1)Services are not deployed in a new environment. You only need to adjust the script sequence of the installation package to be uploaded. After the installation package is uploaded, the subsequent operations will be executed normally.
2)Iterative update: The function is slightly modified. The original configuration item does not need to be modified. You only need to adjust the script order for uploading and installing the package. The original configuration is obtained first, and then the updated package is uploaded. Subsequent operations are normal.
3.3 comparison with Ansible
Advantages:
1) The framework is open-source and the Business script is developed based on shell. It is not as serious as Ansible encapsulation. It can only be written in its format.
2) process multiple configuration files under a service into one configuration template, which is easier to modify and check than Ansible.
3) More DIY functions are supported to better monitor processes and check versions.
4) You can perform rollback based on the time range to implement real-time rollback.
5) not only applies to update deployment, but also to the first deployment.
Disadvantages:
1) It takes a long time for Ansible to be commercialized and more people are using it.
Automated deployment and unified installation and upgrade-class ansible tool uniydeploy0.3 released (updated)
UnifyDeploy0.4Download