CN115543347A - Application deployment method and device, electronic equipment and computer readable medium - Google Patents

Application deployment method and device, electronic equipment and computer readable medium Download PDF

Info

Publication number
CN115543347A
CN115543347A CN202211152624.6A CN202211152624A CN115543347A CN 115543347 A CN115543347 A CN 115543347A CN 202211152624 A CN202211152624 A CN 202211152624A CN 115543347 A CN115543347 A CN 115543347A
Authority
CN
China
Prior art keywords
application
group
version number
application package
target
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
CN202211152624.6A
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.)
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology 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 Beijing Jingdong Century Trading Co Ltd, Beijing Wodong Tianjun Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN202211152624.6A priority Critical patent/CN115543347A/en
Publication of CN115543347A publication Critical patent/CN115543347A/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

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

Abstract

The embodiment of the disclosure discloses an application deployment method, an application deployment device, electronic equipment and a computer readable medium. One embodiment of the method comprises: hashing each target application packet in the target application packet group to generate an application packet version number to obtain an application packet version number group; selecting at least one target application package from the target application package group as an application package group to be deployed according to the application package version number group and the deployment application version number group; and deploying the application package group to be deployed to the storage positions pointed by the storage paths according to the storage paths corresponding to the application package group to be deployed, wherein the servers pointed by the storage paths are the same. The implementation mode is related to the client technology, improves the utilization rate of the server and reduces the waste of server resources.

Description

