CN113641373A - Mirror image deployment method, device and storage medium - Google Patents

Mirror image deployment method, device and storage medium Download PDF

Info

Publication number
CN113641373A
CN113641373A CN202111004082.3A CN202111004082A CN113641373A CN 113641373 A CN113641373 A CN 113641373A CN 202111004082 A CN202111004082 A CN 202111004082A CN 113641373 A CN113641373 A CN 113641373A
Authority
CN
China
Prior art keywords
mirror
image
layer
mirror image
deployment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111004082.3A
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 Qianshi Technology Co Ltd
Original Assignee
Beijing Jingdong Qianshi 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 Qianshi Technology Co Ltd filed Critical Beijing Jingdong Qianshi Technology Co Ltd
Priority to CN202111004082.3A priority Critical patent/CN113641373A/en
Publication of CN113641373A publication Critical patent/CN113641373A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/63Image based installation; Cloning; Build to order

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The application discloses a method, a device and a storage medium for mirror image deployment. Based on the application, when a mirror layer deployment instruction corresponding to a mirror layer to be constructed is received, corresponding mirror layer data is constructed based on the mirror layer deployment instruction, the mirror layer data is stored after construction is completed, and a storage address is obtained and returned to the mirror layer deployment instruction. And acquiring a storage address of the mirror image layer data corresponding to the mirror image layer deployment instruction, pulling the mirror image layer data corresponding to the storage address from the stored manufactured mirror image, and pulling other mirror image layer data to synthesize the mirror image layer data into full mirror image data for deployment. By only constructing and deploying the mirror image layer, the mirror image generation efficiency and the deployment efficiency are improved.

Description

