CN111338656B - Method and device for installing software package to target host and computer equipment - Google Patents

Method and device for installing software package to target host and computer equipment Download PDF

Info

Publication number
CN111338656B
CN111338656B CN202010116137.9A CN202010116137A CN111338656B CN 111338656 B CN111338656 B CN 111338656B CN 202010116137 A CN202010116137 A CN 202010116137A CN 111338656 B CN111338656 B CN 111338656B
Authority
CN
China
Prior art keywords
software package
target host
management platform
server
installing
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.)
Active
Application number
CN202010116137.9A
Other languages
Chinese (zh)
Other versions
CN111338656A (en
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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN202010116137.9A priority Critical patent/CN111338656B/en
Publication of CN111338656A publication Critical patent/CN111338656A/en
Priority to PCT/CN2020/099444 priority patent/WO2021169124A1/en
Application granted granted Critical
Publication of CN111338656B publication Critical patent/CN111338656B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures

Abstract

The invention provides a method, a device and computer equipment for installing a software package to a target host. The execution main body of the method is a software package management platform, which comprises the following steps: receiving parameters of a software package to be synchronized and a target host; checking the software package according to a preset checking rule; when the verification passes, determining a synchronous path according to the parameters of the target host, wherein the synchronous path is a path which is reached to a server of the target host by the software package management platform; generating configuration information required by the target host for installing the software package according to the package name of the software package and the parameters of the target host; synchronizing the software package to a server of the target host via a synchronization path; and sending the configuration information to an operation and maintenance management platform of the target host, wherein the operation and maintenance management platform is used for installing the software package on the server of the target host to the target host according to the configuration information. According to the method and the device for installing the software package, efficiency of installing the software package to the target host can be improved.

Description

Method and device for installing software package to target host and computer equipment
Technical Field
The present invention relates to the field of software package installation, and in particular, to a method, an apparatus, and a computer device for installing a software package to a target host.
Background
When traditional software is installed or software is upgraded, after a developer packages and makes a software package, deployment personnel are required to manually upload the software package to a target host and install the software package, but along with the rising of cloud computing and distribution and the improvement of enterprise security consciousness, a plurality of intermediate devices such as network security isolation and cloud servers are often arranged between an office network and the target host, and the installation package is required to be synchronized to a plurality of target hosts, at this time, the installation package is uploaded by adopting a traditional mode, then manual and gradual synchronization is required to be performed on each intermediate device, and finally synchronization is required to be performed on a plurality of target hosts, a large amount of repeated work is required to be performed by deployment personnel during the process, a large amount of time and labor are consumed, and the efficiency is low.
Therefore, providing a method, an apparatus and a computer device for installing a software package to a target host, which achieve automatic synchronization and installation of the software package, so as to quickly and effectively synchronize the software package to the target host and achieve installation, is a technical problem to be solved in the art.
Disclosure of Invention
The invention aims to provide a method, a device and computer equipment for installing a software package to a target host, which are used for solving the technical problem of low efficiency when synchronizing the software package to the target host in the prior art.
In one aspect, to achieve the above object, the present invention provides a method for installing a software package to a target host.
The execution subject of the method for installing the software package to the target host is a software package management platform, and the method comprises the following steps: receiving parameters of a software package to be synchronized and a target host; checking the software package according to a preset checking rule; when the verification passes, determining a synchronous path according to the parameters of the target host, wherein the synchronous path is a path which is reached to a server of the target host by the software package management platform; generating configuration information required by the target host for installing the software package according to the package name of the software package and the parameters of the target host; synchronizing the software package to a server of the target host via a synchronization path; and sending the configuration information to an operation and maintenance management platform of the target host, wherein the operation and maintenance management platform is used for installing the software package on the server of the target host to the target host according to the configuration information.
Further, the process of synchronizing the software package to the server of the target host via the synchronization path includes at least two synchronization steps for synchronizing the software package from the upstream device to the adjacent downstream device, the synchronization steps including: and calling a script execution function to execute a preset script on the upstream device, wherein when the preset script is executed, the software package on the upstream device is synchronized to the downstream device.
Further, the synchronizing step further includes: acquiring process information and an execution result of a script execution function for executing a preset script; and writing the process information and the execution result into a synchronization log.
Further, the step of synchronizing the software package to the server of the target host via the synchronization path comprises: establishing a synchronous task, wherein the synchronous task comprises sub-tasks which are in one-to-one correspondence with the synchronous steps and are arranged in sequence, and executing one synchronous step when starting one sub-task; starting a subtask; marking the state of the subtasks according to the execution result; when the state of the subtask is successful in execution, starting the next subtask; when the state of the subtask is the execution failure, interrupting the synchronous task; outputting prompt information of sub-task execution failure and providing a log checking control; in response to an operation of the log view control, a synchronization log is displayed.
Further, the method further comprises: providing a breakpoint continuous control for the interrupted synchronous task; and in response to the operation of the breakpoint resume control, restarting the sub-task with the status of failed execution.
Further, the method further comprises: when the verification passes, calculating the digital fingerprint of the software package to obtain an original fingerprint; when the preset script is executed, calculating the digital fingerprint of the software package of the upstream device to obtain a verification fingerprint, and synchronizing the software package of the upstream device to the downstream device when the verification fingerprint is consistent with the original fingerprint.
The step of verifying the software package according to a preset verification rule comprises the following steps: checking whether the package name of the software package accords with a preset package name specification; judging whether the environment information contained in the package name of the software package is the same as the environment information of the target host computer or not; judging whether the host type contained in the package name of the software package is the same as the host type of the target host; and/or judging whether the system version information contained in the package name of the software package meets the preset system version requirement.
In another aspect, to achieve the above object, the present invention provides an apparatus for installing a software package to a target host.
The device for installing the software package to the target host is arranged on a software package management platform, and comprises: the receiving module is used for receiving parameters of the software package to be synchronized and the target host; the verification module is used for verifying the software package according to a preset verification rule; the determining module is used for determining a synchronous path according to the parameters of the target host when the verification passes, wherein the synchronous path is a path which reaches a server of the target host by the software package management platform; the processing module is used for generating configuration information required by the target host for installing the software package according to the package name of the software package and the parameters of the target host; the synchronization module is used for synchronizing the software package to the server of the target host computer through a synchronization path; and the sending module is used for sending the configuration information to an operation and maintenance management platform of the target host, wherein the operation and maintenance management platform is used for installing a software package on a server of the target host to the target host according to the configuration information.
To achieve the above object, the present invention also provides a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the above method when executing the computer program.
To achieve the above object, the present invention also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the above method.
The method, the device and the computer equipment for installing the software package to the target host provide a unified software package receiving interface inlet, receive the parameters of the software package and the target host uploaded by a user, automatically check the software package uploaded by the user, ensure the legality of the software package, and when the software package passes the check, on one hand, determine the synchronous path of the software package reaching the server of the target host, so as to synchronize the software package to the server of the target host through the synchronous path; on the other hand, some configuration information required by installing the software package on the target host is generated and sent to the operation and maintenance management platform of the target host, so that the operation and maintenance management platform can install the software package on the server of the target host to the target host according to the configuration information, and therefore, for a user, the user only needs to upload the software package to the software package management platform, the software package management platform can automatically install the software package to the corresponding host, the operation is simple, the manpower is liberated, and a large amount of time is saved. Furthermore, in the synchronization process, digital fingerprints of the software package files are compared in each synchronization step, synchronization is performed only when the digital fingerprints are consistent, and a user can quickly know the state of the software package through a real-time synchronization log provided by the software package management platform, so that the problems in the installation process can be easily positioned.
Drawings
FIG. 1 is a flowchart of a method for installing a software package on a target host according to an embodiment of the present invention;
FIG. 2 is a flowchart of a method for installing a software package to a target host according to a second embodiment of the present invention;
FIG. 3 is a schematic diagram illustrating a third embodiment of the present invention for installing a software package on a target host;
FIG. 4 is a block diagram of a fourth embodiment of the present invention for installing a software package on a target host device;
fig. 5 is a hardware configuration diagram of a computer device according to a fifth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present invention more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The invention provides a method, a device, computer equipment and a computer readable storage medium for installing a software package to a target host.
Specific embodiments of the method, apparatus, computer device, and computer-readable storage medium for installing a software package to a target host provided by the present invention are described in detail below.
Example 1
The embodiment of the invention provides a method for installing a software package to a target host, an execution main body of the method is a software package management platform, the software package management platform is positioned in an office network, and a plurality of intermediate devices such as a network security isolation device, a cloud server and the like are arranged between the software package management platform and the target host, for example, a plurality of fort machines, a trigger, a public cloud server, a proprietary cloud server, an internal cloud server and the like. By the method, the software package management platform provides a unified software package receiving inlet for a user, and the user can automatically complete synchronization and installation of the software package by only uploading the software package to be synchronized and selecting and/or inputting parameters of a target host. Specifically, fig. 1 is a flowchart of a method for installing a software package to a target host according to an embodiment of the present invention, as shown in fig. 1, the method for installing a software package to a target host according to the embodiment includes the following steps S101 to S106.
Step S101: parameters of the software package to be synchronized and the target host are received.
Optionally, the software package management platform includes a front end for interaction with a user and a back end for data processing. The front end provides an interactive interface, an entry for receiving the software package to be synchronized and a parameter selection and/or input window of the target host machine, which are uploaded by a user, are arranged on the interactive interface, and the user can submit the parameters of the software package to be synchronized and the parameter selection and/or input window of the target host machine to the software package management platform through the interactive interface.
Step S102: and checking the software package according to a preset checking rule.
The software package management platform presets a verification rule to verify the software package uploaded by the user, when the verification is passed, the software package is successfully uploaded, the following step S103 is executed, when the verification is not passed, the software package is failed to be uploaded, and meanwhile, the front end can output related information for prompting the failure of uploading.
Optionally, when the software package is verified according to a preset verification rule, at least one of the following steps may be included:
1. and checking whether the package name of the software package accords with a preset package name specification.
For example, the package name specification may include: in the step, the package names of the software packages to be uploaded are compared according to package name specifications so as to check whether the package names of the software packages accord with preset package name specifications or not.
2. And judging whether the environment information contained in the package name of the software package is the same as the environment information of the target host.
The environment information contained in the package name can be specifically information for identifying a test environment or information for identifying a production environment, the software package management platform presets the corresponding relation between the parameters of the target host and the environment information, and the environment information of the target host can be determined through the received parameters of the target host. In the step, the environment information in the package name is analyzed, the environment information of the target host is obtained according to the parameters of the target host, and the environment information of the target host are compared, and if the environment information is the information for identifying the test environment or the information for identifying the production environment, the environment information contained in the package name of the software package is the same as the environment information of the target host.
3. And judging whether the host type contained in the package name of the software package is the same as the host type of the target host.
The host type contained in the package name can be information for identifying different host types, the software package management platform presets the corresponding relation between the parameters of the target host and the host types of the target host, in the step, the host types in the package name are analyzed, the host types of the target host are obtained according to the parameters of the target host, and the host types of the target host are compared, if the host types are the same, the host types contained in the package name of the software package are the same as the host types of the target host.
4. And judging whether the system version information contained in the package name of the software package meets the preset system version requirement.
The package name comprises system version information, the height of the installed package version is identified, the software package management platform presets the corresponding relation between the parameters of the target host and the system version requirements, in the step, the system version information in the package name is analyzed, the system version requirements are determined according to the parameters of the target host, and then the system version requirements are compared with the package names of the software packages to be uploaded so as to check whether the system version information contained in the package names of the software packages accords with the system version requirements.
When the software package is checked, if the software package comprises a plurality of check items, the software package is checked successfully by the characterization when all the check items pass, and the software package is checked failed by the characterization when any check item does not pass.
Step S103: and when the verification passes, determining a synchronous path according to the parameters of the target host.
The synchronous path is a path which is reached to a server of the target host by the software package management platform. Optionally, the software package management platform presets paths to servers of a plurality of target hosts, wherein after the target hosts receive an installation package acquisition instruction issued by the servers of the target hosts, the target hosts acquire the installation package from the servers. The path from the software package management platform to the servers of the target hosts can embody the node relation through a mesh or tree structure, wherein in the mesh or tree structure, the node relation is embodied by the parameters of the target hosts, and specifically, the parameters of the target hosts comprise information such as host names and the like. And according to the parameters of the target host, matching the corresponding nodes in the mesh or tree structure, and determining the synchronous path.
Step S104: and generating configuration information required by the target host for installing the software package according to the package name of the software package and the parameters of the target host.
Specifically, a part of configuration information required for installing the software package can be defined in the package name of the software package, and the part is used as a parameter of a target host which needs to be selected by a user, so that the target host can be generated according to the package name of the software package and the parameter of the target host to obtain the configuration information required for installing the software package; or, the corresponding relation between the configuration parameters required by installing the software package and the package name of the software package and the parameters of the target host can be stored in the software package management platform, so that the matched configuration information can be found out in the corresponding relation according to the package name of the software package and the parameters of the target host.
Step S105: the software package is synchronized to the server of the target host via a synchronization path.
The synchronization path may include a plurality of nodes, the software package management platform is a start node of the synchronization path, the server of the target host is a final node of the synchronization path, an intermediate device between the software package management platform and the server of the target host is an intermediate node of the synchronization path, and at least one intermediate device is provided, so that the process of synchronizing to the server of the target host via the synchronization path includes at least two synchronization steps, each synchronization step is used for synchronizing a software package from an upstream device to an adjacent downstream device, wherein the start node is only the upstream device, the final node is only the downstream device, and the intermediate node may be the upstream device or the downstream device.
Each node on the synchronization path, which can be used as an upstream device, is preset with a preset script for synchronizing the local software package to an adjacent downstream device, and each synchronization step specifically includes: the software package management platform calls a script execution function to execute a preset script on the upstream device, so that when the preset script is executed, the software package local to the upstream device is synchronized to the downstream device. All the synchronization steps included in the synchronization path are performed, i.e. this step S105 is completed.
Further, the synchronizing step further includes: and acquiring process information and an execution result of the script execution function for executing the preset script, and writing the process information and the execution result into a synchronous log, wherein the process information and the execution result are written into the synchronous log in real time when each synchronous step is executed, so that in the synchronous process, a user can check the synchronous log in real time, know the real-time dynamics of an installation package, and if an error occurs in a synchronous link, the user can immediately locate the error information and solve the error information through the real-time synchronous log.
Optionally, when the verification passes, the method further comprises the steps of: and calculating the digital fingerprint of the software package to obtain the original fingerprint. Correspondingly, when the preset script is executed, calculating the digital fingerprint of the software package aiming at the software package to be synchronized with the downstream equipment in the upstream equipment to obtain a check fingerprint, comparing whether the check fingerprint is consistent with the digital fingerprint, synchronizing the software package of the upstream equipment to the downstream equipment when the check fingerprint is consistent with the original fingerprint, and if the check fingerprint is inconsistent with the original fingerprint, outputting information for prompting that the fingerprints are inconsistent, and interrupting synchronization. In particular, the digital fingerprint may be an MD5 value, or may be other digital fingerprints, which the present application is not limited to. Through the verification to vertical fingerprint, can promote the security in the synchronous in-process.
Step S106: and sending the configuration information to an operation and maintenance management platform of the target host.
The operation and maintenance management platform and the software package management platform are both in an office network, the software package management platform can control the target host, but can not transmit an installation package to the target host, the operation and maintenance management platform issues a command for installing the software package to a server of the target host according to configuration information, the server sends a command for acquiring the software package to the target host, and the target host acquires the software package to the server for installation, so that the software package is installed to the target host.
By adopting the method for installing the software package to the target host provided by the embodiment, a unified software package receiving interface inlet is provided, parameters of the software package and the target host uploaded by a user are received, the software package uploaded by the user is automatically checked, the validity of the software package is ensured, and when the verification is passed, on one hand, a synchronous path of the software package reaching a server of the target host is determined, so that the software package is synchronized to the server of the target host through the synchronous path; on the other hand, some configuration information required by installing the software package on the target host is generated and sent to the operation and maintenance management platform of the target host, so that the operation and maintenance management platform can install the software package on the server of the target host to the target host according to the configuration information, and therefore, for a user, the user only needs to upload the software package to the software package management platform, the software package management platform can automatically install the software package to the corresponding host, the operation is simple, the manpower is liberated, and a large amount of time is saved. Furthermore, in the synchronization process, digital fingerprints of the software package files are compared in each synchronization step, synchronization is performed only when the digital fingerprints are consistent, and a user can quickly know the state of the software package through a real-time synchronization log provided by the software package management platform, so that the problems in the installation process can be easily positioned.
Example two
In a second embodiment of the present invention, a method for installing a software package to a target host is provided, and part of steps of the method for installing a software package to a target host are the same as those in the first embodiment, and are not described in detail in this embodiment, and reference may be made to the first embodiment. Specifically, fig. 2 is a flowchart of a method for installing a software package to a target host according to a second embodiment of the present invention, as shown in fig. 2, the method for installing a software package to a target host according to the second embodiment includes the following steps S201 to S210.
Step S201: parameters of the software package to be synchronized and the target host are received.
Step S202: and checking the software package according to a preset checking rule.
Wherein, when the verification is passed, the following step S203 is performed, and when the verification is not passed, the following step S211 is performed.
Step S203: and when the verification passes, determining a synchronous path according to the parameters of the target host.
The synchronous path is a path which is reached to a server of the target host by the software package management platform.
Step S204: and establishing a synchronous task.
And establishing a synchronous task aiming at each received software package to be synchronized. The synchronous tasks comprise sub-tasks which are in one-to-one correspondence with the synchronous steps and are arranged in sequence, and each time one sub-task is started, one synchronous step is executed, each sub-task is started in sequence, and then the synchronous tasks can be completed.
Step S205: a subtask is started.
After the synchronous task is established, starting the first sub-task, and after each subsequent sub-task is successfully executed, starting the next sub-task.
After a subtask is started, a synchronization step is executed, namely a script execution function is called to execute a preset script on upstream equipment, when the preset script is executed, a software package local to the upstream equipment is synchronized to downstream equipment, meanwhile, process information and an execution result of the script execution function to execute the preset script are obtained, and then the process information and the execution result are written into a synchronization log, wherein the execution result comprises execution success and execution failure.
Step S206: and marking the state of the subtasks according to the execution result.
When the state of the subtask is execution success, the following step S207 is executed, and when the state of the subtask is execution failure, the following step S208 is executed.
Step S207: and judging whether the current subtask is the last subtask included in the synchronous task.
The subtask identification can be set for each subtask, in this step, it is determined whether the task identification of the current subtask is the same as the task identification of the last subtask, and if so, the current subtask is the last subtask included in the synchronous task.
Specifically, if the current subtask is the last subtask included in the synchronous task, the following step S209 is executed, and if the current subtask is not the last subtask included in the synchronous task, the step S205 is returned to and the next subtask is started.
Step S208: and interrupting the synchronous task, outputting prompt information of failure in execution of the subtasks, providing a log checking control, and displaying the synchronous log in response to the operation of the log checking control.
If the execution of the subtask fails, the software package management platform provides an interrupt interaction interface, a log viewing control is arranged on the interface, and when a user clicks the log viewing control, the software package management platform responds to the operation of the log viewing control to acquire and display the current synchronous log.
In addition, optionally, a breakpoint continuous control is provided for the interrupted synchronous task, for example, a list for displaying synchronous tasks is provided, the list includes a plurality of synchronous tasks, the breakpoint continuous control is set corresponding to the interrupted synchronous task, when a user clicks the breakpoint continuous control, the software package management platform responds to the operation of the breakpoint continuous control, and the state is restarted as a subtask with failed execution.
Step S209: and generating configuration information required by the target host for installing the software package according to the package name of the software package and the parameters of the target host, and sending the configuration information to an operation and maintenance management platform of the target host.
And if the last subtask in the synchronous task is successfully executed, indicating that the software package is synchronized to the server of the target host, in the step, sending configuration information to an operation and maintenance management platform of the target host, wherein the operation and maintenance management platform is used for installing the software package on the server of the target host to the target host according to the configuration information.
Step S210: and outputting prompt information of verification failure.
When the software package is checked according to a preset check rule, and the check is not passed, the step is executed, so that the user can process in time.
By adopting the method for installing the software package to the target host provided by the embodiment, the process of synchronizing the software package is realized based on the task mode, the subtasks are set for each synchronization step, feedback of the execution result can be formed in the process of executing each subtask, and then a synchronization log is formed, when the subtask is successfully executed, the next subtask is started, the synchronization task is finally completed, when the subtask is failed to be executed, a user can inquire the synchronization log, and breakpoint continuous operation can be carried out on the interrupted synchronization task.
Example III
In a third embodiment of the present invention, a method for installing a software package to a target host is provided, where part of steps of the method for installing a software package to a target host are the same as those in the foregoing embodiment, and the details of the part of steps are not described in detail in this embodiment, and reference may be made to the foregoing embodiment. In this embodiment, the installation enclosure PRM (Red Hat Package Manager) package, specifically, fig. 3 is a schematic diagram of installing a software package to a target host according to the third embodiment of the present invention, and as shown in fig. 3, the method for installing a software package to a target host according to the third embodiment of the present invention includes the following steps:
after the user uploads the manufactured RPM package to the software package management platform, the software package management platform receives the parameters of the RPM package and the target host, the platform checks the RPM package according to the set rule, and uploads the RPM package after passing the parameter, otherwise, the uploading fails. Meanwhile, the platform calculates the MD5 value of the RPM package, and records the package name, the type of the host, the system version, the MD5 value, version information, release, RPM package description and the like of the RPM package into a database.
The software package management platform provides a synchronous button, and the user clicks the synchronous button, and the software package management platform adopts rsync algorithm to synchronize the RPM package to the configured public cloud, proprietary cloud, internal cloud and other YUM servers (Yellow dog UpdaterModified SERVER) in parallel, and then synchronizes the RPM package to the YUM servers (and servers of the target host) of each available area in parallel from the YUM servers of each cloud, for example: and synchronizing the YUM servers of the public cloud to the YUM servers of different available areas such as the public cloud ECA, ECB, SCA, HKA, HKB, SGA, reading information in a database after successful synchronization, and synchronizing related information of the RPM package to an operation and maintenance management platform of each cloud as configuration information, so that supervision and deployment of the operation and maintenance management platform are facilitated. In the synchronization process of the RPM package, when the software package management platform synchronizes to the cloud YUM server or the cloud YUM server synchronizes to the available area YUM server, the software package management platform calls a script execution function to execute a preset script so as to compare the MD5 value of the RPM package, if the MD5 value is consistent with the initial MD5 value of the RPM package, the software package management platform synchronizes, otherwise, an alarm notification is sent.
In addition, in the synchronization process of the RPM package, the execution process and the execution result of the script execution function are written into the synchronization log, a user can check the synchronization log in real time to know the real-time dynamic state of the RPM package, if an error occurs in the synchronization link, the user can quickly locate and solve the error information through the real-time log, and if the error information has a failure link in the synchronization process, the user is supported to carry out breakpoint continuous operation. Specifically, if there is a failed task, the software package management platform will acquire from the database where the task fails, so as to continue to execute the task according to the instruction of the user.
By adopting the method for installing the software package to the target host provided by the embodiment, a unified web interface entry is provided, and the life cycle management of the RPM package can be performed; when uploading an RPM packet, adding a checking mechanism of the RPM packet, and forbidding uploading when the RPM packet does not accord with the specification; in the process of synchronizing the RPM package, the MD5 value of the RPM package file is checked, if the MD5 value is consistent with the initial MD5 value of the file, the MD5 value is synchronized, otherwise, the MD5 value is not synchronized and an alarm notification is sent. The method can support batch synchronous operation of a plurality of RPM packages, and saves a great deal of time. The synchronization log of the RPM package can be displayed in real time, and the synchronization progress of the RPM package can be checked. Problems occurring in the synchronization process can be easily located through the log, and the system supports the breakpoint continuous-acting function.
Example IV
In accordance with the first embodiment, the fourth embodiment of the present invention provides a device for installing a software package to a target host, where the device is disposed on a software package management platform, and related technical features and technical effects can be referred to the first embodiment. Fig. 4 is a block diagram of a software package installed on a target host device according to a fourth embodiment of the present invention, and as shown in fig. 4, the device includes: a receiving module 401, a checking module 402, a determining module 403, a processing module 404, a synchronizing module 405 and a transmitting module 406.
The receiving module 401 is configured to receive parameters of a software package to be synchronized and a target host; the verification module 402 is configured to verify the software package according to a preset verification rule; the determining module 403 is configured to determine a synchronization path according to a parameter of the target host when the verification passes, where the synchronization path is a path that the software package management platform reaches a server of the target host; the processing module 404 is configured to generate configuration information required for installing the software package by the target host according to the package name of the software package and the parameters of the target host; the synchronization module 405 is configured to synchronize the software package to a server of the target host via a synchronization path; the sending module 406 is configured to send the configuration information to an operation and maintenance management platform of the target host, where the operation and maintenance management platform is configured to install a software package on a server of the target host to the target host according to the configuration information.
Optionally, in one embodiment, the synchronization module 405 performs at least two synchronization steps when synchronizing the software package to the server of the target host via the synchronization path, where the synchronization steps are used to synchronize the software package from the upstream device to an adjacent downstream device, the synchronization steps include: and calling a script execution function to execute a preset script on the upstream device, wherein when the preset script is executed, the software package on the upstream device is synchronized to the downstream device.
Optionally, in one embodiment, the synchronizing step further includes: acquiring process information and an execution result of a script execution function for executing a preset script; and writing the process information and the execution result into a synchronization log.
Optionally, in one embodiment, the synchronization module 405 includes a synchronization task establishment unit, a subtask starting unit, a status marking unit, a synchronization task interruption unit, an output unit, and a display unit, where the synchronization task establishment unit is configured to establish a synchronization task, where the synchronization task includes subtasks that are in one-to-one correspondence with the synchronization steps and are arranged in sequence, and each time a subtask is started, one synchronization step is executed; the subtask starting unit is used for starting a subtask; the state marking unit is used for marking the state of the subtask according to the execution result; the synchronous task interruption unit is used for interrupting the synchronous task when the state of the subtask is the execution failure; the subtask starting unit is also used for starting the next subtask when the state of the subtask is successful in execution; the output unit is used for outputting prompt information of subtask execution failure and providing a log checking control; the display unit is used for responding to the operation of the log checking control and displaying the synchronous log.
Optionally, in one embodiment, the synchronization module 405 is further configured to provide a breakpoint resume control for the interrupted synchronization task, and restart the execution of the failed subtask in response to an operation of the breakpoint resume control.
Optionally, in an embodiment, the synchronization module 405 is further configured to calculate a digital fingerprint of the software package to obtain an original fingerprint when the verification passes, calculate a digital fingerprint of the software package of the upstream device to obtain a verification fingerprint when the preset script is executed, and synchronize the software package of the upstream device to the downstream device when the verification fingerprint and the original fingerprint are consistent.
Optionally, in one embodiment, when the verification module 402 verifies the software package according to a preset verification rule, the specifically executed steps include: checking whether the package name of the software package accords with a preset package name specification; judging whether the environment information contained in the package name of the software package is the same as the environment information of the target host computer or not; judging whether the host type contained in the package name of the software package is the same as the host type of the target host; and/or judging whether the system version information contained in the package name of the software package meets the preset system version requirement.
Example five
The present embodiment also provides a computer device, such as a smart phone, a tablet computer, a notebook computer, a desktop computer, a rack-mounted server, a blade server, a tower server, or a rack-mounted server (including an independent server or a server cluster formed by a plurality of servers) that can execute a program. As shown in fig. 5, the computer device 01 of the present embodiment includes at least, but is not limited to: the memory 011, the processor 012, which can be communicatively connected to each other through a system bus, as shown in fig. 5. It is noted that fig. 5 only shows a computer device 01 having a component memory 011 and a processor 012, but it is understood that not all of the illustrated components are required to be implemented, and more or fewer components may alternatively be implemented.
In this embodiment, the memory 011 (i.e., readable storage medium) includes flash memory, hard disk, multimedia card, card memory (e.g., SD or DX memory, etc.), random Access Memory (RAM), static Random Access Memory (SRAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), programmable Read Only Memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, memory 011 may be an internal storage unit of computer device 01, such as a hard disk or memory of computer device 01. In other embodiments, the memory 011 may also be an external storage device of the computer device 01, such as a plug-in hard disk, smart Media Card (SMC), secure Digital (SD) Card, flash memory Card (Flash Card) or the like, which are provided on the computer device 01. Of course, the memory 011 may also include both the internal memory unit of the computer device 01 and its external memory device. In this embodiment, the memory 011 is generally used to store an operating system and various application software installed in the computer apparatus 01, for example, program codes of a device for installing a software package to a target host in the fourth embodiment. Further, the memory 011 can also be used for temporarily storing various types of data that have been output or are to be output.
The processor 012 may be a central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor, or other data processing chip in some embodiments. The processor 012 is typically used to control the overall operation of the computer device 01. In the present embodiment, the processor 012 is used to execute program codes stored in the memory 011 or process data such as a method of installing a software package to a target host or the like.
Example six
The present embodiment also provides a computer-readable storage medium such as a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, a server, an App application store, etc., on which a computer program is stored, which when executed by a processor, performs the corresponding functions. The computer readable storage medium of the present embodiment is used for storing an apparatus for installing a software package to a target host, and when executed by a processor, implements the method for installing a software package to a target host of the first embodiment.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.

Claims (10)

1. A method for installing a software package to a target host, wherein an execution subject of the method is a software package management platform, the software package management platform is located in an office network, and an intermediate device is arranged between the software package management platform and the target host, the intermediate device comprises a network security isolation and a cloud server, and the method comprises:
receiving parameters of a software package to be synchronized and a target host;
checking the software package according to a preset checking rule;
when the verification is passed, determining a synchronous path according to the parameters of the target host, wherein the synchronous path is a path which reaches a server of the target host by the software package management platform;
generating configuration information required by the target host for installing the software package according to the package name of the software package and the parameters of the target host;
synchronizing the software package to a server of the target host through the synchronization path, wherein the synchronization path comprises a plurality of nodes, the software package management platform is a starting node of the synchronization path, the server of the target host is a finishing node of the synchronization path, and the intermediate device between the software package management platform and the server of the target host is an intermediate node of the synchronization path;
The configuration information is sent to an operation and maintenance management platform of the target host, wherein the operation and maintenance management platform is used for installing a software package on a server of the target host to the target host according to the configuration information, the operation and maintenance management platform and the software package management platform are located in an office network, the operation and maintenance management platform issues a command for installing the software package to the server of the target host according to the configuration information, the server sends a command for acquiring the software package to the target host, and the target host acquires the software package to the server for installation.
2. The method of installing a software package on a target host according to claim 1, wherein the process of synchronizing the software package to a server of the target host via the synchronization path includes at least two synchronization steps for synchronizing the software package from an upstream device to an adjacent downstream device, the synchronization steps comprising:
and calling a script execution function to execute a preset script on the upstream device, wherein when the preset script is executed, the software package on the upstream device is synchronized to the downstream device.
3. The method of installing a software package on a target host of claim 2, wherein the synchronizing step further comprises:
acquiring process information and an execution result of the script execution function to execute a preset script; and
and writing the process information and the execution result into a synchronous log.
4. A method of installing a software package on a target host according to claim 3, wherein the step of synchronizing the software package to a server of the target host via the synchronization path comprises:
establishing a synchronization task, wherein the synchronization task comprises sub-tasks which are in one-to-one correspondence with the synchronization steps and are arranged in sequence, and executing one synchronization step when starting one sub-task;
starting one of the subtasks;
marking the state of the subtask according to the execution result;
when the state of the subtask is successful in execution, starting the next subtask;
when the state of the subtask is the execution failure, interrupting the synchronous task;
outputting prompt information of the subtask execution failure and providing a log checking control;
and responding to the operation of the log view control, and displaying the synchronous log.
5. The method of installing a software package on a target host of claim 4, further comprising:
providing a breakpoint continuous control for the interrupted synchronous task;
and restarting the subtask with the failed execution state in response to the operation of the breakpoint resume control.
6. The method of installing a software package on a target host of claim 2,
the method further comprises the steps of: when the verification passes, calculating the digital fingerprint of the software package to obtain an original fingerprint;
and when the preset script is executed, calculating the digital fingerprint of the software package of the upstream device to obtain a verification fingerprint, and synchronizing the software package of the upstream device to the downstream device when the verification fingerprint is consistent with the original fingerprint.
7. The method of installing a software package on a target host according to claim 1, wherein the step of verifying the software package according to a preset verification rule comprises:
checking whether the package name of the software package accords with a preset package name specification;
judging whether the environment information contained in the package name of the software package is the same as the environment information of the target host;
Judging whether the host type contained in the package name of the software package is the same as the host type of the target host; and/or
And judging whether the system version information contained in the package name of the software package meets the preset system version requirement.
8. An apparatus for installing a software package to a target host, the apparatus being disposed on a software package management platform, the software package management platform being located in an office network and being provided with an intermediate device between the software package management platform and the target host, the intermediate device including a network security isolator and a cloud server, the apparatus comprising:
the receiving module is used for receiving parameters of the software package to be synchronized and the target host;
the verification module is used for verifying the software package according to a preset verification rule;
the determining module is used for determining a synchronous path according to the parameters of the target host when the verification passes, wherein the synchronous path is a path which reaches a server of the target host by the software package management platform;
the processing module is used for generating configuration information required by the target host for installing the software package according to the package name of the software package and the parameters of the target host;
a synchronization module, configured to synchronize the software package to a server of the target host via the synchronization path, where the synchronization path includes a plurality of nodes, the software package management platform is a start node of the synchronization path, the server of the target host is an end node of the synchronization path, and the intermediate device between the software package management platform and the server of the target host is an intermediate node of the synchronization path;
The system comprises a sending module, an operation and maintenance management platform and a server, wherein the sending module is used for sending the configuration information to the operation and maintenance management platform of the target host, the operation and maintenance management platform is used for installing a software package on a server of the target host to the target host according to the configuration information, the operation and maintenance management platform and the software package management platform are located in an office network, the operation and maintenance management platform issues a command for installing the software package to the server of the target host according to the configuration information, the server sends a command for acquiring the software package to the target host, and the target host acquires the software package to the server for installation.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any one of claims 1 to 7 when the computer program is executed by the processor.
10. A computer-readable storage medium having stored thereon a computer program, characterized by: the computer program implementing the steps of the method of any of claims 1 to 7 when executed by a processor.
CN202010116137.9A 2020-02-25 2020-02-25 Method and device for installing software package to target host and computer equipment Active CN111338656B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202010116137.9A CN111338656B (en) 2020-02-25 2020-02-25 Method and device for installing software package to target host and computer equipment
PCT/CN2020/099444 WO2021169124A1 (en) 2020-02-25 2020-06-30 Method and apparatus for installing software package to target host, and computer device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010116137.9A CN111338656B (en) 2020-02-25 2020-02-25 Method and device for installing software package to target host and computer equipment

Publications (2)

Publication Number Publication Date
CN111338656A CN111338656A (en) 2020-06-26
CN111338656B true CN111338656B (en) 2023-12-15

Family

ID=71183643

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010116137.9A Active CN111338656B (en) 2020-02-25 2020-02-25 Method and device for installing software package to target host and computer equipment

Country Status (2)

Country Link
CN (1) CN111338656B (en)
WO (1) WO2021169124A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111338656B (en) * 2020-02-25 2023-12-15 平安科技(深圳)有限公司 Method and device for installing software package to target host and computer equipment
CN112286531B (en) * 2020-09-21 2023-07-04 麒麟软件有限公司 Method for realizing switching of RPM (revolutions per minute) package management tool into DPKG (digital per gram) package management tool in Redhat system release
CN113434156A (en) * 2021-06-29 2021-09-24 青岛海尔科技有限公司 Automatic database deployment method and device, storage medium and electronic device
CN113535270B (en) * 2021-07-23 2022-12-13 建信金融科技有限责任公司 Software starting method and device

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102136942A (en) * 2010-12-31 2011-07-27 华为技术有限公司 Method and device for downloading software
CN102195978A (en) * 2011-04-26 2011-09-21 深圳市共济科技有限公司 Software distribution deployment method and system
CN102437938A (en) * 2012-01-09 2012-05-02 北京邮电大学 Large-scale network monitoring oriented virtual deployment system and method
CN103577235A (en) * 2013-11-14 2014-02-12 中安消技术有限公司 Software deploying method, deploying server, computer to be deployed and system
CN104639614A (en) * 2015-01-05 2015-05-20 广州杰赛科技股份有限公司 Software distributing method, system and server
CN104699799A (en) * 2015-03-19 2015-06-10 神华集团有限责任公司 Data transmission method based on cross system
CN105049504A (en) * 2015-07-09 2015-11-11 国云科技股份有限公司 Big data transit transmission synchronization and storage method
CN108234607A (en) * 2017-12-18 2018-06-29 上海中畅数据技术有限公司 Document distribution method and system under a kind of architecture mode based on micro services
CN108509203A (en) * 2018-03-13 2018-09-07 腾讯科技(深圳)有限公司 Across the cloud dispositions method of software, computer equipment and storage medium
CN108776604A (en) * 2018-05-23 2018-11-09 网易(杭州)网络有限公司 The execution method and system of goal task
CN109995653A (en) * 2019-04-15 2019-07-09 深圳市迅雷网络技术有限公司 Data transmission method, device, system and the readable storage medium storing program for executing of cross-node

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6510466B1 (en) * 1998-12-14 2003-01-21 International Business Machines Corporation Methods, systems and computer program products for centralized management of application programs on a network
NO314867B1 (en) * 2001-03-13 2003-06-02 Ericsson Telefon Ab L M Procedure for optimizing software distribution in large communications networks
US20090007096A1 (en) * 2007-06-28 2009-01-01 Microsoft Corporation Secure Software Deployments
CN104360878B (en) * 2014-10-29 2019-05-17 中国建设银行股份有限公司 A kind of method and device of application software deployment
CN111338656B (en) * 2020-02-25 2023-12-15 平安科技(深圳)有限公司 Method and device for installing software package to target host and computer equipment

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102136942A (en) * 2010-12-31 2011-07-27 华为技术有限公司 Method and device for downloading software
CN102195978A (en) * 2011-04-26 2011-09-21 深圳市共济科技有限公司 Software distribution deployment method and system
CN102437938A (en) * 2012-01-09 2012-05-02 北京邮电大学 Large-scale network monitoring oriented virtual deployment system and method
CN103577235A (en) * 2013-11-14 2014-02-12 中安消技术有限公司 Software deploying method, deploying server, computer to be deployed and system
CN104639614A (en) * 2015-01-05 2015-05-20 广州杰赛科技股份有限公司 Software distributing method, system and server
CN104699799A (en) * 2015-03-19 2015-06-10 神华集团有限责任公司 Data transmission method based on cross system
CN105049504A (en) * 2015-07-09 2015-11-11 国云科技股份有限公司 Big data transit transmission synchronization and storage method
CN108234607A (en) * 2017-12-18 2018-06-29 上海中畅数据技术有限公司 Document distribution method and system under a kind of architecture mode based on micro services
CN108509203A (en) * 2018-03-13 2018-09-07 腾讯科技(深圳)有限公司 Across the cloud dispositions method of software, computer equipment and storage medium
CN108776604A (en) * 2018-05-23 2018-11-09 网易(杭州)网络有限公司 The execution method and system of goal task
CN109995653A (en) * 2019-04-15 2019-07-09 深圳市迅雷网络技术有限公司 Data transmission method, device, system and the readable storage medium storing program for executing of cross-node

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
A generic approach for deploying and upgrading mutable software components;Sander van der Burg;《2012 4th International Workshop on Hot Topics in Software Upgrades》;第26-30页 *
基于云平台的软件分发设计与实现;邓书芬;《移动通信》(第2017年10期);第70-74页 *
巩徽等.8.2.3消息认证和消息完整性.《传媒信息安全》.中国传媒大学出版社,2015,121. *

Also Published As

Publication number Publication date
CN111338656A (en) 2020-06-26
WO2021169124A1 (en) 2021-09-02

Similar Documents

Publication Publication Date Title
CN111338656B (en) Method and device for installing software package to target host and computer equipment
TW201407341A (en) Method, device and system of repairing software run-time error
CN111694592A (en) Management method and system for project version release
CN111162953B (en) Data processing method, system upgrading method and server
CN110224854A (en) Dispositions method, device and the storage medium of block chain node
CN113448862B (en) Software version testing method and device and computer equipment
CN110727575B (en) Information processing method, system, device and storage medium
CN113434254B (en) Client deployment method, client deployment apparatus, computer device, and storage medium
CN111367531A (en) Code processing method and device
CN109246454B (en) Set top box management method, device, terminal and storage medium based on cloud platform
KR102194974B1 (en) System for monitoring and controling electric power system for process verification
CN113419949B (en) Abnormality detection method, device, equipment and storage medium for data processing
CN111338644A (en) Task script deployment method and system
EP4130982A1 (en) Network-based solution module deployment platform
CN115190293A (en) Dial testing method and device, electronic equipment and computer storage medium
CN109828752B (en) Project code automatic generation method, device, computer equipment and storage medium
CN114637672A (en) Automatic data testing method and device, computer equipment and storage medium
CN113805925A (en) Online upgrading method, device, equipment and medium for distributed cluster management software
CN114385258A (en) Automatic testing method and device, electronic equipment and storage medium
CN115372803B (en) Motherboard test system, method, device and storage medium
CN112165512B (en) File release method and device, terminal equipment and storage medium
CN115756496B (en) Mirror image compiling method and device, computer readable storage medium and electronic equipment
CN117112037A (en) Cloud platform starting method and device, electronic equipment and storage medium
CN113449035A (en) Data synchronization method and device, computer equipment and readable storage medium
CN116400933A (en) Operating system installation method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40032313

Country of ref document: HK

SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant