CN114090029A - Mirror image transmission method and device, electronic equipment and storage medium - Google Patents

Mirror image transmission method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114090029A
CN114090029A CN202111401028.2A CN202111401028A CN114090029A CN 114090029 A CN114090029 A CN 114090029A CN 202111401028 A CN202111401028 A CN 202111401028A CN 114090029 A CN114090029 A CN 114090029A
Authority
CN
China
Prior art keywords
mirror image
harbor
node
mirror
name
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
CN202111401028.2A
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.)
China Telecom Group System Integration Co Ltd
Original Assignee
China Telecom Group System Integration 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 China Telecom Group System Integration Co Ltd filed Critical China Telecom Group System Integration Co Ltd
Priority to CN202111401028.2A priority Critical patent/CN114090029A/en
Publication of CN114090029A publication Critical patent/CN114090029A/en
Priority to PCT/CN2022/099354 priority patent/WO2023087693A1/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes

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 Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application provides a mirror image transmission method, a mirror image transmission device, electronic equipment and a storage medium, which belong to the technical field of mirror image warehouses, and the mirror image transmission method comprises the following steps: acquiring a mirror image in a first Harbor node; downloading the mirror image to a preset directory; and uploading each mirror image in the preset directory to a mirror image warehouse of which the mirror image warehouse name in the second Harbor node is the same as the mirror image warehouse name of the mirror image in the first Harbor node. This scheme need not to transmit the mirror image through the port of different version Harbor nodes, consequently, even the version of first Harbor node and second Harbor node is different, also can realize uploading the mirror image in the first Harbor node to second Harbor node to, this scheme need not to rely on the staff can realize the mirror image transmission, has not only saved manpower resources, has still improved mirror image transmission efficiency.

Description

