CN112148315A - Software deployment method, device, server and storage medium - Google Patents

Software deployment method, device, server and storage medium Download PDF

Info

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
installation
deployment
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
Application number
CN202011012018.5A
Other languages
Chinese (zh)
Inventor
刘红申
程建波
吕军
王宇光
孟祥涛
李丹枫
廖艳丽
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
JD Digital Technology Holdings Co Ltd
Original Assignee
JD Digital Technology Holdings Co Ltd
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 JD Digital Technology Holdings Co Ltd filed Critical JD Digital Technology Holdings Co Ltd
Priority to CN202011012018.5A priority Critical patent/CN112148315A/en
Publication of CN112148315A publication Critical patent/CN112148315A/en
Pending legal-status Critical Current

Links

Images

Classifications

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

Abstract

The embodiment of the invention relates to a software deployment method, a device, a server and a storage medium, wherein the method comprises the following steps: receiving the deployment instruction through a client; calling a configuration file for deploying software through the deployment instruction, wherein the configuration file at least comprises a software operating environment configuration file or target server information; acquiring the target server information from the configuration file, and establishing 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, the requirement of a client can be met, the number of instances can be dynamically changed without limitation, the problem that multiple times of repeated operation are needed when multiple servers deploy the software for multiple times can be solved, and additional resources do not need to be occupied.

Description