Application deployment method, device, electronic equipment and computer readable medium
Technical Field
Embodiments of the present disclosure relate to the field of computer technologies, and in particular, to an application deployment method, an application deployment apparatus, an electronic device, and a computer-readable medium.
Background
At present, for the deployment of applications (application programs), the following methods are generally adopted: an application is deployed on a server.
However, the above deployment approach generally has the following technical problems: one server deploys one application, so that the utilization rate of the server is reduced, and the waste of server resources is caused.
Disclosure of Invention
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
Some embodiments of the present disclosure propose application deployment methods, apparatuses, electronic devices and computer readable media to address one or more of the technical problems noted in the background section above.
In a first aspect, some embodiments of the present disclosure provide an application deployment method, including: hashing each target application packet in the target application packet group to generate an application packet version number to obtain an application packet version number group; selecting at least one target application package from the target application package group as an application package group to be deployed according to the application package version number group and the deployment application version number group; and deploying the application package group to be deployed to the storage positions pointed by the storage paths according to the storage paths corresponding to the application package group to be deployed, wherein the servers pointed by the storage paths are the same.
Optionally, before performing hash processing on each target application package in the target application package group to generate an application package version number and obtain an application package version number group, the method further includes: according to each target application code address in the target application code address group, acquiring a target application code corresponding to the target application code address to obtain a target application code group; and packaging each target application code in the target application code group to generate a target application package to obtain a target application package group.
Optionally, the selecting, according to the application package version number group and the deployment application version number group, at least one target application package from the target application package group as an application package group to be deployed includes: for each application package version number in the application package version number group, executing the following processing steps: determining whether an application identifier which is the same as the application identifier corresponding to the application package version number exists in each application identifier corresponding to the deployment application version number group; in response to the application identifier which is the same as the application identifier corresponding to the application package version number, determining the deployment application version number corresponding to the application package version number in the deployment application version number group as a target application version number; in response to determining that the version number of the application package is different from the target application version number, determining the version number of the application package as the version number of the application package to be deployed; and for each determined version number of the application package to be deployed, selecting the target application package corresponding to the version number of the application package to be deployed from the target application package group as the application package to be deployed.
Optionally, the processing step further includes: and determining the version number of the application package as the version number of the application package to be deployed in response to the fact that the application identifier which is the same as the application identifier corresponding to the version number of the application package does not exist.
Optionally, before the selecting at least one target application package from the target application package group as the application package group to be deployed according to the application package version number group and the deployment application version number group, the method further includes: and acquiring locally stored application version numbers of the applications deployed in the target server as a deployed application version number group.
Optionally, before performing hash processing on each target application package in the target application package group to generate an application package version number and obtain an application package version number group, the method further includes: and configuring the storage path of each target application package in the target application package group in the target server.
Optionally, the method further includes: and backing up the application package group to be deployed and the version number of each application package corresponding to the application package group to be deployed into a target database.
Optionally, the method further includes: in response to receiving at least one piece of rollback application information, acquiring an application packet corresponding to each piece of rollback application information in the at least one piece of rollback application information as a rollback application packet to obtain a rollback application packet group, wherein the rollback application information in the at least one piece of rollback application information comprises an application identifier and an application packet version number corresponding to the application identifier; and deploying the rollback application packet group according to each storage path corresponding to the rollback application packet group.
Optionally, before performing hash processing on each target application package in the target application package group to generate an application package version number and obtain an application package version number group, the method further includes: an access domain name for each target application package in the set of target application packages is configured.
In a second aspect, some embodiments of the present disclosure provide an application deployment apparatus, the apparatus comprising: the hash unit is configured to hash each target application packet in the target application packet group to generate an application packet version number, so as to obtain an application packet version number group; the selection unit is configured to select at least one target application package from the target application package groups as an application package group to be deployed according to the application package version number group and the deployment application version number group; and the deployment unit is configured to deploy the application package group to be deployed to the storage positions pointed by the storage paths according to the storage paths corresponding to the application package group to be deployed, wherein the servers pointed by the storage paths are the same.
Optionally, before the hashing unit, the apparatus further comprises: the first acquisition unit is configured to acquire a target application code corresponding to a target application code address according to each target application code address in a target application code address group to obtain a target application code group; and the packaging unit is configured to perform packaging processing on each target application code in the target application code group to generate a target application package, so as to obtain a target application package group.
Optionally, the selection unit is further configured to: for each application package version number in the application package version number group, executing the following processing steps: determining whether an application identifier which is the same as the application identifier corresponding to the application package version number exists in each application identifier corresponding to the deployment application version number group; in response to the application identifier which is the same as the application identifier corresponding to the application package version number, determining the deployment application version number corresponding to the application package version number in the deployment application version number group as a target application version number; in response to determining that the version number of the application package is different from the target application version number, determining the version number of the application package as the version number of the application package to be deployed; and for each determined version number of the application package to be deployed, selecting the target application package corresponding to the version number of the application package to be deployed from the target application package group as the application package to be deployed.
Optionally, the selection unit is further configured to: and determining the version number of the application package as the version number of the application package to be deployed in response to determining that the application identifier which is the same as the application identifier corresponding to the version number of the application package does not exist.
Optionally, before the selecting unit, the apparatus further comprises: and the second acquisition unit is configured to acquire the locally stored application version numbers of the applications deployed in the target server as a deployed application version number group.
Optionally, before the hashing unit, the apparatus further comprises: and the first configuration unit is configured to configure the storage path of each target application package in the target application package group in the target server.
Optionally, the apparatus further comprises: and the backup unit is configured to backup the application package group to be deployed and the version number of each application package corresponding to the application package group to be deployed into a target database.
Optionally, the apparatus further comprises: a third obtaining unit, configured to, in response to receiving at least one piece of rollback application information, obtain, as a rollback application package, an application package corresponding to each piece of rollback application information in the at least one piece of rollback application information, and obtain a rollback application package group, where rollback application information in the at least one piece of rollback application information includes an application identifier and an application package version number corresponding to the application identifier; and the second deployment unit is configured to deploy the rollback application package group according to each storage path corresponding to the rollback application package group.
Optionally, before the hashing unit, the apparatus further comprises: a second configuration unit configured to configure an access domain name of each target application package in the target application package group.
In a third aspect, some embodiments of the present disclosure provide an electronic device, comprising: one or more processors; a storage device, on which one or more programs are stored, which when executed by one or more processors cause the one or more processors to implement the method described in any implementation of the first aspect.
In a fourth aspect, some embodiments of the present disclosure provide a computer readable medium on which a computer program is stored, wherein the program, when executed by a processor, implements the method described in any of the implementations of the first aspect.
The above embodiments of the present disclosure have the following advantages: by the application deployment method of some embodiments of the present disclosure, the utilization rate of the server is improved, and the waste of server resources is reduced. Specifically, the reasons for the waste of server resources are: one server deploys one application, so that the utilization rate of the server is reduced, and the waste of server resources is caused. Based on this, in the application deployment method according to some embodiments of the present disclosure, first, each target application package in the target application package group is hashed to generate an application package version number, so as to obtain an application package version number group. Thus, the version number of each application can be determined, and the subsequent deployment application provides data support. And then, selecting at least one target application package from the target application package groups as an application package group to be deployed according to the application package version number group and the deployment application version number group. Therefore, the application needing to be deployed can be determined according to the version number of the application package, so that repeated deployment of the application is avoided. And finally, deploying the application package group to be deployed to the storage position pointed by each storage path according to each storage path corresponding to the application package group to be deployed. Wherein, the servers pointed by the storage paths are the same. Thus, a plurality of application packages to be deployed can be deployed to the same server. Therefore, the utilization rate of the server is improved, and the waste of server resources is reduced.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and elements are not necessarily drawn to scale.
FIG. 1 is a schematic illustration of one application scenario of an application deployment method of some embodiments of the present disclosure;
FIG. 2 is a flow diagram of some embodiments of an application deployment method according to the present disclosure;
FIG. 3 is a flow diagram of further embodiments of an application deployment method according to the present disclosure;
FIG. 4 is a flow diagram of still further embodiments of an application deployment method according to the present disclosure;
FIG. 5 is a schematic structural diagram of some embodiments of an application deployment apparatus according to the present disclosure;
FIG. 6 is a schematic block diagram of an electronic device suitable for use in implementing some embodiments of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the disclosure are shown in the drawings, it is to be understood that the disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings. The embodiments and features of the embodiments in the present disclosure may be combined with each other without conflict.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
Fig. 1 is a schematic diagram of one application scenario of an application deployment method according to some embodiments of the present disclosure.
In the application scenario of fig. 1, first, the computing device 101 may hash each target application package in the target application package group 102 to generate an application package version number, resulting in an application package version number group 103. Then, the computing device 101 may select at least one target application package from the target application package group 102 as an application package group to be deployed 105 according to the application package version number group 103 and the deployment application version number group 104. Finally, the computing device 101 may deploy the application package group to be deployed 105 to the storage location pointed by each storage path according to each storage path corresponding to the application package group to be deployed 105. Wherein, the servers pointed by the storage paths are the same.
The computing device 101 may be hardware or software. When the computing device is hardware, it may be implemented as a distributed cluster composed of multiple servers or terminal devices, or may be implemented as a single server or a single terminal device. When the computing device is embodied as software, it may be installed in the hardware devices enumerated above. It may be implemented, for example, as multiple software or software modules to provide distributed services, or as a single software or software module. And is not particularly limited herein.
It should be understood that the number of computing devices in FIG. 1 is merely illustrative. There may be any number of computing devices, as the implementation requires.
With continued reference to fig. 2, a flow 200 of some embodiments of an application deployment method in accordance with the present disclosure is shown. The application deployment method comprises the following steps:
step 201, performing hash processing on each target application package in the target application package group to generate an application package version number, so as to obtain an application package version number group.
In some embodiments, an executing agent of the application deployment method (e.g., computing device 101 shown in fig. 1) may hash each target application package in the set of target application packages to generate an application package version number, resulting in a set of application package version numbers. Here, the execution subject of the application deployment method may refer to a computing device for deploying the application. The target application package group may refer to individual application packages to be deployed to the same server. Here, the application package may refer to a program installation package. In practice, the execution agent may hash each target application package in the target application package group by using an MD5 (Message Digest) information Digest Algorithm to generate an application package version number, so as to obtain an application package version number group.
Optionally, before step 201, the method further includes: and configuring the storage path of each target application package in the target application package group in the target server.
In some embodiments, the execution agent may configure a storage path of each target application package in the target application package group in the target server. Here, the storage path of each target application package configured is different. For example, the storage path corresponding to the A-target application package may be "/root/product". The storage path corresponding to the B target application package may be "/root/order". Here, the arrangement is not limited. For example, the configuration may be a manual setting.
Optionally, before step 201, the method further includes: an access domain name for each target application package in the set of target application packages is configured.
In some embodiments, the execution principal may configure the access domain name for each target application package in the group of target application packages. Here, the access domain name corresponding to each target application package is different. Here, the access domain name refers to a domain name. In practice, one access domain name may be configured for one target application package, and multiple access domain names may also be configured for one target application package, which is not limited to this. In an actual application scenario, a user can access an application pointed by an access domain name through the access domain name.
Step 202, selecting at least one target application package from the target application package groups as an application package group to be deployed according to the application package version number group and the deployment application version number group.
In some embodiments, the execution subject may select at least one target application package from the target application package group as an application package group to be deployed according to the application package version number group and the deployment application version number group. Here, the deployment application version number in the deployment application version number group may refer to a version number of an application that has been deployed in the target server. The target server may refer to a server for deploying the target application package group.
In practice, according to the application package version number group and the deployment application version number group, the execution main body may select at least one target application package from the target application package group as an application package group to be deployed by the following steps:
the first step is to select the application package version number meeting the deployment condition from the application package version number group as the version number of the application package to be deployed, and obtain the application package version number group to be deployed. Wherein, the deployment condition may be: the version number of the application package is different from any deployment application version number in the deployment application version number group.
And secondly, selecting a target application package corresponding to the version number of the application package to be deployed from the target application package group as the application package to be deployed according to the version number of each application package to be deployed in the application package to be deployed version number group. Thus, the application package group to be deployed is obtained.
Optionally, before step 202, the method further includes: and acquiring locally stored application version numbers of the applications deployed in the target server as a deployed application version number group.
In some embodiments, the execution agent may obtain, from the local database, locally stored application version numbers of the applications deployed in the target server as a deployment application version number group by using a wired connection or a wireless connection. Here, the target server may refer to a server for deploying the target application package group. Here, each application corresponding to the deployment application version number group is already deployed in the target server.
Step 203, deploying the application package group to be deployed to the storage position pointed by each storage path according to each storage path corresponding to the application package group to be deployed.
In some embodiments, the execution main body may deploy the application package group to be deployed to a storage location pointed by each storage path according to each storage path corresponding to the application package group to be deployed. Wherein, the servers pointed by the storage paths are the same. The storage locations in the servers pointed to by the storage paths are different. Here, the application packages to be deployed in the application package group to be deployed correspond to the storage paths in the storage paths.
In practice, for each to-be-deployed application package in the to-be-deployed application package group, the execution main body may store the to-be-deployed application package to a storage location pointed by the target storage path. And the target storage path is a storage path corresponding to the application package to be deployed in each storage path.
Optionally, the application package group to be deployed and the version numbers of the application packages corresponding to the application package group to be deployed are backed up to a target database.
In some embodiments, the execution main body may backup the to-be-deployed application package group and version numbers of the application packages corresponding to the to-be-deployed application package group to a target database. Here, the target database may refer to a database for backing up and storing each deployed application package and an application package version number corresponding to the application package. For example, the target database may refer to a local database.
The above embodiments of the present disclosure have the following advantages: by the application deployment method of some embodiments of the present disclosure, the utilization rate of the server is improved, and the waste of server resources is reduced. Specifically, the reasons for the waste of server resources are: one server deploys one application, so that the utilization rate of the server is reduced, and the waste of server resources is caused. Based on this, in the application deployment method according to some embodiments of the present disclosure, first, each target application package in the target application package group is hashed to generate an application package version number, so as to obtain an application package version number group. Thus, the version number of each application can be determined, and the subsequent deployment application provides data support. And then, selecting at least one target application package from the target application package groups as an application package group to be deployed according to the application package version number group and the deployment application version number group. Therefore, the application needing to be deployed can be determined according to the version number of the application package, so that repeated deployment of the application is avoided. And finally, deploying the application package group to be deployed to the storage position pointed by each storage path according to each storage path corresponding to the application package group to be deployed. Wherein, the servers pointed by the storage paths are the same. Thus, a plurality of application packages to be deployed can be deployed to the same server. Therefore, the utilization rate of the server is improved, and the waste of server resources is reduced. And because a plurality of applications can be deployed at one time, the efficiency of deploying the plurality of applications is improved.
With further reference to FIG. 3, further embodiments of an application deployment method according to the present disclosure are illustrated. The application deployment method comprises the following steps:
step 301, according to each target application code address in the target application code address group, obtaining a target application code corresponding to the target application code address, and obtaining a target application code group.
In some embodiments, an execution subject (e.g., the computing device 101 shown in fig. 1) of the application deployment method may obtain, according to each target application code address in the target application code address group, a target application code corresponding to the target application code address, so as to obtain the target application code group. Here, the target application code address in the target application code address group may refer to a pre-configured address for acquiring the target application code. In practice, the execution subject may access each target application code address in the target application code address group to obtain the target application code pointed to by the target application code address. Thus, a target application code set is obtained.
Step 302, performing a packing process on each target application code in the target application code group to generate a target application package, so as to obtain a target application package group.
In some embodiments, the execution main body may perform a packing process on each target application code in the target application code group to generate a target application package, so as to obtain a target application package group. In practice, the execution body may perform production environment packaging (build) processing on each target application code in the target application code group to generate a target application package, so as to obtain a target application package group.
Step 303, performing hash processing on each target application packet in the target application packet group to generate an application packet version number, so as to obtain an application packet version number group.
In some embodiments, the specific implementation and technical effects of step 303 may refer to step 201 in those embodiments corresponding to fig. 2, and are not described herein again.
And 304, selecting at least one target application package from the target application package groups as an application package group to be deployed according to the application package version number group and the deployment application version number group.
In some embodiments, according to the application package version number group and the deployment application version number group, the execution subject may select at least one target application package from the target application package group as an application package group to be deployed by:
the first step, for each application package version number in the application package version number group, executing the following processing steps:
a first processing step, determining whether an application identifier identical to the application identifier corresponding to the application package version number exists in each application identifier corresponding to the deployment application version number group. Here, the deployment application version number in the deployment application version number group corresponds to an application identifier in each of the application identifiers. The application identification may refer to an identification symbol of the application.
And a second processing step, in response to determining that the application identifier same as the application identifier corresponding to the application package version number exists, determining the deployment application version number corresponding to the application package version number in the deployment application version number group as a target application version number. That is, in response to determining that the application identifier that is the same as the application identifier corresponding to the application package version number exists in each application identifier corresponding to the deployment application version number group, determining the deployment application version number corresponding to the application package version number in the deployment application version number group as a target application version number.
And a third processing step, in response to determining that the version number of the application package is different from the target application version number, determining the version number of the application package as the version number of the application package to be deployed.
And secondly, selecting a target application package corresponding to the version number of the application package to be deployed from the target application package group as the application package to be deployed according to the determined version number of each application package to be deployed. Thus, the application package group to be deployed is obtained.
Optionally, the processing step further includes: and determining the version number of the application package as the version number of the application package to be deployed in response to determining that the application identifier which is the same as the application identifier corresponding to the version number of the application package does not exist.
In some embodiments, the execution main body may determine, in response to determining that there is no application identifier that is the same as the application identifier corresponding to the application package version number, the application package version number as an application package version number to be deployed. That is, the version number of the application package may be determined as the version number of the application package to be deployed in response to determining that the application identifier corresponding to the application package version number does not have the application identifier that is the same as the application identifier corresponding to the application package version number.
And 305, deploying the application package group to be deployed to the storage position pointed by each storage path according to each storage path corresponding to the application package group to be deployed.
In some embodiments, the specific implementation of step 305 and the technical effect thereof may refer to step 203 in those embodiments corresponding to fig. 2, which are not described herein again.
As can be seen from fig. 3, compared with the description of some embodiments corresponding to fig. 2, the flow 300 in some embodiments corresponding to fig. 3 embodies a step of detecting a deployed application in a server (target server) where the application is to be deployed. Therefore, the solutions described in the embodiments can detect the application identifier and the application version number of the deployed application, and prevent the repeated deployment of the application in the server.
With further reference to FIG. 4, still further embodiments of application deployment methods in accordance with the present disclosure are illustrated. The application deployment method comprises the following steps:
step 401, performing hash processing on each target application packet in the target application packet group to generate an application packet version number, so as to obtain an application packet version number group.
And 402, selecting at least one target application package from the target application package groups as an application package group to be deployed according to the application package version number group and the deployment application version number group.
Step 403, deploying the application package group to be deployed to the storage location pointed by each storage path according to each storage path corresponding to the application package group to be deployed.
In some embodiments, the specific implementation of steps 401 to 403 and the technical effects brought by the implementation may refer to steps 201 to 203 in those embodiments corresponding to fig. 2, which are not described herein again.
Step 404, in response to receiving at least one rollback application information, obtaining an application package corresponding to each rollback application information in the at least one rollback application information as a rollback application package, and obtaining a rollback application package group.
In some embodiments, an execution subject of the application deployment method (e.g., the computing device 101 shown in fig. 1) may obtain, in response to receiving at least one piece of rollback application information, an application package corresponding to each piece of rollback application information in the at least one piece of rollback application information as a rollback application package, to obtain a rollback application package group. The rollback application information in the at least one rollback application information includes an application identifier and an application package version number corresponding to the application identifier. Here, the rollback application information of the at least one rollback application information may refer to information selected by the user to rollback a certain application. In practice, the execution main body may obtain, in response to receiving the at least one rollback application information, an application packet corresponding to each rollback application information in the at least one rollback application information from the terminal device in a wired connection or wireless connection manner, as the rollback application packet (where the rollback application information includes an application identifier and an application packet version number that are the same as an application identifier and an application packet version number corresponding to the rollback application packet), and obtain the rollback application packet group. Here, application packages of different versions (application package version numbers) of the respective applications are stored in the terminal device.
And 405, deploying the rollback application package group according to each storage path corresponding to the rollback application package group.
In some embodiments, the execution body may deploy the rollback application package group according to each storage path corresponding to the rollback application package group. Here, the rollback application package in the rollback application package group corresponds to a storage path in the storage paths. The storage paths corresponding to the rollback application packet group are different. Here, the storage location corresponding to the storage path stores a current application package corresponding to a certain rollback application package. The servers pointed by the storage paths are the same.
In practice, for each rollback application package in the above rollback application package group, the following rollback steps are performed:
firstly, determining a target storage path according to the storage path corresponding to the rollback application package.
And a second step of rolling back (updating) the application package pointed by the target storage path into the rolled-back application package.
Optionally, the rollback application package group and each application package version number corresponding to the rollback application package group are backed up.
In some embodiments, the execution main body may back up the rollback application package group and the version number of each application package corresponding to the rollback application package group to the target database.
As can be seen from fig. 4, in contrast to the description of some embodiments corresponding to fig. 2, the flow 400 in some embodiments corresponding to fig. 4 embodies a rollback step for each application in the same server. The efficiency of roll-back adjustment to a plurality of applications is promoted.
With further reference to fig. 5, as an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of an application deployment apparatus, which correspond to those of the method embodiments shown in fig. 2, and which may be applied in various electronic devices in particular.
As shown in fig. 5, the application deployment device 500 of some embodiments comprises: a hashing unit 501, a selection unit 502 and a deployment unit 503. The hash unit 501 is configured to hash each target application packet in the target application packet group to generate an application packet version number, so as to obtain an application packet version number group; a selecting unit 502, configured to select at least one target application package from the target application package groups as an application package group to be deployed according to the application package version number group and the deployment application version number group; the deployment unit 503 is configured to deploy the application package group to be deployed to the storage location pointed by each storage path according to each storage path corresponding to the application package group to be deployed, where servers pointed by each storage path are the same.
Optionally, before the hashing unit 501, the apparatus 500 further comprises: the first acquisition unit is configured to acquire a target application code corresponding to a target application code address according to each target application code address in a target application code address group to obtain a target application code group; and the packaging unit is configured to perform packaging processing on each target application code in the target application code group to generate a target application package, so as to obtain a target application package group.
Optionally, the selecting unit 502 is further configured to: for each application package version number in the application package version number group, executing the following processing steps: determining whether an application identifier which is the same as the application identifier corresponding to the application package version number exists in each application identifier corresponding to the deployment application version number group; in response to determining that the application identifier which is the same as the application identifier corresponding to the application package version number exists, determining the deployment application version number corresponding to the application package version number in the deployment application version number group as a target application version number; in response to the fact that the version number of the application package is different from the target application version number, determining the version number of the application package as the version number of the application package to be deployed; and for each determined version number of the application package to be deployed, selecting the target application package corresponding to the version number of the application package to be deployed from the target application package group as the application package to be deployed.
Optionally, the selecting unit 502 is further configured to: and determining the version number of the application package as the version number of the application package to be deployed in response to the fact that the application identifier which is the same as the application identifier corresponding to the version number of the application package does not exist.
Optionally, before the selecting unit 502, the apparatus 500 further includes: and the second acquisition unit is configured to acquire the locally stored application version numbers of the applications deployed in the target server as a deployed application version number group.
Optionally, before the hashing unit 501, the apparatus 500 further comprises: and the first configuration unit is configured to configure the storage path of each target application package in the target application package group in the target server.
Optionally, the apparatus 500 further comprises: and the backup unit is configured to backup the application package group to be deployed and the version number of each application package corresponding to the application package group to be deployed into a target database.
Optionally, the apparatus 500 further comprises: a third obtaining unit, configured to, in response to receiving at least one piece of rollback application information, obtain, as a rollback application package, an application package corresponding to each piece of rollback application information in the at least one piece of rollback application information, and obtain a rollback application package group, where rollback application information in the at least one piece of rollback application information includes an application identifier and an application package version number corresponding to the application identifier; and the second deployment unit is configured to deploy the rollback application package group according to each storage path corresponding to the rollback application package group.
Optionally, before the hashing unit 501, the apparatus 500 further comprises: a second configuration unit configured to configure an access domain name of each target application package in the target application package group.
It will be understood that the elements described in the apparatus 500 correspond to various steps in the method described with reference to fig. 2. Thus, the operations, features and resulting advantages described above with respect to the method are also applicable to the apparatus 500 and the units included therein, and are not described herein again.
Referring now to FIG. 6, a block diagram of an electronic device (e.g., computing device 101 of FIG. 1) 600 suitable for use in implementing some embodiments of the present disclosure is shown. The electronic device in some embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle-mounted terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 6, electronic device 600 may include a processing device (e.g., central processing unit, graphics processor, etc.) 601 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage device 608 into a Random Access Memory (RAM) 603. In the RAM603, various programs and data necessary for the operation of the electronic apparatus 600 are also stored. The processing device 601, the ROM602, and the RAM603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
Generally, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. While fig. 6 illustrates an electronic device 600 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided. Each block shown in fig. 6 may represent one device or may represent multiple devices as desired.
In particular, according to some embodiments of the present disclosure, the processes described above with reference to the flow diagrams may be implemented as computer software programs. For example, some embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In some such embodiments, the computer program may be downloaded and installed from a network through the communication device 609, or installed from the storage device 608, or installed from the ROM 602. The computer program, when executed by the processing device 601, performs the above-described functions defined in the methods of some embodiments of the present disclosure.
It should be noted that the computer readable medium described in some embodiments of the present disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In some embodiments of the disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In some embodiments of the present disclosure, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may interconnect with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: hashing each target application packet in the target application packet group to generate an application packet version number to obtain an application packet version number group; selecting at least one target application package from the target application package group as an application package group to be deployed according to the application package version number group and the deployment application version number group; and deploying the application package group to be deployed to the storage positions pointed by the storage paths according to the storage paths corresponding to the application package group to be deployed, wherein the servers pointed by the storage paths are the same.
Computer program code for carrying out operations for embodiments of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in some embodiments of the present disclosure may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor includes a hashing unit, a selection unit, and a deployment unit. Where the names of these elements do not in some cases constitute a limitation on the elements themselves, for example, a hashing unit may also be described as "an element that hashes each target app package in a target app package group to generate an app package version number, resulting in an app package version number group.
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems on a chip (SOCs), complex Programmable Logic Devices (CPLDs), and the like.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention in the embodiments of the present disclosure is not limited to the specific combination of the above-mentioned features, but also encompasses other embodiments in which any combination of the above-mentioned features or their equivalents is made without departing from the inventive concept as defined above. For example, the above features and (but not limited to) technical features with similar functions disclosed in the embodiments of the present disclosure are mutually replaced to form the technical solution.