Mirror image transmission method and device, electronic equipment and storage medium
Technical Field
The present application relates to the technical field of mirror image warehouses, and in particular, to a mirror image transmission method, an apparatus, an electronic device, and a storage medium.
Background
In order to manage the mirror images in an enterprise, a Harbor mirror image warehouse management system is often deployed, but as time goes on, after a new version of the Harbor mirror image warehouse management system appears, the enterprise often uses the Harbor mirror image warehouse management system of a new version to use newly added functions, however, because of the problem of an interface between Harbor mirror image warehouse management systems of different versions, the mirror images of the Harbor mirror image warehouse management system of an old version cannot be imported into the Harbor mirror image warehouse management system of the new version by using the self-generated functions of the Harbor mirror image warehouse management system, and only workers can use a container tool to import one mirror image in the Harbor mirror image warehouse management system of the old version into the Harbor mirror image warehouse management system of the new version, so that the efficiency is very low, and a large amount of human resources need to be occupied.
Disclosure of Invention
The application provides a mirror image transmission method, a mirror image transmission device, electronic equipment and a storage medium, and aims to solve the problems that in the prior art, the efficiency is low and a large amount of human resources are required to be occupied when a mirror image in an old version of a Harbor mirror image warehouse management system is imported into a new version of the Harbor mirror image warehouse management system.
In a first aspect, the present application provides a mirror image transmission method, including: acquiring a mirror image in a first Harbor node; downloading the mirror image to a preset directory; and uploading each mirror image in the preset directory to a mirror image warehouse of which the mirror image warehouse name in the second Harbor node is the same as the mirror image warehouse name of the mirror image in the first Harbor node.
In the embodiment of the application, the mirror image in the first Harbor node is downloaded to the preset directory, and then the mirror image is uploaded to the mirror image warehouse with the same name as the mirror image warehouse in the second Harbor node from the preset directory, so that the mirror image in the first Harbor node is transmitted to the second Harbor node without transmitting the mirror image through ports of different versions of the Harbor node, and therefore, even if the versions of the first Harbor node and the second Harbor node are different, the mirror image in the first Harbor node can be uploaded to the second Harbor node, and the scheme can realize mirror image transmission without depending on workers, so that manpower resources are saved, and the mirror image transmission efficiency is improved.
With reference to the technical solution provided by the first aspect, in some possible implementations, the acquiring a mirror image in a first Harbor node includes: acquiring identity information of the first Harbor node; converting the identity information into a preset format and coding to obtain coded data; sending the coded data to the first Harbor node so that the first Harbor node can perform identity authentication based on the coded data; and when the identity authentication is passed, acquiring the mirror image in the first Harbor node.
In the embodiment of the application, the identity information of the first Harbor node is converted into the preset format, so that the identity authentication of the follow-up first Harbor node is facilitated, the identity information is encoded, the safety of the identity information can be guaranteed, and the identity authentication of the first Harbor node based on the encoded data can be realized, and the safety of the identity information can also be guaranteed.
With reference to the technical solution provided by the first aspect, in some possible implementations, the acquiring a mirror image in a first Harbor node includes: traversing all mirror image warehouses in the first Harbor node to obtain all artifact directories under each mirror image warehouse; and traversing all the mirror images under each artifact directory to obtain the mirror images in the first Harbor node.
In the embodiment of the application, all mirror image information in the first Harbor node can be ensured to be finally obtained by traversing all mirror image warehouses in the first Harbor node and traversing all artifact directories under each mirror image warehouse, so that all mirror images in the first Harbor node can be finally imported into the second Harbor node.
With reference to the technical solution provided by the first aspect, in some possible implementations, the uploading each mirror image in the preset directory to a mirror image warehouse having a same mirror image warehouse name in the second Harbor node as a mirror image warehouse name of the mirror image in the first Harbor node includes: acquiring identity information of the second Harbor node; converting the identity information into a preset format and coding to obtain coded data; sending the coded data to the second Harbor node so that the second Harbor node can perform identity authentication based on the coded data; and when the identity authentication is passed, uploading each mirror image in the preset directory to a mirror image warehouse of which the mirror image warehouse name in the second Harbor node is the same as the mirror image warehouse name of the mirror image in the first Harbor node.
In the embodiment of the application, the identity information of the second Harbor node is converted into the preset format, so that the identity verification of the follow-up second Harbor node is facilitated, the mirror image is guaranteed to be led into the correct Harbor node, the identity information is coded, and the safety of the identity information can be guaranteed.
With reference to the technical solution provided by the first aspect, in some possible implementations, the uploading each mirror image in the preset directory to a mirror image warehouse having a same mirror image warehouse name in the second Harbor node as a mirror image warehouse name of the mirror image in the first Harbor node includes: judging whether a mirror image warehouse with the same name as the mirror image warehouse of the mirror image in the first Harbor node exists in the second Harbor node; when the second Harbor node does not have a mirror image warehouse with the same name as the mirror image warehouse of the mirror image in the first Harbor node, creating a mirror image warehouse with the same name as the mirror image warehouse of the mirror image in the first Harbor node in the second Harbor node; and uploading the mirror image to a mirror image warehouse of which the mirror image warehouse name in the second Harbor node is the same as the mirror image warehouse name of the mirror image in the first Harbor node.
In the embodiment of the application, before the mirror image is led into the second Harbor node, whether a mirror image warehouse with the same name as a mirror image warehouse where the mirror image to be led into the first Harbor node exists in the second Harbor node is judged, when the mirror image warehouse does not exist, the mirror image warehouse with the same name as the mirror image warehouse where the mirror image to be led into the first Harbor node exists is established first, then the mirror image to be led into the newly established mirror image warehouse, and therefore the storage position of the mirror image in the second Harbor node is ensured to be the same as the storage position in the first Harbor node.
With reference to the technical solution provided by the first aspect, in some possible implementations, the uploading each mirror image in the preset directory to a mirror image warehouse having a same mirror image warehouse name in the second Harbor node as a mirror image warehouse name of the mirror image in the first Harbor node includes: determining that the second Harbor node has a mirror image warehouse with the same name as the mirror image warehouse where the mirror image is located in the first Harbor node; and uploading the mirror image to a mirror image warehouse of which the mirror image warehouse name in the second Harbor node is the same as the mirror image warehouse name of the mirror image in the first Harbor node.
In the embodiment of the application, the mirror image warehouse with the same name as the mirror image warehouse where the to-be-imported mirror image is located in the first Harbor node is imported and the to-be-imported mirror image, so that the storage position of the mirror image in the second Harbor node is the same as the storage position of the mirror image in the first Harbor node, and the mirror image is convenient to use subsequently.
In a second aspect, the present application provides an image transmission apparatus, including an obtaining module, a downloading module, and an uploading module, where the obtaining module is configured to obtain an image in a first Harbor node; the downloading module is used for downloading the mirror image to a preset directory; the uploading module is used for uploading each mirror image in the preset directory to a mirror image warehouse of which the mirror image warehouse name in the second Harbor node is the same as the mirror image warehouse name of the mirror image in the first Harbor node.
With reference to the technical solution provided by the second aspect, in some possible implementations, the obtaining module is further configured to obtain identity information of the first Harbor node; converting the identity information into a preset format and coding to obtain coded data; sending the coded data to the first Harbor node so that the first Harbor node can perform identity authentication based on the coded data; and when the identity authentication is passed, acquiring the mirror image in the first Harbor node.
In a third aspect, an embodiment of the present application further provides an electronic device, including: a memory and a processor, the memory and the processor connected; the memory is used for storing programs; the processor is configured to invoke a program stored in the memory to perform a method as provided in the foregoing first aspect embodiment and/or in combination with any possible implementation manner of the foregoing first aspect embodiment.
In a fourth aspect, embodiments of the present application further provide a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a computer to perform the method as described in the foregoing first aspect embodiment and/or in connection with any one of the possible implementations of the foregoing first aspect embodiment.
Drawings
To more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed 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 those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 is a schematic diagram illustrating a mirror image transmission between a first Harbor node and a second Harbor node by using a mirror image transmission tool according to an embodiment of the present application;
fig. 2 is a schematic flowchart illustrating a mirror image transmission method according to an embodiment of the present application;
fig. 3 is a schematic flowchart illustrating an identity information authentication process performed by a first Harbor node according to an embodiment of the present application;
fig. 4 is a schematic flowchart illustrating a process of obtaining a mirror image in a first Harbor node according to an embodiment of the present application;
fig. 5 is a schematic flowchart illustrating uploading of a mirror image in a preset directory to a second Harbor node according to an embodiment of the present application;
fig. 6 is a block diagram illustrating a structure of a mirror image transmission apparatus according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. Meanwhile, relational terms such as "first," "second," and the like may be used solely in the description herein to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
Further, the term "and/or" in the present application is only one kind of association relationship describing the associated object, and means that three kinds of relationships may exist, for example, a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone.
The technical solution of the present application will be clearly and completely described below with reference to the accompanying drawings.
In the prior art, in importing a mirror image in an old version of a Harbor node into a new version of the Harbor node, only one mirror image in the old version of the Harbor node can be imported into the new version of the Harbor node by using a docker, and the process is as follows: the method comprises the steps of firstly opening an 80 port of an old version of a Harbor node, entering an image warehouse, copying a pull address of an image, then using a docker to pull the image corresponding to the pull address from the image warehouse by using the pull, downloading the image to the local, using a docker container to upload the local image to the image warehouse of a new version of the Harbor node by using the push, completing the import of the image, and then repeating the steps until all the images in the old version of the Harbor node are imported into the new version of the Harbor node. The method only depends on that a worker uses docker to import the images in the Harbor image warehouse management system of the old version into the Harbor image warehouse management system of the new version one by one, so that the efficiency is very low, and a large amount of human resources are occupied. Therefore, the mirror image transmission method provided by the scheme solves the problems that the efficiency is low and a large amount of human resources are required to be occupied in the prior art.
For convenience of understanding, please refer to fig. 1, as shown in fig. 1, in the prior art, the mirror image in a first Harbor node cannot be directly imported into a second Harbor node through the api (interface) self-contained tool, and the tool provided in the present scheme may export the mirror image from a mirror image warehouse in the first Harbor node and store the mirror image into a preset directory, and then import the mirror image in the preset directory into a mirror image warehouse in the second Harbor node, where nodes deployed by the tool may share other Harbor nodes, and the Harbor node refers to a Harbor mirror image warehouse management system deployed on an electronic device.
Referring to fig. 2, fig. 2 is a block diagram illustrating a mirror image transmission method according to an embodiment of the present invention, and steps included in the mirror image transmission method will be described with reference to fig. 2.
S100: and acquiring a mirror image in the first Harbor node.
And acquiring the mirror image from the first Harbor node so as to upload the acquired mirror image to the second Harbor node, for example, acquiring the mirror image from the first Harbor node by the tool provided by the application.
In an implementation manner, before acquiring a mirror image in a first Harbor node, identity information of the first Harbor node needs to be authenticated, where the process of authenticating the identity information of the first Harbor node may be to acquire the identity information of the first Harbor node first, convert the acquired identity information into a preset format and encode the converted identity information to obtain encoded data, send the encoded data to the first Harbor node, so that the first Harbor node performs identity verification based on the encoded data, and acquire the mirror image in the first Harbor node when the identity verification passes. To facilitate understanding of the above process of authenticating identity information of the first Harbor node, please refer to fig. 3, where fig. 3 is a schematic flowchart illustrating a process of authenticating identity information of the first Harbor node according to an embodiment of the present application.
Optionally, the process of obtaining the identity information of the first Harbor node may be to find the identity information of the first Harbor node from a list in which identity information of a plurality of Harbor nodes are stored in advance, where the list may be a yaml list, and the identity information of the plurality of Harbor nodes may be simultaneously stored through the yaml list, and in an embodiment, the yaml list in which the identity information of 2 Harbor nodes is stored is shown in table 1.
TABLE 1
name address username password
120 https://172.16.29.120 admin xxxxxxx
140 https://172.16.29.140 test xxxxxxx
In the yaml list shown in table 1, the identity information of two Harbor nodes with the names 120 and 140 are stored, and the identity information of each Harbor node includes a Harbor node name (name), a Harbor node address (address), a user name (username), and a password (password), for example, the Harbor node with the node name 120 has a node address https://172.16.29.120, a user name admin, and a password xxxxxxx.
The identity information of the first Harbor node can be a user name and a password, after the user name and the password are obtained, the user name and the password are converted into a preset format, and then coding is carried out to obtain coded data. The preset format may be set according to actual requirements, for example, the preset format may be [ user name ], [ password ], where the actual requirement of the preset format is not limited, where the user name and the password may be numbers or a combination of numbers and letters, and the "user name" and the "password" in the preset format are only data indicating the corresponding position of the preset format. The specific encoding method for encoding the identity information converted into the preset format may also be set according to actual requirements, for example, the specific encoding method may be base64 encoding, and the specific encoding method is not limited herein.
Optionally, the process of sending the encoded data to the first Harbor node may be that the encoded data is put into a request header of a request to the first Harbor node, and after the first Harbor node receives the request, the encoded data may be obtained from the request header of the request. Or, the encoded data may also be directly sent to the first Harbor node, and a specific manner of sending the encoded data to the first Harbor node may be set according to an actual requirement, which is not limited herein.
In an embodiment, the process of obtaining the mirror image in the first Harbor node may be that, first, all mirror image warehouses in the first Harbor node are traversed to obtain all artifact directories under each mirror image warehouse, and then, all mirror images under each artifact directory are traversed to obtain the mirror image in the first Harbor node. All the images in the image warehouse can be obtained by traversing all the artifact catalogs in each image warehouse, and further all the images in the image warehouse can be completely imported into the second Harbor node.
In order to facilitate understanding of the process of obtaining the mirror image in the first Harbor node, please refer to fig. 4, first traverse all mirror image warehouses in the first Harbor node to obtain all artifact directories under each mirror image warehouse, then traverse all mirror images under each artifact directory, then judge whether an unretraversed artifact directory exists, if so, traverse all mirror image warehouses in the first Harbor node again until all the artifact directories under each mirror image warehouse are traversed, and obtain the mirror image in the first Harbor node.
In one embodiment, the obtaining of the mirror image in the first Harbor node may be to obtain, from the first Harbor node, mirror image information representing a storage location and an attribute of the mirror image in the first Harbor node, where the mirror image information may include a storage address of the mirror image in the first Harbor node, mirror image version information, and mirror image content information, where a specific content of the mirror image information is not limited, as long as the mirror image corresponding to the mirror image information can be downloaded from the first Harbor node according to the obtained mirror image information.
S200: downloading the mirror image to a preset directory;
downloading the mirror image acquired from the first Harbor node to a preset directory, and storing the mirror image to be uploaded to the second Harbor node in the preset directory, for example, downloading the mirror image to the preset directory of the node where the tool shown in fig. 1 is deployed.
In one embodiment, the preset directory may be/tmp/images, and the image downloaded to the directory is stored in the/tmp/image directory according to the format of [ image-id ]/such as,/tmp/images/sha 256:84a9c2a56336659b21f2c3c8fc671ce7a76042588491d186924732e9bb5b969f, which is only for ease of understanding and should not be used as an example for illustration of the present application.
In one embodiment, after the mirror image is downloaded to the preset directory, each mirror image file in the preset directory includes an image layer file of the mirror image and a mirror image information file, where the mirror image information file includes data such as an image layer, a start parameter, and a default hanging in the directory. Optionally, the image layer file and the image information file both conform to an Open Container Initiative (OCI) standard.
S300: and uploading each mirror image in the preset directory to a mirror image warehouse of which the mirror image warehouse name in the second Harbor node is the same as the mirror image warehouse name of the mirror image in the first Harbor node.
In one embodiment, before uploading each mirror image in a preset directory to a mirror image warehouse with the same mirror image warehouse name in a second Harbor node as the mirror image warehouse name of the mirror image in a first Harbor node, identity authentication of the second Harbor node is required, wherein the identity authentication of the second Harbor node may be performed by first obtaining identity information of the second Harbor node, then converting the obtained identity information into a preset format and encoding the same to obtain encoded data, and then sending the encoded data to the second Harbor node to enable the second Harbor node to perform identity authentication based on the encoded data, and when the identity authentication passes, uploading each mirror image in the preset directory to a mirror image warehouse with the same mirror image warehouse name in the second Harbor node as the mirror image warehouse name of the mirror image in the first Harbor node.
The process of performing identity authentication on the second Harbor node is the same as the process of performing identity authentication on the first Harbor node described above, and is not described herein again for brief description.
In an embodiment, the process of uploading each mirror image in the preset directory to the mirror image warehouse with the same name as the mirror image warehouse of the mirror image in the first Harbor node may be that, first, it is determined whether there is a mirror image warehouse with the same name as the mirror image warehouse of the mirror image in the first Harbor node in the second Harbor node, and when there is no mirror image warehouse with the same name as the mirror image warehouse of the mirror image in the first Harbor node in the second Harbor node, a mirror image warehouse with the same name as the mirror image warehouse of the mirror image in the first Harbor node is created in the second Harbor node, and then, the mirror image warehouse with the same name as the mirror image warehouse of the mirror image in the first Harbor node is uploaded to the mirror image warehouse of the second Harbor node.
Optionally, when a mirror image warehouse with the same name as the mirror image warehouse where the mirror image is located in the first Harbor node exists in the second Harbor node, the mirror image is uploaded to the mirror image warehouse with the same name as the mirror image warehouse of the mirror image in the first Harbor node.
To facilitate understanding of the process of uploading each mirror in the preset directory to the mirror repository having the same mirror repository name as the mirror repository name of the mirror in the first Harbor node, please refer to fig. 5, where fig. 5 is a schematic flowchart illustrating a process of uploading a mirror in the preset directory to the second Harbor node according to an embodiment of the present disclosure.
Optionally, when a mirror image warehouse with the same name as the mirror image warehouse where the mirror image is located in the first Harbor node exists in the second Harbor node, the mirror image in the preset directory may be pushed to the second Harbor node through a docker in the second Harbor node.
Optionally, when the preset directory includes a plurality of mirror images, the mirror images in the preset directory may be sequentially uploaded to the second Harbor node according to the time sequence of completing downloading of the mirror images from the first Harbor node; or, after the mirror image is downloaded from the first Harbor node, the mirror image is immediately uploaded to the second Harbor node; alternatively, multiple mirrors may be uploaded to the second Harbor node at the same time.
Optionally, after all the images in the preset directory are uploaded to the second Harbor node, the preset directory is deleted to prevent the images from being leaked.
Optionally, after all the mirror images in the preset directory are uploaded to the second Harbor node, it is determined whether all the mirror images in the first Harbor node are imported into the second Harbor node, and if there are mirror images in the first Harbor node that are not imported into the second Harbor node, the mirror images in the first Harbor node are obtained again, where the process of obtaining the mirror images in the first Harbor node is described clearly in the foregoing, and is not described here again.
Optionally, the first Harbor node and the second Harbor node are different versions of Harbor nodes, for example, the first Harbor node may be an old version of Harbor node, and the second Harbor node may be a new version of Harbor node; alternatively, the first Harbor node may be a new version of Harbor node, and the second Harbor node may be an old version of Harbor node.
Referring to fig. 6, fig. 6 is a diagram illustrating an image transmission apparatus 100 according to an embodiment of the present disclosure, where the image transmission apparatus includes an obtaining module 110, a downloading module 120, and an uploading module 130.
An obtaining module 110, configured to obtain a mirror image in the first Harbor node.
The downloading module 120 is configured to download the image to a preset directory.
An uploading module 130, configured to upload each mirror image in the preset directory to a mirror image warehouse having a same mirror image warehouse name in the second Harbor node as the mirror image warehouse name of the mirror image in the first Harbor node.
The obtaining module 110 is further configured to obtain identity information of the first Harbor node; converting the identity information into a preset format and coding to obtain coded data; sending the coded data to the first Harbor node so that the first Harbor node can perform identity authentication based on the coded data; and when the identity authentication is passed, acquiring a mirror image in the first Harbor node.
The obtaining module 110 is further configured to traverse all mirror image warehouses in the first Harbor node to obtain all artifact directories under each mirror image warehouse; and traversing all the mirror images under each artifact directory to obtain the mirror images in the first Harbor node.
The uploading module 130 is specifically configured to obtain identity information of the second Harbor node; converting the identity information into a preset format and coding to obtain coded data; sending the coded data to the second Harbor node so that the second Harbor node can perform identity authentication based on the coded data; and when the identity authentication is passed, uploading each mirror image in the preset directory to a mirror image warehouse of which the mirror image warehouse name in the second Harbor node is the same as the mirror image warehouse name of the mirror image in the first Harbor node.
The uploading module 130 is specifically configured to determine whether the second Harbor node has a mirror image warehouse with the same name as the mirror image warehouse where the mirror image is located in the first Harbor node; when a mirror image warehouse with the same name as the mirror image warehouse in the first Harbor node does not exist in the second Harbor node, creating a mirror image warehouse with the same name as the mirror image warehouse in the first Harbor node in the second Harbor node; and uploading the mirror image to a mirror image warehouse of which the mirror image warehouse name in the second Harbor node is the same as the mirror image warehouse name of the mirror image in the first Harbor node.
The uploading module 130 is specifically configured to determine that the second Harbor node has a mirror image warehouse with the same name as the mirror image warehouse where the mirror image is located in the first Harbor node; and uploading the mirror image to a mirror image warehouse of which the mirror image warehouse name in the second Harbor node is the same as the mirror image warehouse name of the mirror image in the first Harbor node.
The implementation principle and the technical effect of the image transmission apparatus 100 provided in the embodiment of the present application are the same as those of the aforementioned image transmission method embodiment, and for the sake of brief description, no mention is made in the apparatus embodiment, and reference may be made to the corresponding contents in the aforementioned image transmission method embodiment.
Please refer to fig. 7, which is an electronic device 200 according to an embodiment of the present disclosure. The electronic device 200 includes: a transceiver 210, a memory 220, a communication bus 230, and a processor 240.
The elements of the transceiver 210, the memory 220, and the processor 240 are electrically connected to each other directly or indirectly to achieve data transmission or interaction. For example, the components may be electrically coupled to each other via one or more communication buses 230 or signal lines. The transceiver 210 is used for transceiving data. The memory 220 is used to store a computer program such as the software functional module shown in fig. 6, that is, the image transmission apparatus 100. The image transmission apparatus 100 includes at least one software function module, which may be stored in the memory 220 in the form of software or firmware (firmware) or solidified in an Operating System (OS) of the electronic device 200. The processor 240 is configured to execute an executable module stored in the memory 220, such as a software functional module or a computer program included in the image transmission apparatus 100. For example, a mirror image in a first Harbor node is acquired; downloading the mirror image to a preset directory; and uploading each mirror image in the preset directory to a mirror image warehouse of which the mirror image warehouse name in the second Harbor node is the same as the mirror image warehouse name of the mirror image in the first Harbor node.
The Memory 220 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like.
The processor 240 may be an integrated circuit chip having signal processing capabilities. The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor 240 may be any conventional processor or the like.
The electronic device 200 includes, but is not limited to, a personal computer, a server, and the like.
The embodiment of the present application further provides a non-volatile computer-readable storage medium (hereinafter, referred to as a storage medium), where a computer program is stored on the storage medium, and when the computer program is run by the electronic device 200 as described above, the computer program executes the above-described image transmission method.
The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (10)