Mirror image deployment method, device and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, and a storage medium for image deployment.
Background
When a system is deployed, a mirror image technology is generally adopted, and the system is deployed by pulling or transmitting a mirror image file at a target server. In the whole deployment process, the target server performs the making and pulling of the complete image, which requires a long deployment time, and particularly, when a large amount of systems are deployed, the deployment time is generally longer, thereby affecting the deployment efficiency of the systems.
Disclosure of Invention
Embodiments of the present application provide a method, an apparatus, and a storage medium for image deployment, which are helpful for improving image deployment efficiency.
In one embodiment, a method of image deployment includes:
receiving a mirror layer deployment instruction of a mirror layer to be constructed;
acquiring a storage address of the mirror layer data corresponding to the mirror layer deployment instruction, wherein the storage address is an address for storing the mirror layer data after the mirror layer data is constructed based on the mirror layer deployment instruction;
and pulling the mirror image layer data corresponding to the storage address in the stored manufactured mirror image, pulling other mirror image layer data to synthesize the mirror image data into full mirror image data and deploying.
Optionally, the method further comprises the step of building image layer data based on the image layer deployment instruction:
acquiring an application identifier to be deployed and a mirror image version identifier corresponding to a mirror image layer deployment instruction, and judging whether the stored manufactured mirror image has the application identifier to be deployed and the mirror image version identifier corresponding to the mirror image layer deployment instruction;
if the application identifier and the image version identifier do not exist, acquiring an image deployment file corresponding to the image layer deployment instruction, and generating full image data containing at least one image layer data corresponding to the application identifier and the image version identifier to be deployed based on the image deployment file;
and when the image layer data exists, constructing the image layer data based on the image layer file carried by the image layer deployment instruction.
Optionally, based on the mirror layer deployment instruction corresponding to the mirror layer data, the application identifier to be deployed and the mirror version identifier corresponding to the mirror layer deployment instruction are obtained, the mirror layer data in at least one storage address corresponding to both the application identifier to be deployed and the mirror version identifier is pulled, and synthesized into full mirror image data for deployment.
Optionally, receiving a mirror image deployment instruction, and acquiring an application identifier to be deployed and a mirror image version identifier corresponding to the mirror image deployment instruction;
if the application identifier to be deployed and the image version identifier corresponding to the image deployment instruction do not exist in the stored manufactured image, acquiring an image deployment file corresponding to the image layer deployment instruction, and generating full image data containing at least one image layer data corresponding to the application identifier to be deployed and the image version identifier based on the image deployment file;
and pulling and deploying the full amount of mirror image data corresponding to the application identifier to be deployed and the mirror image version identifier.
Optionally, analyzing the full mirror image data to generate at least one mirror image layer data included in the full mirror image data;
and determining a storage address for at least one mirror image layer data, and correspondingly storing the application identifier to be deployed and the mirror image version identifier corresponding to the full amount of mirror image data.
In another embodiment, there is provided an apparatus for mirror image deployment, the apparatus comprising:
the receiving module is used for receiving a mirror layer deployment instruction of a mirror layer to be constructed;
the acquisition module is used for acquiring a storage address of the mirror layer data corresponding to the mirror layer deployment instruction, wherein the storage address is an address for storing the mirror layer data after the mirror layer data is constructed based on the mirror layer deployment instruction;
and the deployment module is used for pulling the mirror image layer data corresponding to the storage address in the stored manufactured mirror image, pulling other mirror image layer data to synthesize the mirror image layer data into full mirror image data and deploying the mirror image data.
Optionally, the apparatus further comprises a building module:
acquiring an application identifier to be deployed and a mirror image version identifier corresponding to a mirror image layer deployment instruction, and judging whether the stored manufactured mirror image has the application identifier to be deployed and the mirror image version identifier corresponding to the mirror image layer deployment instruction;
if the application identifier and the image version identifier do not exist, acquiring an image deployment file corresponding to the image layer deployment instruction, and generating full image data containing at least one image layer data corresponding to the application identifier and the image version identifier to be deployed based on the image deployment file;
and when the image layer data exists, constructing the image layer data based on the image layer file carried by the image layer deployment instruction.
Optionally, the deployment module is further configured to:
and acquiring an application identifier to be deployed and a mirror version identifier corresponding to the mirror layer deployment instruction based on the mirror layer deployment instruction corresponding to the mirror layer data, pulling the mirror layer data in at least one storage address corresponding to the application identifier to be deployed and the mirror version identifier, synthesizing into full mirror image data, and deploying.
Optionally, the apparatus further includes a full-volume mirrored data deployment module:
receiving a mirror image deployment instruction, and acquiring an application identifier to be deployed and a mirror image version identifier corresponding to the mirror image deployment instruction;
if the application identifier to be deployed and the image version identifier corresponding to the image deployment instruction do not exist in the stored manufactured image, acquiring an image deployment file corresponding to the image layer deployment instruction, and generating full image data containing at least one image layer data corresponding to the application identifier to be deployed and the image version identifier based on the image deployment file;
and pulling and deploying the full amount of mirror image data corresponding to the application identifier to be deployed and the mirror image version identifier.
Optionally, the full volume mirrored data deployment module is further configured to:
analyzing the full mirror image data to generate at least one mirror image layer data contained in the full mirror image data;
and determining a storage address for at least one mirror image layer data, and correspondingly storing the application identifier to be deployed and the mirror image version identifier corresponding to the full amount of mirror image data.
In another embodiment of the present application, a non-transitory computer readable storage medium is provided that stores instructions that, when executed by a processor, cause the processor to perform the method of mirroring deployment of the preceding embodiments.
In another embodiment of the present invention, an electronic device is provided, which includes a processor for executing the steps of the method of mirror image deployment described above.
Based on the above embodiment, when the mirror layer deployment instruction corresponding to the mirror layer to be constructed is received, the corresponding mirror layer data is constructed based on the mirror layer deployment instruction, and after the construction is completed, the mirror layer data is stored, and the storage address is obtained and returned to the mirror layer deployment instruction. And acquiring a storage address of the mirror image layer data corresponding to the mirror image layer deployment instruction, pulling the mirror image layer data corresponding to the storage address from the stored manufactured mirror image, and pulling other mirror image layer data to synthesize the mirror image layer data into full mirror image data for deployment. By only constructing and deploying the mirror image layer, the mirror image generation efficiency and the deployment efficiency are improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
FIG. 1 is a schematic flow chart diagram illustrating a method for image deployment in an embodiment of the present application;
FIG. 2 is an expanded flow diagram of a method of mirror deployment in an embodiment of the present application;
FIG. 3 is an expanded flow diagram of another method for image deployment in an embodiment of the present application;
FIG. 4 is a schematic illustration of a mirror-image deployed device in another embodiment of the present application;
fig. 5 is a schematic diagram of an electronic device according to another embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims of the present application and in the drawings described above, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are, for example, capable of operation in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprising" and "having," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements explicitly listed, but may include other steps or elements not explicitly listed or inherent to such process, method, article, or apparatus.
Based on the problems in the prior art, the embodiment of the application aims at the problem of low deployment efficiency caused by long consumed time in the process of mirror image deployment, particularly in the process of mirror image production, pulling and full mirror image data processing in the transmission process of large-item ocular image deployment, and improves the efficiency of mirror image deployment by constructing, pulling and transmitting the mirror image layer data which needs to be changed in the full mirror image data.
In an embodiment of the present application, a mirror layer deployment instruction or a mirror deployment instruction of a mirror layer to be constructed may be received in a server, and construction, processing, and deployment of mirror layer data or full mirror data are performed in the server based on the mirror layer deployment instruction or the mirror deployment instruction, respectively. If the server is respectively provided with a mirror image construction module, a mirror image processing module and a mirror image deployment module, mirror image data is transmitted among the three modules. In addition, the construction, processing and deployment of the mirror image can be respectively carried out on different servers. And if the server needing mirror image deployment acquires the constructed mirror image data from the target server, the mirror image data is sent to other servers for mirror image processing, and the returned mirror image data is deployed.
Fig. 1 is a flowchart illustrating a method of image deployment in an embodiment of the present application. As shown in fig. 1, the specific steps of the process are as follows:
s101, receiving a mirror layer deployment instruction of a mirror layer to be constructed.
In this step, each mirror layer deployment instruction in the embodiment of the present application corresponds to one mirror layer in the full amount of mirror data. After the application to be deployed and the image version to be subjected to image deployment are selected, an image layer deployment instruction is generated for the image layer to be constructed, which needs to be constructed, and the image layer deployment instruction is received by the server or the module, which needs to be subjected to image deployment. The mirror image deployment instruction carries an application identifier to be deployed and a mirror image version identifier which need to be subjected to mirror image deployment.
S102, a storage address of the mirror image layer data corresponding to the mirror image layer deployment instruction is obtained, wherein the storage address is an address of the mirror image layer data after the mirror image layer data is constructed based on the mirror image layer deployment instruction.
In this step, the server to be deployed or a mirror image deployment module in the server acquires a storage address of the mirror image layer data corresponding to the received mirror image layer deployment instruction. And the storage address of the mirror layer data is generated by the target server corresponding to the server to be deployed or a mirror construction module in the server based on the mirror layer deployment instruction to construct the mirror layer data.
In specific implementation, the storage address may be carried or not carried in the deployment instruction;
if the storage address is carried in the deployment instruction, directly acquiring the storage address from the deployment instruction; and if the corresponding storage address does not exist, acquiring the corresponding storage address from the construction equipment/module according to the relevant information in the deployment instruction.
And sending the storage address to a server generated by the mirror image layer deployment instruction, wherein the storage address is carried in the mirror image layer deployment instruction.
S103, pulling the mirror image layer data corresponding to the storage address in the stored manufactured mirror image, pulling other mirror image layer data to synthesize the mirror image data into full mirror image data and deploying.
In this step, based on the storage address carried by the mirror layer deployment instruction, the mirror layer data corresponding to the storage address is pulled from the stored manufactured mirror. Further, when deploying, pulling other mirror image layer data which belongs to the same application identifier to be deployed and mirror image version identifier as the mirror image layer data, and transmitting the mirror image layer data to a server or a mirror image processing module for mirror image processing to synthesize, so as to generate full mirror image data, and perform mirror image deployment on the server or the mirror image deployment module to be deployed.
Based on the mirror image deployment method of the embodiment, when the mirror image layer deployment instruction corresponding to the mirror image layer to be constructed is received, the corresponding mirror image layer data is constructed based on the mirror image layer deployment instruction, the mirror image layer data is stored after the construction is completed, and the storage address is obtained and returned to the mirror image layer deployment instruction. And acquiring a storage address of the mirror image layer data corresponding to the mirror image layer deployment instruction, pulling the mirror image layer data corresponding to the storage address from the stored manufactured mirror image, and pulling other mirror image layer data to synthesize the mirror image layer data into full mirror image data for deployment. By only constructing and deploying the mirror image layer, the mirror image generation efficiency and the deployment efficiency are improved.
Fig. 2 is an expanded flow diagram of a method of image deployment shown in fig. 1. Referring to fig. 2, steps S201 to S202, S206, S209 and S212 are executed in a mirror image deployment module of a server or a server that needs to perform mirror image deployment, steps S203 to S205 and S207 to S208 are executed on a target server for constructing mirror image data or in a mirror image construction module in the server, and steps S210 to S211 are executed in a server that performs mirror image processing or a mirror image processing module in the server. And data interaction is carried out among the servers and among the modules of the servers. The method mainly comprises the following steps:
s201, receiving a mirror layer deployment instruction of a mirror layer to be constructed.
In this step, the mirror layer deployment instruction in the embodiment of the present application carries the to-be-deployed application identifier and the mirror version identifier to which the mirror layer to be constructed belongs. And, generally, one mirror layer deployment instruction corresponds to one layer of mirror layer data in the full amount of mirror data. The image layer deployment instruction Dockerfile is a text file used by a container Docker for constructing an image, and comprises a custom instruction and a format, and the image can be constructed from the Dockerfile through a Docker build command. The configuration can be carried out according to the requirement through a uniform grammatical command, the distribution is carried out on different files through the uniform configuration file, and the automatic construction can be carried out according to the configuration file when the configuration file is required to be used.
S202, acquiring an application identifier to be deployed and a mirror image version identifier corresponding to the mirror image layer deployment instruction.
Here, the application identifier to be deployed corresponds to an application program that needs to be subjected to mirror image deployment, and the mirror image version identifier corresponds to a mirror image data version that needs to be deployed.
S203, acquiring the mirror image layer file corresponding to the mirror image layer deployment instruction.
In this step, the mirror layer file is a generated file corresponding to a layer of mirror image to be constructed.
And S204, generating mirror layer data corresponding to the received mirror layer deployment instruction.
In this step, a custom command technology (for example, a linux custom command or a CLI client and CLI service program in other programming languages) is used to generate the mirror layer data. This step may be done on the target server or in a mirror building module in the server. Optionally, when receiving a mirror layer deployment instruction such as COPY test/target/test.zip/tmp/test.zip, invoking a corresponding interface to generate mirror layer data including a mirror layer code and mirror layer content corresponding to the mirror layer deployment instruction as shown in table 1. The received mirror layer deployment instruction generally corresponds to a layer of mirror layer data that needs to be personalized.
Figure BDA0003236617640000061
TABLE 1
And S205, generating a storage address for the mirror layer data.
In this step, a storage address in a target server or a mirror construction module of the server that constructs the mirror layer data is generated for the mirror layer data.
S206, judging whether the application identifier to be deployed and the image version identifier corresponding to the image layer deployment instruction exist in the manufactured image.
In this step, based on the application identifier to be deployed and the image version identifier corresponding to the image layer deployment instruction, it is queried whether the application identifier to be deployed and the image version identifier corresponding to the image layer deployment instruction are stored in a target server or an image construction module in the server for constructing image layer data. Optionally, if mirror layer data corresponding to the application identifier to be deployed and the mirror version identifier corresponding to the mirror layer deployment instruction are constructed before, the application identifier to be deployed and the mirror version identifier corresponding to the mirror layer deployment instruction are stored in correspondence with the mirror deployment instruction.
And S207, acquiring a mirror image deployment file corresponding to the mirror image layer deployment instruction.
In this step, when the application identifier to be deployed and the image version identifier corresponding to the image layer deployment instruction do not exist, the image deployment file corresponding to the image layer deployment instruction is obtained, and the full amount of image data including at least one image layer data corresponding to the application identifier to be deployed and the image version identifier are generated based on the image deployment file. Optionally, when the application identifier to be deployed and the image version identifier corresponding to the current image layer deployment instruction do not exist in the manufactured image, it may be determined that the full amount of images to which the image layer data belongs are deployed for the first time, and the full amount of image data needs to be constructed. Therefore, the image deployment file corresponding to the image layer deployment instruction is obtained, so that the image deployment file is used for deploying the full amount of image data for the application to be deployed and the image version to which the image layer deployment instruction belongs. The full mirror image data comprises at least one layer of mirror image layer data, and each layer of mirror image layer data corresponds to one storage address.
And S208, generating the full amount of mirror image data corresponding to the mirror image deployment file.
S209, acquiring the corresponding mirror layer data based on the mirror layer deployment instruction.
In this step, data interaction may be performed with a target Server or a mirror image building module in the Server for building mirror image layer data by using a Browser/Server mode (Browser/Server, B/S), a Server-Client mode (Client-Server, C/S), a CLI component, or a shell interaction manner. Namely, the mirror layer data corresponding to the mirror layer deployment instruction is obtained.
And S210, pulling other mirror image layer data related to the mirror image layer data.
And S211, synthesizing the full amount of mirror image data.
Here, based on the mirror layer deployment instruction corresponding to the mirror layer data, the application identifier to be deployed and the mirror version identifier corresponding to the mirror layer deployment instruction are obtained, the mirror layer data in at least one storage address corresponding to both the application identifier to be deployed and the mirror version identifier are pulled, and the mirror layer data is synthesized into full mirror image data. Specifically, when mirror image deployment is performed, deployment of a full amount of mirror image data is required, and therefore, after the mirror image layer data corresponding to the mirror image layer deployment instruction is constructed, other mirror image layer data corresponding to the application identifier to be deployed and the mirror image version identifier carried by the mirror image layer deployment instruction need to be pulled from a target server or a mirror image construction module in the server where the mirror image layer data is constructed, and the full amount of mirror image data is synthesized in the server where mirror image processing is performed or a mirror image processing module in the server. The changed mirror image layer data generated based on the mirror image layer deployment instruction is synthesized with other unchanged mirror image layer data belonging to the same application identifier to be deployed and the same mirror image version identifier, so that the full amount of mirror image data is generated.
S212, deploying the mirror image data.
Fig. 3 is an extended flowchart of another method for image deployment according to an embodiment of the present application. Wherein, steps S301 to S302, S305 and S309 are executed in a mirror deployment module of a server or a server that needs to execute mirror deployment, steps S303 to S304 and S308 are executed on a target server for constructing mirror data or in a mirror construction module in the server, and steps S306 to S307 are executed in a server that performs mirror machining or a mirror machining module in the server. And data interaction is carried out among the servers and among the modules of the servers.
S301, receiving a mirror image deployment instruction of a mirror image to be constructed.
In this step, the mirror image deployment instruction corresponds to the acquisition of the full amount of mirror image data.
S302, acquiring an application identifier to be deployed and a mirror version identifier corresponding to the mirror deployment instruction.
S303, acquiring a mirror image deployment file corresponding to the mirror image deployment instruction.
In this step, the mirror image deployment file is a generation file corresponding to the full amount of mirror images to be constructed.
S304, generating the full mirror image data corresponding to the received mirror image deployment file.
In this step, the full amount of mirror image data including at least one mirror image layer data corresponding to the application identifier to be deployed and the mirror image version identifier is generated based on the mirror image deployment file.
S305, judging whether the manufactured mirror image has the application identifier to be deployed and the mirror image version identifier which both correspond to the mirror image deployment instruction.
In this step, based on the to-be-deployed application identifier and the mirror version identifier corresponding to the mirror deployment instruction, it is queried whether the to-be-deployed application identifier and the mirror version identifier corresponding to the mirror deployment instruction are stored in a target server or a mirror construction module in the server for constructing the mirror layer data. Optionally, if the total amount of mirror image data corresponding to the to-be-deployed application identifier and the mirror image version identifier corresponding to the mirror image deployment instruction is constructed before, the to-be-deployed application identifier and the mirror image version identifier corresponding to the mirror image layer deployment instruction are stored in correspondence with the mirror image deployment instruction.
S306, pulling the full amount of mirror image data corresponding to the application identifier to be deployed and the mirror image version identifier.
In this step, data interaction may be performed with a target Server or a mirror image building module in the Server for building mirror image layer data by using a Browser/Server mode (Browser/Server, B/S), a Server-Client mode (Client-Server, C/S), a CLI component, or a shell interaction manner. Namely, the full amount of mirror image data corresponding to the mirror image layer deployment instruction is acquired.
S307, analyzing the full mirror image data into mirror image layer data.
Here, the full amount of mirror image data is analyzed in the server that performs the mirror image processing or a mirror image processing module in the server, and at least one mirror image layer data included in the full amount of mirror image data is generated. Optionally, the mirror layer data of each layer is obtained from a json file in the layer content corresponding to the full amount of mirror data.
S308, determining a storage address for at least one mirror layer data.
In this step, a storage address is determined for at least one mirror image layer data in a target server or a mirror image construction module in the server for constructing the mirror image layer data, and the storage address is stored correspondingly to the application identifier to be deployed and the mirror image version identifier corresponding to the full amount of mirror image data. When a certain mirror image layer is changed subsequently, other unchanged mirror image layers are pulled for synthesis.
S309, deploying the full amount of mirror image data.
In summary, the present application implements a method of mirror image deployment.
Based on the above scheme, in the embodiment of the application, for the situation that all included mirror layers are changed in the mirror layer deployment of the application, not every time mirror data is produced, by generating a mirror layer instruction only for the changed mirror layer and deploying the mirror layer instruction for the mirror layer, only the mirror layer is produced in the subsequent mirror layer production. By acquiring the changed data of the mirror image layer, the time for mirror image production and mirror image pulling or transmission is reduced, and the problem of time consumption in deployment is solved, so that the deployment efficiency is greatly improved, and the deployment time and labor cost are saved.
Based on the same inventive concept as the method for mirror image deployment, the embodiment of the present application further provides a device for mirror image deployment.
Fig. 4 is a schematic diagram of a mirror-image deployed device in another embodiment of the present application. Wherein, the mirror image deployed device can comprise:
a receiving module 41, configured to receive a mirror layer deployment instruction of a mirror layer to be constructed;
an obtaining module 42, configured to obtain a storage address of the mirror layer data corresponding to the mirror layer deployment instruction, where the storage address is an address of the mirror layer data stored after the mirror layer data is constructed based on the mirror layer deployment instruction;
and the deployment module 43 is configured to pull the mirror layer data corresponding to the storage address from the stored manufactured mirror, pull other mirror layer data to synthesize the mirror layer data into full mirror image data, and deploy the mirror layer data.
In this embodiment, specific functions and interaction manners of the receiving module 41, the obtaining module 42, and the deploying module 43 may refer to the record of the embodiment corresponding to fig. 1, and are not described herein again.
Optionally, the apparatus further comprises a building module 44:
acquiring an application identifier to be deployed and a mirror image version identifier corresponding to a mirror image layer deployment instruction, and judging whether the stored manufactured mirror image has the application identifier to be deployed and the mirror image version identifier corresponding to the mirror image layer deployment instruction;
if the application identifier and the image version identifier do not exist, acquiring an image deployment file corresponding to the image layer deployment instruction, and generating full image data containing at least one image layer data corresponding to the application identifier and the image version identifier to be deployed based on the image deployment file;
and when the image layer data exists, constructing the image layer data based on the image layer file carried by the image layer deployment instruction.
Optionally, the deployment module 43 is further configured to:
and acquiring an application identifier to be deployed and a mirror version identifier corresponding to the mirror layer deployment instruction based on the mirror layer deployment instruction corresponding to the mirror layer data, pulling the mirror layer data in at least one storage address corresponding to the application identifier to be deployed and the mirror version identifier, synthesizing into full mirror image data, and deploying.
Optionally, the apparatus further comprises a full volume mirrored data deployment module 45:
receiving a mirror image deployment instruction, and acquiring an application identifier to be deployed and a mirror image version identifier corresponding to the mirror image deployment instruction;
if the application identifier to be deployed and the image version identifier corresponding to the image deployment instruction do not exist in the stored manufactured image, acquiring an image deployment file corresponding to the image layer deployment instruction, and generating full image data containing at least one image layer data corresponding to the application identifier to be deployed and the image version identifier based on the image deployment file;
and pulling and deploying the full amount of mirror image data corresponding to the application identifier to be deployed and the mirror image version identifier.
Optionally, the full volume mirrored data deployment module 45 is further configured to:
analyzing the full mirror image data to generate at least one mirror image layer data contained in the full mirror image data;
and determining a storage address for at least one mirror image layer data, and correspondingly storing the application identifier to be deployed and the mirror image version identifier corresponding to the full amount of mirror image data.
Fig. 5 is a schematic diagram of an electronic device according to another embodiment of the present application. As shown in fig. 5, another embodiment of the present application further provides an electronic device, which may include a processor 501, wherein the processor 501 is configured to execute the steps of the method of mirror image deployment. As can also be seen from fig. 5, the electronic device provided by the above embodiment further comprises a non-transitory computer readable storage medium 502, the non-transitory computer readable storage medium 502 having stored thereon a computer program, which when executed by the processor 501 performs the steps of one of the mirror deployment methods described above.
In particular, the non-transitory computer readable storage medium 502 can be a general purpose storage medium such as a removable disk, a hard disk, a FLASH, a Read Only Memory (ROM), an erasable programmable read only memory (EPROM or FLASH memory), or a portable compact disc read only memory (CD-ROM), etc., and the computer program on the non-transitory computer readable storage medium 502, when executed by the processor 501, can cause the processor 501 to perform the steps of one of the image-deployed methods described above.
In practical applications, the non-transitory computer readable storage medium 502 may be included in the apparatus/device/system described in the above embodiments, or may exist alone without being assembled into the apparatus/device/system. The computer readable storage medium carries one or more programs which, when executed, enable performance of the steps of a method of deploying images as described above.
The flowchart and block diagrams in the figures of the present application illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments disclosed herein. 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 or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Those skilled in the art will appreciate that various combinations and/or combinations of features recited in the various embodiments and/or claims of the present disclosure can be made, even if such combinations or combinations are not explicitly recited in the present application. In particular, the features recited in the various embodiments and/or claims of the present application may be combined and/or coupled in various ways, all of which fall within the scope of the present disclosure, without departing from the spirit and teachings of the present application.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present application, and are used for illustrating the technical solutions of the present application, but not limiting the same, and the scope of the present application is not limited thereto, and although the present application is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can still change or easily conceive of the technical solutions described in the foregoing embodiments or equivalent replacement of some technical features thereof within the technical scope disclosed in the present application; such changes, variations and substitutions do not depart from the spirit and scope of the exemplary embodiments of the present application and are intended to be covered by the appended claims. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A method of image deployment, comprising:
receiving a mirror layer deployment instruction of a mirror layer to be constructed;
acquiring a storage address of the mirror layer data corresponding to the mirror layer deployment instruction, wherein the storage address is an address for storing the mirror layer data after the mirror layer data is constructed based on the mirror layer deployment instruction;
and pulling the mirror image layer data corresponding to the storage address in the stored manufactured mirror image, pulling other mirror image layer data to synthesize the mirror image data into full mirror image data and deploying.
2. The method of claim 1, further comprising, before the step of obtaining the memory address of the mirror layer data corresponding to the mirror layer deployment instruction, the step of constructing the mirror layer data based on the mirror layer deployment instruction:
acquiring an application identifier to be deployed and a mirror image version identifier corresponding to a mirror image layer deployment instruction, and judging whether the stored manufactured mirror image has the application identifier to be deployed and the mirror image version identifier corresponding to the mirror image layer deployment instruction;
if the application identifier and the image version identifier do not exist, acquiring an image deployment file corresponding to the image layer deployment instruction, and generating full image data containing at least one image layer data corresponding to the application identifier and the image version identifier to be deployed based on the image deployment file;
and when the image layer data exists, constructing the image layer data based on the image layer file carried by the image layer deployment instruction.
3. The method of claim 2, wherein the step of pulling and pulling data synthesis of other mirror layers into full volume mirror data and deploying comprises:
and acquiring an application identifier to be deployed and a mirror version identifier corresponding to the mirror layer deployment instruction based on the mirror layer deployment instruction corresponding to the mirror layer data, pulling the mirror layer data in at least one storage address corresponding to the application identifier to be deployed and the mirror version identifier, synthesizing into full mirror image data, and deploying.
4. The method of claim 3, further comprising:
receiving a mirror image deployment instruction, and acquiring an application identifier to be deployed and a mirror image version identifier corresponding to the mirror image deployment instruction;
if the application identifier to be deployed and the image version identifier corresponding to the image deployment instruction do not exist in the stored manufactured image, acquiring an image deployment file corresponding to the image layer deployment instruction, and generating full image data containing at least one image layer data corresponding to the application identifier to be deployed and the image version identifier based on the image deployment file;
and pulling and deploying the full amount of mirror image data corresponding to the application identifier to be deployed and the mirror image version identifier.
5. The method according to claim 4, wherein the step of pulling and deploying the full amount of mirror image data corresponding to both the application identifier and the mirror image version identifier to be deployed comprises:
analyzing the full mirror image data to generate at least one mirror image layer data contained in the full mirror image data;
and determining a storage address for at least one mirror image layer data, and correspondingly storing the application identifier to be deployed and the mirror image version identifier corresponding to the full amount of mirror image data.
6. An apparatus for mirror image deployment, comprising:
the receiving module is used for receiving a mirror layer deployment instruction of a mirror layer to be constructed;
the acquisition module is used for acquiring a storage address of the mirror layer data corresponding to the mirror layer deployment instruction, wherein the storage address is an address for storing the mirror layer data after the mirror layer data is constructed based on the mirror layer deployment instruction;
and the deployment module is used for pulling the mirror image layer data corresponding to the storage address in the stored manufactured mirror image, pulling other mirror image layer data to synthesize the mirror image layer data into full mirror image data and deploying the mirror image data.
7. The mirror deployed apparatus of claim 6, further comprising a build module:
acquiring an application identifier to be deployed and a mirror image version identifier corresponding to a mirror image layer deployment instruction, and judging whether the stored manufactured mirror image has the application identifier to be deployed and the mirror image version identifier corresponding to the mirror image layer deployment instruction;
if the application identifier and the image version identifier do not exist, acquiring an image deployment file corresponding to the image layer deployment instruction, and generating full image data containing at least one image layer data corresponding to the application identifier and the image version identifier to be deployed based on the image deployment file;
and when the image layer data exists, constructing the image layer data based on the image layer file carried by the image layer deployment instruction.
8. The apparatus of claim 7, wherein the deployment module is further configured to:
and acquiring an application identifier to be deployed and a mirror version identifier corresponding to the mirror layer deployment instruction based on the mirror layer deployment instruction corresponding to the mirror layer data, pulling the mirror layer data in at least one storage address corresponding to the application identifier to be deployed and the mirror version identifier, synthesizing into full mirror image data, and deploying.
9. A non-transitory computer readable storage medium storing instructions that, when executed by a processor, cause the processor to perform the steps of a method of mirroring deployment as claimed in any one of claims 1 to 5.
10. A terminal device comprising a processor configured to perform the steps of a method of mirror deployment according to any one of claims 1 to 5.
CN202111004082.3A 2021-08-30 2021-08-30 Mirror image deployment method, device and storage medium Pending CN113641373A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111004082.3A CN113641373A (en) 2021-08-30 2021-08-30 Mirror image deployment method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111004082.3A CN113641373A (en) 2021-08-30 2021-08-30 Mirror image deployment method, device and storage medium