Software deployment method, device, server and storage medium
Technical Field
The embodiment of the invention relates to the field of computer software, in particular to a software deployment method, a software deployment device, a server and a storage medium.
Background
In the internet field today, which often involves external delivery deployment of software, such as verification test deployment for specific applications of customers, a solution to a processing scheme for such needs can be generally deployed in an enterprise internal server or a notebook computer in advance, and then demonstrated, i.e., pre-deployed, for customers; or, the conventional deployment, namely the deployment of executable files compiled by using codes, is used on the client side; still alternatively, the container deployment is orchestrated using cloud technology on-site at the customer site.
However, the above solutions all have certain disadvantages, although the security of the pre-deployment code is guaranteed, the dynamic requirements of the customer cannot be met, and when the customer temporarily proposes multiple instances to deploy a certain application, the solution has limitations; the conventional deployment is limited to the situation of few applications on the site of a client, when the applications demonstrated to the client are too many, soft ribs appear, the repeated operation is more, and meanwhile, errors are easy to occur; the disadvantage of using cloud technology to orchestrate container deployment on-site at the client side is that when the server resources given by the client just meet the resources required by the application to be demonstrated, it is difficult to take out the machine alone to deploy an additional set of platform for managing the application container.
Disclosure of Invention
In view of this, to solve the technical problems or some 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 a client;
calling a configuration file for deploying software through the deployment instruction, wherein the configuration file at least comprises a software operating environment configuration file or target server information;
acquiring the target server information from the configuration file, and establishing a data transmission link with the target server based on the target server information;
and sending 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 one possible embodiment, the method further comprises:
and 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 running environment based on the second installation script file in the configuration file of the software running environment.
In one possible embodiment, the method further comprises:
verifying the configuration file to obtain verification information;
if the verification information passes verification, executing the step of sending the configuration file to the target server through the data transmission link;
and if the verification information fails to pass the verification, generating a message that the configuration file is abnormal.
In one possible embodiment, the method further comprises:
storing the installation file in a temporary file to generate a first temporary task file;
and 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 one possible embodiment, the method further comprises:
the target server acquires the installation file from the second temporary task file;
analyzing the installation file, and performing format conversion on the analyzed installation file to obtain an installation file with a preset format;
determining a first installation script file from installation files in a preset format;
and executing the installation operation of the software based on the first installation script file.
In one possible embodiment, the method further comprises:
acquiring a log file corresponding to the software deployment result returned by the target server;
if the log file contains the information that the software is successfully deployed, deleting the first temporary task file;
and if the log file contains the information of the software deployment failure, generating prompt information of the software deployment failure.
In one possible embodiment, the method further comprises:
and if the log file contains the information that the software is successfully deployed, sending a deleting instruction for deleting the second temporary task file to the target server, so that the target server responds to the deleting instruction to delete the second temporary task file.
In a second aspect, an embodiment of the present invention provides a software deploying apparatus, including:
the acquisition module is used for receiving the deployment instruction through a client;
the calling module is used for calling a configuration file for deploying software through the deployment instruction, and the configuration file at least comprises a software operation environment configuration file or target server information;
the connection module is used for acquiring the target server information from the configuration file and establishing a data transmission link with the target server based on the target server information;
and the sending module is used for sending the installation file of the software to the target server through the data transmission link so as to enable the target server to execute 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, the processor being configured to execute a software deployment program stored in the memory to implement the software deployment method of any one of the first aspect.
In a fourth aspect, an embodiment of the present invention provides a storage medium, including: the storage medium stores one or more programs that are executable by one or more processors to implement the software deployment method of any one of the first aspects described above.
According to the software deployment scheme provided by the embodiment of the invention, the deployment instruction is received through the client; calling a configuration file for deploying software through the deployment instruction, wherein the configuration file at least comprises a software operating environment configuration file or target server information; acquiring the target server information from the configuration file, and establishing 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, the requirement of a client can be met, the number of instances can be dynamically changed without limitation, the problem that multiple times of repeated operation are needed when multiple servers deploy the software for multiple times can be solved, and additional resources do not need to be occupied.
Drawings
Fig. 1 is an application scenario diagram of a software deployment method according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a software deployment method according to an embodiment of the present invention;
fig. 3 is a schematic flowchart of another software deployment method according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a software deploying apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a server according to an embodiment of the present invention.
Detailed Description
In order to make the objects, 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 drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
For the convenience of understanding of the embodiments of the present invention, the following description will be further explained with reference to specific embodiments, which are not to be construed as limiting the embodiments of the present invention.
Fig. 1 is an application scenario diagram of a software deployment method according to an embodiment of the present invention, and as shown in fig. 1, the application scenario specifically includes: at least one master server and at least one slave server.
The method comprises the steps that firstly, a configuration file needs to be written in advance, the file can specify software to be deployed for each server or each group of servers, the configuration file also contains a public environment configuration file used for configuring a public environment for software operation before the servers deploy the software, and then a deployHelper service is installed on a main control server and comprises a deployServer service and a deployCli client, wherein the deployServer service is used for calling the software service to demonstrate for a client; the deploy client is used for receiving a deployment instruction of a technician, the technician can input a command line from the deploy client, and then the whole server group executes a deployment task according to the method of the scheme to complete automatic deployment.
Fig. 2 is a schematic flowchart of a software deployment method provided in an embodiment of the present invention, and as shown in fig. 2, the method specifically includes:
and S21, receiving the deployment instruction through the client.
And S22, calling a configuration file for deploying the software through the deployment instruction, wherein the configuration file at least comprises a software running environment configuration file or target server information.
In the invention, the main control server receives a software deployment instruction, the software deployment instruction can carry a corresponding configuration file ID name, and after receiving the software deployment instruction, the main control server finds corresponding configuration file information from the software deployment instruction and calls a corresponding configuration file according to the configuration file information.
Furthermore, the configuration file records the target server information of the software to be deployed and the common environment configuration file of the software operation.
Optionally, the target server information to be deployed with the software recorded in the configuration file may only include one target server, or may include multiple target servers, so as to prevent some servers from being unable to support the software to run or some servers from being crashed, and therefore, the problem may be effectively solved by including the information of the multiple servers.
S23, 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.
And inquiring the called configuration file, inquiring target server information from the configuration file, wherein the target server information recorded in the configuration file at least comprises the IP address and the server name of the server, and establishing a data transmission link with the target server according to the inquired target server information.
And S24, sending 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 data transmission link is established between the host server and the target server, 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 analyzes the software installation file, converts the software installation file into a software installation file in an executable format, and then performs installation and deployment operations on the software according to the analyzed software installation file.
According to the software deployment method provided by the embodiment of the invention, the deployment instruction is received through the client; calling a configuration file for deploying software through the deployment instruction, wherein the configuration file at least comprises a software operating environment configuration file or target server information; acquiring the target server information from the configuration file, and establishing a data transmission link with the target server based on the target server information; the method comprises the steps of sending an installation file of software to a target server through a data transmission link so that the target server executes software deployment based on a first installation script file in the installation file, wherein the configuration file and a deployment script file are packaged in advance, the configuration file can be directly called after a main control server receives a deployment instruction input by a technician, and software deployment work is directly completed according to the content of the script file, so that the problem of repeated operation when multiple servers need to deploy the software for multiple times in the prior art can be solved, and additional resources do not need to be occupied.
Fig. 3 is a schematic flow chart of another software deployment method provided in the embodiment of the present invention, and as shown in fig. 3, the method specifically includes:
and S31, receiving the deployment instruction through the client.
And S32, verifying the configuration file to obtain verification information.
In the invention, a technician types in a software deployment instruction from a deployCli client, after receiving the software deployment instruction, a main control server calls a corresponding configuration file according to configuration file information carried in the software deployment instruction, then verifies the configuration file, and verifies whether the configuration file is abnormal or not to obtain verification information.
For example, whether the grammar in the configuration file conforms to the grammar rule is verified, and if the grammar rule does not conform to the grammar rule, an error is reported; and if the configuration file passes the verification and has no abnormal condition, performing subsequent processes.
And S33, if the verification information passes the verification, executing the step of sending the configuration file to the target server through the data transmission link.
And S34, sending the configuration file to the target server through the data transmission link, so that the target server executes the step of software operation environment deployment based on the second installation script file in the software operation environment configuration file.
In the embodiment of the invention, if the configuration file passes the verification and has no abnormal condition, the main control server sends the configuration file which is verified to be correct 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 into a configuration file in an executable format, finds a second installation script file from the configuration file in the executable format, and then executes the installation script file to install and deploy the public environment in which the software operates.
It should be noted that the master server may be connected through an SSH protocol via a data transmission link established with the target server, and secret-free communication between all servers is set; the configuration files comprise environment configuration files required by the operation of the compiled software, and when more servers are required to deploy the software, the configuration files are sent to other servers, so that the other servers can quickly configure the environment required by the operation of the software.
And S35, if the verification information is not verified, generating a message that the configuration file is abnormal.
When the configuration file is verified, if the verification fails, an error is reported, the error report information may include an error reason or an error position, and further, a technician may quickly find and correct the abnormal reason of the configuration file through the error report information.
And S36, storing the installation file in a temporary file to generate a first temporary task file.
In the embodiment of the invention, the main control server stores the software installation packed file to be installed in the temporary file of the local Home directory to generate the first temporary task file, wherein the file is stored in the form of the temporary file, because the whole software deployment demonstration process is probably performed on the server provided by the client, the client does not know which files need to be cleaned after the deployment of the demonstration software is finished, so that the system can automatically find the temporary file and delete the temporary file after the completion of the subsequent whole deployment task, the memory is released, and the client experience is improved.
And S37, 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 the embodiment of the invention, the main control server sends the first temporary task file stored locally 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.
And S38, the target server acquires the installation file from the second temporary task file.
In the embodiment of the invention, the target server traverses the local temporary directory to find the second temporary task file, analyzes the second temporary task file, and acquires the software installation package file from the analyzed second temporary task file according to the software installation instruction carried in the task file.
And S39, analyzing the installation file, and performing format conversion on the analyzed installation file to obtain an installation file with a preset format.
In the embodiment of the present invention, the target server parses the obtained software installation packaged file to generate a software installation file in an executable format, and obtains one or more files in the same format as a preset software installation format according to the preset software installation format (for example,. exe format).
S310, determining a first installation script file from installation files in a preset format.
S311, executing the installation operation of the software based on the first installation script file.
Traversing the one or more files with the same preset software installation format, and determining a first installation script file from the files, wherein the first installation script file is a script running file for the software installation.
Further, the first installation script file is operated to finish the automatic installation of the software, and the software can be operated after the installation is finished.
S312, obtaining the log file corresponding to the software deployment result returned by the target server.
In the embodiment of the invention, the remote data transmission link between the main control server and the target server, which is established based on the SSH protocol, can return the log file carrying the software deployment result through the SSH protocol after the target server executes the software deployment operation.
When the target server deploys the software, the software deployment may fail due to an analysis error of a software installation package file in the task file; it is also possible that the system of the target server does not conform to the software operating environment; if the software deployment fails due to reasons such as that the hardware environment of the target server does not meet the requirement of the installation and operation environment of the software, the master control server may send an instruction for acquiring the software deployment state to the target server to acquire the current software deployment state when the target server does not return the log file carrying the software deployment result within a preset time (e.g., 5 minutes).
Optionally, based on the SSH protocol, if a keepalive mechanism is performed on the target server in advance, the target server may actively send a deployment failure message to the master server.
S313, if the log file contains the information that the software is successfully deployed, deleting the first temporary task file.
And S314, if the log file contains the information of the software deployment failure, generating prompt information of the software deployment failure.
In the embodiment of the invention, if the log file returned by the target server contains the information of successful software deployment, the main control server searches and deletes the local first temporary task file, and releases the memory.
Optionally, if the log file returned by the target server contains information of software deployment failure, the master control server generates prompt information of software deployment failure to display, and a technician can search for an abnormal reason according to the prompt information and correct the abnormal reason.
S315, if the log file contains the information that the software deployment is successful, sending a deleting instruction for deleting the second temporary task file to the target server, so that the target server responds to the deleting instruction to delete the second temporary task file.
And if the log file returned by the target server contains the information of successful software deployment, the main control server sends a deletion instruction for deleting the second temporary task file on the target server to the target server through the data transmission link, and after receiving the deletion instruction, the target server searches for the second temporary task file in the local temporary directory to delete the second temporary task file.
It should be noted that, in the present invention, if the master server crashes, one server may be selected from the other servers again, and the deployHelper service is reinstalled on the selected server, and because the secret-free communication is set between all the servers, any server installed with the deployHelper service can complete the whole software deployment process of the present scheme.
According to the software deployment method provided by the embodiment of the invention, the deployment instruction is received through the client; calling a configuration file for deploying software through the deployment instruction, wherein the configuration file at least comprises a software operating environment configuration file or target server information; acquiring the target server information from the configuration file, and establishing a data transmission link with the target server based on the target server information; the method comprises the steps of sending an installation file of software to a target server through a data transmission link, enabling the target server to execute software deployment steps based on a first installation script file in the installation file, enabling a plurality of servers to deploy a plurality of instances to meet customer requirements and dynamically change the number of the instances without limitation, and enabling the servers to automatically complete a software running environment and software deployment to solve the problem that the running environment needs to be repeatedly configured for many times when a plurality of servers deploy software for many times without occupying extra resources.
Fig. 4 is a schematic structural diagram of a software deployment apparatus provided in an embodiment of the present invention, which specifically includes:
an obtaining module 401, configured to receive the deployment instruction through a client;
a calling module 402, configured to call, through the deployment instruction, a configuration file for deploying software, where the configuration file at least includes a software operating environment configuration file or target server information;
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;
a sending module 404, configured to send an installation file of the software to the target server through the data transmission link, so that the target server performs a step of software deployment based on a first installation script file in the installation file.
In a possible embodiment, 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 the information that the software is successfully deployed, deleting the first temporary task file; and if the log file contains the information of the software deployment failure, generating prompt information of the software deployment failure.
In a possible implementation manner, the invoking module 402 is specifically configured to verify the configuration file to obtain verification information; if the verification information passes verification, executing the step of sending the configuration file to the target server through the data transmission link; and if the verification information fails to pass the verification, generating a message that the configuration file is abnormal.
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 executes the step of deploying the software runtime environment based on the second installation script file in the configuration file of the software runtime environment.
In a possible implementation manner, the sending module 404 is further configured to store the installation file in a temporary file, and generate a first temporary task file; and 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 manner, the sending module 404 is further configured to send, if the log file includes the information that the software deployment is successful, a deletion instruction for deleting the second temporary task file to the target server, so that the target server deletes the second temporary task file in response to the deletion instruction.
The software deploying device provided in this embodiment may be the software deploying device shown in fig. 4, and may execute all the steps of the software deploying method shown in fig. 2 to 3, so as to achieve the technical effect of the software deploying method shown in fig. 2 to 3, and for brevity, reference is specifically made to the description related to fig. 2 to 3, which is not described herein again.
Fig. 5 is a schematic structural diagram of a server according to an embodiment of the present invention, where the server 500 shown in fig. 5 includes: at least one processor 501, memory 502, at least one network interface 504, and other user interfaces 503. The various components in the server 500 are coupled together by a bus system 505. It is understood that the bus system 505 is used to enable connection communications between these components. The bus system 505 includes a power bus, a control bus, and a status signal bus in addition to a data bus. For clarity of illustration, however, the various buses are labeled as bus system 505 in FIG. 5.
The user interface 503 may include, among other things, a display, a keyboard, or a pointing device (e.g., a mouse, trackball, touch pad, or touch screen, among others.
It is to be understood that the memory 502 in embodiments of the present invention may be either volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The non-volatile memory may be a Read-only memory (ROM), a programmable Read-only memory (PROM), an erasable programmable Read-only memory (erasabprom, EPROM), an electrically erasable programmable Read-only memory (EEPROM), or a flash memory. The volatile memory may be a Random Access Memory (RAM) which functions as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (staticiram, SRAM), dynamic random access memory (dynamic RAM, DRAM), synchronous dynamic random access memory (syncronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM ), Enhanced Synchronous DRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and direct memory bus RAM (DRRAM). The memory 502 described herein is intended to comprise, without being limited to, these and any other suitable types of memory.
In some embodiments, memory 502 stores elements, executable units or data structures, or a subset thereof, or an expanded set thereof as follows: an operating system 5021 and application programs 5022.
The operating system 5021 includes various system programs, such as a framework layer, a core library layer, a driver layer, and the like, and is used for implementing various basic services and processing hardware-based tasks. The application 5022 includes various applications, such as a media player (MediaPlayer), a Browser (Browser), and the like, for implementing various application services. The program for implementing the method according to the embodiment of the present invention may be included in the application program 5022.
In the embodiment of the present invention, by calling a program or an instruction stored in the memory 502, specifically, a program or an instruction stored in the application 5022, the processor 501 is configured to execute the method steps provided by the method embodiments, for example, including:
receiving the deployment instruction through a client; calling a configuration file for deploying software through the deployment instruction, wherein the configuration file at least comprises a software operating environment configuration file or target server information; acquiring the target server information from the configuration file, and establishing a data transmission link with the target server based on the target server information; and sending 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 one possible embodiment, the configuration file is sent to the target server through the data transmission link, so that the target server executes the step of software runtime deployment based on the second installation script file in the software runtime configuration file.
In a possible implementation manner, the configuration file is verified to obtain verification information;
if the verification information passes verification, executing the step of sending the configuration file to the target server through the data transmission link; and if the verification information fails to pass the verification, generating a message that the configuration file is abnormal.
In one possible implementation mode, the installation file is stored in a temporary file, and a first temporary task file is generated; and 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 one possible embodiment, the target server obtains the installation file from the second temporary task file; analyzing the installation file, and performing format conversion on the analyzed installation file to obtain an installation file with a preset format; determining a first installation script file from installation files in a preset format; and executing the installation operation of the software based on the first installation script file.
In one possible implementation manner, a log file corresponding to the software deployment result returned by the target server is obtained; if the log file contains the information that the software is successfully deployed, deleting the first temporary task file; and if the log file contains the information of the software deployment failure, generating prompt information of the software deployment failure.
In a possible implementation manner, if the log file includes the information that the software deployment is successful, a deletion instruction for deleting the second temporary task file is sent to the target server, so that the target server deletes the second temporary task file in response to the deletion instruction.
The method disclosed by the above-mentioned embodiments of the present invention may be applied to the processor 501, or implemented by the processor 501. The processor 501 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 501. The processor 501 may be a general-purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, or discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software elements in the decoding processor. The software elements may be located in ram, flash, rom, prom, or eprom, registers, among other storage media that are well known in the art. The storage medium is located in the memory 502, and the processor 501 reads the information in the memory 502 and completes the steps of the method in combination with the hardware.
It is to be understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or any combination thereof. For a hardware implementation, the processing units may be implemented within one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), general purpose processors, controllers, micro-controllers, microprocessors, other electronic units configured to perform the functions described herein, or a combination thereof.
For a software implementation, the techniques described herein may be implemented by means of units performing the functions described herein. The software codes may be stored in a memory and executed by a processor. The memory may be implemented within the processor or external to the processor.
The server provided in this embodiment may be the server shown in fig. 5, and may execute all the steps of the software deployment method shown in fig. 2 to 3, so as to achieve the technical effect of the software deployment method shown in fig. 2 to 3, and for brevity, please refer to the description related to fig. 2 to 3, which is not described herein again.
The embodiment of the invention also provides a storage medium (computer readable storage medium). The storage medium herein stores one or more programs. Among others, 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, a hard disk, or a solid state disk; the memory may also comprise a combination of memories of the kind described above.
When one or more programs in the storage medium are executable by one or more processors to implement the software deployment method described above as being executed on the server side.
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:
receiving the deployment instruction through a client; calling a configuration file for deploying software through the deployment instruction, wherein the configuration file at least comprises a software operating environment configuration file or target server information; acquiring the target server information from the configuration file, and establishing a data transmission link with the target server based on the target server information; and sending 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 one possible embodiment, the configuration file is sent to the target server through the data transmission link, so that the target server executes the step of software runtime deployment based on the second installation script file in the software runtime configuration file.
In a possible implementation manner, the configuration file is verified to obtain verification information;
if the verification information passes verification, executing the step of sending the configuration file to the target server through the data transmission link; and if the verification information fails to pass the verification, generating a message that the configuration file is abnormal.
In one possible implementation mode, the installation file is stored in a temporary file, and a first temporary task file is generated; and 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 one possible embodiment, the target server obtains the installation file from the second temporary task file; analyzing the installation file, and performing format conversion on the analyzed installation file to obtain an installation file with a preset format; determining a first installation script file from installation files in a preset format; and executing the installation operation of the software based on the first installation script file.
In one possible implementation manner, a log file corresponding to the software deployment result returned by the target server is obtained; if the log file contains the information that the software is successfully deployed, deleting the first temporary task file; and if the log file contains the information of the software deployment failure, generating prompt information of the software deployment failure.
In a possible implementation manner, if the log file includes the information that the software deployment is successful, a deletion instruction for deleting the second temporary task file is sent to the target server, so that the target server deletes the second temporary task file in response to the deletion instruction.
Those of skill would further appreciate that the various illustrative components and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied in hardware, a software module executed by a processor, or a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are merely exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (10)