1. An image transmission method, comprising:
acquiring a mirror image in a first Harbor node;
downloading the mirror image to a preset directory;
and uploading each mirror image in the preset directory to a mirror image warehouse of which the mirror image warehouse name in the second Harbor node is the same as the mirror image warehouse name of the mirror image in the first Harbor node.
2. The method of claim 1, wherein the obtaining the mirror image in the first Harbor node comprises:
acquiring identity information of the first Harbor node;
converting the identity information into a preset format and coding to obtain coded data;
sending the coded data to the first Harbor node so that the first Harbor node can perform identity authentication based on the coded data;
and when the identity authentication is passed, acquiring the mirror image in the first Harbor node.
3. The method of claim 1, wherein the obtaining the mirror image in the first Harbor node comprises:
traversing all mirror image warehouses in the first Harbor node to obtain all artifact catalogs under each mirror image warehouse;
and traversing all the mirror images under each artifact directory to obtain the mirror images in the first Harbor node.
4. The method of claim 1, wherein uploading each mirror in the preset directory to a mirror repository having a mirror repository name in the second Harbor node identical to a mirror repository name of the mirror in the first Harbor node comprises:
acquiring identity information of the second Harbor node;
converting the identity information into a preset format and coding to obtain coded data;
sending the coded data to the second Harbor node so that the second Harbor node can perform identity authentication based on the coded data;
and when the identity authentication is passed, uploading each mirror image in the preset directory to a mirror image warehouse of which the mirror image warehouse name in the second Harbor node is the same as the mirror image warehouse name of the mirror image in the first Harbor node.
5. The method of claim 1, wherein uploading each mirror in the preset directory to a mirror repository having a mirror repository name in the second Harbor node identical to a mirror repository name of the mirror in the first Harbor node comprises:
judging whether a mirror image warehouse with the same name as the mirror image warehouse of the mirror image in the first Harbor node exists in the second Harbor node;
when the second Harbor node does not have a mirror image warehouse with the same name as the mirror image warehouse of the mirror image in the first Harbor node, creating a mirror image warehouse with the same name as the mirror image warehouse of the mirror image in the first Harbor node in the second Harbor node;
and uploading the mirror image to a mirror image warehouse of which the mirror image warehouse name in the second Harbor node is the same as the mirror image warehouse name of the mirror image in the first Harbor node.
6. The method of claim 1, wherein uploading each mirror in the preset directory to a mirror repository having a mirror repository name in a second Harbor node that is the same as the mirror repository name of the mirror in the first Harbor node comprises:
determining that the second Harbor node has a mirror image warehouse with the same name as the mirror image warehouse where the mirror image is located in the first Harbor node;
and uploading the mirror image to a mirror image warehouse of which the mirror image warehouse name in the second Harbor node is the same as the mirror image warehouse name of the mirror image in the first Harbor node.
7. An image transmission apparatus, comprising:
the acquisition module is used for acquiring a mirror image in the first Harbor node;
the downloading module is used for downloading the mirror image to a preset directory;
and the uploading module is used for uploading each mirror image in the preset directory to a mirror image warehouse of which the mirror image warehouse name in the second Harbor node is the same as the mirror image warehouse name of the mirror image in the first Harbor node.
8. The image transmission apparatus according to claim 7, wherein the obtaining module is further configured to obtain identity information of the first Harbor node; converting the identity information into a preset format and coding to obtain coded data; sending the coded data to the first Harbor node so that the first Harbor node can perform identity authentication based on the coded data; and when the identity authentication is passed, acquiring the mirror image in the first Harbor node.
9. An electronic device, comprising: a memory and a processor, the memory and the processor being connected;
the memory is used for storing programs;
the processor to invoke a program stored in the memory to perform the method of any of claims 1-6.
10. A computer-readable storage medium, having stored thereon a computer program which, when executed by a computer, performs the method of any one of claims 1-6.
CN202111401028.2A 2021-11-19 2021-11-19 Mirror image transmission method and device, electronic equipment and storage medium Pending CN114090029A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202111401028.2A CN114090029A (en) 2021-11-19 2021-11-19 Mirror image transmission method and device, electronic equipment and storage medium
PCT/CN2022/099354 WO2023087693A1 (en) 2021-11-19 2022-06-17 Mirror image transmission method and apparatus, electronic device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111401028.2A CN114090029A (en) 2021-11-19 2021-11-19 Mirror image transmission method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114090029A true CN114090029A (en) 2022-02-25

