CN113791796B - Cross-domain mirror image generation method, mirror image installation method, device and electronic equipment - Google Patents

Cross-domain mirror image generation method, mirror image installation method, device and electronic equipment Download PDF

Info

Publication number
CN113791796B
CN113791796B CN202111345505.8A CN202111345505A CN113791796B CN 113791796 B CN113791796 B CN 113791796B CN 202111345505 A CN202111345505 A CN 202111345505A CN 113791796 B CN113791796 B CN 113791796B
Authority
CN
China
Prior art keywords
server
image file
target
mirror image
storage server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111345505.8A
Other languages
Chinese (zh)
Other versions
CN113791796A (en
Inventor
李恩铮
苏安琪
唐姝曼
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Kingsoft Cloud Network Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network 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 Kingsoft Cloud Network Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN202111345505.8A priority Critical patent/CN113791796B/en
Publication of CN113791796A publication Critical patent/CN113791796A/en
Application granted granted Critical
Publication of CN113791796B publication Critical patent/CN113791796B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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

Abstract

The embodiment of the invention provides a cross-domain mirror image generation method, a mirror image installation method, a device and electronic equipment, and relates to the technical field of computers. The specific implementation scheme is as follows: when a mirror image generation instruction input by a user is received, determining a target server to be subjected to mirror image generation, which is indicated by the mirror image generation instruction; determining a first object storage server of a region where the target server is located; wherein the first object storage server has stored therein: the target server generates a mirror image file belonging to the whole machine data; transmitting the image file stored by the first object storage server to a second object storage server so as to save the image file by the second object storage server; wherein the second object storage server is: an object storage server within a domain is specified. Therefore, the scheme provided by the invention can improve the generation efficiency of the cross-domain mirror image file.

Description

Cross-domain mirror image generation method, mirror image installation method, device and electronic equipment
Technical Field
The invention relates to the technical field of computers, in particular to a cross-domain mirror image generation method, a mirror image installation method, a device and electronic equipment.
Background
When a user deploys own services by using a bare metal server, servers in different regions and different available areas are created. When a newly created bare metal server needs to use an original server system and data in other regions, the whole data of the original server needs to be copied to a new server. The whole machine data comprises data of a system disk and data disk.
In the related technology, when the complete machine data of an original server needs to be copied to a new server, a user initiates an assistance application for generating a mirror image file of the original server to a cloud service manufacturer through a work order system, so that an internal worker of the cloud service manufacturer manually makes the mirror image file of the original server and manually stores the made mirror image file into an object storage server of a domain where the new server to be installed locates, and a cross-domain mirror image generation process is completed. Therefore, the user can reload the whole data of the new server based on the mirror image file stored in the object storage server, namely, the whole data of the original server is copied in the new server.
Since the mirror image file needs to be manually made and stored by an internal person of a cloud service manufacturer, in the related art, the generation process of the cross-domain mirror image file is complicated, so that the generation efficiency of the cross-domain mirror image file is low.
Disclosure of Invention
The embodiment of the invention aims to provide a cross-domain mirror image generation method, a cross-domain mirror image installation method, a cross-domain mirror image generation device and an electronic device, so as to improve the generation efficiency of cross-domain mirror image files. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a cross-domain mirror image generation method, which is applied to a console, where the console communicates with an object storage server and a pre-created server in each domain; the method comprises the following steps:
when a mirror image generation instruction input by a user is received, determining a target server to be subjected to mirror image generation, which is indicated by the mirror image generation instruction;
determining a first object storage server of a region where the target server is located; wherein the first object storage server has stored therein: the target server generates a mirror image file belonging to the whole machine data;
transmitting the image file stored by the first object storage server to a second object storage server so as to save the image file by the second object storage server; wherein the second object storage server is: an object storage server within a domain is specified.
Optionally, the manner of transferring the image file of the target server in the first object storage server to the second object storage server includes:
sending a transmission instruction for the image file to the first object storage server to cause the first object storage server to transmit the image file to the second object storage server;
alternatively, the first and second electrodes may be,
acquiring the mirror image file from the first object storage server;
and transmitting the image file to the second object storage server.
Optionally, after determining the target server to be subjected to image generation, which is indicated by the image generation instruction, the method further includes:
and sending a mirror image file making instruction to the target server so that the target server makes a mirror image file belonging to the whole machine data, and storing the made mirror image file into the first object storage server.
Optionally, the method for the target server to make the image file belonging to the whole machine data includes:
and after receiving the mirror image file manufacturing instruction sent by the console, manufacturing the mirror image file belonging to the whole machine data by using a specified mirror image manufacturing tool.
Optionally, each region further comprises a pre-execution environment PXE server communicating with the created server;
before sending the mirror image file making instruction to the target server, the method further comprises the following steps:
sending a first specified trigger instruction to the target server, so that the target server downloads a first system file containing the specified image making tool from a target PXE server communicated with the target server, and runs the first system file to enter an operating system indicated by the first system file;
and after the target server enters the operating system indicated by the first system file, sending a mirror image file manufacturing instruction to the target server.
Optionally, the designated region is a region where a server to be installed with the image file is located.
In a second aspect, an embodiment of the present invention provides a mirror image installation method, which is applied to a designated server, where the designated server is a server created in advance in any region, and an object storage server and the server created in advance in each region communicate with a console;
the method comprises the following steps:
receiving an installation instruction of a mirror image file aiming at a target server, which is sent by the console; the target server and the designated server belong to different regions;
acquiring the mirror image file stored in a designated storage server; wherein, the specified storage server is an object storage server in a domain where the specified server is located, and the image file stored in the specified storage server is generated according to the cross-domain image generation method of the first aspect;
and installing the acquired image file.
Optionally, each region further comprises a pre-execution environment PXE server communicating with the created server;
before receiving an installation instruction of an image file of a target server sent by a console, the method further comprises the following steps:
after receiving a second specified trigger instruction sent by a console, acquiring a second system file of a target PXE server communicated with the specified server, and operating the second system file to enter an operating system indicated by the second system file;
the acquiring the image file stored in the designated storage server includes:
and after entering the operating system indicated by the second system file, acquiring the image file stored in the specified storage server by using the target PXE server.
Optionally, the obtaining, by using the target PXE server, the image file stored in the specified storage server includes:
sending an acquisition instruction for the image file to the target PXE server, so that if the target PXE server detects that the image file is stored in the target PXE server and is acquired from the specified storage server in advance, the image file stored in the target PXE server is fed back to the specified server, and if the image file is not stored in the target PXE server and is acquired from the specified storage server in advance, the image file is acquired from the specified storage server and the acquired image file is fed back to the specified server;
and receiving the image file fed back by the target PXE.
In a third aspect, an embodiment of the present invention provides a cross-domain mirror image generation apparatus, which is applied to a console, where the console communicates with an object storage server and a pre-created server in each domain; the device comprises:
the system comprises a first receiving module, a second receiving module and a third receiving module, wherein the first receiving module is used for determining a target server to be subjected to mirror image generation, which is indicated by a mirror image generation instruction, when the mirror image generation instruction input by a user is received;
the determining module is used for determining a first object storage server of a region where the target server is located; wherein the first object storage server has stored therein: the target server generates a mirror image file belonging to the whole machine data;
the transmission module is used for transmitting the image file stored by the first object storage server to a second object storage server so that the second object storage server stores the image file; wherein the second object storage server is: an object storage server within a domain is specified.
In a fourth aspect, an embodiment of the present invention provides a mirror image installation apparatus, which is applied to a designated server, where the designated server is a server created in advance in any region, and an object storage server and the server created in advance in each region communicate with a console; the device comprises:
the second receiving module is used for receiving an installation instruction of the mirror image file aiming at the target server and sent by the console; the target server and the designated server belong to different regions;
the acquisition module is used for acquiring the mirror image file stored in the appointed storage server; wherein, the specified storage server is an object storage server in a domain where the specified server is located, and the image file stored in the specified storage server is generated according to the cross-domain image generation method of the first aspect;
and the installation module is used for installing the acquired mirror image file.
In a fifth aspect, an embodiment of the present invention provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor and the communication interface complete communication between the memory and the processor through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing the steps of the cross-domain mirror image generation method or the steps of the mirror image installation method when executing the program stored in the memory.
In a sixth aspect, an embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and the computer program, when executed by a processor, implements the steps of the above cross-domain image generation method or the steps of the image installation method.
In a seventh aspect, an embodiment of the present invention further provides a computer program product containing instructions, which when run on a computer, causes the computer to execute any one of the above-mentioned cross-domain image generation methods or the above-mentioned image installation method.
In an eighth aspect, an embodiment of the present invention further provides a bare metal server, where the bare metal server is a server created in advance in any region, and the object storage servers and the servers created in advance in each region are in communication with the console;
the bare metal server comprises a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for finishing mutual communication through the communication bus;
a memory for storing a computer program;
the processor is used for realizing the following steps when executing the program stored in the memory: receiving an installation instruction of a mirror image file aiming at a target server, which is sent by the console; the target server and the bare metal server belong to different regions;
acquiring the mirror image file stored in a designated storage server; wherein, the specified storage server is an object storage server in a domain where the bare metal server is located, and the image file stored in the specified storage server is generated according to the cross-domain image generation method of the first aspect;
and installing the acquired image file.
Optionally, each region further comprises a pre-execution environment PXE server communicating with the created server;
the processor is further configured to implement the following steps when executing the program stored in the memory:
before the installation instruction which is sent by the console and aims at the mirror image file of the target server is received, after a second specified trigger instruction sent by the console is received, a second system file of the target PXE server which is communicated with the bare metal server is obtained, and the second system file is operated to enter an operating system indicated by the second system file;
the processor acquires the image file stored in a designated storage server, and comprises the following steps:
and after entering the operating system indicated by the second system file, acquiring the image file stored in the specified storage server by using the target PXE server.
Optionally, the acquiring, by the processor, the image file stored in the designated storage server by using the target PXE server includes:
sending an acquisition instruction for the image file to the target PXE server, so that if the target PXE server detects that the image file is stored in the target PXE server and is acquired from the specified storage server in advance, the image file stored in the target PXE server is fed back to the specified server, and if the image file is not stored in the target PXE server and is acquired from the specified storage server in advance, the image file is acquired from the specified storage server and the acquired image file is fed back to the specified server;
and receiving the image file fed back by the target PXE.
The embodiment of the invention has the following beneficial effects:
in the cross-domain mirror image generation method provided by the embodiment of the present invention, when receiving a mirror image generation instruction input by a user, a console may determine a target server indicated by the mirror image generation instruction, and then determine a first storage server of a region where the target server is located, where: the target server generates a mirror image file belonging to the whole machine data; and further transmitting the image file stored in the first storage server to a second storage server for storage, so that the object storage server in the specified region can store the image file of the target server, that is, the cross-domain image file is generated on the object storage server in the specified region. Therefore, in the cross-domain mirror image generation process, the mirror image file does not need to be manually made and stored by internal personnel of a cloud service manufacturer, so that the cross-domain mirror image file generation process is simplified. Therefore, the scheme provided by the invention can improve the generation efficiency of the cross-domain mirror image file.
On the basis, the invention also provides a mirror image installation method, and the specified server to be subjected to mirror image installation can directly acquire the cross-domain mirror image file from the local domain, so that the installation efficiency of the cross-domain mirror image file can be improved.
Of course, not all of the advantages described above need to be achieved at the same time in the practice of any one product or method of the invention.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other embodiments can be obtained by referring to these drawings.
Fig. 1 is a flowchart of a cross-domain mirror image generation method according to an embodiment of the present invention;
FIG. 2 is a flowchart of a mirror image installation method according to an embodiment of the present invention;
fig. 3 is a network topology diagram of a cross-domain mirror image generation method according to an embodiment of the present invention;
fig. 4 is a flowchart of a specific example of a method for generating an image according to an embodiment of the present invention;
FIG. 5 is a traffic lane diagram of a mirror installation method according to an embodiment of the present invention;
FIG. 6 is a system timing diagram of a mirror installation method according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a cross-domain mirror image generation apparatus according to an embodiment of the present invention;
FIG. 8 is a schematic structural diagram of a mirror image installation apparatus according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived from the embodiments given herein by one of ordinary skill in the art, are within the scope of the invention.
When a user deploys own services by using a bare metal server, servers in different regions and different available regions are created. Thereby, the following problems derive: when a newly created bare metal server needs to use the complete machine data of an original server in other regions, the complete machine data of the original server needs to be copied to a new server; the bare metal server is a computing server with both elastic cloud service and physical machine performance; the region is a geographical area where the physical data center is located, and different regions are completely independent; the available area refers to a physical data center with mutually independent power and network in the same region, a plurality of available areas can be arranged in the same region, and low-delay links can be connected among the available areas in the same region.
In the related technology, when the complete machine data of the original server needs to be copied to the new server, a user submits a work order for assistance application to a cloud service manufacturer through a work order system, after the cloud service manufacturer receives the work order, internal workers manually make a mirror image file of the complete machine data of the original server, and manually copy the generated mirror image file to an object storage server in the region where the new server is located, so that the operation steps are complex;
meanwhile, a user needs to wait for a long time from initiating a work order to a cloud service manufacturer to receiving and processing the work order by the cloud service manufacturer, so that user experience is poor, and after the user submits the work order, workers in the cloud service manufacturer need to manually upload the image file to an object storage server in a region where the new server is located, so that manual operation is more, efficiency is low, and labor consumption is serious.
Since the mirror image file needs to be manually made and stored by an internal person of a cloud service manufacturer, in the related art, the generation process of the cross-domain mirror image file is complicated, so that the generation efficiency of the cross-domain mirror image file is low.
In order to solve the technical problems in the related art, embodiments of the present invention provide a cross-domain mirror image generation method, a mirror image installation method, a device, and an electronic device.
First, a cross-domain mirror image generation method provided by an embodiment of the present invention is described below.
The cross-domain mirror image generation method provided by the embodiment of the invention is applied to a console, the console is communicated with object storage servers in various regions and pre-established servers, wherein the object storage server in each region can be an object storage server capable of cross-domain communication. For example, the pre-created servers in each region may be bare metal servers.
The console may be a server independent of various servers in various regions, and in a specific application, the console may be service software for cross-domain image generation and installation in the server, or a cross-domain image generation and installation plug-in embedded in the service software.
The console may further include a front end for interacting with a user and a back end for communicating with various servers in various regions. A user may utilize a console to enable automated cross-domain mirror generation and installation.
Illustratively, the console may expose control buttons, such as an "image generation" button, an "image installation" button, and a "data query" button, to provide the user with the functionality to generate an image file across domains, install an image file, and query an image file. Specifically, by clicking a mirror image generation button in the console, automatic cross-domain mirror image generation can be realized; by clicking a mirror image installation button in the console, automatic installation can be realized; by clicking the 'data query' button, the relevant image file can be queried.
Illustratively, when the console detects a click operation for the "mirror image generation" button, that is, when a JS (JavaScript, scripting language for developing Web pages) control of the console monitors that a user clicks the "mirror image generation" button event, the front end pops up a relevant mirror image generation form, guides the user to fill in relevant field information, transmits the relevant user filling-in field information to the back end of the console through an API (Application Programming Interface) after the user submits the form, and the back end automatically responds to complete the whole process of generating the mirror image file across domains.
Illustratively, when the console detects a click operation on a 'mirror image installation' button, a front end pops up a related form of mirror image installation, the form can contain a 'data query' button, and when the console detects a click operation on the 'data query' button, a list of mirror images is popped up, and the list provides for querying the mirror images in a region dimension; the data display field in the list can display information such as ID and size of the mirror image file from information required by a user, and accurately display content. When a user clicks and selects a certain image file in the list and submits the related form of the image installation to the back end, the back end can automatically install the image file selected by the user.
The cross-domain mirror image generation method provided by the embodiment of the invention can comprise the following steps:
when a mirror image generation instruction input by a user is received, determining a target server to be subjected to mirror image generation, which is indicated by the mirror image generation instruction;
determining a first object storage server of a region where the target server is located; wherein the first object storage server has stored therein: the target server generates a mirror image file belonging to the whole machine data;
transmitting the image file stored by the first object storage server to a second object storage server so as to save the image file by the second object storage server; wherein the second object storage server is: an object storage server within a domain is specified.
In the solution provided in the embodiment of the present invention, when receiving a mirror image generation instruction input by a user, a console may determine a target server indicated by the mirror image generation instruction, and then determine a first storage server of a region where the target server is located, where: the target server generates a mirror image file belonging to the whole machine data; and further transmitting the image file stored in the first storage server to a second storage server for storage, so that the object storage server in the specified region can store the image file of the target server, that is, the cross-domain image file is generated on the object storage server in the specified region. Therefore, in the cross-domain mirror image generation process, the mirror image file does not need to be manually made and stored by internal personnel of a cloud service manufacturer, so that the cross-domain mirror image file generation process is simplified. Therefore, the scheme provided by the invention can improve the generation efficiency of the cross-domain mirror image file.
The cross-domain mirror image generation method provided by the embodiment of the invention is described below with reference to the accompanying drawings.
As shown in fig. 1, the method for generating a cross-domain mirror image according to an embodiment of the present invention may include the following steps:
s101, when a mirror image generation instruction input by a user is received, determining a target server to be subjected to mirror image generation and indicated by the mirror image generation instruction;
the console provides a cross-domain generation function of the image file for a user, and when the console receives an image generation instruction input by the user, corresponding image generation operation is executed according to parameters carried in the image generation instruction. In this embodiment, first, a target server to be subjected to image generation, which is indicated by an image generation instruction, needs to be determined according to a parameter carried by the image generation instruction, so as to subsequently obtain an image file for the target server. For example, the parameters carried by the image generation instruction may include: identification information, which is used for indicating a target server needing to make the mirror image file, and can be ID or name information of the target server; of course, the parameters carried by the image generation instruction may also include area information of the target server, such as: available area information, and the like. Optionally, when the console includes a front end and a back end, the user gives the identification information of the target server to be subjected to the mirror image generation through the front end of the console, so that the back end of the console may receive the mirror image generation instruction sent by the user through the front end of the console.
For example, if the image generation instruction carries ID information of the target server, the process of determining the target server may be: and acquiring the ID information carried in the mirror image generation instruction, and searching the target server matched with the ID through the ID information.
S102, determining a first object storage server of a region where the target server is located; wherein the first object storage server has stored therein: the target server generates a mirror image file belonging to the whole machine data;
in this embodiment, the image file belonging to the whole data generated by the target server is an image file related to the target server, and the whole data may be a set of system disk data and data disk data of the target server; and after the target server generates the image file belonging to the whole data, the generated image file can be transmitted to the first object storage server in the location domain for storage. It will be appreciated that the object store servers within each of the domains may be servers that communicate across domains to facilitate subsequent object store servers within other domains to retrieve the image file from the first object store server.
Determining the first object storage server in the target server location domain may include various implementations. For example, at least one of the following two ways is included:
the first mode is as follows: and determining the object storage server in the location domain of the target server based on the pre-established mapping relation. The mapping relationship comprises mapping between a server pre-established in each region and an object storage server in the region, and according to the mapping relationship, the object storage server mapped by the target server can be found, namely the first object storage server in the region where the target server is located.
The second mode is as follows: and determining the object storage server in the location domain of the target server based on the region information input by the user. The object storage server in the region can be searched according to the region indicated by the region information, that is, the first object storage server in the region where the target server is located is found.
S103, transmitting the image file stored by the first object storage server to a second object storage server so that the second object storage server stores the image file; wherein the second object storage server is: an object storage server within a domain is specified.
In this embodiment, after the first object storage server of the region where the target server is located is determined through step S102, the image file stored in the first object storage server may be transmitted to the object storage server in the specified region, so as to be saved by the object storage server in the specified region, thereby facilitating the server created in the specified region to use the image file.
Wherein the designated zone may be determined in any one of the following two ways.
The first method is as follows: and the appointed region is determined as the region where the server to be provided with the mirror image file is located. It can be understood that the console may transmit the image file from a first object storage server in a region where the target server is located to a second object storage server in the region where the server to be installed with the image file is located, so that when the server to be installed with the image file needs to use the image file, the console may obtain the image file needed to be used from the object storage server in its own region.
In this embodiment, the method may further include: determining the region information of the designated region, and transmitting the region information of the designated region to the first object storage server;
accordingly, after receiving the region information of the designated region, the first object storage server may transmit the image file to an object storage server in the designated region, that is, a second object storage server. The region information of the designated region may be region information input by a user at the console, and thus, after acquiring the region information input by the user, the console may transmit the region information of the designated region to the first object storage server.
The second method comprises the following steps: the designated region is determined as a region where any one of the object storage servers communicating with the first object storage server is located. It can be understood that the image file is transmitted from the first object storage server to the object storage servers in other regions for storage, and then the image file can be directly obtained from the object storage server in the local region when servers in other regions need to use the image file, which is convenient and fast.
In addition, the transmission mode of the image file can also comprise a plurality of modes.
Optionally, in an implementation manner, the transferring the image file of the target server in the first object storage server to the second object storage server includes:
sending a transmission instruction for the image file to the first object storage server to enable the first object storage server to transmit the image file to the second object storage server.
That is to say, the console sends a transmission instruction for the image file to the first object storage server, where the transmission instruction may carry an identifier of the image file to be transmitted and an identifier or an address of the second object storage server, so as to instruct the first object storage server to transmit the corresponding image file to the second object storage server. And after receiving the image file transmitted by the first object storage server, the second object storage server stores the image file in the local storage space.
Therefore, the image file can be transmitted to the appointed region by the cross-domain transmission mode between the first object storage server and the second object storage server, so as to be convenient for the use of the servers in the appointed region.
Optionally, in another implementation manner, the transferring the image file of the target server in the first object storage server to the second object storage server includes steps a1-a 2:
a1, acquiring the image file from the first object storage server;
in this implementation manner, an instruction for obtaining the image file may be sent to the first object storage server, where the instruction may carry an identifier of the image file to indicate that the first object storage server finds the relevant image file, and then the first object server feeds back the image file to the console, and the console receives the image file.
A2, transmitting the image file to the second object storage server.
After the console receives the image file, the image file may be forwarded to a second object storage server. It will be appreciated that since the console communicates with the object storage servers in the respective domains, the console may act as an intermediate node for the transfer to transfer the image file retrieved from the first object storage server to the second object storage server.
Therefore, by the method, if the object storage server in the region can not transmit across the region, the object storage server can also transmit through the console, so that the transmission mode of the image file is enriched.
In the solution provided in the embodiment of the present invention, when receiving a mirror image generation instruction input by a user, a console may determine a target server indicated by the mirror image generation instruction, and then determine a first storage server of a region where the target server is located, where: the target server generates a mirror image file belonging to the whole machine data; and further transmitting the image file stored in the first storage server to a second storage server for storage, so that the object storage server in the specified region can store the image file of the target server, that is, the cross-domain image file is generated on the object storage server in the specified region. Therefore, in the cross-domain mirror image generation process, the mirror image file does not need to be manually made and stored by internal personnel of a cloud service manufacturer, so that the cross-domain mirror image file generation process is simplified. Therefore, the scheme provided by the invention can improve the generation efficiency of the cross-domain mirror image file.
Furthermore, according to the scheme, automatic cross-domain mirror image manufacturing can be achieved through related operation of the console, workers of cloud service manufacturers do not need to manually manufacture mirror image files, and the manufactured mirror image files are manually copied to the object storage server in the region where the new server is located, so that the waiting time of manual operation and users is reduced, and the generation efficiency of the cross-domain mirror image files is improved.
Optionally, in another embodiment of the present invention, after determining the target server to be subjected to image generation, which is indicated by the image generation instruction, the method further includes:
and sending a mirror image file making instruction to the target server so that the target server makes a mirror image file belonging to the whole machine data, and storing the made mirror image file into the first object storage server.
In this embodiment, the image file of the whole data is an image file including system disk data and data disk data, where the data disk data may be all data disk data in the target server or part of data disk data in the target server. It can be understood that when the complete machine data includes system disk data and all data disk data, a newly deployed server can conveniently acquire all data in a target server, in some scenes, for example, in game scenes, the system disk and the data disk data of each server are the same and the data volume is large, the mode efficiency of copying the data disk data after the traditional system disk loader is completed is low, and the complete machine mirror image can ensure that a game node can be used immediately after being started; when the complete machine data comprises system disk data and partial data disk data, the data needing mirror image manufacturing can be flexibly selected, so that resource waste caused by manufacturing the mirror image of the data which is not needed is avoided.
If the complete machine data includes system disk data and partial data disk data, the image file making instruction may carry a relevant parameter indicating making of an image, for example, the relevant parameter may be a storage area identifier indicating a storage area where data that needs to make an image file is located.
After receiving the mirror image file making instruction, the target server can determine data needing to make the mirror image file based on relevant parameters in the mirror image file making instruction, and then make the mirror image file based on the data. For example: when the relevant parameter is the storage area identifier, the target server may determine the data in the storage area indicated by the storage area identifier as the data for which the image file needs to be made, and further make the image file based on the data in the storage area.
Optionally, the image file manufacturing instruction may further carry an object storage server identifier, where the object storage server identifier indicates the first object storage server, and at this time, after the target server completes manufacturing the image file, the target server may determine the first object storage server based on the object storage server identifier, and write the manufactured image file into the first object storage server.
The method for making the mirror image file belonging to the whole machine data by the target server can be that after receiving the mirror image file making instruction sent by the console, the mirror image file belonging to the whole machine data is made by using a specified mirror image making tool.
Optionally, in one implementation, each local domain further includes a pre-execution environment PXE server in communication with the created server, and the specified mirroring tool may be stored in a target PXE server in communication with the target server.
Accordingly, before sending the image file making instruction to the target server, the method further includes steps B1-B2:
b1, sending a first specified trigger instruction to the target server, so that the target server downloads a first system file containing the specified image production tool from a target PXE (Preboot eXecution Environment) server communicating with the target server, and runs the first system file to enter an operating system indicated by the first system file;
that is, when a target server needs to make an image file, a console sends a first specified trigger instruction to the target server to instruct the target server to download a first system file from the target PXE server, wherein a specified image making tool is integrated in the first system file;
illustratively, the specified image creation tool may be a DISM (Deployment image service and Management) tool. After downloading the first system file, the target server may run the first system file in the local memory, thereby entering the operating system indicated by the first system file, that is, the PXE system.
B2, after the target server enters the operating system indicated by the first system file, sending an image file making instruction to the target server.
In this way, after entering the PXE system, the target server feeds back information for implementing the PXE system to the console, and after receiving the feedback information, the console sends the image file making instruction to the target server, so that the target server makes an image file belonging to the whole data of the target server under the PXE system.
The target server may support a system logical partition (system disk) and a data logical partition (data disk), so that the target server may make an image file of the whole data, that is, make a whole image file including the system disk data and the data disk data. The manufactured image file can be cached locally in the target server, uploaded to the target PXE server or uploaded to an intra-domain object storage server through the target PXE server.
In the related art, since the console generally provides only a function of making an image file of the system disk, such as Linux and Windows operating systems, the console supports only the image file making of the system disk. The data disk image file is manufactured by a worker, a work order is submitted by a user, an assistance application is initiated to a cloud service manufacturer, and the data disk image file is manufactured manually by workers in the cloud service manufacturer, so that when the image file of the whole machine data of the server is generated in a cross-domain mode, an operation link is too long, and technical capability support of related products expected to be self-served by the user side is influenced. In addition, the mirror image file is manually made by workers in the cloud service manufacturer, the waiting time of a user is further prolonged, and the situation that the user urgently needs to deploy the server in a short time cannot be properly dealt with in a manual mode. Therefore, the automation of cross-domain generation of the mirror image file is insufficient, and the generation efficiency of the cross-domain whole mirror image file is low.
Therefore, in the scheme of the embodiment, the console sends the mirror image file making instruction to the target server, and the target server makes the mirror image file belonging to the whole machine data by using the specified mirror image making tool after receiving the mirror image file making instruction, so that the making of the whole machine mirror image file can be automatically completed through the related operation of the console, and the operation flow and time of a user are saved.
On the basis of the scheme, the embodiment of the invention also provides a mirror image installation method which is applied to the appointed server, wherein the appointed server is a server pre-established in any region, and the object storage servers in all regions and the pre-established servers are communicated with the console; as shown in fig. 2, a mirror image installation method provided in an embodiment of the present invention includes steps S201 to S203:
s201, receiving an installation instruction of a mirror image file aiming at a target server, which is sent by the console; the target server and the designated server belong to different regions;
in this embodiment, the target server and the designated server belong to different regions, when the designated server needs to install the image file of the target server, a user may send an installation instruction for the image file of the target server to the designated server through the console, and after receiving the installation instruction for the image file sent by the console, the designated server performs an installation operation for the corresponding image file.
Optionally, in one implementation, each local domain further includes a pre-execution environment PXE server in communication with the created server; before receiving an installation instruction of an image file of a target server sent by a console, the method further comprises the following steps:
and after receiving a second specified trigger instruction sent by the console, acquiring a second system file of a target PXE server communicated with the specified server, and operating the second system file to enter an operating system indicated by the second system file.
In this implementation manner, after receiving a second specified trigger instruction sent by the console, the specified server obtains a second system file stored in a target PXE server in communication with the specified server, and after running the second system file, enters an operating system indicated by the second system file. And after the appointed server enters the operating system indicated by the second system file, receiving an installation instruction which is sent by the console and aims at the image file of the target server.
S202, acquiring the mirror image file stored in a designated storage server; the specified storage server is an object storage server in a domain where the specified server is located, and the image file stored in the specified storage server is generated according to the cross-domain image generation method in the foregoing embodiment;
in this embodiment, after receiving an installation instruction of an image file for a target server, which is sent by a console, a specified server obtains the image file from an object storage server in a domain where the specified server is located.
Optionally, in an implementation manner, the obtaining the image file stored in the specified storage server includes:
and after entering the operating system indicated by the second system file, acquiring the image file stored in the specified storage server by using the target PXE server.
In this implementation manner, after the designated server enters the operating system indicated by the second system file, an installation instruction for the image file of the target server sent by the console is received, and then the image file is downloaded and installed from the object storage server in the domain where the designated server is located.
Optionally, in an implementation manner, the obtaining, by using the target PXE server, the image file stored in the designated storage server includes steps C1-C2:
c1, sending an acquisition instruction for the image file to the target PXE server, so that if the target PXE server detects that the target PXE server stores the image file acquired from the designated storage server in advance, the target PXE server feeds back the image file stored in the target PXE server to the designated server, otherwise, the target PXE server acquires the image file from the designated storage server and feeds back the acquired image file to the designated server;
in this implementation manner, after receiving an acquisition instruction for the image file sent by a specified server, the target PXE server may detect whether the image file requested by the specified server is locally stored according to information about the image file carried in the instruction, and if the image file is stored in the target PXE server, feed back the image file to the specified server; and if the image file is not stored in the target PXE server, acquiring the image file from the specified storage server, and feeding back the acquired image file to the specified server.
C2, receiving the image file fed back by the target PXE.
That is, after the target PXE server feeds back the image file to the designated server, the designated server receives the image file. It can be understood that the image file of the target server generated by the above cross-domain image generation method is stored in the object storage server in a specified region, and the specified region may be a region where the specified server is located. Thus, the designated server may obtain the image file of the target server stored in the designated storage server.
S203, installing the acquired mirror image file.
In this embodiment, after the image file of the target server is acquired in step S202, the image file of the target server may be installed in a designated server. Illustratively, a mirror image installation request may be sent to the console backend by triggering a "mirror image installation" button in the console front-end, and the console backend automatically executes a mirror image installation process after receiving the mirror image installation request.
It is worth mentioning that after the console installs the required mirror image file for the specified server, the self-checking module can also perform self-checking on whether the mirror image is installed successfully, and feed back the installation result to the user through the front end of the console. Therefore, according to the embodiment, the automatic installation of the image file can be realized through the related operation of the console, so that the operation flow and time of a user are reduced.
For a clearer understanding of the contents of the embodiments of the present invention, the network topology and the flow of a specific example of the present invention are described below with reference to fig. 3 and 4.
As shown in fig. 3, the region1 and the region2 are different regions, each region includes an available area 1, an available area 2 and an object storage server, each available area includes a plurality of instances (corresponding to the pre-created servers in the region above) and a PXE server, wherein the instances in the different available areas are independent, and the instances in the different regions are also independent. The PXE servers in different available areas in the same region are connected through links, so that the instances in different available areas in the same region can communicate through the PXE servers in the available areas; there is a link connection between object store servers in different domains, so that instances between different domains can communicate through the object store servers in their home domain.
That is, the overall structure of the network topology map made by cross-domain mirroring is divided into three dimensions:
(1) the method comprises the following steps that region dimensionality is achieved, a single region has a unique object storage server, and the object storage server provides functions of mirror image storage, network transmission and the like for a PXE server in an available region;
(2) available area dimension: the single available area has a unique PXE server, and the object storage server provides functions of image storage, network transmission and the like for the PXE server in the available area;
(3) example dimensions: an example is a server that a user has deployed, and a single usable area may have N instances.
As shown in fig. 4, taking the web-side one-key cross-domain generation of the whole machine image file of the Windows10 Pro version as an example, the cross-domain generation process includes the following steps:
(1) when a user needs to generate a Windows10 Pro version of the whole machine image across domains, the user firstly selects an instance (namely the target server) needing to make an image file through a console, and clicks a button of image generation when detecting that the system of the instance is Windows10 Pro.
(2) The front end monitors a mirror image generation button event, and transmits related parameters (such as identification information of an example) to the back end through an interface, so that the back end automatically makes a complete machine mirror image file, namely a mirror image file belonging to complete machine data, in the example after receiving the related parameters.
(3) And (3) after the step (2) is executed, a system return value exists, and whether the manufacture is successful is judged according to the return value. If the mirror image fails, the front end feeds back information of mirror image making failure, and a user can timely obtain the operation result; if the situation is successful, the whole machine image file is cached to the local place of the instance, and then is automatically uploaded to an object storage server in the region of the instance through an object storage server interface.
(4) And the back end transmits the image file from the object storage server of the region where the instance is located to the object storage server in the appointed region.
Through the process, the process of generating the cross-domain mirror image file can be simplified, so that the generation efficiency of the cross-domain mirror image file is improved.
The technical route of a mirror image installation method provided by the embodiment of the invention is described below with reference to fig. 5.
As shown in fig. 5, the business lane diagram is divided horizontally into a user side and a service provider side, and divided vertically into a production cross-domain generation mirror image stage and a use mirror image stage.
In the cross-domain mirror image generation stage, the user side executes the following operations: a user executes the installation system, selects whether to use the existing mirror image file in the rear end of the console, and enters an installation mirror image stage if the existing mirror image file is used; if not, the user-defined mirror image generation button is clicked through clicking the console, the front end feeds back a mirror image generation form after the console detects that the user-defined mirror image generation button is clicked, a user fills in mirror image information, namely relevant information needed by a cross-domain generation mirror image file, after filling, whether a current mirror image is generated or not is confirmed, and if yes, a mirror image generation instruction carrying form information is sent to a service provider (namely the console rear end).
The service provider side performs the following operations: after receiving the mirror image generation instruction, the service provider makes a mirror image file and caches the mirror image file to the local of the server for making the mirror image file, then automatically uploads the mirror image file to the object storage server of the region where the server for making the mirror image file is located through an object storage server interface, and then transmits the made mirror image file to the object storage server in the appointed region through the object storage server for storage.
And (3) mounting a mirror image stage: a user clicks a 'search for a self-defined mirror' button of a console, a self-defined mirror needing to be installed is searched from a data storage server of a service provider, the user side judges whether the self-defined mirror needing to be installed is in the current region (the region of the server needing to install the mirror), and if yes, a mirror image file in an object storage server in the current domain is subjected to mirror image installation; if not, the user copies the self-defined mirror image to the current region through the control console, the service provider side starts a cross-region mirror image copying service, and copies the mirror image to the current region according to the requirement, namely, copies the mirror image file to the current region from an object storage server in the designated region, wherein the object storage server in the designated region stores the required mirror image file. Therefore, after the current region receives the required mirror image file, the user side can install the required mirror image file through the installation tool, and installation is finished.
The system timing sequence of the cross-domain mirror image generation method and the mirror image installation method provided by the embodiment of the invention is explained with reference to fig. 6.
As shown in fig. 6, in the generation phase of the cross-domain image file: firstly, a user triggers a cross-region mirror image copying instruction (an instruction for indicating cross-domain mirror image file generation), and after a front-end system (namely the front end) receives the instruction, the front-end system feeds back example information, wherein the example information may include a plurality of examples, and specifically may be an example list displayed in a front-end interface; then, the user selects a target instance needing to make the mirror image file from a plurality of instances provided by the front-end interface; the front end transmits the ID and other identification information of the target instance which needs to make the mirror image file and is selected by the user to a back-end system (namely the back end); then, after the back-end system automatically executes the creation of the image file, the image ID, the image data (image file) and the current region information (current region information where the image file is located) are uploaded to the target storage server of the region where the target instance is located for storage, and then the image file and the like are transmitted to the target storage server in the specified region for storage through the target storage server of the region where the target instance is located. The designated region may be a region where a server to which the manufactured image file is to be installed is located.
In the installation stage of the image file: firstly, a user triggers an installation mirror image instruction; then, the console front-end system feeds back mirror image information, which may include a plurality of mirror images (mirror image files), specifically, a mirror image list displayed in the front-end interface; next, the user selects a mirror to be installed; then, the front-end system transmits information such as mirror image ID and the like to the back-end system; then, the back end of the console sends a trigger instruction to a designated server of the mirror image file to be installed, so that the designated server obtains a second system file of the PXE server which is communicated with the designated server, and runs the second system file to enter an operating system indicated by the second system file; after entering the operating system indicated by the second system file, acquiring the image file stored in the designated storage server by using a PXE server, wherein the PXE server firstly checks whether a local required image exists or not, and if not, the image file is downloaded from the local domain object storage server; then, the console can control the PXE server to provide image downloading and installing services for the specified server of the image to be installed, detect whether the image is installed successfully, and feed back the installation result.
According to the scheme provided by the embodiment of the invention, the generation efficiency of the cross-domain mirror image file can be improved.
Corresponding to the above method embodiment, the embodiment of the present invention further provides a cross-domain mirror image generation apparatus, which is applied to a console, where the console communicates with object storage servers in various regions and pre-created servers; as shown in fig. 7, the apparatus includes:
the first receiving module 710 is configured to, when receiving a mirror image generation instruction input by a user, determine a target server to be subjected to mirror image generation, where the target server is indicated by the mirror image generation instruction;
a determining module 720, configured to determine a first object storage server of a region where the target server is located; wherein the first object storage server has stored therein: the target server generates a mirror image file belonging to the whole machine data;
a transmission module 730, configured to transmit the image file stored by the first object storage server to a second object storage server, so that the second object storage server stores the image file; wherein the second object storage server is: an object storage server within a domain is specified.
Optionally, the transmission module is specifically configured to:
sending a transmission instruction for the image file to the first object storage server to cause the first object storage server to transmit the image file to the second object storage server;
alternatively, the first and second electrodes may be,
acquiring the mirror image file from the first object storage server;
and transmitting the image file to the second object storage server.
Optionally, the apparatus further comprises:
and the making module is used for sending a mirror image file making instruction to the target server after determining the target server to be subjected to mirror image generation and indicated by the mirror image generating instruction so as to make the target server make a mirror image file belonging to the whole machine data, and storing the made mirror image file into the first object storage server.
Optionally, the method for the target server to make the image file belonging to the whole machine data includes:
and after receiving the mirror image file manufacturing instruction sent by the console, manufacturing the mirror image file belonging to the whole machine data by using a specified mirror image manufacturing tool.
Optionally, each region further comprises a pre-execution environment PXE server communicating with the created server;
before sending the mirror image file making instruction to the target server, the apparatus further includes:
the downloading module is used for sending a first specified trigger instruction to the target server so that the target server downloads a first system file containing the specified image making tool from a target PXE server communicated with the target server and runs the first system file to enter an operating system indicated by the first system file;
and the entry module is used for sending a mirror image file making instruction to the target server after the target server enters the operating system indicated by the first system file.
Optionally, the designated region is a region where a server to be installed with the image file is located.
Corresponding to the method embodiment, the embodiment of the invention also provides a mirror image installation device, which is applied to the appointed server, wherein the appointed server is a server pre-established in any region, and the object storage servers in all regions and the pre-established servers are communicated with the console; as shown in fig. 8, the apparatus includes:
a second receiving module 810, configured to receive an installation instruction of an image file for a target server, where the installation instruction is sent by the console; the target server and the designated server belong to different regions;
an obtaining module 820, configured to obtain the image file stored in a specified storage server; the specified storage server is an object storage server in a domain where the specified server is located, and the image file stored in the specified storage server is generated according to the cross-domain image generation method in the foregoing embodiment;
and an installation module 830, configured to install the obtained image file.
Optionally, each region further comprises a pre-execution environment PXE server communicating with the created server;
before the receiving of the installation instruction of the image file of the target server sent by the console, the apparatus further includes:
the operating module is used for acquiring a second system file of a target PXE server which is communicated with the specified server after receiving a second specified trigger instruction sent by the console, and operating the second system file to enter an operating system indicated by the second system file;
the acquisition module is specifically configured to:
and after entering the operating system indicated by the second system file, acquiring the image file stored in the specified storage server by using the target PXE server.
Optionally, the obtaining, by using the target PXE server, the image file stored in the specified storage server includes:
sending an acquisition instruction for the image file to the target PXE server, so that if the target PXE server detects that the image file is stored in the target PXE server and is acquired from the specified storage server in advance, the image file stored in the target PXE server is fed back to the specified server, and if the image file is not stored in the target PXE server and is acquired from the specified storage server in advance, the image file is acquired from the specified storage server and the acquired image file is fed back to the specified server;
and receiving the image file fed back by the target PXE.
An embodiment of the present invention further provides an electronic device, as shown in fig. 9, which includes a processor 901, a communication interface 902, a memory 903, and a communication bus 904, where the processor 901, the communication interface 902, and the memory 903 complete mutual communication through the communication bus 904,
a memory 903 for storing computer programs;
the processor 901 is configured to implement the steps of the cross-domain image generation method in any one of the above embodiments or the steps of the image installation method in any one of the above embodiments when executing the program stored in the memory 903.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
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.
In yet another embodiment of the present invention, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the cross-domain image generation method described in any of the above embodiments, or implements the steps of the image installation method described in any of the above embodiments.
In yet another embodiment, the present invention further provides a computer program product containing instructions which, when run on a computer, cause the computer to perform the steps of the cross-domain image generation method described in any of the above embodiments, or the steps of the image installation method described in any of the above embodiments.
In another embodiment provided by the present invention, a bare metal server is further provided, where the bare metal server is a server created in advance in any region, and the object storage servers and the pre-created servers in each region communicate with the console;
the bare metal server comprises a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for finishing mutual communication through the communication bus;
a memory for storing a computer program;
the processor is used for realizing the following steps when executing the program stored in the memory: receiving an installation instruction of a mirror image file aiming at a target server, which is sent by the console; the target server and the bare metal server belong to different regions;
acquiring the mirror image file stored in a designated storage server; the specified storage server is an object storage server in the domain where the bare metal server is located, and the image file stored in the specified storage server is generated according to the cross-domain image generation method in the embodiment;
and installing the acquired image file.
Optionally, each region further comprises a pre-execution environment PXE server communicating with the created server;
the processor is further configured to implement the following steps when executing the program stored in the memory:
before the installation instruction which is sent by the console and aims at the mirror image file of the target server is received, after a second specified trigger instruction sent by the console is received, a second system file of the target PXE server which is communicated with the bare metal server is obtained, and the second system file is operated to enter an operating system indicated by the second system file;
the processor acquires the image file stored in a designated storage server, and comprises the following steps:
and after entering the operating system indicated by the second system file, acquiring the image file stored in the specified storage server by using the target PXE server.
Optionally, the acquiring, by the processor, the image file stored in the designated storage server by using the target PXE server includes:
sending an acquisition instruction for the image file to the target PXE server, so that if the target PXE server detects that the image file is stored in the target PXE server and is acquired from the specified storage server in advance, the image file stored in the target PXE server is fed back to the specified server, and if the image file is not stored in the target PXE server and is acquired from the specified storage server in advance, the image file is acquired from the specified storage server and the acquired image file is fed back to the specified server;
and receiving the image file fed back by the target PXE.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., SolID State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely 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.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (13)

1. A cross-domain mirror image generation method is characterized by being applied to a console, wherein the console is communicated with object storage servers in various regions and pre-established servers, and each region also comprises a pre-execution environment PXE server communicated with the established server; the method comprises the following steps:
when a mirror image generation instruction input by a user is received, determining a target server to be subjected to mirror image generation, which is indicated by the mirror image generation instruction;
determining a first object storage server of a region where the target server is located; wherein the first object storage server has stored therein: the target server generates a mirror image file belonging to the whole machine data;
transmitting the image file stored by the first object storage server to a second object storage server so as to save the image file by the second object storage server; wherein the second object storage server is: designating an object storage server within a domain;
after determining the target server to be subjected to image generation and indicated by the image generation instruction, the method further includes:
sending a first specified trigger instruction to the target server, so that the target server downloads a first system file containing the specified image making tool from a target PXE server communicated with the target server, and runs the first system file to enter an operating system indicated by the first system file;
after the target server enters an operating system indicated by the first system file, sending a mirror image file making instruction to the target server so that the target server makes a mirror image file belonging to the whole machine data, and storing the made mirror image file into the first object storage server;
the mode of the target server for manufacturing the mirror image file belonging to the whole machine data comprises the following steps:
and after receiving the mirror image file manufacturing instruction sent by the console, manufacturing the mirror image file belonging to the whole machine data by using a specified mirror image manufacturing tool.
2. The method of claim 1, wherein transferring the image file of the target server of the first object storage server to the second object storage server comprises:
sending a transmission instruction for the image file to the first object storage server to cause the first object storage server to transmit the image file to the second object storage server;
alternatively, the first and second electrodes may be,
acquiring the mirror image file from the first object storage server;
and transmitting the image file to the second object storage server.
3. The method according to claim 1 or 2, wherein the designated region is a region where a server to install the image file is located.
4. A mirror image installation method is characterized in that the mirror image installation method is applied to a designated server, the designated server is a server pre-established in any region, and an object storage server and the pre-established server in each region are communicated with a console;
the method comprises the following steps:
receiving an installation instruction of a mirror image file aiming at a target server, which is sent by the console; the target server and the designated server belong to different regions;
acquiring the mirror image file stored in a designated storage server; the designated storage server is an object storage server in the domain where the designated storage server is located, and the image file stored in the designated storage server is generated according to the method of any one of claims 1 to 3;
and installing the acquired image file.
5. The method as recited in claim 4, further comprising within each locality a pre-execution environment (PXE) server in communication with the created server;
before receiving an installation instruction of an image file of a target server sent by a console, the method further comprises the following steps:
after receiving a second specified trigger instruction sent by a console, acquiring a second system file of a target PXE server communicated with the specified server, and operating the second system file to enter an operating system indicated by the second system file;
the acquiring the image file stored in the designated storage server includes:
and after entering the operating system indicated by the second system file, acquiring the image file stored in the specified storage server by using the target PXE server.
6. The method as claimed in claim 4, wherein the obtaining, by using the target PXE server, the image file stored in the specified storage server includes:
sending an acquisition instruction for the image file to the target PXE server, so that if the target PXE server detects that the image file is stored in the target PXE server and is acquired from the specified storage server in advance, the image file stored in the target PXE server is fed back to the specified server, and if the image file is not stored in the target PXE server and is acquired from the specified storage server in advance, the image file is acquired from the specified storage server and the acquired image file is fed back to the specified server;
and receiving the image file fed back by the target PXE.
7. A cross-domain mirror image generation device is applied to a console, and the console is communicated with an object storage server in each region and a pre-established server; each region also comprises a pre-execution environment PXE server which is communicated with the created server; the device comprises:
the system comprises a first receiving module, a second receiving module and a third receiving module, wherein the first receiving module is used for determining a target server to be subjected to mirror image generation, which is indicated by a mirror image generation instruction, when the mirror image generation instruction input by a user is received;
the determining module is used for determining a first object storage server of a region where the target server is located; wherein the first object storage server has stored therein: the target server generates a mirror image file belonging to the whole machine data;
the transmission module is used for transmitting the image file stored by the first object storage server to a second object storage server so that the second object storage server stores the image file; wherein the second object storage server is: designating an object storage server within a domain;
the determining module is further configured to send a first specified trigger instruction to the target server after the first receiving module executes a target server to be subjected to image generation and indicated by the image generation instruction, so that the target server downloads a first system file including the specified image making tool from a target PXE server in communication with the target server, runs the first system file to enter an operating system indicated by the first system file, and sends an image file making instruction to the target server after the target server enters the operating system indicated by the first system file, so that the target server makes an image file belonging to complete machine data, and stores the made image file in the first object storage server; the mode of the target server for manufacturing the mirror image file belonging to the whole machine data comprises the following steps: and after receiving the mirror image file manufacturing instruction sent by the console, manufacturing the mirror image file belonging to the whole machine data by using a specified mirror image manufacturing tool.
8. The mirror image installation device is applied to a designated server, wherein the designated server is a server pre-established in any region, and an object storage server and the pre-established server in each region are communicated with a console; the device comprises:
the second receiving module is used for receiving an installation instruction of the mirror image file aiming at the target server and sent by the console; the target server and the designated server belong to different regions;
the acquisition module is used for acquiring the mirror image file stored in the appointed storage server; the designated storage server is an object storage server in the domain where the designated storage server is located, and the image file stored in the designated storage server is generated according to the method of any one of claims 1 to 3;
and the installation module is used for installing the acquired mirror image file.
9. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the steps of the cross-domain image generation method of any one of claims 1 to 3 or the steps of the image installation method of any one of claims 4 to 6 when executing a program stored in a memory.
10. A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, carries out the steps of the cross-domain image generation method according to any one of claims 1 to 3 or the steps of the image installation method according to any one of claims 4 to 6.
11. A bare metal server is characterized in that the bare metal server is a server pre-established in any region, and an object storage server and the pre-established server in each region are communicated with a console;
the bare metal server comprises a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for finishing mutual communication through the communication bus;
a memory for storing a computer program;
the processor is used for realizing the following steps when executing the program stored in the memory: receiving an installation instruction of a mirror image file aiming at a target server, which is sent by the console; the target server and the bare metal server belong to different regions;
acquiring the mirror image file stored in a designated storage server; the specified storage server is an object storage server in the region where the bare metal server is located, and the image file stored in the specified storage server is generated according to the method of any one of claims 1 to 3;
and installing the acquired image file.
12. The bare metal server according to claim 11, further comprising a pre-execution environment (PXE) server within each locality in communication with the created server;
the processor is further configured to implement the following steps when executing the program stored in the memory:
before the installation instruction which is sent by the console and aims at the mirror image file of the target server is received, after a second specified trigger instruction sent by the console is received, a second system file of the target PXE server which is communicated with the bare metal server is obtained, and the second system file is operated to enter an operating system indicated by the second system file;
the processor acquires the image file stored in a designated storage server, and comprises the following steps:
and after entering the operating system indicated by the second system file, acquiring the image file stored in the specified storage server by using the target PXE server.
13. The bare metal server according to claim 12, wherein the processor obtains the image file stored in the designated storage server using the target PXE server, including:
sending an acquisition instruction for the image file to the target PXE server, so that if the target PXE server detects that the image file is stored in the target PXE server and is acquired from the specified storage server in advance, the image file stored in the target PXE server is fed back to the specified server, and if the image file is not stored in the target PXE server and is acquired from the specified storage server in advance, the image file is acquired from the specified storage server and the acquired image file is fed back to the specified server;
and receiving the image file fed back by the target PXE.
CN202111345505.8A 2021-11-15 2021-11-15 Cross-domain mirror image generation method, mirror image installation method, device and electronic equipment Active CN113791796B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111345505.8A CN113791796B (en) 2021-11-15 2021-11-15 Cross-domain mirror image generation method, mirror image installation method, device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111345505.8A CN113791796B (en) 2021-11-15 2021-11-15 Cross-domain mirror image generation method, mirror image installation method, device and electronic equipment

Publications (2)

Publication Number Publication Date
CN113791796A CN113791796A (en) 2021-12-14
CN113791796B true CN113791796B (en) 2022-03-04

Family

ID=78955183

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111345505.8A Active CN113791796B (en) 2021-11-15 2021-11-15 Cross-domain mirror image generation method, mirror image installation method, device and electronic equipment

Country Status (1)

Country Link
CN (1) CN113791796B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104050015A (en) * 2014-06-27 2014-09-17 国家计算机网络与信息安全管理中心 Mirror image storage and distribution system for virtual machines
CN104219099A (en) * 2014-09-25 2014-12-17 浪潮(北京)电子信息产业有限公司 Automatic server cluster deploying method and device
WO2021022985A1 (en) * 2019-08-06 2021-02-11 中兴通讯股份有限公司 Cloud service processing method and device, cloud server, cloud service system and storage medium
CN112433677A (en) * 2020-11-24 2021-03-02 浪潮云信息技术股份公司 Method for docking multiple storage back ends by cloud mirror image service
CN112955869A (en) * 2018-11-08 2021-06-11 英特尔公司 Function As A Service (FAAS) system enhancements

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104050015A (en) * 2014-06-27 2014-09-17 国家计算机网络与信息安全管理中心 Mirror image storage and distribution system for virtual machines
CN104219099A (en) * 2014-09-25 2014-12-17 浪潮(北京)电子信息产业有限公司 Automatic server cluster deploying method and device
CN112955869A (en) * 2018-11-08 2021-06-11 英特尔公司 Function As A Service (FAAS) system enhancements
WO2021022985A1 (en) * 2019-08-06 2021-02-11 中兴通讯股份有限公司 Cloud service processing method and device, cloud server, cloud service system and storage medium
CN112433677A (en) * 2020-11-24 2021-03-02 浪潮云信息技术股份公司 Method for docking multiple storage back ends by cloud mirror image service

Also Published As

Publication number Publication date
CN113791796A (en) 2021-12-14

Similar Documents

Publication Publication Date Title
EP2791800B1 (en) System and method for data collection and analysis of information relating to mobile applications
CN108196878B (en) Method and device for generating application program installation package, electronic equipment and storage medium
US9465625B2 (en) Provisioning of operating environments on a server in a networked environment
US9952849B2 (en) Apparatus, information processing system, method for processing information, and program
US11914881B2 (en) Data migration method and apparatus
US10216514B2 (en) Identification of a component for upgrade
CN108540509B (en) Processing method and device of terminal browser, server and intelligent terminal
CN109587258B (en) Service activity detection method and device
JP6359652B2 (en) Information transmission method, apparatus and device
CN110968331B (en) Method and device for running application program
CN105446750A (en) Web app starting operation and mirror image file generating method and device
CN109933289B (en) Storage copy deployment method and system, electronic equipment and storage medium
CN106802814A (en) For the method and device of software release upgrade
US20100235826A1 (en) Apparatus, system, and method for efficient code update
CN110890987A (en) Method, device, equipment and system for automatically creating cluster
CN115168031A (en) Fog calculation system, method, electronic equipment and storage medium
US11900089B2 (en) Automatically configuring and deploying a software operator in a distributed computing environment from a package
JP2006338225A (en) Automatic installation method of computer
US10193737B2 (en) Method for performing communication between browser and mobile terminal, and browser apparatus
CN113791796B (en) Cross-domain mirror image generation method, mirror image installation method, device and electronic equipment
CN113342419A (en) Loading method and device for push system, electronic equipment and storage medium
CN109375946B (en) Method and system for managing component package of node package manager
CN109086059B (en) Code loading updating method, device and server
CN111913870A (en) Multi-environment management method, device, system, equipment and medium
CN114866517A (en) Installation file execution method and device 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
GR01 Patent grant
GR01 Patent grant