1. A method for deploying software, comprising:
receiving the deployment instruction through a client;
calling a configuration file for deploying software through the deployment instruction, wherein the configuration file at least comprises a software operating environment configuration file or target server information;
acquiring the target server information from the configuration file, and establishing a data transmission link with the target server based on the target server information;
and sending 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.
2. The method of claim 1, further comprising:
and 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 running environment based on the second installation script file in the configuration file of the software running environment.
3. The method of claim 2, further comprising:
verifying the configuration file to obtain verification information;
if the verification information passes verification, executing the step of sending the configuration file to the target server through the data transmission link;
and if the verification information fails to pass the verification, generating a message that the configuration file is abnormal.
4. The method of claim 3, wherein sending the installation file of the software to the target server via the data transmission link comprises:
storing the installation file in a temporary file to generate a first temporary task file;
and 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.
5. The method of claim 4, wherein the step of the target server performing software deployment based on a first installation script file in the installation files comprises:
the target server acquires the installation file from the second temporary task file;
analyzing the installation file, and performing format conversion on the analyzed installation file to obtain an installation file with a preset format;
determining a first installation script file from installation files in a preset format;
and executing the installation operation of the software based on the first installation script file.
6. The method of claim 5, further comprising:
acquiring a log file corresponding to the software deployment result returned by the target server;
if the log file contains the information that the software is successfully deployed, deleting the first temporary task file;
and if the log file contains the information of the software deployment failure, generating prompt information of the software deployment failure.
7. The method of claim 6, further comprising:
and if the log file contains the information that the software is successfully deployed, sending a deleting instruction for deleting the second temporary task file to the target server, so that the target server responds to the deleting instruction to delete the second temporary task file.
8. A software deploying apparatus, comprising:
the acquisition module is used for receiving the deployment instruction through a client;
the calling module is used for calling a configuration file for deploying software through the deployment instruction, and the configuration file at least comprises a software operation environment configuration file or target server information;
the connection module is used for acquiring the target server information from the configuration file and establishing a data transmission link with the target server based on the target server information;
and the sending module is used for sending the installation file of the software to the target server through the data transmission link so as to enable the target server to execute the step of software deployment based on the first installation script file in the installation file.
9. A server, comprising: a processor and a memory, wherein the processor is used for executing the software automatic deployment program stored in the memory to realize the software automatic deployment method of any one of claims 1-7.
10. A storage medium storing one or more programs executable by one or more processors to implement the method for automatic deployment of software according to any one of claims 1 to 7.
CN202011012018.5A 2020-09-22 2020-09-22 Software deployment method, device, server and storage medium Pending CN112148315A (en)

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 (5)