Family

ID=80303769

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111401028.2A Pending CN114090029A (en) 2021-11-19 2021-11-19 Mirror image transmission method and device, electronic equipment and storage medium

Country Status (2)

Country Link
CN (1) CN114090029A (en)
WO (1) WO2023087693A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023087693A1 (en) * 2021-11-19 2023-05-25 中电信数智科技有限公司 Mirror image transmission method and apparatus, electronic device, and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9317223B2 (en) * 2012-12-17 2016-04-19 International Business Machines Corporation Method and apparatus for automated migration of data among storage centers
CN111858181B (en) * 2020-07-22 2024-02-06 浪潮云信息技术股份公司 Method and tool for realizing mirror image synchronization of cross-region container
CN111917856A (en) * 2020-07-27 2020-11-10 平安证券股份有限公司 Mirror image file delivery method and related equipment
CN114090029A (en) * 2021-11-19 2022-02-25 中国电信集团系统集成有限责任公司 Mirror image transmission method and device, electronic equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023087693A1 (en) * 2021-11-19 2023-05-25 中电信数智科技有限公司 Mirror image transmission method and apparatus, electronic device, and storage medium

Also Published As

Publication number Publication date
WO2023087693A1 (en) 2023-05-25

Similar Documents

Publication Publication Date Title
CN107733922B (en) Method and apparatus for invoking a service
CN109995866B (en) Distributed file verification method and device, computer device and storage medium
CN109951514B (en) File processing method and system based on cloud storage and computer equipment
CN110851818B (en) Verification code display method and device, computer equipment and readable storage medium
CN111400777B (en) Network storage system, user authentication method, device and equipment
CN114090029A (en) Mirror image transmission method and device, electronic equipment and storage medium
CN111654399A (en) Networking method, device and equipment based on SD-WAN and storage medium
CN107635221A (en) A kind of car-mounted terminal identifying processing method and device
CN109446445B (en) Resource acquisition method and device
CN112650954B (en) Block chain data sharing method, device, equipment and storage medium
CN114598750A (en) Data request processing method and device and storage medium
EP3668106B1 (en) Method and system for service provisioning to an optical network terminal
CN114285890B (en) Cloud platform connection method, device, equipment and storage medium
US20170286560A1 (en) Method, device and system for device troubleshooting service of the internet of things
US7318060B2 (en) Document management device and method, program therefor, and storage medium
CN114125812A (en) Data synchronization method, device, server and storage medium
CN108780488B (en) Method, system and device for determining uploading permission of substance detection information
CN112256646B (en) Method and device for operating file system subdirectory, electronic equipment and storage medium
CN113014456A (en) Monitoring data transmission system, method, device, equipment and storage medium
CN110929500B (en) File comparison method and related device
CN112068899A (en) Plug-in loading method and device, electronic equipment and storage medium
CN111045928A (en) Interface data testing method, device, terminal and storage medium
CN112560093B (en) File management method, device, equipment and storage medium based on block chain
US20130325926A1 (en) Information processor and information processing method
CN111400327A (en) Data synchronization method and device, electronic 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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: Room 1308, 13th floor, East Tower, 33 Fuxing Road, Haidian District, Beijing 100082

Applicant after: China Telecom Digital Intelligence Technology Co.,Ltd.

Address before: Room 1308, 13th floor, East Tower, 33 Fuxing Road, Haidian District, Beijing 100082

Applicant before: CHINA TELECOM GROUP SYSTEM INTEGRATION Co.,Ltd.