Claims (12)

1. An application deployment method comprising:
hashing each target application packet in the target application packet group to generate an application packet version number to obtain an application packet version number group;
selecting at least one target application package from the target application package group as an application package group to be deployed according to the application package version number group and the deployment application version number group;
and deploying the application package group to be deployed to the storage position pointed by each storage path according to each storage path corresponding to the application package group to be deployed, wherein the servers pointed by each storage path are the same.
2. The method of claim 1, wherein prior to said hashing each target application package in the set of target application packages to generate an application package version number, the method further comprises:
according to each target application code address in the target application code address group, acquiring a target application code corresponding to the target application code address to obtain a target application code group;
and packaging each target application code in the target application code group to generate a target application package to obtain a target application package group.
3. The method according to claim 1, wherein the selecting at least one target application package from the target application package group as an application package group to be deployed according to the application package version number group and a deployment application version number group comprises:
for each application package version number in the application package version number group, executing the following processing steps:
determining whether an application identifier which is the same as the application identifier corresponding to the application package version number exists in each application identifier corresponding to the deployment application version number group;
in response to the application identifier which is the same as the application identifier corresponding to the application package version number, determining the deployment application version number corresponding to the application package version number in the deployment application version number group as a target application version number;
in response to determining that the application package version number is different from the target application version number, determining the application package version number as an application package version number to be deployed;
and for each determined version number of the application package to be deployed, selecting the target application package corresponding to the version number of the application package to be deployed from the target application package group as the application package to be deployed.
4. The method of claim 3, wherein the processing step further comprises:
and determining the application package version number as the version number of the application package to be deployed in response to determining that the application identifier which is the same as the application identifier corresponding to the application package version number does not exist.
5. The method according to claim 1, wherein before the selecting at least one target application package from the target application package group as the application package group to be deployed according to the application package version number group and the deployment application version number group, the method further comprises:
and acquiring locally stored application version numbers of the applications deployed in the target server as a deployed application version number group.
6. The method of claim 1, wherein prior to said hashing each target application package in the set of target application packages to generate an application package version number, the method further comprises:
and configuring a storage path of each target application package in the target application package group in the target server.
7. The method of claim 1, wherein the method further comprises:
and backing up the application package group to be deployed and the version number of each application package corresponding to the application package group to be deployed to a target database.
8. The method according to one of claims 1 to 7, wherein the method further comprises:
in response to receiving at least one piece of rollback application information, acquiring an application package corresponding to each piece of rollback application information in the at least one piece of rollback application information as a rollback application package to obtain a rollback application package group, wherein the rollback application information in the at least one piece of rollback application information comprises an application identifier and an application package version number corresponding to the application identifier;
and deploying the rollback application packet group according to each storage path corresponding to the rollback application packet group.
9. The method of claim 1, wherein prior to said hashing each target app package in the set of target app packages to generate an app package version number, the method further comprises:
an access domain name for each target application package in the set of target application packages is configured.
10. An application deployment apparatus comprising:
the hash unit is configured to hash each target application packet in the target application packet group to generate an application packet version number, so as to obtain an application packet version number group;
the selecting unit is configured to select at least one target application package from the target application package group as an application package group to be deployed according to the application package version number group and the deployment application version number group;
the deployment unit is configured to deploy the application package group to be deployed to the storage positions pointed by the storage paths according to the storage paths corresponding to the application package group to be deployed, wherein the servers pointed by the storage paths are the same.
11. An electronic device, comprising:
one or more processors;
a storage device having one or more programs stored thereon;
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-9.
12. A computer-readable medium, on which a computer program is stored, wherein the program, when executed by a processor, implements the method of any one of claims 1-9.
CN202211152624.6A 2022-09-21 2022-09-21 Application deployment method and device, electronic equipment and computer readable medium Pending CN115543347A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211152624.6A CN115543347A (en) 2022-09-21 2022-09-21 Application deployment method and device, electronic equipment and computer readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211152624.6A CN115543347A (en) 2022-09-21 2022-09-21 Application deployment method and device, electronic equipment and computer readable medium

