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

Mirror image deployment method, device, equipment and storage medium Download PDF

Info

Publication number
CN112214284A
CN112214284A CN202011135030.5A CN202011135030A CN112214284A CN 112214284 A CN112214284 A CN 112214284A CN 202011135030 A CN202011135030 A CN 202011135030A CN 112214284 A CN112214284 A CN 112214284A
Authority
CN
China
Prior art keywords
equipment
address information
database
image
mirror image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011135030.5A
Other languages
Chinese (zh)
Inventor
耿明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Capitalonline Data Service Co ltd
Original Assignee
Capitalonline Data Service 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 Capitalonline Data Service Co ltd filed Critical Capitalonline Data Service Co ltd
Priority to CN202011135030.5A priority Critical patent/CN112214284A/en
Publication of CN112214284A publication Critical patent/CN112214284A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/63Image based installation; Cloning; Build to order
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45562Creating, deleting, cloning virtual machine instances
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45575Starting, stopping, suspending or resuming virtual machine instances

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides a mirror image deployment method, a mirror image deployment device, equipment and a storage medium, wherein the method comprises the following steps: the method comprises the steps that a first device sends a query request to a database, wherein the query request is used for querying the number of mirror images; the first device receives the mirror image quantity from the database; acquiring first address information of the second equipment from a database according to the number of the mirror images; and mounting the mirror image in the storage system to the second equipment according to the first address information, and setting the mirror image as a starting item of the third equipment by the second equipment. The method comprises the steps that a query request is sent to a database through first equipment, the quantity of mirror images is queried from the database, first address information of second equipment is obtained from the database according to the quantity of the mirror images, further, the mirror images are mounted on the second equipment according to the first address information of the second equipment, the second equipment can set the mirror images as starting items of third equipment, and therefore the first equipment can automatically deploy the mirror images in the third equipment through the second equipment.

Description

Mirror image deployment method, device, equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for deploying a mirror image.
Background
With the continuous development of Computer technology, enterprises have higher and higher requirements on Computer storage performance, and conventional storage protocols, such as Internet Small Computer System Interface (iSCSI), have been unable to meet the requirements in some specific service scenarios.
In order to support network storage of a data center, a Non-Volatile Memory (NVMe) fusion Fabric (NVMeOF) is proposed in the prior art. The extension of the NVMe standard on a Peripheral Component Interconnect express (PCIe) standard can be realized by the NVMeOF. In addition, NVMe may be mapped to multiple fabric (Fabrics) Transmission options through NVMeOF, and the Fabrics Transmission options may include Fibre Channel (FC), wireless bandwidth (InfiniBand, IB), Remote Direct data Access (RDMA) second version (v2) of RDMA over Ethernet (RoCE), Internet Wide Area RDMA Protocol (Wide Area RDMA Protocol), Transmission Control Protocol (TCP), and the like. The mapping of NVMe to multiple fabric (Fabrics) transmission options enables the data center and the storage system to communicate with each other through a network, so that the data center can access an NVMe Solid State Disk (SSD) in the storage system. The data center may include a host, among other things. Thereby enabling faster access between the host and the storage system.
Therefore, NVMeOF has lower latency compared to iSCSI, but needs the functionality needed to maintain traffic while replacing iSCSI, and there is a lack in the prior art of methods for automated image deployment in hosts based on NVMeOF.
Disclosure of Invention
The embodiment of the application provides a mirror image deployment method, a mirror image deployment device, equipment and a storage medium, which are used for solving the problems in the related technology, and the technical scheme is as follows:
in a first aspect, an embodiment of the present application provides a mirror image deployment method, including:
the method comprises the steps that a first device sends a query request to a database, wherein the query request is used for querying the quantity of mirror images;
the first device receiving the mirror image quantity from the database;
the first equipment acquires first address information of second equipment from the database according to the mirror image quantity;
and the first equipment mounts the mirror image in the storage system into the second equipment according to the first address information, wherein the second equipment is used for setting the mirror image as a starting item of the third equipment.
In one embodiment, the obtaining, by the first device, the first address information of the second device from the database according to the number of images includes:
and the first equipment acquires the first address information of the second equipment from the database under the condition that the number of the images is greater than or equal to 1.
In one embodiment, the obtaining, by the first device, the first address information of the second device from the database according to the number of images includes:
in the case that the number of images is equal to 0, the first device creates an image in the storage system;
the first device stores the relevant information of the created mirror image in the database;
the first device obtains the first address information of the second device from the database.
In one embodiment, the first device creates an image in the storage system, comprising:
the first device creates an image in the storage system, sets quality of service of the image, and acquires identification information of the image.
In one embodiment, the first device stores information about the created image in the database, including:
the first device stores the quality of service of the created image and the identification information of the image in the database.
In one embodiment, the method further comprises:
the first device sends first configuration information to a fourth device, the first configuration information is used for configuring a port of the fourth device, the port of the fourth device is used for communication between the third device and a fifth device, and the fifth device is used for configuring second address information of the third device.
In one embodiment, the method further comprises:
the first device sends a restart control instruction to the third device, where the restart control instruction is used to control the third device to restart, and after the third device is restarted, the third device is used to obtain the second address information from the fifth device.
In one embodiment, the method further comprises:
and the first device determines the corresponding relation between the fourth address information and the fifth address information according to the corresponding relation between the third address information of the third device and the fourth address information of the fifth device, which is locally stored, and the corresponding relation between the third address information and the fifth address information of the public network, which is stored in the database.
In one embodiment, the method further comprises:
and the first device sends second configuration information to the third device, wherein the second configuration information is used for modifying the fourth address information stored in the third device into the fifth address information.
In a second aspect, an embodiment of the present application provides a mirror image deployment method, where the method includes:
the second equipment receives a mounting instruction sent by the first equipment;
the second device mounts the mirror image in the storage system into the second device according to the mounting instruction;
the second device sets the image as a boot item of the third device.
In one embodiment, the second device sets the image as a boot item of a third device, including:
the second device maps the image to a local block device and sets the image as a boot entry of the third device.
In a third aspect, an embodiment of the present application provides an image deployment apparatus, where the apparatus includes:
the sending module is used for sending a query request to the database, wherein the query request is used for querying the number of the mirror images;
a receiving module, configured to receive the number of images from the database;
the acquisition module is used for acquiring first address information of the second equipment from the database according to the number of the mirror images;
and the mounting module is used for mounting the mirror image in the storage system into the second equipment according to the first address information, and the second equipment is used for setting the mirror image as a starting item of the third equipment.
In an embodiment, the obtaining module is specifically configured to obtain the first address information of the second device from the database when the number of images is greater than or equal to 1.
In one embodiment, the apparatus further comprises: a creation module and a storage module;
a creation module for creating a mirror in the storage system if the number of mirrors is equal to 0;
the storage module is used for storing the relevant information of the created mirror image into the database;
the obtaining module is specifically configured to obtain the first address information of the second device from the database.
In one embodiment, the apparatus further comprises: the setting module is used for setting the service quality of the mirror image after the mirror image is created by the creating module; the acquisition module is further configured to: and acquiring the identification information of the mirror image.
In one embodiment, the storage module is specifically configured to: storing the service quality of the created mirror and the identification information of the mirror in the database.
In one embodiment, the sending module is further configured to: and sending first configuration information to a fourth device, wherein the first configuration information is used for configuring a port of the fourth device, the port of the fourth device is used for communication between the third device and a fifth device, and the fifth device is used for configuring second address information of the third device.
In one embodiment, the sending module is further configured to: and sending a restart control instruction to the third device, wherein the restart control instruction is used for controlling the third device to restart, and after the third device is restarted, the third device is used for acquiring the second address information from the fifth device.
In one embodiment, the apparatus further comprises: a determining module, configured to determine a correspondence between the fourth address information and the fifth address information according to a correspondence between locally stored third address information of the third device and fourth address information of the fifth device, and a correspondence between the third address information and fifth address information of a public network, where the correspondence is stored in the database.
In one embodiment, the sending module is further configured to: and sending second configuration information to the third device, wherein the second configuration information is used for modifying the fourth address information stored in the third device into the fifth address information.
In a fourth aspect, an embodiment of the present application provides an image deployment apparatus, including:
the receiving module is used for receiving a mounting instruction sent by first equipment;
the mounting module is used for mounting the mirror image in the storage system into the second equipment according to the mounting instruction;
and the setting module is used for setting the mirror image as a starting item of the third equipment.
In one embodiment, the apparatus further comprises: and the mapping module is used for mapping the mirror image into local block equipment.
In a fifth aspect, an embodiment of the present application provides an image deployment device, where the device includes: a memory and a processor. Wherein the memory and the processor are in communication with each other via an internal connection path, the memory is configured to store instructions, the processor is configured to execute the instructions stored by the memory, and the processor is configured to perform the method of any of the above aspects when the processor executes the instructions stored by the memory.
In a sixth aspect, embodiments of the present application provide a computer-readable storage medium, which stores a computer program, and when the computer program runs on a computer, the method in any one of the above-mentioned aspects is executed.
The advantages or beneficial effects in the above technical solution at least include: the method comprises the steps that a query request is sent to a database through first equipment, the quantity of mirror images is queried from the database, first address information of second equipment is obtained from the database according to the quantity of the mirror images, further, the mirror images are mounted on the second equipment according to the first address information of the second equipment, the second equipment can set the mirror images as starting items of third equipment, and therefore the first equipment can automatically deploy the mirror images in the third equipment through the second equipment.
The foregoing summary is provided for the purpose of description only and is not intended to be limiting in any way. In addition to the illustrative aspects, embodiments, and features described above, further aspects, embodiments, and features of the present application will be readily apparent by reference to the drawings and following detailed description.
Drawings
In the drawings, like reference numerals refer to the same or similar parts or elements throughout the several views unless otherwise specified. The figures are not necessarily to scale. It is appreciated that these drawings depict only some embodiments in accordance with the disclosure and are therefore not to be considered limiting of its scope.
FIG. 1 is a flowchart of a mirror deployment method according to an embodiment of the present application;
FIG. 2 is a schematic diagram of an application scenario according to an embodiment of the present application;
FIG. 3 is a flow diagram of an image deployment according to another embodiment of the present application;
FIG. 4 is a schematic diagram of an application scenario according to another embodiment of the present application;
FIG. 5 is a flow diagram of a mirror deployment according to another embodiment of the present application;
FIG. 6 is a block diagram of a mirror image deployment apparatus according to an embodiment of the present application;
FIG. 7 is a block diagram of a mirror image deployment apparatus according to another embodiment of the present application;
fig. 8 is a block diagram of a mirror image deployment device according to an embodiment of the present application.
Detailed Description
In the following, only certain exemplary embodiments are briefly described. As those skilled in the art will recognize, the described embodiments may be modified in various different ways, all without departing from the spirit or scope of the present application. Accordingly, the drawings and description are to be regarded as illustrative in nature, and not as restrictive.
Compared with iSCSI, NVMeOF has lower delay, but the functions required by the maintenance of the service are required while replacing iSCSI, and the method for automatically deploying the image in the host based on NVMeOF is lacked in the prior art. In order to solve the problem, an embodiment of the present application provides an image deployment method, and specifically, an image may be automatically deployed in a host based on NVMeOF. A detailed description is given below of a mirror image deployment method provided in the embodiments of the present application with reference to specific embodiments.
FIG. 1 shows a flowchart of an image deployment method according to an embodiment of the present application. As shown in fig. 1, the method may include:
s101, the first device sends a query request to the database, and the query request is used for querying the number of the mirror images.
The mirror image deployment method described in this embodiment may be applied to the application scenario shown in fig. 2. As shown in fig. 2, the application scenario includes a first device 21, a database 22, a switch 23, a second device 24, a third device 25, and a storage system 26. The number of the second devices 24 is not limited to one, and may be multiple, for example, and two second devices 24 are taken as an example to be schematically illustrated here. Similarly, the number of the third devices 25 is not limited to one, and may be a plurality of third devices, and two third devices 25 are exemplified here for illustrative purposes. Wherein the first device 21 may communicate with the database 22 and the switch 23, respectively, the database 22 may be integrated in the first device 21, or the first device 21 and the database 22 may be independent from each other. The switch 23 may communicate with the second device 24 and the storage system 26, respectively. The second device 24 may communicate with a third device 25.
Specifically, the storage system 26 may include an image, which may be a disk volume, which may be understood as a storage unit or storage space in the storage system 26. In addition, the disk volume can also be recorded as a template clone volume. The database 22 may store the number of images and a Universal Unique Identifier (UUID) of each image. The first device 21 may specifically be a Bare Metal Server (BMS). The first device 21 may send a query request to the database 22, the query request being for a query of the number of images. Alternatively, in some embodiments, the query request is used to query the number of images and the UUID of each image. The mirror quantity may be specifically a template clone volume inventory quantity.
And S102, the first device receives the mirror image number from the database.
In case the database 22 receives the query request, the database 22 may send the mirrored amount to the first device 21, and accordingly the first device 21 receives the mirrored amount from the database 22.
S103, the first device acquires the first address information of the second device from the database according to the mirror image quantity.
As shown in fig. 2, the second device 24 may specifically be a Network Interface Controller (NIC), which may also be called a Network Adapter (Network Adapter), a Network Card (Network Interface Card), or a Local Area Network receiver (Local Area Network Adapter), and is a piece of computer hardware designed to allow a computer to communicate over a computer Network. Where RoCE may be a network protocol that allows RDMA over Ethernet, the frame header, i.e., the network header, may be an Ethernet header, the data portion of the frame format of the network protocol may include an InfiniBand header, thereby allowing RDMA to be used on a standard Ethernet infrastructure (switch), and the NIC may be special, e.g., may be an adapter or interface card that reduces latency and CPU usage. The adapter may register a direct storage area that may be used by the application so that the third device 25 may pass the data to be transferred directly to the storage system.
For example, the database 22 may also store address information for the second device 24. The second device 24 may obtain address information of the second device 24 from the database 22 according to the number of images, where the address information may specifically be an Internet Protocol (IP) address, and the IP address of the second device 24 may be recorded as the first address information.
And S104, the first device mounts the mirror image in the storage system into the second device according to the first address information, wherein the second device is used for setting the mirror image as a starting item of the third device.
The first device 21 may mount the image in the storage system to the second device 24 according to the IP address of the second device 24, and further, the second device 24 may map the image to a local block device and set the image as a special boot entry of the third device 25. The third device 25 may specifically be a Physical Server (Physical Server). The second device 24, e.g. the RoCE NIC, may be a network card of the third device 25, in which case the RoCE NIC may be provided in the third device 25. Alternatively, in some embodiments, the second device 24 and the third device 25 may be separate devices. In addition, the third device 25 may also be referred to as a host.
According to the method and the device, the query request is sent to the database through the first device, the number of the mirror images is queried from the database, the first address information of the second device is obtained from the database according to the number of the mirror images, further, the mirror images are mounted on the second device according to the first address information of the second device, the second device can set the mirror images as the starting items of the third device, and therefore the first device can automatically deploy the mirror images in the third device through the second device. For example, when the second device is a RoCE NIC, the first address information is an IP address, and the third device is a host, the first device sends a query request to the database, queries the number of images from the database, and obtains the IP address of the RoCE NIC from the database according to the number of images, and further mounts the images onto the RoCE NIC according to the IP address of the RoCE NIC, and the RoCE NIC sets the images as a start item of the host, so that the first device can automatically deploy images in the host through the RoCE NIC.
FIG. 3 shows a flow diagram of an image deployment method according to another embodiment of the present application. As shown in fig. 3, the method may include:
s301, the first device sends a query request to the database, and the query request is used for querying the number of the mirror images.
The first device 21 may send a query request to the database 22, the query request being for a query of the number of images.
S302, the first device receives the mirror image number from the database.
In case the database 22 receives the query request, the database 22 may send the mirrored amount to the first device 21, and accordingly the first device 21 receives the mirrored amount from the database 22.
And S303, under the condition that the number of the images is greater than or equal to 1, the first device acquires the first address information of the second device from the database. S307 may be performed after S303.
For example, in the case that the number of images is greater than or equal to 1, the first device 21 may directly obtain the first address information of the second device 24 from the database 22, for example, the IP address of the RoCE NIC. It is understood that the first device 21 directly obtains the first address information of the second device 24 from the database 22 is not limited to the case that the number of images is greater than or equal to 1, and may also be performed, for example, if the number of images is greater than or equal to 2, 3 or other positive integer. The number of images greater than or equal to 1 in this embodiment is only an illustrative example of images with stock in the storage system. In addition, in a case where the first device 21 acquires the first address information of the second device 24, the first device 21 may further perform S307 described below.
S304, under the condition that the mirror quantity is equal to 0, the first device creates a mirror in the storage system.
For example, in the case where the number of images is equal to 0, the first device 21 may create an image in the storage system 26. As shown in fig. 2, the first device 21 may communicate with the storage system 26 through the switch 23. For example, the first device 21 may communicate with the switch 23 through a BMS Application Programming Interface (API), the Storage system 26 may be a Storage Area Network (SAN), and the switch 23 may communicate with the SAN through the SAN API. So that the first device 21 can call the SAN API through the BMS API and create an image in the storage system 26 through the SAN API. For example, the first device 21 obtains the clone template in the storage system 26 by calling the SAN API, and further, the first device 21 clones a new template clone volume according to the clone template, the new template clone volume being an image created in the storage system 26 by the first device 21. The SAN API may also be denoted as a storage API. The BMS API may perform, among others, disk volume lifecycle management, disk volume QoS management, RoCE network card control, NVMe target (target) control, and the like.
Optionally, the creating, by the first device, an image in the storage system includes: the first device creates an image in the storage system, sets quality of service of the image, and acquires identification information of the image.
For example, in the case where the first device 21 creates an image in the storage system 26, the first device 21 may also set Quality of Service (QoS) of the image and acquire identification information of the image, such as a UUID.
S305, the first device stores the related information of the created mirror image in the database.
For example, after the first device 21 creates an image in the storage system 26, the first device 21 may further store the information about the created image in the database 22.
Optionally, the first device stores the information about the created image in the database, including: the first device stores the quality of service of the created image and the identification information of the image in the database.
For example, the first device 21 may store the QoS and UUID of the image it creates in the database 22. In some embodiments, the first device 21 may also update an image (image) table in the database 22, which may include identification information of each image, and an identification field of each image for identifying whether the image is configured as a server image. For example, the first device 21 may configure the image as a server image in the image table. The server image may specifically be an image in a physical server.
S306, the first device acquires the first address information of the second device from the database.
For example, the second device 24 may obtain the IP address of the second device 24 from the database 22.
S307, the first device mounts the mirror image in the storage system to the second device according to the first address information, and the second device is used for setting the mirror image as a starting item of the third device.
For example, in a case that the number of the images is greater than or equal to 1, the first device 21 may mount an existing image in a storage system as a target to the second device 24 according to an IP address of the second device 24, where the storage system may include a plurality of images, and the image that the first device 21 mounts to the second device 24 may be any one of the plurality of images.
In the case where the number of images is equal to 0, the first device 21 may mount the image created by the first device 21 in the storage system as a target in the second device 24 according to the IP address of the second device 24.
According to the embodiment of the application, when the number of the images is equal to 0, the first device creates the images in the storage system, stores the related information of the created images in the database, acquires the first address information of the second device from the database, mounts the created images to the second device according to the first address information, and the second device further sets the images as the starting items of the third device, so that the third device, such as a host, can normally deploy the images when the inventory number of the images is 0, and the reliability of image deployment is improved.
For example, in some embodiments, on the basis of fig. 2, the application scenario may further include a fifth device, and the fifth device may specifically be a Dynamic Host Configuration Protocol (DHCP) server. As shown in fig. 4, a second device 24, such as a RoCE NIC, is integrated in a third device 25, and the third device 25 may communicate with a fifth device 27 through the switch 23.
On the basis of the above embodiment, the mirror image deployment method further includes: the first device sends first configuration information to a fourth device, the first configuration information is used for configuring a port of the fourth device, the port of the fourth device is used for communication between the third device and a fifth device, and the fifth device is used for configuring second address information of the third device.
The fourth device may specifically be the switch 23 as described above, for example. For example, the first device 21 may further send, to the switch 23, first configuration information that configures a Virtual Local Area Network (VLAN) of a port of the switch 23, so that the third device 25 and the fifth device 27 can communicate through the port. The fifth device 27 may configure the third device 25 with second address information of the third device 25, where the second address information may be an IP address of the third device 25.
Optionally, the mirror image deployment method further includes: the first device sends a restart control instruction to the third device, where the restart control instruction is used to control the third device to restart, and after the third device is restarted, the third device is used to obtain the second address information from the fifth device.
For example, the first device 21 may send a restart control instruction to the third device 25, and in a case where the third device 25 receives the restart control instruction, the third device 25 may restart according to the restart control instruction, and after the third device 25 restarts, the third device 25 may acquire the IP address of the third device 25 from the fifth device 27 through the port of the switch 23. In other embodiments, the first device 21 may also reset the startup entry of the server, e.g., the third device 25.
Optionally, the mirror image deployment method further includes: and the first device determines the corresponding relation between the fourth address information and the fifth address information according to the corresponding relation between the third address information of the third device and the fourth address information of the fifth device, which is locally stored, and the corresponding relation between the third address information and the fifth address information of the public network, which is stored in the database.
For example, the first device 21 may locally store a corresponding relationship or a binding relationship between third address information of the third device 25 and fourth address information of the fifth device 27, where the third address information of the third device 25 may specifically be a Media Access Control (MAC) address of the third device 25, and the fourth address information of the fifth device 27 may specifically be an IP address of the fifth device 27. In addition, the database 22 further stores a corresponding relationship between the MAC address of the third device 25 and a public network IP address, where the public network IP address may be recorded as fifth address information of the public network. The first device 21 may also obtain the correspondence between the MAC address of the third device 25 and the public network IP address from the database 22. Further, the first device 21 may determine the correspondence between the IP address of the fifth device 27 and the public network IP address according to the correspondence between the MAC address of the third device 25 and the IP address of the fifth device 27, which is locally stored by the first device, and the correspondence between the MAC address of the third device 25 and the public network IP address, which is acquired from the database 22.
Optionally, the mirror image deployment method further includes: and the first device sends second configuration information to the third device, wherein the second configuration information is used for modifying the fourth address information stored in the third device into the fifth address information.
For example, the first device 21 may further send, to the third device 25 through the switch 23, second configuration information for modifying the IP address of the fifth device 27 stored in the third device 25 to the public network IP address, so that the third device 25 may communicate with the public network. Specifically, the first device 21 may call a BMS Agent (Agent) in the third device 25 and configure a service IP address through the BMS Agent, where the process of configuring the service IP address may be a process of modifying an IP address of the fifth device 27 stored in the third device 25 into a public network IP address, so as to complete operations such as system initialization of the third device 25.
According to the embodiment of the application, the port of the switch is configured through the first device, so that the physical server can communicate with the DHCP server through the port, the reliability of communication between the physical server and the DHCP server is improved, and the physical server can normally acquire the IP address of the physical server from the DHCP server. In addition, the physical server is restarted through the first device, so that the physical server can successfully acquire the IP address of the physical server after being restarted. In addition, the first device can acquire the corresponding relation between the IP address of the DHCP server and the public network IP address according to the corresponding relation between the MAC address of the physical server and the IP address of the DHCP server which are locally stored in the first device and the corresponding relation between the MAC address of the physical server and the public network IP address in the database, and further, the first device modifies the IP address of the DHCP server which is stored in the physical server into the public network IP address, so that the physical server can normally communicate with the public network.
FIG. 5 shows a flow diagram of a method of image deployment according to another embodiment of the present application. As shown in fig. 5, the method may include:
s501, the second device receives the mounting instruction sent by the first device.
For example, the first device 21 may send a query request to the database 22, the query request being for a query of the image quantity. In case the database 22 receives the query request, the database 22 may send the mirrored amount to the first device 21, and accordingly the first device 21 receives the mirrored amount from the database 22. In the case that the number of images is greater than or equal to 1, the first device 21 may directly acquire the first address information of the second device 24 from the database 22, for example, the IP address of the RoCE NIC. In the case where the number of images is equal to 0, the first device 21 may create an image in the storage system 26, set Quality of Service (QoS) of the image, and acquire identification information of the image, such as a UUID. After the first device 21 creates the image in the storage system 26, the first device 21 may further store the information related to the created image in the database 22, and obtain the IP address of the second device 24 from the database 22. In addition, when the number of the images is greater than or equal to 1, the first device 21 may mount an image existing in a storage system as a target to the second device 24 according to an IP address of the second device 24, where the storage system may include a plurality of images, and the image that the first device 21 mounts to the second device 24 may be any one of the plurality of images. In the case where the number of images is equal to 0, the first device 21 may mount the image created by the first device 21 in the storage system as a target in the second device 24 according to the IP address of the second device 24. In a specific overload process, the first device 21 may send a mount instruction to the second device 24, and correspondingly, the second device 24 may receive the mount instruction sent by the first device 21, where the mount instruction is used to instruct the second device 24 to mount the mirror image in the second device 24.
And S502, the second device mounts the mirror image in the storage system into the second device according to the mounting instruction.
For example, the second device 24 may mount the mirror image in the storage system to the second device 24 according to the mounting instruction.
And S503, the second device sets the image as a starting item of the third device.
Further, the second device 24 may also set the image as a start item of the third device 25.
Optionally, the setting, by the second device, the image as a boot item of the third device includes: the second device maps the image to a local block device and sets the image as a boot entry of the third device.
For example, the second device 24, for example, a RoCE NIC is integrated in the third device 25, and in a case that the fifth device 27 transmits a data stream to the third device 25 through the switch 23, the RoCE NIC may perform TCP RDMA decapsulation on a data packet in the data stream, map the mirror image to a local block device, and set the mirror image as a special start item of the third device 25. The specific process of TCP RDMA decapsulation for the data packet in the data stream by the RoCE NIC may be a process of Kernel-bypass (Kernel-bypass) performed by the RoCE NIC, that is, the RoCE NIC strips data carried by TCP from an RDMA protocol. In addition, RDMA, a host-offload (host-offload) technology, can implement low-latency, high-bandwidth direct memory-to-memory data communication, and RDMA convergence Ethernet (RoCE), RDMA over Ethernet, allows a network protocol for performing RDMA over Ethernet. This allows RDMA to be used on standard ethernet infrastructures (switches), where the network card may be a special NIC supporting RoCE.
In the embodiment of the application, the first device sends a query request to the database, queries the number of images from the database, and obtains the IP address of the RoCE NIC from the database according to the number of images, and further mounts the images onto the RoCE NIC according to the IP address of the RoCE NIC, and the RoCE NIC sets the images as the start items of the host, so that the first device can automatically deploy the images in the host through the RoCE NIC.
Fig. 6 shows a block diagram of a mirror image deployment apparatus according to an embodiment of the present application. In the embodiment of the present application, the mirror image deployment apparatus may specifically be the first device or a component in the first device as described above. As shown in fig. 6, the apparatus 60 may include:
a sending module 61, configured to send a query request to a database, where the query request is used to query the number of images;
a receiving module 62, configured to receive the image quantity from the database;
an obtaining module 63, configured to obtain first address information of the second device from the database according to the number of the mirror images;
and a mounting module 64, configured to mount the image in the storage system to the second device according to the first address information, where the second device is configured to set the image as a boot entry of a third device.
Optionally, the obtaining module 63 is specifically configured to obtain the first address information of the second device from the database when the number of images is greater than or equal to 1.
Optionally, the apparatus 60 further comprises: a creation module 65 and a storage module 66;
a creating module 65 for creating an image in the storage system if the number of images is equal to 0;
a storage module 66 for storing the information related to the created mirror image in the database;
the obtaining module 63 is specifically configured to obtain the first address information of the second device from the database.
Optionally, the apparatus 60 further comprises: a setting module 67 for setting the quality of service of the image after the creation module 65 creates the image; the obtaining module 63 is further configured to: and acquiring the identification information of the mirror image.
Optionally, the storage module 66 is specifically configured to: storing the service quality of the created mirror and the identification information of the mirror in the database.
Optionally, the sending module 61 is further configured to: and sending first configuration information to a fourth device, wherein the first configuration information is used for configuring a port of the fourth device, the port of the fourth device is used for communication between the third device and a fifth device, and the fifth device is used for configuring second address information of the third device.
Optionally, the sending module 61 is further configured to: and sending a restart control instruction to the third device, wherein the restart control instruction is used for controlling the third device to restart, and after the third device is restarted, the third device is used for acquiring the second address information from the fifth device.
Optionally, the apparatus 60 further comprises: the determining module 68 is configured to determine a correspondence between the fourth address information and the fifth address information according to a correspondence between the locally stored third address information of the third device and the fourth address information of the fifth device, and a correspondence between the third address information and the fifth address information of the public network stored in the database.
Optionally, the sending module 61 is further configured to: and sending second configuration information to the third device, wherein the second configuration information is used for modifying the fourth address information stored in the third device into the fifth address information.
The functions of each module in each apparatus in the embodiment of the present application may refer to corresponding descriptions in the above method, and are not described herein again.
Fig. 7 shows a block diagram of a mirror image deployment apparatus according to an embodiment of the present application. In the embodiment of the present application, the image deployment apparatus may specifically be the second device or a component in the second device as described above. As shown in fig. 7, the apparatus 70 may include:
a receiving module 71, configured to receive a mount instruction sent by a first device;
a mounting module 72, configured to mount the mirror image in the storage system to the second device according to the mounting instruction;
a setting module 73, configured to set the image as a boot item of the third device.
Optionally, the apparatus 70 further comprises: a mapping module 74 for mapping the image to a local block device.
The functions of each module in each apparatus in the embodiment of the present application may refer to corresponding descriptions in the above method, and are not described herein again.
Fig. 8 shows a block diagram of a mirror deployment device according to an embodiment of the present application. In this embodiment of the present application, the image deployment device may specifically be the first device or the second device in the above embodiments. As shown in fig. 8, the apparatus includes: a memory 810 and a processor 820, the memory 810 having stored therein computer programs operable on the processor 820. The processor 820, when executing the computer program, implements the method of image deployment in the above embodiments. The number of the memory 810 and the processor 820 may be one or more.
The application program field restoration device further includes:
and a communication interface 830, configured to communicate with an external device, and perform data interactive transmission.
If the memory 810, the processor 820 and the communication interface 830 are implemented independently, the memory 810, the processor 820 and the communication interface 830 may be connected to each other through a bus and perform communication with each other. The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (EISA) bus, or the like. The 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 in FIG. 8, but this is not intended to represent only one bus or type of bus.
Optionally, in an implementation, if the memory 810, the processor 820 and the communication interface 830 are integrated on a chip, the memory 810, the processor 820 and the communication interface 830 may complete communication with each other through an internal interface.
Embodiments of the present application provide a computer-readable storage medium, which stores a computer program, and when the program is executed by a processor, the computer program implements the method provided in the embodiments of the present application.
The embodiment of the present application further provides a chip, where the chip includes a processor, and is configured to call and execute the instruction stored in the memory from the memory, so that the communication device in which the chip is installed executes the method provided in the embodiment of the present application.
An embodiment of the present application further provides a chip, including: the system comprises an input interface, an output interface, a processor and a memory, wherein the input interface, the output interface, the processor and the memory are connected through an internal connection path, the processor is used for executing codes in the memory, and when the codes are executed, the processor is used for executing the method provided by the embodiment of the application.
It should be understood that the processor may be a Central Processing Unit (CPU), other general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or any conventional processor or the like. It is noted that the processor may be an advanced reduced instruction set machine (ARM) architecture supported processor.
Further, optionally, the memory may include a read-only memory and a random access memory, and may further include a nonvolatile random access memory. The memory may be either volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The non-volatile memory may include a read-only memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an electrically Erasable EPROM (EEPROM), or a flash memory. Volatile memory can include Random Access Memory (RAM), which acts as external cache memory. By way of example, and not limitation, many forms of RAM are available. For example, Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), double data rate synchronous SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), synchlink DRAM (SLDRAM), and direct memory bus RAM (DR RAM).
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. The procedures or functions according to the present application are generated in whole or in part when the computer program instructions are loaded and executed on a computer. 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 computer-readable storage medium.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present application, "a plurality" means two or more unless specifically limited otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process. And the scope of the preferred embodiments of the present application includes other implementations in which functions may be performed out of the order shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions.
It should be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. All or part of the steps of the method of the above embodiments may be implemented by hardware that is configured to be instructed to perform the relevant steps by a program, which may be stored in a computer-readable storage medium, and which, when executed, includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present application may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module may also be stored in a computer-readable storage medium if it is implemented in the form of a software functional module and sold or used as a separate product. The storage medium may be a read-only memory, a magnetic or optical disk, or the like.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive various changes or substitutions within the technical scope of the present application, and these should be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (15)

1. A method for image deployment, the method comprising:
the method comprises the steps that a first device sends a query request to a database, wherein the query request is used for querying the quantity of mirror images;
the first device receiving the mirror image quantity from the database;
the first equipment acquires first address information of second equipment from the database according to the mirror image quantity;
and the first equipment mounts the mirror image in the storage system into the second equipment according to the first address information, wherein the second equipment is used for setting the mirror image as a starting item of the third equipment.
2. The method of claim 1, wherein the obtaining, by the first device, the first address information of the second device from the database according to the number of images comprises:
and when the number of the images is greater than or equal to 1, the first equipment acquires the first address information of the second equipment from the database.
3. The method of claim 1, wherein the obtaining, by the first device, the first address information of the second device from the database according to the number of images comprises:
in a case where the number of images is equal to 0, the first device creating an image in the storage system;
the first device stores the relevant information of the created mirror image in the database;
and the first equipment acquires the first address information of the second equipment from the database.
4. The method of claim 3, wherein the first device creates an image in the storage system, comprising:
the first device creates a mirror image in the storage system, sets the service quality of the mirror image, and acquires identification information of the mirror image.
5. The method of claim 4, wherein the first device storing information about the created image in the database comprises:
the first device stores the service quality of the created mirror image and the identification information of the mirror image into the database.
6. The method of claim 1, further comprising:
the first device sends first configuration information to a fourth device, the first configuration information is used for configuring a port of the fourth device, the port of the fourth device is used for communication between the third device and a fifth device, and the fifth device is used for configuring second address information of the third device.
7. The method of claim 6, further comprising:
the first device sends a restart control instruction to the third device, the restart control instruction is used for controlling the third device to restart, and after the third device is restarted, the third device is used for acquiring the second address information from the fifth device.
8. The method according to claim 6 or 7, characterized in that the method further comprises:
and the first device determines the corresponding relation between the fourth address information and the fifth address information according to the corresponding relation between the third address information of the third device and the fourth address information of the fifth device, which is locally stored, and the corresponding relation between the third address information and the fifth address information of the public network, which is stored in the database.
9. The method of claim 8, further comprising:
and the first equipment sends second configuration information to the third equipment, wherein the second configuration information is used for modifying the fourth address information stored in the third equipment into the fifth address information.
10. A method for image deployment, the method comprising:
the second equipment receives a mounting instruction sent by the first equipment;
the second equipment mounts the mirror image in the storage system into the second equipment according to the mounting instruction;
the second device sets the image as a boot item of a third device.
11. The method of claim 10, wherein the second device setting the image as a boot item of a third device comprises:
and the second equipment maps the mirror image into local block equipment and sets the mirror image as a starting item of third equipment.
12. An image deployment apparatus, the apparatus comprising:
the system comprises a sending module, a receiving module and a sending module, wherein the sending module is used for sending a query request to a database, and the query request is used for querying the number of mirror images;
a receiving module, configured to receive the number of images from the database;
the acquisition module is used for acquiring first address information of the second equipment from the database according to the mirror image quantity;
and the mounting module is used for mounting the mirror image in the storage system into the second equipment according to the first address information, and the second equipment is used for setting the mirror image as a starting item of the third equipment.
13. An image deployment apparatus, the apparatus comprising:
the receiving module is used for receiving a mounting instruction sent by first equipment;
the mounting module is used for mounting the mirror image in the storage system into the second equipment according to the mounting instruction;
and the setting module is used for setting the mirror image as a starting item of the third equipment.
14. An image deployment device, comprising: a processor and a memory, the memory having stored therein instructions that are loaded and executed by the processor to implement the method of any of claims 1 to 11.
15. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 11.
CN202011135030.5A 2020-10-21 2020-10-21 Mirror image deployment method, device, equipment and storage medium Pending CN112214284A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011135030.5A CN112214284A (en) 2020-10-21 2020-10-21 Mirror image deployment method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011135030.5A CN112214284A (en) 2020-10-21 2020-10-21 Mirror image deployment method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112214284A true CN112214284A (en) 2021-01-12

Family

ID=74056283

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011135030.5A Pending CN112214284A (en) 2020-10-21 2020-10-21 Mirror image deployment method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112214284A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113641373A (en) * 2021-08-30 2021-11-12 北京京东乾石科技有限公司 Mirror image deployment method, device and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108616599A (en) * 2018-05-11 2018-10-02 北京辰森世纪科技股份有限公司 Application service registration, newer method and device
CN109639803A (en) * 2018-12-18 2019-04-16 郑州云海信息技术有限公司 A kind of method and system by BMC Long-range Automatic Deployment server OS

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108616599A (en) * 2018-05-11 2018-10-02 北京辰森世纪科技股份有限公司 Application service registration, newer method and device
CN109639803A (en) * 2018-12-18 2019-04-16 郑州云海信息技术有限公司 A kind of method and system by BMC Long-range Automatic Deployment server OS

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113641373A (en) * 2021-08-30 2021-11-12 北京京东乾石科技有限公司 Mirror image deployment method, device and storage medium

Similar Documents

Publication Publication Date Title
US11003480B2 (en) Container deployment method, communication method between services, and related apparatus
US10866911B2 (en) Method and apparatus for establishing connection in non-volatile memory system
CN109768871B (en) Method for configuring multiple virtual network cards, host machine and storage medium
US20060155838A1 (en) Program installation system and method using the same
US20190253347A1 (en) Universal customer premise equipment
US9098345B2 (en) System and method for portable and flexible deployment of servers
WO2016184045A1 (en) Method and apparatus for network service capacity expansion
WO2020024413A1 (en) Method for controlling deployment of cloud computing platform, server, and storage medium
JP4797636B2 (en) Complex information platform apparatus and information processing apparatus configuration method thereof
US20100098085A1 (en) Method, system, and device for implementing active/standby switchover
JP6859340B2 (en) Equipment, systems and methods for retrieving, processing and updating global information
US20180217852A1 (en) System service reloading method and apparatus
CN110633175B (en) Multi-computer-room data processing method based on micro-service, electronic equipment and storage medium
WO2020093976A1 (en) Resource change method and device, apparatus, and storage medium
CN114070723A (en) Virtual network configuration method and system of bare metal server and intelligent network card
JP4681337B2 (en) Fiber channel switch device, information processing system, and login processing method
CN112579311A (en) Method for accessing solid state disk and storage device
CN110908723A (en) Main/standby switching method and device of operating system and related equipment
CN112214284A (en) Mirror image deployment method, device, equipment and storage medium
US20020156945A1 (en) Computer system, resource allocating method thereof and resource allocating program thereof
CN105827496A (en) Method and apparatus for managing PE device
CN109656674B (en) Computer equipment, virtualization chip and data transmission method
WO2014000550A1 (en) Microwave transmission device, and, method and device therefor for data processing
CN113626139B (en) High-availability virtual machine storage method and device
CN106789198B (en) Computing node management method and system

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210112