WO2012139329A1 - Procédé et dispositif de mise à niveau s'appuyant sur un modèle de tâche, et système de mise à niveau par lots - Google Patents

Procédé et dispositif de mise à niveau s'appuyant sur un modèle de tâche, et système de mise à niveau par lots Download PDF

Info

Publication number
WO2012139329A1
WO2012139329A1 PCT/CN2011/075967 CN2011075967W WO2012139329A1 WO 2012139329 A1 WO2012139329 A1 WO 2012139329A1 CN 2011075967 W CN2011075967 W CN 2011075967W WO 2012139329 A1 WO2012139329 A1 WO 2012139329A1
Authority
WO
WIPO (PCT)
Prior art keywords
remote server
command
template
upgrade
execution
Prior art date
Application number
PCT/CN2011/075967
Other languages
English (en)
Chinese (zh)
Inventor
卢振兴
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2012139329A1 publication Critical patent/WO2012139329A1/fr

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Definitions

  • the present invention relates to the field of communications, and in particular, to an upgrade method and device based on a task template, and a batch upgrade system. Background technique
  • the upgrade method currently used is generally performed after logging in to a remote server using the telnet protocol or SSH (Secure Shell) protocol, such as backing up files, stopping services, etc.; then the new version The file is uploaded to the remote server through ftp, and the version is replaced by executing a shell script or decompressing and copying commands.
  • the database script needs to open the database client to execute; finally, the command to start the service is executed.
  • the technical problem solved by the present invention is to provide a method and device for upgrading a task template based on a task template, and a batch upgrade system.
  • the upgrade process is combined to customize, automate, and quickly integrate the software upgrade process and improve the software.
  • the efficiency and accuracy of the upgrade; on the other hand, the upgrade process is batched, effectively liberating manpower from repetitive work.
  • the present invention provides a method for upgrading a task template, including: packaging a common operation, and combining the functional units after the package according to an upgrade requirement to form a task template;
  • the task template is parsed into an operation command, and the operation command is executed after the operation command is sent to a remote server.
  • the common operation is encapsulated into a corresponding functional unit, and the functional unit is composed of a plurality of logically sequential operations, and a function is completed through a series of operation commands;
  • the common operations include backup of files and directories, file transfer, shell script execution, database script execution, database backup, and human machine command execution.
  • the file is placed from the local server to the ftp server, and the remote server is notified by a socket connection command.
  • the remote server obtains the file from the ftp server and completes the transfer of the file from the local server to the remote server.
  • parsing the task template into an operation command is: parsing a task template by a program, parsing the task template into a corresponding functional unit, and then parsing each functional unit into a series of Logical sequential operation commands.
  • the operation command is executed on the remote server through the socket connection. If the operation command is successfully executed, it is determined whether all the operation commands have been executed. If all the commands have been successfully executed, the function is considered to be successfully implemented, otherwise the subsequent commands are continuously executed; If the operation command fails to execute, Then enter the error processing flow.
  • the invention also provides an upgrade device based on a task template, including
  • the template editing module is configured to encapsulate common operations, and combine the functional units after the packaging according to the upgrade requirements to form a task template.
  • a socket communication module configured to establish a communication channel with a remote server through a socket connection
  • a template parsing execution module configured to parse the task template into an operation command, and execute the operation command after sending the operation command to a remote server.
  • the template editing module is configured to encapsulate a common operation into: the template editing module is configured to package a common operation into a corresponding functional unit, where the functional unit is composed of multiple logically sequential operations. A function is completed through a series of operation commands; the common operations include file and directory backup, file transfer, shell script execution, database script execution, database backup, and human machine command execution.
  • the socket communication module is configured to establish a communication channel with a remote server through a socket connection:
  • the socket communication module is configured to send a command to a remote server through a socket input stream, obtain a log and a result returned by the remote server execution command through the socket output stream, and put the file from the local server to the ftp server for the operation involving the file.
  • Sending a command to the remote server through the socket connection the remote server obtains the file from the ftp server, and completes the transfer of the file from the local server to the remote server.
  • the template parsing execution module is configured to parse the task template into an operation command:
  • the template parsing execution module is configured to parse the task template by the program, parse the task template into corresponding functional units, and then parse each functional unit into a series of logically ordered operation commands.
  • the present invention also provides a batch upgrade system, including the above-mentioned upgrade apparatus, and a data distribution thread module;
  • a data distribution thread module configured to receive scheduling data, perform scheduling allocation uniformly, sequentially determine a plurality of upgrading devices, assign task data to an upgrading device that processes an idle state, and set a state of the upgrading device to be in operation;
  • a plurality of upgrade devices are configured to process the task data, and after the upgrade is completed, change its own state to idle, and notify the data distribution thread module.
  • the technical solution of the present invention is used to control the entire upgrade process in one tool, and avoids too many tools to be used back and forth; at the same time, the entire upgrade process is automatically connected in series and executed in order, which also avoids The execution process may be missed by switching back and forth during manual operation, which greatly improves the accuracy and efficiency of execution.
  • the batch upgrade system as long as the server performance allows, the user can maximize the number of connections according to the actual situation of the device and improve the upgrade efficiency.
  • Figure 1 is a flow chart of a first embodiment of the present invention
  • Figure 2 is a diagram of a task template editing example
  • Figure 3 is a schematic diagram of socket communication; 4 is a flowchart of execution of a task template;
  • Figure 5 is a structural view showing a second embodiment of the present invention.
  • Figure 6 is a structural view of a third embodiment of the present invention. detailed description
  • a flowchart of a first embodiment of the present invention provides an upgrade method based on a task template, where the method includes the following steps:
  • step S101 the common operations are encapsulated, and the encapsulated functional units are combined to form a task template according to the upgrade requirement;
  • FIG. 2 it is a task template editing example diagram, which encapsulates the operations commonly used in the upgrade process, and is packaged as a backup of files and directories, file transfer, shell script execution, database script execution, database backup, and man-machine command execution.
  • Function each function consists of a number of logically sequential operations, through which a function is completed.
  • backup of files and directories includes creating a backup destination directory, creating a backup timestamp directory, and executing a copy command;
  • the file transfer includes the operation of transferring the file from the local (put) to the ftp server and the remote server fetching the file from the ftp server (get) the past operation;
  • Shell script execution includes transferring the shell to the remote server, changing shell execution permissions, and executing shell script operations;
  • Database script execution includes transferring database scripts to remote servers, connecting to databases, and executing database scripts;
  • Database backup includes connecting to the database and executing database backup commands
  • the man-machine command includes sending the command itself.
  • a task template is formed by combining these functions as needed in the upgrade process.
  • the first combination of templates is very convenient. Just drag the packaged operation to the upgrade process tree on the right side and fill in the key attributes to complete the template creation.
  • the template is also very flexible. The steps of the template can be adjusted arbitrarily, so that each project can customize its own template according to the project's own situation, thus implementing its own upgrade process; finally, the way to package the operation into functions is also very easy to expand, if there is a new The function needs to be added to the function list on the left side of the new function, and the new function can be added and the compatibility expansion of the original function can be realized.
  • Each operation defines attributes such as execution user, execution timeout, pause after execution, description of this step, etc. By filling in these attributes, the steps of the entire upgrade template can be displayed in an explanatory language, which is very convenient. The user understands.
  • Step S102 the local server establishes a communication channel with the remote server through a socket (socket) connection;
  • the communication channel is based on some protocol contents of telnet and SSH to complete the session simulation of telnet and SSH. As long as the device's IP information and the logged-in username and password are filled in, an automatic connection to the remote server can be achieved. And through the input and output of the socket, the transmission of the command and the processing of the return of the execution result are realized.
  • FIG. 3 it is a schematic diagram of socket communication.
  • the local server establishes a connection with a remote server through socket communication, and sends a command to a remote server through a socket input stream (Input Stream), and outputs a stream through the socket (Output Stream) ) to get the logs and results returned by the remote server execution command.
  • Involving the operation of the file, through the ftp protocol first transfer the file from the local server to the ftp server, and then send the command to the remote server through the socket, so that the remote server obtains the file through the ftp protocol to the ftp server (get) Down, thereby completing the transfer of files from the local server to the remote server.
  • This process is to first simulate the underlying environment of manual execution, and then This environment simulates other operations.
  • Step S103 Parse the task template into an operation command, and execute the operation command after sending the operation command to a remote server.
  • FIG. 4 it is a flowchart for executing a task template, including,
  • step S401 the task template is read, and when the template task is executed, the template is parsed into a packaged functional unit, and then each functional unit is parsed into a series of logically ordered commands;
  • Step S402 executing a command on the remote server through the socket connection. If the command is successfully executed, determining whether all the commands have been executed. If all the commands have been successfully executed, the function is considered to be successfully implemented, otherwise the subsequent commands are continued; If the execution fails, the error processing flow is entered.
  • This process is actually a simulated remote login to the server, manually enter the command to execute.
  • Backup of files and directories first establish a connection with the remote server through socket communication, and then send a backup command to the remote server to complete the backup.
  • the man-machine command execution first establishes a connection with the remote server through socket communication, and then sends the man-machine command to be executed to the remote server for execution.
  • Database backup first establish a connection with the remote server through socket communication, put the backup script to the ftp server, then send the get script command to the remote server, the remote server then get the backup script to the ftp server, and finally send the command to execute the backup script. Give the remote server a backup of the database.
  • Shell script execution first establish a connection with the remote server through socket communication, put the shell script to the ftp server, then send the get command to the remote server, then the remote server to the get shell script on the ftp server, and finally send the command to execute the shell script to the remote server, Perform shell script execution.
  • File transfer first establish a connection with the remote server through socket communication, put the file to the ftp server, then send the get file command to the remote server, the remote server to the ftp server get file, complete the file transfer.
  • Database script execution first establish a connection with the remote server through socket communication, put the database script to the ftp server, then send the get command to the remote server, then the remote server to the ftp server get database script, and finally send the command to execute the database script to the remote The server, the execution of the database script.
  • the backup of files and directories is similar to the communication process of human-machine command execution, but the backup of actual files and directories, and finally the backup command is a series of commands, including the creation of backup target directory, disk space detection, File copying, etc., and man-machine command execution only needs to send the command to be executed.
  • the communication process is similar, the actual steps are very different, mainly in the fact that the last command sent is actually a series of logical sequences. Command combination, not just a single command.
  • database backup, shell script execution, and database script execution are similar in communication process, but the actual steps in the execution process are quite different.
  • database backup also needs to create backup target directory, detect disk space, and connect. Database and so on; while shell script execution needs to change the execution permission of the shell, etc.; database script execution needs to connect to the database without detecting disk space.
  • the file is first uploaded from the local to the ftp server, and the put operation is implemented by the program, and the ftp server to the remote server is passed by the program to the device.
  • the socket connection initiates a get operation and gets the file to the remote server.
  • the transfer of files from the local server to the remote server is done through a two-step ftp operation.
  • the script execution part of the template involved in the template after connecting to the remote server, call the built-in shell script on the remote server carry out.
  • This implements the telnet/SSH client, ftp client, database client and other functions, so that the entire upgrade process is controlled within a tool, avoiding too many tools to use back and forth.
  • the entire upgrade process is automatically executed in series by the program, which also avoids the omission of the execution process caused by the switch back and forth during the manual operation, which greatly improves the accuracy and efficiency of the execution.
  • FIG. 5 is a structural diagram of a second embodiment of the present invention.
  • the template editing module is configured to encapsulate common operations, and combine the functional units after the packaging according to the upgrade requirements to form a task template.
  • a socket communication module configured to establish a communication channel with a remote server through a socket connection
  • a template parsing execution module configured to parse the task template into an operation command, and execute the operation command after sending the operation command to a remote server.
  • the template editing module is configured to encapsulate common operations, specifically
  • the template editing module is configured to package a common operation into a corresponding functional unit, where the functional unit is composed of a plurality of logically sequential operations, and completes a function through a series of operation commands; the common operations include backup of files and directories. , file transfer, shell script execution, database script execution, database backup, and human machine command execution.
  • the socket communication module is configured to establish, by using a socket connection, a communication channel with a remote server,
  • the socket communication module is configured to send a command to a remote server through a socket input stream, obtain a log and a result returned by the remote server execution command through the socket output stream, and put the file from the local server to the ftp server for the operation involving the file.
  • the remote server is notified by sending a command through the socket connection, and the remote server obtains the file from the ftp server, thereby completing the transmission of the file from the local server to the remote server.
  • the template parsing execution module is configured to parse the task template into an operation command, specifically,
  • the template parsing execution module is configured to parse the task template by the program, parse the task template into corresponding functional units, and then parse each functional unit into a series of logically ordered operation commands.
  • FIG. 6 is a structural diagram of a third embodiment of the present invention.
  • a batch upgrade system using the above upgrade apparatus is provided, including
  • a data distribution thread module configured to receive scheduling data, perform scheduling allocation uniformly, sequentially determine a plurality of upgrading devices, view that the upgrading device is in an idle state, and then assign task data to the upgrading device, and the state of the upgrading device Modified to work;
  • the maximum number of connections can be determined by the configuration method. As long as the server performance allows, the user can maximize the number of connections according to the actual situation of the device and improve the efficiency of the upgrade.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