* Cited by examiner, † Cited by third party
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
CN113900677A (en) * 2021-10-18 2022-01-07 盐城金堤科技有限公司 Deployment method, device and equipment of program running environment and computer storage medium
CN113946350A (en) * 2021-10-28 2022-01-18 苏州万店掌网络科技有限公司 Deployment method and system of shared working space
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

Citations (2)

* Cited by examiner, † Cited by third party
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

Patent Citations (2)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
Title
李平: "《网络办公自动化技术与应用》", 31 July 2004, 西安电子科技大学出版社, pages: 85 *

Cited By (9)

* Cited by examiner, † Cited by third party
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
CN113900677A (en) * 2021-10-18 2022-01-07 盐城金堤科技有限公司 Deployment method, device and equipment of program running environment and computer storage medium
CN113946350A (en) * 2021-10-28 2022-01-18 苏州万店掌网络科技有限公司 Deployment method and system of shared working space
CN113946350B (en) * 2021-10-28 2022-08-19 苏州万店掌网络科技有限公司 Deployment method and system of shared working space
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

Similar Documents

Publication Publication Date Title
CN112148315A (en) Software deployment method, device, server and storage medium
US11144439B2 (en) Emulation-based testing of a microservices architecture
CN112637346B (en) Proxy method, proxy device, proxy server and storage medium
US8997088B2 (en) Methods and systems for automated deployment of software applications on heterogeneous cloud environments
US11126426B2 (en) Method and system for implementing software changes using rolling upgrades with reduced downtime
US10430172B2 (en) Re-configuration in cloud computing environments
CN110138577B (en) Cluster creation method, first server and readable storage medium
CN111324412A (en) Service deployment method, device and storage medium
CN110750415B (en) Interface service configuration method, device, medium and computer equipment
CN113687858A (en) Configuration file checking method and device, electronic equipment and storage medium
CN111930625B (en) Log acquisition method, device and system based on cloud service platform
CN112650689A (en) Test method, test device, electronic equipment and storage medium
CN109408133B (en) Method and equipment for starting assembly
CN115774742A (en) Data storage newly-increased method, device, equipment, medium and product of private cloud
CN111857744A (en) Installation method, system, equipment and medium of super-fusion system
US20230132531A1 (en) Software Development Project Infrastructure Builder Tool
US11822461B2 (en) Remote debugging of cloud application
CN115357258B (en) Application deployment method and device, storage medium and electronic device
CN114726848B (en) Client automatic packaging and exe distribution method and device for Windows platform
CN116132276A (en) Operating system replacement method, operating system replacement device, electronic equipment and readable storage medium
CN114911710A (en) Code testing method and electronic equipment
CN112527318A (en) Service processing method and device and online service system
CN116225617A (en) Management migration method and device for container instance, electronic equipment and storage medium
CN117971311A (en) Front-end configuration method, apparatus, and computer-readable storage medium
CN117971262A (en) System upgrading method and device, electronic equipment and readable 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