CN112148315A - Software deployment method, device, server and storage medium - Google Patents
Software deployment method, device, server and storage medium Download PDFInfo
- Publication number
- CN112148315A CN112148315A CN202011012018.5A CN202011012018A CN112148315A CN 112148315 A CN112148315 A CN 112148315A CN 202011012018 A CN202011012018 A CN 202011012018A CN 112148315 A CN112148315 A CN 112148315A
- Authority
- CN
- China
- Prior art keywords
- file
- software
- target server
- deployment
- installation
- Prior art date
- Legal status (The legal status 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 status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/61—Installation
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
本发明实施例涉及一种软件部署方法、装置、服务器及存储介质,所述方法包括:通过客户端接收所述部署指令;通过所述部署指令调用用于部署软件的配置文件,所述配置文件至少包括软件运行环境配置文件或目标服务器信息;从所述配置文件中获取所述目标服务器信息,以及基于所述目标服务器信息建立与所述目标服务器的数据传输链路;将软件的安装文件通过所述数据传输链路发送给所述目标服务器,以使所述目标服务器基于所述安装文件中的第一安装脚本文件执行软件部署的步骤,可以满足客户要求动态改变实例个数而不受局限,可以解决在多台服务器多次部署软件时需要多次重复性操作的问题,且无需占用额外资源。
Embodiments of the present invention relate to a software deployment method, device, server, and storage medium. The method includes: receiving the deployment instruction through a client; calling a configuration file for deploying software through the deployment instruction, and the configuration file At least include a software operating environment configuration file or target server information; obtain the target server information from the configuration file, and establish a data transmission link with the target server based on the target server information; pass the installation file of the software through The data transmission link is sent to the target server, so that the target server executes the steps of software deployment based on the first installation script file in the installation file, which can meet customer requirements to dynamically change the number of instances without limitation , which can solve the problem that multiple repetitive operations are required when deploying software on multiple servers, and does not require additional resources.
Description
技术领域technical field
本发明实施例涉及计算机软件领域,尤其涉及一种软件部署方法、装置、服务器及存储介质。Embodiments of the present invention relate to the field of computer software, and in particular, to a software deployment method, device, server, and storage medium.
背景技术Background technique
在当今互联网领域中,经常涉及到软件的对外交付部署,例如针对客户具体应用的验证性测试部署,针对此类需求的处理方案的解决方法一般可以提前在企业内部服务器或者笔记本电脑中部署好,然后去给客户演示,即预部署;或者,在客户方现场使用常规部署即使用代码编译出来的可执行文件部署;又或者,在客户方现场使用云技术编排容器部署。In today's Internet field, the external delivery and deployment of software is often involved, such as the verification test deployment for specific applications of customers. The solution to the processing solution for such requirements can generally be deployed in the enterprise's internal server or laptop in advance. Then go to the customer to demonstrate, that is, pre-deployment; or, use conventional deployment on the customer's site, that is, deploy the executable file compiled from the code; or, use the cloud technology to orchestrate container deployment on the customer's site.
但是,上述的解决方法均有一定的缺点,预部署虽然代码的安全性得到了保障,但是满足不了客户的动态需求,当客户临时提出多实例部署某个应用时,该方案就会出现局限性;在客户方现场使用常规部署仅限于应用不多的情况,当对客户演示的应用太多时就会出现软肋,重复性操作变多,同时易出错;在客户方现场使用云技术编排容器部署缺点在于,当客户所给服务器资源刚好满足要演示的应用所需要的资源时,就很难再单独拿出机器去额外部署一套来管理应用容器的平台。However, the above solutions all have certain shortcomings. Although the security of the code is guaranteed in pre-deployment, it cannot meet the dynamic needs of customers. When the customer temporarily proposes to deploy an application with multiple instances, the solution will have limitations. ;Using conventional deployment on the customer's site is only limited to cases where there are not many applications. When there are too many applications demonstrated to the customer, there will be weaknesses, more repetitive operations, and error-prone; On the customer's site, the use of cloud technology to orchestrate container deployment disadvantages The problem lies in that when the server resources given by the customer just meet the resources required by the application to be demonstrated, it is difficult to take out a separate machine to deploy an additional platform for managing application containers.
发明内容SUMMARY OF THE INVENTION
鉴于此,为解决上述技术问题或部分技术问题,本发明实施例提供一种软件部署方法、装置、服务器及存储介质。In view of this, in order to solve the above technical problems or some of the technical problems, embodiments of the present invention provide a software deployment method, apparatus, server, and storage medium.
第一方面,本发明实施例提供一种软件部署方法,包括:In a first aspect, an embodiment of the present invention provides a software deployment method, including:
通过客户端接收所述部署指令;receiving the deployment instruction through the client;
通过所述部署指令调用用于部署软件的配置文件,所述配置文件至少包括软件运行环境配置文件或目标服务器信息;A configuration file for deploying software is invoked through the deployment instruction, where the configuration file at least includes a software operating environment configuration file or target server information;
从所述配置文件中获取所述目标服务器信息,以及基于所述目标服务器信息建立与所述目标服务器的数据传输链路;Obtain the target server information from the configuration file, and establish a data transmission link with the target server based on the target server information;
将软件的安装文件通过所述数据传输链路发送给所述目标服务器,以使所述目标服务器基于所述安装文件中的第一安装脚本文件执行软件部署的步骤。The installation file of the software is sent to the target server through the data transmission link, so that the target server executes the step of software deployment based on the first installation script file in the installation file.
在一个可能的实施方式中,所述方法还包括:In a possible implementation, the method further includes:
将所述配置文件通过所述数据传输链路发送给所述目标服务器,以使所述目标服务器基于所述软件运行环境配置文件中的第二安装脚本文件执行软件运行环境部署的步骤。Sending the configuration file to the target server through the data transmission link, so that the target server executes the step of deploying the software operating environment based on the second installation script file in the software operating environment configuration file.
在一个可能的实施方式中,所述方法还包括:In a possible implementation, the method further includes:
对所述配置文件进行校验,得到校验信息;Verifying the configuration file to obtain verification information;
若所述校验信息验证通过,则执行将所述配置文件通过所述数据传输链路发送给所述目标服务器的步骤;If the verification information is verified and passed, the step of sending the configuration file to the target server through the data transmission link is performed;
若所述校验信息验证未通过,则生成所述配置文件异常的消息。If the verification of the verification information fails, a message that the configuration file is abnormal is generated.
在一个可能的实施方式中,所述方法还包括:In a possible implementation, the method further includes:
将所述安装文件存储于临时文件中,生成第一临时任务文件;The installation file is stored in the temporary file, and the first temporary task file is generated;
将所述第一临时任务文件发送给所述目标服务器,以使所述目标服务器将接收到的所述第一临时任务文件存储于本地临时目录中,得到第二临时任务文件。Sending the first temporary task file to the target server, so that the target server stores the received first temporary task file in a local temporary directory to obtain a second temporary task file.
在一个可能的实施方式中,所述方法还包括:In a possible implementation, the method further includes:
所述目标服务器从所述第二临时任务文件中获取所述安装文件;The target server obtains the installation file from the second temporary task file;
对所述安装文件进行解析,并对解析后的安装文件进行格式转换,得到预设格式的安装文件;Analyzing the installation file, and performing format conversion on the parsed installation file to obtain an installation file in a preset format;
从预设格式的安装文件中确定第一安装脚本文件;Determine the first installation script file from the installation file in the preset format;
基于所述第一安装脚本文件,执行所述软件的安装操作。Based on the first installation script file, an installation operation of the software is performed.
在一个可能的实施方式中,所述方法还包括:In a possible implementation, the method further includes:
获取由所述目标服务器返回的所述软件部署结果对应的日志文件;Obtain the log file corresponding to the software deployment result returned by the target server;
若所述日志文件中包含所述软件部署成功的信息,则删除所述第一临时任务文件;If the log file contains the information that the software is deployed successfully, delete the first temporary task file;
若所述日志文件中包含所述软件部署失败的信息,则生成软件部署失败的提示信息。If the log file contains the information that the software deployment fails, a prompt message that the software deployment fails is generated.
在一个可能的实施方式中,所述方法还包括:In a possible implementation, the method further includes:
若所述日志文件中包含所述软件部署成功的信息,则向所述目标服务器发送删除所述第二临时任务文件的删除指令,以使所述目标服务器响应于所述删除指令删除所述第二临时任务文件。If the log file contains the information about the successful deployment of the software, send a deletion instruction for deleting the second temporary task file to the target server, so that the target server deletes the first temporary task file in response to the deletion instruction 2. Temporary task documents.
第二方面,本发明实施例提供一种软件部署装置,包括:In a second aspect, an embodiment of the present invention provides a software deployment device, including:
获取模块,用于通过客户端接收所述部署指令;an acquisition module, configured to receive the deployment instruction through the client;
调用模块,用于通过所述部署指令调用用于部署软件的配置文件,所述配置文件至少包括软件运行环境配置文件或目标服务器信息;a calling module, configured to call a configuration file for deploying software through the deployment instruction, where the configuration file at least includes a software operating environment configuration file or target server information;
连接模块,用于从所述配置文件中获取所述目标服务器信息,以及基于所述目标服务器信息建立与所述目标服务器的数据传输链路;a connection module, configured to obtain the target server information from the configuration file, and establish a data transmission link with the target server based on the target server information;
发送模块,用于将软件的安装文件通过所述数据传输链路发送给所述目标服务器,以使所述目标服务器基于所述安装文件中的第一安装脚本文件执行软件部署的步骤。A sending module, configured to send the installation file of the software to the target server through the data transmission link, so that the target server executes the step of software deployment based on the first installation script file in the installation file.
第三方面,本发明实施例提供一种服务器,包括:处理器和存储器,所述处理器用于执行所述存储器中存储的软件部署程序,以实现上述第一方面中任一项所述的软件部署方法。In a third aspect, an embodiment of the present invention provides a server, including: a processor and a memory, where the processor is configured to execute a software deployment program stored in the memory, so as to implement the software described in any one of the foregoing first aspects Deployment method.
第四方面,本发明实施例提供一种存储介质,包括:所述存储介质存储有一个或者多个程序,所述一个或者多个程序可被一个或者多个处理器执行,以实现上述第一方面中任一项所述的软件部署方法。In a fourth aspect, an embodiment of the present invention provides a storage medium, including: the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the above-mentioned first The software deployment method of any one of the aspects.
本发明实施例提供的软件部署方案,通过客户端接收所述部署指令;通过所述部署指令调用用于部署软件的配置文件,所述配置文件至少包括软件运行环境配置文件或目标服务器信息;从所述配置文件中获取所述目标服务器信息,以及基于所述目标服务器信息建立与所述目标服务器的数据传输链路;将软件的安装文件通过所述数据传输链路发送给所述目标服务器,以使所述目标服务器基于所述安装文件中的第一安装脚本文件执行软件部署的步骤,可以满足客户要求动态改变实例个数而不受局限,可以解决在多台服务器多次部署软件时需要多次重复性操作的问题,且无需占用额外资源。In the software deployment solution provided by the embodiment of the present invention, the deployment instruction is received through the client; the configuration file for deploying the software is invoked through the deployment instruction, and the configuration file at least includes the software running environment configuration file or target server information; Obtaining the target server information from the configuration file, and establishing a data transmission link with the target server based on the target server information; sending the installation file of the software to the target server through the data transmission link, In order to make the target server perform the steps of software deployment based on the first installation script file in the installation file, the number of instances can be dynamically changed to meet customer requirements without limitation, and the need for multiple servers to deploy software can be solved. The problem of multiple repetitive operations without consuming additional resources.
附图说明Description of drawings
图1为本发明实施例提供的一种软件部署方法的应用场景图;FIG. 1 is an application scenario diagram of a software deployment method provided by an embodiment of the present invention;
图2为本发明实施例提供的一种软件部署方法的流程示意图;2 is a schematic flowchart of a software deployment method according to an embodiment of the present invention;
图3为本发明实施例提供的另一种软件部署方法的流程示意图;3 is a schematic flowchart of another software deployment method provided by an embodiment of the present invention;
图4为本发明实施例提供的一种软件部署装置的结构示意图;FIG. 4 is a schematic structural diagram of a software deployment apparatus according to an embodiment of the present invention;
图5为本发明实施例提供的一种服务器的结构示意图。FIG. 5 is a schematic structural diagram of a server according to an embodiment of the present invention.
具体实施方式Detailed ways
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purposes, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments These are some embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
为便于对本发明实施例的理解,下面将结合附图以具体实施例做进一步的解释说明,实施例并不构成对本发明实施例的限定。In order to facilitate the understanding of the embodiments of the present invention, further explanation will be given below with specific embodiments in conjunction with the accompanying drawings, and the embodiments do not constitute limitations to the embodiments of the present invention.
图1为本发明实施例提供的一种软件部署方法的应用场景图,如图1所示,该应用场景具体包括:至少一个主控服务器和至少一个从属服务器。FIG. 1 is an application scenario diagram of a software deployment method provided by an embodiment of the present invention. As shown in FIG. 1 , the application scenario specifically includes: at least one master server and at least one slave server.
本发明首先需要预先编写好配置文件,该文件会指定每台服务器或者每组服务器要部署的软件,该配置文件里面还包含有公共环境配置文件,用于在服务器部署软件之前配置好软件运行的公共环境,然后在主控服务器上安装deployHelper服务,该服务包括deployServer服务以及deployCli客户端,其中deployServer服务用于调用软件服务给客户演示;deployCli客户端用于接收技术人员的部署指令,技术人员可从deployCli客户端键入命令行,然后整个服务器组会按照本方案的方法执行部署任务,完成自动部署。In the present invention, a configuration file needs to be prepared in advance, and the file will specify the software to be deployed on each server or each group of servers. Public environment, and then install the deployHelper service on the master server. The service includes the deployServer service and the deployCli client. The deployServer service is used to call the software service to demonstrate to the customer; the deployCli client is used to receive deployment instructions from technicians. Type a command line from the deployCli client, and then the entire server group will execute the deployment task according to the method in this solution, completing the automatic deployment.
图2为本发明实施例提供的一种软件部署方法的流程示意图,如图2所示,该方法具体包括:FIG. 2 is a schematic flowchart of a software deployment method according to an embodiment of the present invention. As shown in FIG. 2 , the method specifically includes:
S21、通过客户端接收所述部署指令。S21. Receive the deployment instruction through the client.
S22、通过所述部署指令调用用于部署软件的配置文件,所述配置文件至少包括软件运行环境配置文件或目标服务器信息。S22. Call a configuration file for deploying the software through the deployment instruction, where the configuration file at least includes a software running environment configuration file or target server information.
在本发明中,主控服务器接收软件部署指令,该软件部署指令可以携带有相应的配置文件ID名称,主控服务器接收到软件部署指令后,从该软件部署指令中找到对应的配置文件信息,根据此配置文件信息调用对应的配置文件。In the present invention, the main control server receives a software deployment instruction, and the software deployment instruction may carry a corresponding configuration file ID name. After receiving the software deployment instruction, the main control server finds the corresponding configuration file information from the software deployment instruction, Call the corresponding configuration file according to this configuration file information.
进一步地,此配置文件中记载有需要部署该软件的目标服务器信息和软件运行的公共环境配置文件。Further, the configuration file records the target server information on which the software needs to be deployed and the public environment configuration file for running the software.
可选的,改配置文件中记载的需要部署该软件的目标服务器信息可能只包含一台目标服务器,也可能包含多台目标服务器,防止有的服务器不能支持该软件运行或者有的服务器崩溃了,因此,包含多台服务器信息可以有效解决上述问题。Optionally, the target server information that needs to deploy the software recorded in the configuration file may only include one target server, or may include multiple target servers, to prevent some servers from being unable to support the running of the software or some servers from crashing. Therefore, including multiple server information can effectively solve the above problems.
S23、从所述配置文件中获取所述目标服务器信息,以及基于所述目标服务器信息建立与所述目标服务器的数据传输链路。S23. Acquire the target server information from the configuration file, and establish a data transmission link with the target server based on the target server information.
查询上述调用的配置文件,从该配置文件中查询到目标服务器信息,配置文件中记载的目标服务器信息至少包括服务器的IP地址和服务器名称,根据查询到的目标服务器信息,与目标服务器建立数据传输链路。Query the configuration file called above, and query the target server information from the configuration file. The target server information recorded in the configuration file includes at least the IP address and server name of the server. According to the queried target server information, establish data transmission with the target server. link.
S24、将软件的安装文件通过所述数据传输链路发送给所述目标服务器,以使所述目标服务器基于所述安装文件中的第一安装脚本文件执行软件部署的步骤。S24. Send the installation file of the software to the target server through the data transmission link, so that the target server executes the step of software deployment based on the first installation script file in the installation file.
上述主机服务器与目标服务器建立好数据传输链路后,将打包好的软件安装文件通过该数据传输链路发送给目标服务器,After the above-mentioned host server and the target server establish a data transmission link, the packaged software installation file is sent to the target server through the data transmission link,
进一步地,目标服务器接收到主机服务器发送的软件安装文件后,对软件安装文件进行解析,转换成可执行格式的软件安装文件,然后根据解析后的软件安装文件对该软件进行安装部署操作。Further, after receiving the software installation file sent by the host server, the target server parses the software installation file, converts it into an executable format software installation file, and then installs and deploys the software according to the parsed software installation file.
本发明实施例提供的软件部署方法,通过客户端接收所述部署指令;通过所述部署指令调用用于部署软件的配置文件,所述配置文件至少包括软件运行环境配置文件或目标服务器信息;从所述配置文件中获取所述目标服务器信息,以及基于所述目标服务器信息建立与所述目标服务器的数据传输链路;将软件的安装文件通过所述数据传输链路发送给所述目标服务器,以使所述目标服务器基于所述安装文件中的第一安装脚本文件执行软件部署的步骤,由于配置文件和部署脚本文件是预先打包好的,当主控服务器接收到技术人员键入的部署指令后可以直接调用配置文件,根据脚本文件内容直接完成软件部署工作,因此可以解决现有技术需要在多台服务器多次部署软件时的多次重复性操作的问题,且无需占用额外资源。In the software deployment method provided by the embodiment of the present invention, the deployment instruction is received through the client; the configuration file for deploying the software is invoked through the deployment instruction, and the configuration file at least includes the software running environment configuration file or target server information; Obtaining the target server information from the configuration file, and establishing a data transmission link with the target server based on the target server information; sending the installation file of the software to the target server through the data transmission link, To make the target server perform the steps of software deployment based on the first installation script file in the installation file, because the configuration file and the deployment script file are prepackaged, when the master control server receives the deployment instruction entered by the technician The configuration file can be called directly, and the software deployment can be directly completed according to the content of the script file, so the problem of multiple repetitive operations when the software needs to be deployed multiple times on multiple servers in the prior art can be solved without occupying additional resources.
图3为本发明实施例提供的另一种软件部署方法的流程示意图,如图3所示,该方法具体包括:FIG. 3 is a schematic flowchart of another software deployment method provided by an embodiment of the present invention. As shown in FIG. 3 , the method specifically includes:
S31、通过客户端接收所述部署指令。S31. Receive the deployment instruction through the client.
S32、对所述配置文件进行校验,得到校验信息。S32. Verify the configuration file to obtain verification information.
在本发明中,技术人员从deployCli客户端敲入软件部署的指令,主控服务器接收到软件部署指令后,根据软件部署指令中携带的配置文件信息,调取对应的配置文件,然后对配置文件进行校验,验证该配置文件是否异常,得到校验信息。In the present invention, a technician enters a software deployment instruction from the deployCli client, and after receiving the software deployment instruction, the main control server retrieves the corresponding configuration file according to the configuration file information carried in the software deployment instruction, and then interprets the configuration file. Perform verification, verify whether the configuration file is abnormal, and obtain verification information.
例如,验证该配置文件中的语法是否符合语法规则,如果有不符合语法规则的地方,则进行报错;如果该配置文件校验通过,无异常,则进行后续流程。For example, verify whether the grammar in the configuration file complies with the grammar rules, and report an error if there is something that does not meet the grammar rules; if the configuration file is verified and there is no exception, the follow-up process is performed.
S33、若所述校验信息验证通过,则执行将所述配置文件通过所述数据传输链路发送给所述目标服务器的步骤。S33. If the verification information passes the verification, execute the step of sending the configuration file to the target server through the data transmission link.
S34、将所述配置文件通过所述数据传输链路发送给所述目标服务器,以使所述目标服务器基于所述软件运行环境配置文件中的第二安装脚本文件执行软件运行环境部署的步骤。S34. Send the configuration file to the target server through the data transmission link, so that the target server executes the step of deploying the software operating environment based on the second installation script file in the software operating environment configuration file.
在本发明实施例中,如果对配置文件的校验通过,无异常,则主控服务器通过与目标服务器建立的数据传输链路将校验无误后的配置文件发送给目标服务器。In the embodiment of the present invention, if the verification of the configuration file is passed and there is no abnormality, the main control server sends the verified configuration file to the target server through the data transmission link established with the target server.
进一步地,目标服务器接收到配置文件后,对该配置文件进行解析,解析成可执行格式的配置文件,目标服务器从可执行格式的配置文件中找到第二安装脚本文件,然后目标服务器执行该安装脚本文件,安装部署软件运行的公共环境。Further, after receiving the configuration file, the target server parses the configuration file and parses it into a configuration file in an executable format, the target server finds the second installation script file from the configuration file in the executable format, and then the target server executes the installation. A script file that installs and deploys the public environment where the software runs.
需要说明的是,主控服务器通过与目标服务器建立的数据传输链路可以通过SSH协议进行连接,设置所有服务器之间的免密通信;配置文件中包括已经编译好的软件运行需要的环境配置文件,当需要更多的服务器部署此软件时,通过将此配置文件发送给其他服务器,可以使其他服务器快速配置好软件运行需要的环境。It should be noted that the master server can be connected through the SSH protocol through the data transmission link established with the target server, and set up secret-free communication between all servers; the configuration file includes the environment configuration file required for the compiled software to run , when more servers are needed to deploy the software, by sending this configuration file to other servers, other servers can quickly configure the environment required for the software to run.
S35、若所述校验信息验证未通过,则生成所述配置文件异常的消息。S35. If the verification of the verification information fails, generate a message that the configuration file is abnormal.
上述对配置文件进行校验时,如果检验未通过,则进行报错,报错信息里可以包括错误原因或错误位置,进一步地,技术人员通过报错信息可以快速找到配置文件异常原因并进行修正。During the above verification of the configuration file, if the verification fails, an error will be reported. The error message may include the cause of the error or the location of the error. Further, the technician can quickly find the abnormal cause of the configuration file and correct it through the error message.
S36、将所述安装文件存储于临时文件中,生成第一临时任务文件。S36. Store the installation file in a temporary file to generate a first temporary task file.
本发明实施例中,主控服务器将待安装的软件安装打包文件存放在本地的Home目录的临时文件中,生成第一临时任务文件,其中,将文件以临时文件的形式进行存储,是由于可能整个软件部署演示过程是在客户提供的服务器上进行的,那么,客户不知道部署演示软件结束后哪些文件需要清理,所以为了后续整个部署任务完成后,系统可以自动找到该临时文件并删除,释放内存,提升客户体验。In the embodiment of the present invention, the main control server stores the software installation package file to be installed in the temporary file of the local Home directory, and generates the first temporary task file. The entire software deployment demonstration process is carried out on the server provided by the customer. Then, the customer does not know which files need to be cleaned up after the deployment of the demonstration software. Therefore, after the entire deployment task is completed, the system can automatically find the temporary file, delete it, and release it. memory to enhance customer experience.
S37、将所述第一临时任务文件发送给所述目标服务器,以使所述目标服务器将接收到的所述第一临时任务文件存储于本地临时目录中,得到第二临时任务文件。S37: Send the first temporary task file to the target server, so that the target server stores the received first temporary task file in a local temporary directory to obtain a second temporary task file.
本发明实施例中,主控服务器通过与目标服务器建立的数据传输链路将本地存储的第一临时任务文件发送给目标服务器。In the embodiment of the present invention, the main control server sends the locally stored first temporary task file to the target server through the data transmission link established with the target server.
进一步地,目标服务器接收到第一临时任务文件后,将此第一临时任务文件存储在目标服务器本地的临时目录中,得到第二临时任务文件。Further, after receiving the first temporary task file, the target server stores the first temporary task file in a local temporary directory of the target server to obtain a second temporary task file.
S38、所述目标服务器从所述第二临时任务文件中获取所述安装文件。S38. The target server acquires the installation file from the second temporary task file.
本发明实施例中,目标服务器遍历本地临时目录,找到第二临时任务文件,对第二临时任务文件进行解析,从解析后的第二临时任务文件中根据任务文件中携带的软件安装指令获取软件安装打包文件。In this embodiment of the present invention, the target server traverses the local temporary directory, finds the second temporary task file, parses the second temporary task file, and obtains software from the parsed second temporary task file according to the software installation instruction carried in the task file Install the package file.
S39、对所述安装文件进行解析,并对解析后的安装文件进行格式转换,得到预设格式的安装文件。S39, parse the installation file, and perform format conversion on the parsed installation file to obtain an installation file in a preset format.
本发明实施例中,目标服务器对上述获取到的软件安装打包文件进行解析,生成可执行格式的软件安装文件,根据预设的软件安装格式(例如,.exe格式),获取与预设的软件安装格式相同的一个或多个文件。In this embodiment of the present invention, the target server parses the obtained software installation package file, generates a software installation file in an executable format, and obtains and presets a software installation file according to a preset software installation format (for example, .exe format). Install one or more files of the same format.
S310、从预设格式的安装文件中确定第一安装脚本文件。S310. Determine the first installation script file from the installation files in the preset format.
S311、基于所述第一安装脚本文件,执行所述软件的安装操作。S311. Based on the first installation script file, perform an installation operation of the software.
遍历上述与预设的软件安装格式相同的一个或多个文件,从这些文件中确定第一安装脚本文件,此第一安装脚本文件即为该软件安装的脚本运行文件。Traverse one or more files in the same format as the preset software installation format, and determine the first installation script file from these files, where the first installation script file is the script running file for the software installation.
进一步地,运行该第一安装脚本文件,完成软件的自动安装,安装完成后即可运行此软件。Further, the first installation script file is run to complete the automatic installation of the software, and the software can be run after the installation is completed.
S312、获取由所述目标服务器返回的所述软件部署结果对应的日志文件。S312: Acquire a log file corresponding to the software deployment result returned by the target server.
本发明实施例中,基于SSH协议建立的主控服务器与目标服务器的远程数据传输链路,当目标服务器执行软件部署操作后,可以通过SSH协议返回携带有软件部署结果的日志文件。In the embodiment of the present invention, based on the remote data transmission link between the main control server and the target server established based on the SSH protocol, after the target server performs the software deployment operation, the log file carrying the software deployment result can be returned through the SSH protocol.
其中,目标服务器进行软件部署时,可能由于任务文件中的软件安装打包文件解析错误,导致软件部署失败;也可能由于目标服务器的系统不符合软件运行环境;还可能由于目标服务器的硬件环境不符合该软件的安装运行环境要求等原因造成软件部署失败,则当目标服务器在预设时间内(例如,5分钟)未返回携带有软件部署结果的日志文件时,主控服务器可以发送获取软件部署状态的指令给目标服务器,获取当前软件部署状态。Among them, when the target server performs software deployment, the software deployment may fail due to an error in parsing the software installation package file in the task file; it may also be that the system of the target server does not conform to the software operating environment; it may also be that the hardware environment of the target server does not conform to If the software deployment fails due to the requirements of the installation and running environment of the software, when the target server does not return a log file with the software deployment result within a preset time (for example, 5 minutes), the master control server can send the information to obtain the software deployment status. to the target server to obtain the current software deployment status.
可选的,基于SSH协议下,如果预先对目标服务器做了keepalive机制,则目标服务器会主动给主控服务器发送部署失败的消息。Optionally, based on the SSH protocol, if the keepalive mechanism is implemented on the target server in advance, the target server will actively send a deployment failure message to the master server.
S313、若所述日志文件中包含所述软件部署成功的信息,则删除所述第一临时任务文件。S313. If the log file contains information that the software deployment is successful, delete the first temporary task file.
S314、若所述日志文件中包含所述软件部署失败的信息,则生成软件部署失败的提示信息。S314. If the log file contains the information that the software deployment fails, generate a prompt message that the software deployment fails.
本发明实施例中,如果目标服务器返回的日志文件中包含有软件部署成功的信息,则主控服务器查找本地的第一临时任务文件并删除,释放内存。In this embodiment of the present invention, if the log file returned by the target server contains information about successful software deployment, the master control server searches for the local first temporary task file and deletes it to release memory.
可选的,如果目标服务器返回的日志文件中包含有软件部署失败的信息,则主控服务器生成软件部署失败的提示信息进行显示,技术人员可以根据该提示信息查找异常原因并进行修正。Optionally, if the log file returned by the target server contains information about software deployment failure, the master control server generates and displays prompt information about software deployment failure, and the technician can find out the abnormal cause and make corrections according to the prompt information.
S315、若所述日志文件中包含所述软件部署成功的信息,则向所述目标服务器发送删除所述第二临时任务文件的删除指令,以使所述目标服务器响应于所述删除指令删除所述第二临时任务文件。S315. If the log file contains information that the software has been deployed successfully, send a deletion instruction to delete the second temporary task file to the target server, so that the target server deletes all the files in response to the deletion instruction. the second temporary task document.
上述如果目标服务器返回的日志文件中包含有软件部署成功的信息,则主控服务器通过数据传输链路给目标服务器发送删除目标服务器上的第二临时任务文件的删除指令,目标服务器接收到删除指令后,查找本地临时目录中的第二临时任务文件进行删除操作。If the log file returned by the target server contains the information that the software is deployed successfully, then the main control server sends a deletion instruction to delete the second temporary task file on the target server to the target server through the data transmission link, and the target server receives the deletion instruction. After that, search for the second temporary task file in the local temporary directory to delete it.
更需要说明的是,在本发明中,如果主控服务器崩溃,可以重新在其余服务器中任选一台服务器,将deployHelper服务重新安装在此选中的服务器上,因所有服务器之间设置了免密通信,所以任一安装deployHelper服务的服务器都可以完成本方案的整个软件部署流程。It should be noted that, in the present invention, if the main control server crashes, you can re-select a server among the remaining servers, and reinstall the deployHelper service on the selected server, because all servers are set up to avoid passwords. Therefore, any server that installs the deployHelper service can complete the entire software deployment process of this solution.
本发明实施例提供的软件部署方法,通过客户端接收所述部署指令;通过所述部署指令调用用于部署软件的配置文件,所述配置文件至少包括软件运行环境配置文件或目标服务器信息;从所述配置文件中获取所述目标服务器信息,以及基于所述目标服务器信息建立与所述目标服务器的数据传输链路;将软件的安装文件通过所述数据传输链路发送给所述目标服务器,以使所述目标服务器基于所述安装文件中的第一安装脚本文件执行软件部署的步骤,多个服务器部署多个实例可以满足客户要求动态改变实例个数而不受局限,服务器自动完成软件运行环境和软件部署可以解决在多台服务器多次部署软件时需要多次重复配置运行环境的操作,且无需占用额外资源。In the software deployment method provided by the embodiment of the present invention, the deployment instruction is received through the client; the configuration file for deploying the software is invoked through the deployment instruction, and the configuration file at least includes the software running environment configuration file or target server information; Obtaining the target server information from the configuration file, and establishing a data transmission link with the target server based on the target server information; sending the installation file of the software to the target server through the data transmission link, In order to make the target server perform the steps of software deployment based on the first installation script file in the installation file, multiple servers can deploy multiple instances to meet customer requirements and dynamically change the number of instances without limitation, and the server automatically completes software operation. Environment and software deployment can solve the operation of repeatedly configuring the running environment when deploying software on multiple servers multiple times, and does not require additional resources.
图4为本发明实施例提供的一种软件部署装置的结构示意图,具体包括:4 is a schematic structural diagram of a software deployment apparatus according to an embodiment of the present invention, which specifically includes:
获取模块401,用于通过客户端接收所述部署指令;an obtaining module 401, configured to receive the deployment instruction through a client;
调用模块402,用于通过所述部署指令调用用于部署软件的配置文件,所述配置文件至少包括软件运行环境配置文件或目标服务器信息;A calling module 402, configured to call a configuration file for deploying software through the deployment instruction, where the configuration file at least includes a software running environment configuration file or target server information;
连接模块403,用于从所述配置文件中获取所述目标服务器信息,以及基于所述目标服务器信息建立与所述目标服务器的数据传输链路;A connection module 403, configured to obtain the target server information from the configuration file, and establish a data transmission link with the target server based on the target server information;
发送模块404,用于将软件的安装文件通过所述数据传输链路发送给所述目标服务器,以使所述目标服务器基于所述安装文件中的第一安装脚本文件执行软件部署的步骤。The sending module 404 is configured to send the installation file of the software to the target server through the data transmission link, so that the target server executes the step of software deployment based on the first installation script file in the installation file.
在一个可能的实施方式中,所述获取模块401,具体用于获取由所述目标服务器返回的所述软件部署结果对应的日志文件;若所述日志文件中包含所述软件部署成功的信息,则删除所述第一临时任务文件;若所述日志文件中包含所述软件部署失败的信息,则生成软件部署失败的提示信息。In a possible implementation manner, the obtaining module 401 is specifically configured to obtain a log file corresponding to the software deployment result returned by the target server; if the log file contains information that the software deployment is successful, then delete the first temporary task file; if the log file contains the information that the software deployment fails, generate a prompt message that the software deployment fails.
在一个可能的实施方式中,所述调用模块402,具体用于对所述配置文件进行校验,得到校验信息;若所述校验信息验证通过,则执行将所述配置文件通过所述数据传输链路发送给所述目标服务器的步骤;若所述校验信息验证未通过,则生成所述配置文件异常的消息。In a possible implementation manner, the calling module 402 is specifically configured to verify the configuration file to obtain verification information; if the verification information passes the verification, execute the configuration file through the The step of sending the data transmission link to the target server; if the verification of the verification information fails, a message that the configuration file is abnormal is generated.
在一个可能的实施方式中,所述发送模块404,具体用于将所述配置文件通过所述数据传输链路发送给所述目标服务器,以使所述目标服务器基于所述软件运行环境配置文件中的第二安装脚本文件执行软件运行环境部署的步骤。In a possible implementation manner, the sending module 404 is specifically configured to send the configuration file to the target server through the data transmission link, so that the target server is configured based on the software operating environment configuration file The second installation script file in executes the steps of software runtime environment deployment.
在一个可能的实施方式中,所述发送模块404,还用于将所述安装文件存储于临时文件中,生成第一临时任务文件;将所述第一临时任务文件发送给所述目标服务器,以使所述目标服务器将接收到的所述第一临时任务文件存储于本地临时目录中,得到第二临时任务文件。In a possible implementation manner, the sending module 404 is further configured to store the installation file in a temporary file to generate a first temporary task file; send the first temporary task file to the target server, so that the target server stores the received first temporary task file in a local temporary directory to obtain a second temporary task file.
在一个可能的实施方式中,所述发送模块404,还用于若所述日志文件中包含所述软件部署成功的信息,则向所述目标服务器发送删除所述第二临时任务文件的删除指令,以使所述目标服务器响应于所述删除指令删除所述第二临时任务文件。In a possible implementation manner, the sending module 404 is further configured to send a deletion instruction for deleting the second temporary task file to the target server if the log file contains the information that the software is deployed successfully , so that the target server deletes the second temporary task file in response to the deletion instruction.
本实施例提供的软件部署装置可以是如图4中所示的软件部署装置,可执行如图2-3中软件部署方法的所有步骤,进而实现图2-3所示软件部署方法的技术效果,具体请参照图2-3相关描述,为简洁描述,在此不作赘述。The software deployment device provided in this embodiment may be the software deployment device shown in FIG. 4 , and can execute all steps of the software deployment method shown in FIG. 2-3 , thereby realizing the technical effect of the software deployment method shown in FIG. 2-3 , please refer to the relevant descriptions in FIGS. 2-3 for details. For the sake of brevity, details are not repeated here.
图5为本发明实施例提供的一种服务器的结构示意图,图5所示的服务器500包括:至少一个处理器501、存储器502、至少一个网络接口504和其他用户接口503。服务器500中的各个组件通过总线系统505耦合在一起。可理解,总线系统505用于实现这些组件之间的连接通信。总线系统505除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图5中将各种总线都标为总线系统505。FIG. 5 is a schematic structural diagram of a server according to an embodiment of the present invention. The
其中,用户接口503可以包括显示器、键盘或者点击设备(例如,鼠标,轨迹球(trackball)、触感板或者触摸屏等。Among them, the
可以理解,本发明实施例中的存储器502可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-OnlyMemory,ROM)、可编程只读存储器(ProgrammableROM,PROM)、可擦除可编程只读存储器(ErasablePROM,EPROM)、电可擦除可编程只读存储器(ElectricallyEPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(RandomAccessMemory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(StaticRAM,SRAM)、动态随机存取存储器(DynamicRAM,DRAM)、同步动态随机存取存储器(SynchronousDRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(DoubleDataRateSDRAM,DDRSDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(SynchlinkDRAM,SLDRAM)和直接内存总线随机存取存储器(DirectRambusRAM,DRRAM)。本文描述的存储器502旨在包括但不限于这些和任意其它适合类型的存储器。It can be understood that the
在一些实施方式中,存储器502存储了如下的元素,可执行单元或者数据结构,或者他们的子集,或者他们的扩展集:操作系统5021和应用程序5022。In some embodiments,
其中,操作系统5021,包含各种系统程序,例如框架层、核心库层、驱动层等,用于实现各种基础业务以及处理基于硬件的任务。应用程序5022,包含各种应用程序,例如媒体播放器(MediaPlayer)、浏览器(Browser)等,用于实现各种应用业务。实现本发明实施例方法的程序可以包含在应用程序5022中。The
在本发明实施例中,通过调用存储器502存储的程序或指令,具体的,可以是应用程序5022中存储的程序或指令,处理器501用于执行各方法实施例所提供的方法步骤,例如包括:In this embodiment of the present invention, by calling the program or instruction stored in the
通过客户端接收所述部署指令;通过所述部署指令调用用于部署软件的配置文件,所述配置文件至少包括软件运行环境配置文件或目标服务器信息;从所述配置文件中获取所述目标服务器信息,以及基于所述目标服务器信息建立与所述目标服务器的数据传输链路;将软件的安装文件通过所述数据传输链路发送给所述目标服务器,以使所述目标服务器基于所述安装文件中的第一安装脚本文件执行软件部署的步骤。Receive the deployment instruction through the client; call a configuration file for deploying software through the deployment instruction, where the configuration file at least includes a software operating environment configuration file or target server information; obtain the target server from the configuration file information, and establish a data transmission link with the target server based on the target server information; send the installation file of the software to the target server through the data transmission link, so that the target server is based on the installation The first installation script file in the file performs the steps of software deployment.
在一个可能的实施方式中,将所述配置文件通过所述数据传输链路发送给所述目标服务器,以使所述目标服务器基于所述软件运行环境配置文件中的第二安装脚本文件执行软件运行环境部署的步骤。In a possible implementation manner, the configuration file is sent to the target server through the data transmission link, so that the target server executes software based on the second installation script file in the software operating environment configuration file Steps to run the environment deployment.
在一个可能的实施方式中,对所述配置文件进行校验,得到校验信息;In a possible implementation manner, the configuration file is verified to obtain verification information;
若所述校验信息验证通过,则执行将所述配置文件通过所述数据传输链路发送给所述目标服务器的步骤;若所述校验信息验证未通过,则生成所述配置文件异常的消息。If the verification of the verification information passes, the step of sending the configuration file to the target server through the data transmission link is performed; if the verification of the verification information fails, an abnormality of the configuration file is generated. information.
在一个可能的实施方式中,将所述安装文件存储于临时文件中,生成第一临时任务文件;将所述第一临时任务文件发送给所述目标服务器,以使所述目标服务器将接收到的所述第一临时任务文件存储于本地临时目录中,得到第二临时任务文件。In a possible implementation manner, the installation file is stored in a temporary file to generate a first temporary task file; the first temporary task file is sent to the target server, so that the target server will receive the The first temporary task file is stored in the local temporary directory, and the second temporary task file is obtained.
在一个可能的实施方式中,所述目标服务器从所述第二临时任务文件中获取所述安装文件;对所述安装文件进行解析,并对解析后的安装文件进行格式转换,得到预设格式的安装文件;从预设格式的安装文件中确定第一安装脚本文件;基于所述第一安装脚本文件,执行所述软件的安装操作。In a possible implementation manner, the target server obtains the installation file from the second temporary task file; parses the installation file, and performs format conversion on the parsed installation file to obtain a preset format A first installation script file is determined from an installation file in a preset format; and an installation operation of the software is performed based on the first installation script file.
在一个可能的实施方式中,获取由所述目标服务器返回的所述软件部署结果对应的日志文件;若所述日志文件中包含所述软件部署成功的信息,则删除所述第一临时任务文件;若所述日志文件中包含所述软件部署失败的信息,则生成软件部署失败的提示信息。In a possible implementation manner, a log file corresponding to the software deployment result returned by the target server is obtained; if the log file contains information that the software deployment is successful, delete the first temporary task file ; If the log file contains the information that the software deployment fails, generate a prompt message that the software deployment fails.
在一个可能的实施方式中,若所述日志文件中包含所述软件部署成功的信息,则向所述目标服务器发送删除所述第二临时任务文件的删除指令,以使所述目标服务器响应于所述删除指令删除所述第二临时任务文件。In a possible implementation manner, if the log file contains information about the successful deployment of the software, a deletion instruction for deleting the second temporary task file is sent to the target server, so that the target server responds to the The deletion instruction deletes the second temporary task file.
上述本发明实施例揭示的方法可以应用于处理器501中,或者由处理器501实现。处理器501可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过处理器501中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器501可以是通用处理器、数字信号处理器(DigitalSignalProcessor,DSP)、专用集成电路(ApplicationSpecificIntegratedCircuit,ASIC)、现成可编程门阵列(FieldProgrammableGateArray,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本发明实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本发明实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件单元组合执行完成。软件单元可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器502,处理器501读取存储器502中的信息,结合其硬件完成上述方法的步骤。The methods disclosed in the above embodiments of the present invention may be applied to the
可以理解的是,本文描述的这些实施例可以用硬件、软件、固件、中间件、微码或其组合来实现。对于硬件实现,处理单元可以实现在一个或多个专用集成电路(ApplicationSpecificIntegratedCircuits,ASIC)、数字信号处理器(DigitalSignalProcessing,DSP)、数字信号处理设备(DSPDevice,DSPD)、可编程逻辑设备(ProgrammableLogicDevice,PLD)、现场可编程门阵列(Field-ProgrammableGateArray,FPGA)、通用处理器、控制器、微控制器、微处理器、用于执行本申请所述功能的其它电子单元或其组合中。It will be appreciated that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application specific integrated circuits (Application Specific Integrated Circuits, ASIC), digital signal processors (Digital Signal Processing, DSP), digital signal processing devices (DSP Device, DSPD), Programmable Logic Device (Programmable Logic Device, PLD) ), a Field-Programmable Gate Array (FPGA), a general-purpose processor, a controller, a microcontroller, a microprocessor, other electronic units for performing the functions described herein, or a combination thereof.
对于软件实现,可通过执行本文所述功能的单元来实现本文所述的技术。软件代码可存储在存储器中并通过处理器执行。存储器可以在处理器中或在处理器外部实现。For a software implementation, the techniques described herein may be implemented by means of units that perform the functions described herein. Software codes may be stored in memory and executed by a processor. The memory can be implemented in the processor or external to the processor.
本实施例提供的服务器可以是如图5中所示的服务器,可执行如图2-3中软件部署方法的所有步骤,进而实现图2-3所示的软件部署方法的技术效果,具体请参照图2-3相关描述,为简洁描述,在此不作赘述。The server provided in this embodiment may be the server shown in Figure 5, and can execute all steps of the software deployment method shown in Figure 2-3, thereby achieving the technical effect of the software deployment method shown in Figure 2-3. Referring to the related descriptions in FIGS. 2-3 , for the sake of brevity, details are not repeated here.
本发明实施例还提供了一种存储介质(计算机可读存储介质)。这里的存储介质存储有一个或者多个程序。其中,存储介质可以包括易失性存储器,例如随机存取存储器;存储器也可以包括非易失性存储器,例如只读存储器、快闪存储器、硬盘或固态硬盘;存储器还可以包括上述种类的存储器的组合。The embodiment of the present invention also provides a storage medium (computer-readable storage medium). The storage medium here stores one or more programs. Wherein, the storage medium may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as read-only memory, flash memory, hard disk or solid-state hard disk; the memory may also include the above-mentioned types of memory. combination.
当存储介质中一个或者多个程序可被一个或者多个处理器执行,以实现上述在服务器侧执行的软件部署方法。When one or more programs in the storage medium can be executed by one or more processors, the above software deployment method executed on the server side is implemented.
所述处理器用于执行存储器中存储的软件部署程序,以实现以下在服务器侧执行的软件部署方法的步骤:The processor is configured to execute the software deployment program stored in the memory to implement the following steps of the software deployment method executed on the server side:
通过客户端接收所述部署指令;通过所述部署指令调用用于部署软件的配置文件,所述配置文件至少包括软件运行环境配置文件或目标服务器信息;从所述配置文件中获取所述目标服务器信息,以及基于所述目标服务器信息建立与所述目标服务器的数据传输链路;将软件的安装文件通过所述数据传输链路发送给所述目标服务器,以使所述目标服务器基于所述安装文件中的第一安装脚本文件执行软件部署的步骤。Receive the deployment instruction through the client; call a configuration file for deploying software through the deployment instruction, where the configuration file at least includes a software operating environment configuration file or target server information; obtain the target server from the configuration file information, and establish a data transmission link with the target server based on the target server information; send the installation file of the software to the target server through the data transmission link, so that the target server is based on the installation The first installation script file in the file performs the steps of software deployment.
在一个可能的实施方式中,将所述配置文件通过所述数据传输链路发送给所述目标服务器,以使所述目标服务器基于所述软件运行环境配置文件中的第二安装脚本文件执行软件运行环境部署的步骤。In a possible implementation manner, the configuration file is sent to the target server through the data transmission link, so that the target server executes software based on the second installation script file in the software operating environment configuration file Steps to run the environment deployment.
在一个可能的实施方式中,对所述配置文件进行校验,得到校验信息;In a possible implementation manner, the configuration file is verified to obtain verification information;
若所述校验信息验证通过,则执行将所述配置文件通过所述数据传输链路发送给所述目标服务器的步骤;若所述校验信息验证未通过,则生成所述配置文件异常的消息。If the verification of the verification information passes, the step of sending the configuration file to the target server through the data transmission link is performed; if the verification of the verification information fails, an abnormality of the configuration file is generated. information.
在一个可能的实施方式中,将所述安装文件存储于临时文件中,生成第一临时任务文件;将所述第一临时任务文件发送给所述目标服务器,以使所述目标服务器将接收到的所述第一临时任务文件存储于本地临时目录中,得到第二临时任务文件。In a possible implementation manner, the installation file is stored in a temporary file to generate a first temporary task file; the first temporary task file is sent to the target server, so that the target server will receive the The first temporary task file is stored in the local temporary directory, and the second temporary task file is obtained.
在一个可能的实施方式中,所述目标服务器从所述第二临时任务文件中获取所述安装文件;对所述安装文件进行解析,并对解析后的安装文件进行格式转换,得到预设格式的安装文件;从预设格式的安装文件中确定第一安装脚本文件;基于所述第一安装脚本文件,执行所述软件的安装操作。In a possible implementation manner, the target server obtains the installation file from the second temporary task file; parses the installation file, and performs format conversion on the parsed installation file to obtain a preset format A first installation script file is determined from an installation file in a preset format; and an installation operation of the software is performed based on the first installation script file.
在一个可能的实施方式中,获取由所述目标服务器返回的所述软件部署结果对应的日志文件;若所述日志文件中包含所述软件部署成功的信息,则删除所述第一临时任务文件;若所述日志文件中包含所述软件部署失败的信息,则生成软件部署失败的提示信息。In a possible implementation manner, a log file corresponding to the software deployment result returned by the target server is obtained; if the log file contains information that the software deployment is successful, delete the first temporary task file ; If the log file contains the information that the software deployment fails, generate a prompt message that the software deployment fails.
在一个可能的实施方式中,若所述日志文件中包含所述软件部署成功的信息,则向所述目标服务器发送删除所述第二临时任务文件的删除指令,以使所述目标服务器响应于所述删除指令删除所述第二临时任务文件。In a possible implementation manner, if the log file contains information about the successful deployment of the software, a deletion instruction for deleting the second temporary task file is sent to the target server, so that the target server responds to the The deletion instruction deletes the second temporary task file.
专业人员应该还可以进一步意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。Professionals should be further aware that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. Interchangeability, the above description has generally described the components and steps of each example in terms of function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementations should not be considered beyond the scope of the present invention.
结合本文中所公开的实施例描述的方法或算法的步骤可以用硬件、处理器执行的软件模块,或者二者的结合来实施。软件模块可以置于随机存储器(RAM)、内存、只读存储器(ROM)、电可编程ROM、电可擦除可编程ROM、寄存器、硬盘、可移动磁盘、CD-ROM、或技术领域内所公知的任意其它形式的存储介质中。The steps of a method or algorithm described in connection with the embodiments disclosed herein may be implemented in hardware, a software module executed by a processor, or a combination of the two. A software module can be placed in random access memory (RAM), internal memory, read only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other in the technical field. in any other known form of storage medium.
以上所述的具体实施方式,对本发明的目的、技术方案和有益效果进行了进一步详细说明,所应理解的是,以上所述仅为本发明的具体实施方式而已,并不用于限定本发明的保护范围,凡在本发明的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The specific embodiments described above further describe the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above descriptions are only specific embodiments of the present invention, and are not intended to limit the scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202011012018.5A CN112148315A (en) | 2020-09-22 | 2020-09-22 | Software deployment method, device, server and storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202011012018.5A CN112148315A (en) | 2020-09-22 | 2020-09-22 | Software deployment method, device, server and storage medium |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN112148315A true CN112148315A (en) | 2020-12-29 |
Family
ID=73896370
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202011012018.5A Pending CN112148315A (en) | 2020-09-22 | 2020-09-22 | Software deployment method, device, server and storage medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN112148315A (en) |
Cited By (11)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112764753A (en) * | 2020-12-31 | 2021-05-07 | 北京知因智慧科技有限公司 | Project deployment method and device, electronic equipment and storage medium |
| CN113377385A (en) * | 2021-06-07 | 2021-09-10 | 中国工商银行股份有限公司 | Client automatic deployment method and device |
| CN113900677A (en) * | 2021-10-18 | 2022-01-07 | 盐城金堤科技有限公司 | Deployment method, apparatus, device and computer storage medium of program operating environment |
| CN113918182A (en) * | 2021-11-10 | 2022-01-11 | 北京锐安科技有限公司 | Software deployment method, device, server and storage medium |
| CN113946350A (en) * | 2021-10-28 | 2022-01-18 | 苏州万店掌网络科技有限公司 | Deployment method and system of shared working space |
| CN114035809A (en) * | 2021-10-28 | 2022-02-11 | 建信金融科技有限责任公司 | Application deployment method, device, equipment and storage medium |
| CN114116066A (en) * | 2021-11-30 | 2022-03-01 | 湖南麒麟信安科技股份有限公司 | Cloud platform cluster control method, system and storage medium |
| CN114363332A (en) * | 2021-12-27 | 2022-04-15 | 徐工汉云技术股份有限公司 | Distributed-based gateway remote automatic operation and maintenance method |
| CN114489701A (en) * | 2022-01-28 | 2022-05-13 | 第四范式(北京)技术有限公司 | Configuration method and device of artificial intelligence software deployment environment and electronic equipment |
| CN116149679A (en) * | 2022-12-28 | 2023-05-23 | 武汉达梦数据技术有限公司 | A cloud database plug-in installation method, device, electronic equipment and storage medium |
| WO2024179294A1 (en) * | 2023-02-27 | 2024-09-06 | 中兴通讯股份有限公司 | Component deployment method and apparatus, electronic device, and storage medium |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102195978A (en) * | 2011-04-26 | 2011-09-21 | 深圳市共济科技有限公司 | Software distribution deployment method and system |
| CN111324412A (en) * | 2018-12-13 | 2020-06-23 | 阿里巴巴集团控股有限公司 | Service deployment method, device and storage medium |
-
2020
- 2020-09-22 CN CN202011012018.5A patent/CN112148315A/en active Pending
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102195978A (en) * | 2011-04-26 | 2011-09-21 | 深圳市共济科技有限公司 | Software distribution deployment method and system |
| CN111324412A (en) * | 2018-12-13 | 2020-06-23 | 阿里巴巴集团控股有限公司 | Service deployment method, device and storage medium |
Non-Patent Citations (1)
| Title |
|---|
| 李平: "《网络办公自动化技术与应用》", 31 July 2004, 西安电子科技大学出版社, pages: 85 * |
Cited By (15)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112764753A (en) * | 2020-12-31 | 2021-05-07 | 北京知因智慧科技有限公司 | Project deployment method and device, electronic equipment and storage medium |
| CN112764753B (en) * | 2020-12-31 | 2024-04-12 | 北京知因智慧科技有限公司 | Project deployment method and device, electronic equipment and storage medium |
| CN113377385A (en) * | 2021-06-07 | 2021-09-10 | 中国工商银行股份有限公司 | Client automatic deployment method and device |
| CN113900677A (en) * | 2021-10-18 | 2022-01-07 | 盐城金堤科技有限公司 | Deployment method, apparatus, device and computer storage medium of program operating environment |
| CN113946350B (en) * | 2021-10-28 | 2022-08-19 | 苏州万店掌网络科技有限公司 | Deployment method and system of shared working space |
| CN113946350A (en) * | 2021-10-28 | 2022-01-18 | 苏州万店掌网络科技有限公司 | Deployment method and system of shared working space |
| CN114035809A (en) * | 2021-10-28 | 2022-02-11 | 建信金融科技有限责任公司 | Application deployment method, device, equipment and storage medium |
| CN113918182A (en) * | 2021-11-10 | 2022-01-11 | 北京锐安科技有限公司 | Software deployment method, device, server and storage medium |
| CN114116066A (en) * | 2021-11-30 | 2022-03-01 | 湖南麒麟信安科技股份有限公司 | Cloud platform cluster control method, system and storage medium |
| CN114116066B (en) * | 2021-11-30 | 2024-05-07 | 湖南麒麟信安科技股份有限公司 | Cloud platform cluster control method, system and storage medium |
| CN114363332A (en) * | 2021-12-27 | 2022-04-15 | 徐工汉云技术股份有限公司 | Distributed-based gateway remote automatic operation and maintenance method |
| CN114363332B (en) * | 2021-12-27 | 2024-01-23 | 徐工汉云技术股份有限公司 | Remote automatic operation and maintenance method based on distributed gateway |
| CN114489701A (en) * | 2022-01-28 | 2022-05-13 | 第四范式(北京)技术有限公司 | Configuration method and device of artificial intelligence software deployment environment and electronic equipment |
| CN116149679A (en) * | 2022-12-28 | 2023-05-23 | 武汉达梦数据技术有限公司 | A cloud database plug-in installation method, device, electronic equipment and storage medium |
| WO2024179294A1 (en) * | 2023-02-27 | 2024-09-06 | 中兴通讯股份有限公司 | Component deployment method and apparatus, electronic device, and storage medium |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN112148315A (en) | Software deployment method, device, server and storage medium | |
| US6789215B1 (en) | System and method for remediating a computer | |
| US8997088B2 (en) | Methods and systems for automated deployment of software applications on heterogeneous cloud environments | |
| US8775577B1 (en) | System and method for configuration management service | |
| KR101137157B1 (en) | Efficient patching | |
| WO2019076369A1 (en) | Cloud platform deployment method, device, electronic device, and readable storage medium | |
| US20210240491A1 (en) | System and method for runtime synchronization and authentication of pre-boot device drivers for a rescue operating system | |
| US8438418B2 (en) | Simplifying automated software maintenance of data centers | |
| US7536599B2 (en) | Methods and systems for validating a system environment | |
| KR20060045813A (en) | Effective patching | |
| CN110138577B (en) | Cluster creation method, first server and readable storage medium | |
| CN107741852B (en) | A service deployment method based on cluster software | |
| WO2022267407A1 (en) | Automated operation and maintenance tool-based proxy deployment method and apparatus | |
| CN110943860A (en) | BMC (baseboard management controller) firmware updating method and system, electronic equipment and storage medium | |
| CN107733847A (en) | Platform Website login method, apparatus, computer equipment and readable storage medium storing program for executing | |
| US20240118884A1 (en) | Automated deployment method for upgrading client's internal business software systems | |
| CN105262608A (en) | Monitoring method and monitoring device for network service | |
| CN110262821A (en) | A kind of management method of software module, device and server | |
| CN112732285A (en) | Upgrading method and device suitable for cloud computing linux operating system and electronic equipment | |
| CN112256289A (en) | Automatic deployment method, device and equipment | |
| WO2021139261A1 (en) | Application deployment method and device, and medium | |
| CN109992295B (en) | A version management method and server | |
| CN114328210A (en) | Test method, test device and computer readable storage medium | |
| CN109408133B (en) | Method and equipment for starting assembly | |
| CN115811475B (en) | YAML-based automated deployment method, system, electronic device, and storage medium |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| CB02 | Change of applicant information |
Address after: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176 Applicant after: Jingdong Technology Holding Co.,Ltd. Address before: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176 Applicant before: Jingdong Digital Technology Holding Co.,Ltd. |
|
| CB02 | Change of applicant information | ||
| RJ01 | Rejection of invention patent application after publication |
Application publication date: 20201229 |
|
| RJ01 | Rejection of invention patent application after publication |