Publications (1)

Publication Number Publication Date
CN115543347A true CN115543347A (en) 2022-12-30

Family

ID=84727213

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211152624.6A Pending CN115543347A (en) 2022-09-21 2022-09-21 Application deployment method and device, electronic equipment and computer readable medium

Country Status (1)

Country Link
CN (1) CN115543347A (en)

Similar Documents

Publication Publication Date Title
CN110909521B (en) Online document information synchronous processing method and device and electronic equipment
CN111800513B (en) Method and device for pushing information and computer readable medium of electronic equipment
CN111209306A (en) Business logic judgment method and device, electronic equipment and storage medium
CN112714042B (en) Pressure testing method and device, electronic equipment and storage medium
CN111596992B (en) Navigation bar display method and device and electronic equipment
CN112748962A (en) Application loading method and device, electronic equipment and computer readable medium
CN113420400B (en) Routing relation establishment method, request processing method, device and equipment
CN113553206B (en) Data event execution method and device, electronic equipment and computer readable medium
CN114860213A (en) Application package generation method, device, equipment and medium
CN114780124A (en) Differential upgrading method, device, medium and electronic equipment
CN113032046A (en) Method, device and equipment for repairing so file and storage medium
CN114115941A (en) Resource sending method, page rendering method, device, electronic equipment and medium
CN115543347A (en) Application deployment method and device, electronic equipment and computer readable medium
CN111309367A (en) Method, device, medium and electronic equipment for managing service discovery
CN111580890A (en) Method, apparatus, electronic device, and computer-readable medium for processing features
CN113472565B (en) Method, apparatus, device and computer readable medium for expanding server function
CN111314457B (en) Method and device for setting virtual private cloud
CN110633324B (en) Method, apparatus, electronic device and computer readable medium for synchronizing data
CN116319322B (en) Power equipment node communication connection method, device, equipment and computer medium
CN113157365B (en) Program running method, program running device, electronic equipment and computer readable medium
CN112650722B (en) File processing method and device based on android application program, electronic equipment and medium
CN113761548B (en) Data transmission method and device for Shuffle process
CN112596753A (en) Dependency package installation method and device, electronic equipment and computer readable medium
CN114398098A (en) Application script execution method and device, electronic equipment and computer readable medium
CN113721934A (en) Hot patch installation method and device, electronic equipment and computer readable 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