L'invention porte sur un procédé de mise à niveau s'appuyant sur un modèle de tâche. Le procédé comprend les opérations suivantes : des opérations communes sont encapsulées et les unités fonctionnelles encapsulées sont combinées afin de former le modèle de tâche conformément à l'exigence de mise à niveau (S101); un canal de communication est établi avec un serveur distant par l'intermédiaire d'une connexion socket (S102); le modèle de tâche est décomposé en instructions d'opération et les instructions d'opération sont exécutées après avoir été envoyées au serveur distant (S103). La solution technique de la présente invention porte également sur un dispositif de mise à niveau s'appuyant sur le modèle de tâche et sur un système de mise à niveau par lots. La véracité et l'efficacité d'exécution sont extrêmement améliorées par utilisation de la solution technique de la présente invention. De plus, des utilisateurs peuvent augmenter au maximum les nombres de connexions conformément à la situation réelle du dispositif de manière à améliorer l'efficacité de mise à niveau seulement si la capacité du serveur est admissible par utilisation du système de mise à niveau par lots.
PCT/CN2011/075967 2011-04-14 2011-06-20 Procédé et dispositif de mise à niveau s'appuyant sur un modèle de tâche, et système de mise à niveau par lots WO2012139329A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201110093710.XA CN102736926B (zh) 2011-04-14 2011-04-14 一种基于任务模板的升级方法及装置、批量升级系统
CN201110093710.X 2011-04-14

Publications (1)

Publication Number Publication Date
WO2012139329A1 true WO2012139329A1 (fr) 2012-10-18

Family

ID=46992483

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/075967 WO2012139329A1 (fr) 2011-04-14 2011-06-20 Procédé et dispositif de mise à niveau s'appuyant sur un modèle de tâche, et système de mise à niveau par lots

Country Status (2)

Country Link
CN (1) CN102736926B (fr)
WO (1) WO2012139329A1 (fr)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105516788A (zh) * 2015-12-09 2016-04-20 珠海迈科智能科技股份有限公司 一种机顶盒的存储设备的烧写方法及系统

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105279001B (zh) * 2015-11-20 2018-09-07 杭州云柚科技有限公司 一种用于网络终端设备的软件远程升级方法
CN107305497A (zh) * 2016-04-21 2017-10-31 中兴通讯股份有限公司 版本升级方法及装置
WO2018218399A1 (fr) * 2017-05-27 2018-12-06 中国科学院深圳先进技术研究院 Procédé de commande de mise à niveau et équipement de commande de mise à niveau appliqués à la migration d'un système d'application
CN108182075A (zh) * 2017-12-29 2018-06-19 成都三零凯天通信实业有限公司 一种通过socket通信方式自动升级目标软件的程序

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101770375A (zh) * 2008-12-26 2010-07-07 新奥特(北京)视频技术有限公司 一种软件自动升级的实现方法、系统和装置
CN101820447A (zh) * 2010-03-31 2010-09-01 青岛海信宽带多媒体技术有限公司 软件升级方法及升级装置

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB0017336D0 (en) * 2000-07-15 2000-08-30 Ibm Preferable modes of software package deployment
CN100461699C (zh) * 2006-06-28 2009-02-11 华为技术有限公司 一种设备自动化升级的方法
CN101094229B (zh) * 2007-07-24 2012-12-19 深圳市融创天下科技股份有限公司 一种网络应用程序的增量升级方法
CN100535860C (zh) * 2007-10-25 2009-09-02 中兴通讯股份有限公司 一种设备软件升级自动化的实现系统和方法
CN101170568B (zh) * 2007-11-29 2012-01-11 中兴通讯股份有限公司 一种Telnet命令自动生成及批量执行方法

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101770375A (zh) * 2008-12-26 2010-07-07 新奥特(北京)视频技术有限公司 一种软件自动升级的实现方法、系统和装置
CN101820447A (zh) * 2010-03-31 2010-09-01 青岛海信宽带多媒体技术有限公司 软件升级方法及升级装置

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105516788A (zh) * 2015-12-09 2016-04-20 珠海迈科智能科技股份有限公司 一种机顶盒的存储设备的烧写方法及系统

Also Published As

Publication number Publication date
CN102736926A (zh) 2012-10-17
CN102736926B (zh) 2016-06-15

Similar Documents

Publication Publication Date Title
US11099976B2 (en) Generating code for deploying cloud infrastructure
US20200250074A1 (en) Test Orchestration Platform
CN109547509B (zh) 一种跨平台部署的方法和系统
WO2012139329A1 (fr) Procédé et dispositif de mise à niveau s'appuyant sur un modèle de tâche, et système de mise à niveau par lots
WO2017105966A1 (fr) Intégration dynamique/sur demande en tant que partie d'un déploiement
CN107426335B (zh) 一种可自动生成云环境配置文件的系统及使用方法
WO2015188617A1 (fr) Procédé et dispositif pour installer des bases de données mysql
WO2018036342A1 (fr) Procédé et dispositif de visualisation de conception de modèle basée sur csar
EP3391216A1 (fr) Outil d'intégration pour le déploiement de composants premiers et tiers
WO2015143794A1 (fr) Procédés de création et de mise à niveau, serveur, terminal, système de mise à niveau et supports d'informations
CN104765641A (zh) 一种作业调度方法及系统
CN105204991A (zh) 一种物联设备测试方法及装置
WO2016201995A1 (fr) Procédé et appareil destinés à la mise en œuvre de construction d'objet de test, et appareil de test de configuration de service
US10972351B2 (en) Dynamic management of network environments
CN111159019B (zh) 一种应用程序的测试方法、测试控制终端以及测试终端
CN110659198A (zh) 应用程序的测试用例执行方法、装置和软件测试系统
WO2021244644A1 (fr) Procédé d'intégration dynamique d'une application, et système logiciel et machine associée
EP3230865B1 (fr) Système d'exécution de récupération par génération programmatique de flux de travaux exploitables
CN111769979A (zh) 一种云资源编排方法、系统、终端及存储介质
WO2011103729A1 (fr) Procédé d'enregistrement, d'annulation de programme d'interprétation de commandes auto défini et système correspondant
CN109992295B (zh) 一种版本管理方法和服务器
CN112272190B (zh) 一种数据访问方法和装置
CN104570967B (zh) 基于Android系统的远程控制方法及系统
JP5993835B2 (ja) マルチノードを用いるスマート端末ファジング装置およびその方法
US10592227B2 (en) Versioned intelligent offline execution of software configuration automation

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 11863652

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 11863652

Country of ref document: EP

Kind code of ref document: A1