Publications (1)

Publication Number Publication Date
CN113641373A true CN113641373A (en) 2021-11-12

Family

ID=78424374

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111004082.3A Pending CN113641373A (en) 2021-08-30 2021-08-30 Mirror image deployment method, device and storage medium

Country Status (1)

Country Link
CN (1) CN113641373A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017045424A1 (en) * 2015-09-18 2017-03-23 乐视控股(北京)有限公司 Application program deployment system and deployment method
CN108958927A (en) * 2018-05-31 2018-12-07 康键信息技术(深圳)有限公司 Dispositions method, device, computer equipment and the storage medium of container application
WO2020125389A1 (en) * 2018-12-17 2020-06-25 深圳壹账通智能科技有限公司 Image file acquisition method, apparatus, computer device and storage medium
CN112214284A (en) * 2020-10-21 2021-01-12 北京首都在线科技股份有限公司 Mirror image deployment method, device, equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017045424A1 (en) * 2015-09-18 2017-03-23 乐视控股(北京)有限公司 Application program deployment system and deployment method
CN108958927A (en) * 2018-05-31 2018-12-07 康键信息技术(深圳)有限公司 Dispositions method, device, computer equipment and the storage medium of container application
WO2020125389A1 (en) * 2018-12-17 2020-06-25 深圳壹账通智能科技有限公司 Image file acquisition method, apparatus, computer device and storage medium
CN112214284A (en) * 2020-10-21 2021-01-12 北京首都在线科技股份有限公司 Mirror image deployment method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
EP1246057A2 (en) Remote program downloading system
CN108647010B (en) Project engineering initialization method, terminal equipment and storage medium
CN104598902A (en) Method and device for identifying screenshot and browser
CN108228293B (en) Interface skin switching method and device
CN107483567B (en) Distributed log searching method and system
CN105224302B (en) Skin processing method of input method and input method system
CN110795353A (en) Debugging method, device and equipment for fast application and storage medium
JP5982922B2 (en) Information processing system, information processing method, communication terminal, communication terminal control method and control program, server, server control method and control program
CN116569159A (en) Automatic depiction and extraction of tabular data in portable document format using a graph neural network
CN113190229A (en) Method and device for generating government affair page
CN111414168B (en) Web application development method and device based on mind map and electronic equipment
CN113641373A (en) Mirror image deployment method, device and storage medium
US20080243960A1 (en) Deterministic file content generation of seed-based files
CN111767417A (en) Application picture management method, device, equipment and storage medium
CN105119944A (en) Application starting method and related device
CN113593519B (en) Method, system, device, equipment and storage medium for synthesizing text speech
JP5906906B2 (en) Log management method, log management system, and information processing apparatus
CN112261483B (en) Video output method and device
CN109889737B (en) Method and apparatus for generating video
CN113641440A (en) Front-end multi-language display method and device
CN113672488A (en) Log text processing method and device
CN105224451B (en) A kind of processing method and system of script file
CN110727416A (en) Development framework generation method and related device
KR100938277B1 (en) Method and apparatus for file compression and restoration of compression format
CN111045696A (en) Method and device for automatically installing single machine operation system, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination