CN111800468A - Cloud-based multi-cluster management method, device, medium and electronic equipment - Google Patents

Cloud-based multi-cluster management method, device, medium and electronic equipment Download PDF

Info

Publication number
CN111800468A
CN111800468A CN202010505429.1A CN202010505429A CN111800468A CN 111800468 A CN111800468 A CN 111800468A CN 202010505429 A CN202010505429 A CN 202010505429A CN 111800468 A CN111800468 A CN 111800468A
Authority
CN
China
Prior art keywords
cluster
server
image file
cloud platform
server cluster
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
CN202010505429.1A
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202010505429.1A priority Critical patent/CN111800468A/en
Publication of CN111800468A publication Critical patent/CN111800468A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • 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/45595Network integration; Enabling network access in virtual machine instances

Abstract

The embodiment of the application provides a cloud-based multi-cluster management method and device, a computer readable medium and electronic equipment, which are applied to the technical field of cloud. The cloud-based multi-cluster management method comprises the following steps: the method comprises the steps of reading a mirror image file used for creating the virtual machine, obtaining cluster identifications of all server clusters accessed to a cloud platform, determining transmission threads corresponding to all the cluster identifications, sending the mirror image file to the server clusters corresponding to all the cluster identifications in parallel and in batch on the basis of the transmission threads corresponding to the cluster identifications of all the server clusters, and improving the data obtaining efficiency of the server clusters, so that the creating efficiency and the management efficiency of the virtual machine are improved.

Description

Cloud-based multi-cluster management method, device, medium and electronic equipment
Technical Field
The present application relates to the field of cloud computing technologies, and in particular, to a cloud-based multi-cluster management method and apparatus, a computer-readable medium, and an electronic device.
Background
Cloud computing is a computing model that distributes computing tasks over a large pool of resources made up of cloud servers, enabling various application systems to obtain computing power, storage space, and information services as needed. In the related art, virtualized data management is realized through an integral cloud system, which causes the problems of large scale and inconvenient management of the cloud system. Moreover, when the cloud system is expanded, the data can be processed only based on the original cloud system, and the efficiency of cloud platform system management is further reduced.
Disclosure of Invention
Embodiments of the present application provide a cloud-based multi-cluster management method and apparatus, a computer-readable medium, and an electronic device, which can improve data acquisition efficiency of a server cluster to a certain extent, and further improve creation efficiency and management efficiency of a virtual machine.
Other features and advantages of the present application will be apparent from the following detailed description, or may be learned by practice of the application.
According to an aspect of an embodiment of the present application, there is provided a cloud-based multi-cluster management method, including: reading an image file for creating a virtual machine; acquiring cluster identification of each server cluster accessed to the cloud platform; determining a transmission thread corresponding to each cluster identifier; and based on the transmission thread corresponding to each cluster identifier, the image file is sent to each server cluster corresponding to each cluster identifier in parallel.
According to an aspect of an embodiment of the present application, there is provided a cloud-based multi-cluster management apparatus, including: the reading unit is used for reading an image file used for creating a virtual machine; the acquisition unit is used for acquiring cluster identifiers of all server clusters accessed to the cloud platform; the creating unit is used for determining the transmission thread corresponding to each cluster identifier; and the sending unit is used for sending the image file to each server cluster corresponding to each cluster identifier in parallel based on the transmission thread corresponding to each cluster identifier.
In some embodiments of the present application, based on the foregoing scheme, the reading unit includes: the first reading unit is used for successively reading mirror image data with preset data volume from the mirror image file used for creating the virtual machine; and the data adding unit is used for adding the read mirror image data to the mirror image data queue according to the reading sequence.
In some embodiments of the present application, based on the foregoing scheme, the sending unit includes: the second reading unit is used for reading mirror image data with preset data volume from the mirror image data queue; the first broadcasting unit is used for broadcasting the read mirror image data to the transmission thread corresponding to each cluster identifier; and the second sending unit is used for sending the read mirror image data to each server cluster corresponding to each cluster identifier in parallel through the transmission thread until the mirror image file is sent to each server cluster.
In some embodiments of the present application, based on the foregoing solution, the obtaining unit includes: the detection unit is used for calling a detection component and detecting information of the server cluster contained in the storage component of the cloud platform; and the first determining unit is used for determining the cluster identification of the server cluster accessed to the cloud platform based on the information of the server cluster contained in the storage component.
In some embodiments of the present application, based on the foregoing scheme, the sending unit includes: the area creating unit is used for determining a blank storage area corresponding to the cluster identifier in the storage component of the server cluster based on the cluster identifier; and the parallel sending unit is used for sending the image file to a blank storage area corresponding to the cluster identifier in parallel based on the transmission thread corresponding to each server identifier.
In some embodiments of the present application, based on the foregoing solution, the detecting unit includes: and the period detection unit is used for controlling a detection component in the management node to call the service corresponding to the storage component based on a preset period so as to obtain the cluster identifier of the server cluster managed by the storage component.
In some embodiments of the present application, based on the foregoing solution, the cloud-based multi-cluster management apparatus further includes: the third reading unit is used for reading a historical mirror image file of an original server cluster in the cloud platform when a newly added server cluster is registered in the cloud platform; the history mirror image file is used for creating a virtual machine; the second determining unit is used for determining a transmission thread corresponding to each history image file; and the second sending unit is used for sending the historical image files to the newly added server cluster in parallel based on the transmission threads corresponding to the historical image files respectively so as to enable the newly added server cluster to establish a virtual machine based on the historical image files.
In some embodiments of the present application, based on the foregoing scheme, the second sending unit includes: an identifier obtaining unit, configured to obtain a cluster identifier of a server cluster registered in the cloud platform; a newly added determining unit, configured to identify, based on a historical cluster identifier stored in a storage component of the cloud platform and a cluster identifier of the registered server cluster, a cluster identifier that is not stored in the storage component as a newly added identifier corresponding to the newly added server cluster; and the third sending unit is used for sending each history image file to the newly added server cluster corresponding to the newly added identifier in parallel based on the transmission thread corresponding to each history image file.
In some embodiments of the present application, based on the foregoing scheme, the second sending unit includes: the fourth reading unit is used for reading the image files with preset data volume in parallel from the queue based on the queue formed by the historical image files; the second transmission unit is used for transmitting the image files with the preset number to the transmission thread corresponding to each image file; and the fourth sending unit is used for sending the image files to the newly added server cluster in parallel through the transmission thread until all the historical image files are sent to the newly added server cluster.
According to an aspect of an embodiment of the present application, there is provided a cloud-based multi-cluster management method, including: acquiring mirror image data sent by a management node in a cloud platform based on a transmission thread corresponding to a cluster identifier of a server cluster, wherein the transmission thread is created by the management node aiming at the cluster identifier of the server cluster and is independent of transmission threads corresponding to other server clusters in the cloud platform; when the mirror image data is obtained, synthesizing the obtained mirror image data according to data bits to obtain a mirror image file; synchronizing the mirror image file to a server in the server cluster; and creating a virtual machine in the server according to the image file.
According to an aspect of an embodiment of the present application, there is provided a cloud-based multi-cluster management apparatus, including: the data transmission unit is used for acquiring mirror image data sent by a management node in a cloud platform based on a transmission thread corresponding to a cluster identifier of a server cluster, wherein the transmission thread is created by the management node aiming at the cluster identifier of the server cluster and is independent of transmission threads corresponding to other server clusters in the cloud platform; the file synthesis unit is used for synthesizing the obtained mirror image data according to data bits to obtain a mirror image file when the mirror image data is obtained; the file synchronization unit is used for synchronizing the mirror image file to the server in the server cluster; and the virtual machine creating unit is used for creating a virtual machine in the server according to the image file.
In some embodiments of the present application, based on the foregoing solution, the cloud-based multi-cluster management apparatus further includes: a registration request unit, configured to send a registration request to the cloud platform; the historical data acquisition unit is used for acquiring the historical image files which are sent by the management node in parallel based on the transmission threads corresponding to the historical image files in other server clusters in the cloud platform if the registration in the cloud platform is finished; and the first creating unit is used for creating the virtual machine according to the history image file.
In some embodiments of the present application, based on the foregoing solution, the cloud-based multi-cluster management apparatus further includes: the file storage unit is used for storing the mirror image file; and the position adding unit is used for adding the storage position of the image file into the metadata information of the image file.
According to an aspect of embodiments of the present application, there is provided a computer readable medium having stored thereon a computer program which, when executed by a processor, implements a cloud-based multi-cluster management method as described in the above embodiments.
According to an aspect of an embodiment of the present application, there is provided an electronic device including: one or more processors; a storage device to store one or more programs that, when executed by the one or more processors, cause the one or more processors to implement a cloud-based multi-cluster management method as described in the above embodiments.
In the technical solutions provided in some embodiments of the present application, a cluster identifier of each server cluster accessing a cloud platform is obtained by reading an image file used for creating a virtual machine, and a transmission thread corresponding to the cluster identifier of each cloud server cluster is determined, so that the image files are sent to the server clusters corresponding to each cluster identifier in parallel and in batch based on the transmission threads corresponding to the cluster identifiers of the server clusters, thereby improving data acquisition efficiency of the server clusters, and further improving creation efficiency and management efficiency of the virtual machine.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application. It is obvious that the drawings in the following description are only some embodiments of the application, and that for a person skilled in the art, other drawings can be derived from them without inventive effort. In the drawings:
FIG. 1 shows a schematic diagram of an exemplary system architecture to which aspects of embodiments of the present application may be applied;
FIG. 2 schematically illustrates a flow diagram of a cloud-based multi-cluster management method according to an embodiment of the present application;
FIG. 3 schematically illustrates a system architecture diagram for cloud platform management of multi-cluster images according to one embodiment of the present application;
fig. 4 schematically shows a flowchart for obtaining a cluster identifier of each server cluster accessing a cloud platform according to an embodiment of the present application;
FIG. 5 schematically illustrates a diagram of multi-cluster detection and discovery according to an embodiment of the present application;
FIG. 6 schematically illustrates creating a transfer thread based on various server clusters according to one embodiment of the present application;
FIG. 7 schematically illustrates a diagram of parallel transfer of an image file according to an embodiment of the present application;
FIG. 8 is a schematic diagram that illustrates mirror data synchronization for a newly added cluster according to one embodiment of the present application;
FIG. 9 schematically illustrates a flow diagram of a cloud-based multi-cluster management method according to an embodiment of the present application;
FIG. 10 schematically illustrates a block diagram of a cloud-based multi-cluster management apparatus according to an embodiment of the present application;
FIG. 11 schematically illustrates a block diagram of a cloud-based multi-cluster management apparatus according to an embodiment of the present application;
FIG. 12 illustrates a schematic structural diagram of a computer system suitable for use in implementing the electronic device of an embodiment of the present application.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the application. One skilled in the relevant art will recognize, however, that the subject matter of the present application can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and so forth. In other instances, well-known methods, devices, implementations, or operations have not been shown or described in detail to avoid obscuring aspects of the application.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor means and/or microcontroller means.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
Cloud computing is a computing model that distributes computing tasks over a resource pool of large numbers of computers, enabling various application systems to obtain computing power, storage space, and information services as needed. The network that provides the resources is referred to as the "cloud". Resources in the "cloud" appear to the user as being infinitely expandable and available at any time, available on demand, expandable at any time, and paid for on-demand. With the development of diversification of internet, real-time data stream and connecting equipment and the promotion of demands of search service, social network, mobile commerce, open collaboration and the like, cloud computing is rapidly developed. Different from the prior parallel distributed computing, the generation of cloud computing can promote the revolutionary change of the whole internet mode and the enterprise management mode in concept.
As a basic capability provider of cloud computing, a cloud computing resource pool platform, referred to as a cloud platform for short, generally referred to as Infrastructure as a Service (IaaS), is established, and multiple types of virtual resources are deployed in a resource pool and are selectively used by external clients. The cloud computing resource pool mainly comprises: computing devices (which are virtualized machines, including operating systems), storage devices, and network devices. According to logical function division. Specifically, a Platform as a Service (PaaS) layer may be deployed on the IaaS layer; software as a service (SaaS) layer is deployed on the PaaS layer, and the SaaS layer can also be directly deployed on the IaaS layer. PaaS is a platform for software operation, such as a database, a web container, etc.; SaaS is a variety of business software, such as web portal, sms, and mass texting. Generally speaking, SaaS and PaaS are upper layers relative to IaaS.
In the field of cloud computing, a large amount of data exists in a cloud platform to be processed or transmitted, and a big data technology is used. Big data is a data set which cannot be captured, managed and processed by a conventional software tool within a certain time range, and is a massive, high-growth-rate and diversified information asset which can have stronger decision-making power, insight discovery power and flow optimization capability only by a new processing mode. With the advent of the cloud era, big data has attracted more and more attention, and the big data needs special technology to effectively process a large amount of data within a tolerance elapsed time. The method is suitable for the technology of big data, and comprises a large-scale parallel processing database, data mining, a distributed file system, a distributed database, a cloud computing platform, the Internet and an extensible storage system. In the embodiment, the big data is stored and managed in a mode of creating the virtual machine based on the cloud platform, so that the efficiency and the scale of big data processing are improved.
In an embodiment of the present application, a server in a server cluster may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing a cloud computing service. The terminal may be, but is not limited to, a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, and the like. The terminal and the server may be directly or indirectly connected through wired or wireless communication, and the application is not limited herein.
Fig. 1 shows a schematic diagram of an exemplary system architecture to which the technical solution of the embodiments of the present application can be applied.
As shown in fig. 1, the system architecture may include at least two server clusters (e.g., server cluster 101 and server cluster 102 shown in fig. 1, which may also be virtual server clusters), a network 103, and a server 104 corresponding to a management node. Network 103 serves as a medium for providing communication links between clusters of servers and servers 104. Network 103 may include various connection types, such as wired communication links, wireless communication links, and so forth.
It should be understood that the number of server clusters, networks, and servers in FIG. 1 are illustrative only. There may be any number of devices, networks, and servers, as desired for an implementation. For example, server 104 may be a server cluster comprised of multiple servers, or the like.
In an embodiment of the present application, a user may send a control instruction to a device corresponding to a server cluster through the control server 104 to control a virtual machine in the server cluster to perform operations such as installation and operation. Specifically, in this embodiment, the image file used for creating the virtual machine is read by the server 104 corresponding to the management node, the cluster identifiers of the server clusters accessing the cloud platform are obtained, the transmission threads corresponding to each cluster identifier are determined, the transmission threads corresponding to the cluster identifiers of the server clusters are determined, and the image file is sent to the server clusters in parallel, so that the server clusters create the virtual machine based on the image file. The corresponding threads are respectively created for the cloud server clusters, so that the mirror image files are sent to the server clusters corresponding to the cluster identifications in parallel and in batch based on the threads, the data acquisition efficiency of the server clusters is improved, and the creation efficiency and the management efficiency of the virtual machine are further improved.
It should be noted that the cloud-based multi-cluster management method provided in the embodiment of the present application is generally executed by the server 104, and accordingly, the cloud-based multi-cluster management apparatus is generally disposed in the server 104. However, in other embodiments of the present application, the terminal device may also have a similar function as the server, so as to execute the method for cloud-based multi-cluster management provided in the embodiments of the present application.
The implementation details of the technical solution of the embodiment of the present application are set forth in detail below:
fig. 2 illustrates a flow diagram of a cloud-based multi-cluster management method according to an embodiment of the present application, which may be performed by a server, which may be the server illustrated in fig. 1. Referring to fig. 2, the cloud-based multi-cluster management method at least includes steps S210 to S240, which are described in detail as follows:
in step S210, an image file for creating a virtual machine is read.
In one embodiment of the present application, in a cloud platform based on the cloud computing management platform project Openstack, a storage service is provided, typically using a distributed system. In general, a set of storage cluster is used in a cloud platform, but as the service increases, the data of the cloud platform increases more and more, and the cluster often needs to be expanded, so that the scale of the storage cluster increases more and more, which may cause the failure rate of the storage cluster to increase and the operation and maintenance cost to increase. In this embodiment, a multi-cluster mode is proposed in a cloud platform, and storage service is provided by accessing a plurality of small storage clusters in one set of cloud platform, so as to expand storage capacity. So that the multiple clusters are treated separately, and the data of each cluster are independent.
Fig. 3 is a system architecture diagram of a cloud platform in multi-cluster image management according to an embodiment of the present disclosure.
As shown in fig. 3, the system architecture of the cloud platform in the multi-cluster mirror management provided by the embodiment is mainly divided into four layers, which are described in detail as follows: the first layer is a business layer 310, which mainly includes platforms that a user can directly operate, such as a self-service platform, a monitoring platform, and an operation and maintenance platform. The self-service platform is used for providing an interface for providing application resources for the user terminal; the monitoring platform is used for monitoring the use condition of all resources of the whole platform; the operation and maintenance platform is used for managing an operation interface, for example, performing operations such as migration of some host machines. The second layer is a cloud gateway layer 320, which is mainly a gateway Venus, an Internet Protocol (IP) system, and a Role-Based Access Control (RBAC). The gateway Venus is used for providing a uniform original platform resource interface; the IP system is used for managing network resources such as IP and the like; the RBAC is used for authentication. The third layer is a basic cloud layer 330, which is mainly an open-source cloud platform providing Iaas service, a virtual machine management component Nova is used for managing the life cycle of a virtual machine, an image management component Glance is used for managing the life cycle of an image, and a storage component Cinder is used for managing the life cycle of a volume. The fourth layer is storage tier 340, which contains at least two clusters for providing block storage services through storage clusters using a multi-cluster mode.
In an embodiment of the present application, the image file may be stored in the storage space of the management node in advance, and the manner of reading the image file may be directly read from the storage space of the management node, or may be read from another management node, or may be a manner of reading the existing image data for integration to obtain the image file, and so on.
In an embodiment of the application, the image file is used for loading and starting a virtual machine in each cluster, so that one image file is uploaded to each cluster under the condition that a plurality of clusters run in parallel, when the virtual machine is created, each cluster searches for an image in each cluster, and the virtual machines in each cluster are started from the second of a cloud platform through snapshot and clone technologies in the clusters.
In an embodiment of the present application, the process of reading the image file for creating the virtual machine in step S210 specifically includes the following steps: sequentially reading mirror image data with preset data volume from a mirror image file used for creating a virtual machine; and adding the read mirror image data to a mirror image data queue according to the reading sequence.
Specifically, in this embodiment, since the data size of the image file may be relatively large, in this embodiment, when the image file is read, the image data of the preset data size is read successively. And adding the read mirror image data into the found mirror image data queue in batches according to the read data so as to read the mirror image data with preset data volume from the mirror image data queue when the mirror image file is sent to each server cluster corresponding to each cluster identifier in parallel. And secondly, broadcasting the read mirror image data to the transmission thread corresponding to each cluster identifier. And then, the read mirror image data is sent to each server cluster corresponding to each cluster identifier in parallel through a transmission thread until the mirror image file is sent to each server cluster.
In an embodiment of the present application, due to the large data volume of the image file, it may not be possible to transmit the data to the server cluster at one time. Therefore, in this embodiment, a preset data amount is set, so that the data of the preset data amount in the image file is sequentially read through the transmission thread corresponding to each server cluster, and the read data is broadcast and transmitted to the transmission thread corresponding to each server cluster in parallel until the data in the image file is transmitted completely.
By the method for reading and sending the mirror image file, when the data volume of the mirror image file is large, the mirror image file data can be sent to each server cluster at the highest speed, so that the load balance during the transmission of the mirror image data can be ensured, and the efficiency of the transmission of the mirror image data can be improved.
In step S220, a cluster identifier of each server cluster accessing the cloud platform is obtained.
In an embodiment of the application, a multi-cluster mode is used in a cloud platform, and the capacity expansion of storage is realized by adding small clusters in one set of cloud platform. Therefore, during the working process of the cloud platform, a plurality of new server sets can be registered or accessed into the cloud platform. In this embodiment, the cluster identifier of each server cluster accessed to the cloud platform is obtained, so that the server clusters are managed through the cluster identifier, and a server cluster object that needs to send the mirror image file in parallel is determined.
In an embodiment of the present application, the method for obtaining the cluster identifier of each server cluster accessing the cloud platform may be by detecting the server cluster accessing the cloud platform. For example, by collecting application information of each server cluster, a cluster identifier of each server cluster accessing the cloud platform is determined through the application information.
In an embodiment of the present application, as shown in fig. 4, the process of acquiring the cluster identifier of each server cluster accessing the cloud platform in step S220 includes the following steps S410 to S420, which are described in detail as follows:
in step S410, a detection component is invoked to detect information of the server cluster included in the storage component of the cloud platform.
In an embodiment of the present application, the step S410 of invoking the detection component and detecting the information of the server cluster contained in the storage component of the cloud platform includes: and controlling a detection component in the management node to call the service corresponding to the storage component based on a preset period, and acquiring the information of the server cluster managed by the storage component.
In an embodiment of the application, a Probe component and a storage component, circle, are set in a management node of a cloud platform. The detection component Probe is used for detecting information of a server cluster in the cloud platform, and the storage component Cinder is used for storing and managing data information in the server cluster. Based on the two components, in this embodiment, the detection component is controlled to detect the information of the server cluster included in the storage component through a set period duration.
Specifically, when the information of the server cluster is detected, the Probe is controlled to call the service corresponding to the storage component Cinder, the information of the server cluster managed by the storage component is acquired, and then the server cluster which needs to send the mirror image file is determined through the cluster identifier.
Fig. 5 is a schematic diagram of multi-cluster detection and discovery provided in an embodiment of the present application.
As shown in fig. 5, the mirror management component glare (510) includes: an Application Programming Interface (API), a repository Cinder store, a Probe component, and a Database computer (DBC) of the client. The API is used for receiving a mirror image operation request; the circle store is used for calling the storage component circle to upload the mirror data to the Volume of the storage component 520, namely the Volume in the circle; the Probe component Probe is used as a background timing Probe task, and acquires a cluster identifier corresponding to each cluster by calling a shader interface, for example, a Volume-type, such as: cluster 1, set1, cluster 2, set2, etc.; the DBC is a client that interacts with the database to access clusters of probe findings. The sender component comprises an API, a volume resource control component and a cluster controller Driver corresponding to each server cluster. The API is used for receiving a volume operation request; the volume resource control component is used for volume resource control, such as data snapshot, data backup, and the like, and the cluster controller Driver is used for controlling each cluster, for example, the cluster controller 1 to the cluster controller 3 in fig. 5 are respectively used for controlling the cluster 1 to the cluster 3 (530).
For example, in a specific application process, the detection and discovery of multiple server clusters are to make the mirror management component company sense multiple clusters accessed by the storage component binder, in this embodiment, one Volume type represents one server cluster, and the Volume types of the server clusters are identified by the storage component binder, for example, the Volume types 1 to 3 in fig. 5. When the detection is triggered, the detection component Probe is used as a background service to call a storage component folder service every 5 minutes, and the Volume-type of the cluster currently managed by the storage component folder is obtained.
Further, after the Volume-type of the server cluster currently managed by the circle is obtained, the memory of the storage module is updated. Specifically, the detection component Probe transmits the detected Volume-type to the repository module Cinder store for updating, and the repository Cinder store stores the latest detected Volume-type set in the memory for unified management, so that the management efficiency of the server cluster is improved.
In step S420, a cluster identifier of a server cluster accessing the cloud platform is determined based on the information of the server cluster included in the storage component.
In an embodiment of the application, after the information of the server cluster included in the storage component in the cloud platform is obtained through detection, the server cluster accessing the cloud platform is determined based on the information of the server cluster included in the storage component, so that the transmission of the image file is performed on the server cluster accessing the cloud platform.
Specifically, in this embodiment, when a plurality of server clusters are newly created in the cloud platform at the same time, the step needs to transmit and update the image files to the plurality of server clusters. Therefore, based on the detected information of the server clusters included in the storage component, all the server clusters corresponding to the information of the server clusters can be identified as the server clusters in the access cloud platform, or the information of the server clusters included in the storage component can be compared with the information of the server clusters included in the history to determine the information of the server clusters with new addition. For example, cluster information of the newly added server cluster is determined, identification information in the cluster information of the server clusters is detected, and the identification information is identified as a cluster identification of the server cluster accessing the cloud platform.
In step S230, transmission threads respectively corresponding to each cluster identifier are determined.
In an embodiment of the application, after a cluster identifier of each server cluster accessing a cloud platform is obtained, a transmission thread corresponding to each server cluster is determined according to the cluster identifier. In an embodiment of the present application, the transmission thread in this embodiment may be created in advance according to a server cluster, or may be generated according to a cluster identifier of the server cluster after the server cluster is detected.
It should be noted that, in this embodiment, the transmission threads respectively corresponding to the server clusters are created to transmit the image file to the server clusters in parallel, so that it is avoided that when a virtual machine is created by another cluster that is not in the same cluster as the image file, the creation of the virtual machine can be completed only by cross-cluster copying the image file, and the copy operation in the process occupies the management network traffic between the control nodes and needs to download the image file to the current cluster, which is related to the size of the image file, and especially in the case of a large data volume of the image file, the virtual machine cannot be created in a second level in this manner. There is a need for a multi-cluster management scheme that includes how the company component senses multiple sets, how to register with company when adding clusters, and how quickly company uploads data to individual clusters when uploading images rather than growing linearly with the number of clusters. Therefore, the user can not feel the difference between the multi-cluster cloud platform and the previous platform when using the cloud platform, and the transparency to the user service is achieved. According to the embodiment, the transmission threads are constructed, and the image files are transmitted to the servers respectively based on the transmission threads, so that the transmission efficiency of the image files is improved, and the efficiency of loading the virtual machine based on the image files is further improved.
Fig. 6 is a schematic diagram illustrating creation of a transmission thread based on each server cluster according to an embodiment of the present application.
As shown in fig. 6, in the cloud platform, when the image file 610 is uploaded to the image management component 620, the image management component 620 accesses the storage component 630 to collectively use the volume management image, and when the storage component 630 accesses a plurality of clusters, the image management component 620 uses the storage component 630 to respectively manage each server cluster based on the volume type. For example, based on the volume types corresponding to the clusters 1 to 3, transfer threads corresponding to the clusters 1 to 3 are created.
In step S240, the image file is sent to each server cluster corresponding to each cluster identifier in parallel based on the transmission thread corresponding to each cluster identifier.
In an embodiment of the application, after the transmission thread corresponding to each server cluster is created, the image file is sent to each server cluster corresponding to each cluster identifier in parallel based on the transmission thread corresponding to each cluster identifier. Therefore, the image file can reach each server cluster at the same time, time delay caused by serial transmission of the image file is avoided, each server cluster can quickly establish a virtual machine based on the obtained image file, and the purpose of starting the virtual machine in seconds is achieved.
In an embodiment of the application, the process of sending the image file to each server cluster corresponding to each cluster identifier in parallel based on the transmission thread corresponding to each cluster identifier in step S420 includes: determining a blank storage area corresponding to the cluster identifier in a storage component of the server cluster based on the cluster identifier; and based on the transmission thread corresponding to each server identifier, sending the image file to a blank storage area corresponding to the cluster identifier in parallel.
In one embodiment of the present application, a transfer thread is initiated for online operation based on the cluster identification of each server cluster. The transmission thread creates a blank storage area through the cluster identification of each server cluster. For example, the cluster identifier may be Volume-Type, and a blank storage area is created based on the cluster identifier of the server cluster as Volume for storing the mirror file of the server cluster.
Specifically, a transmission thread is started for each server cluster to carry out uploading operation, the Volume-type of each cluster is obtained through detection, each transmission thread calls a renderer service through a Volume-type parameter to create a blank Volume for storing an image file to be uploaded later, and therefore the transmission reliability of the image file and the integrity of data in the image file are guaranteed.
In an embodiment of the present application, a process of sending an image file to each server cluster corresponding to each cluster identifier in parallel based on a transmission thread corresponding to each cluster identifier includes the following steps: successively reading data with preset data volume from the mirror image file; and broadcasting the data read each time to each server cluster in parallel based on the transmission thread corresponding to each server cluster.
Further, since block transmission is performed through a preset data volume, data leakage may be caused, in this embodiment, after the mirror image data transmission is finished, checking may be performed in the server cluster and the management node, so as to ensure integrity of the mirror image data.
Fig. 7 is a schematic diagram of parallel transmission of an image file according to an embodiment of the present application.
As shown in fig. 7, the preset data amount in the embodiment of the present application may be 4M, 5M, and the like, and when the preset data amount is 4M, the data may be transmitted according to an integer multiple of a data bit, so as to prevent data from being leaked, and improve reliability and integrity of data transmission.
In one embodiment of the present application, the process of transferring image files in parallel is performed in the repository 710 of the management node. Specifically, the shader store module reads 4M data from the image file each time, starting with the image file handle, then sorts the data in the order of reading, and places the data in a data queue 720. Each 4M data block in the queue is broadcast to the corresponding processing thread of each cluster and forms a thread set 730, for example, the first 4M data is processed by thread 1. In the processing thread 740 within the sliding window, based on the previously created blank storage area, that is, the blank volume, the previously created blank volume is opened by the block repository Librbd, and the 4M mirror data is written into the cluster 750 using the Write interface, and after the mirror data is written, the corresponding location information is generated, so as to facilitate the subsequent processing of indexing, searching, and the like of the mirror file.
In an embodiment of the application, if the number of the server clusters is at least three, a preselected cluster corresponding to the size of the sliding window is sequentially selected from each server cluster according to the size of the sliding window; and sending the image file to the preselected cluster in parallel based on the transmission thread corresponding to each server cluster.
As shown in fig. 7, in the application process of the cluster management method in this embodiment, especially under the condition of many clusters, the situation that the traffic of the storage network is too large and the network load is too heavy is avoided. Here, flow control is performed using a sliding window, and the processing threads of all clusters are placed in a thread set 730. In this embodiment, according to the size of the sliding window, preselected clusters corresponding to the size of the sliding window are sequentially selected from the server clusters, and the image file is sent to the preselected clusters in parallel based on the transmission threads corresponding to the server clusters.
For example, in this embodiment, the size of the sliding window is set to the number of clusters that are simultaneously running and uploading. For example, when the sliding window is 2, 4M mirror image data is uploaded through the processing threads corresponding to the cluster 1 and the cluster 2, and after the cluster 1 and the cluster 2 have been processed, the sliding window is moved backward by 2 frames, that is, the mirror image data is transmitted for the processing threads of the cluster 3 and the cluster 4, until the 4M data is transmitted for each cluster.
In an embodiment of the application, by the window transmission mode, the problem of overlarge traffic of a storage network caused by parallel data transmission under the condition of an overlarge number of clusters is avoided, and the efficiency of data parallel transmission is improved.
In an embodiment of the present application, the cloud-based multi-cluster management method in this embodiment further includes the following steps S710 to S730, which are described in detail as follows:
in step S710, when a newly added server cluster is registered in the cloud platform, reading a historical image file of an original server cluster in the cloud platform; the history image file is used for creating a virtual machine.
In an embodiment of the application, in the operation process of the cloud platform, some server clusters which have been registered and managed normally work, and new registered server clusters may also be successively registered. In this embodiment, a newly added server cluster may be registered in the cloud platform based on cluster information such as a cluster identifier, so as to implement expansion of the cloud platform.
It should be noted that, in this embodiment, the server is managed in a cluster management manner, so that a new server cluster can be additionally registered in the cloud platform at any time without affecting the work of other server clusters in the cloud platform. The capacity expansion of the cloud platform is realized, and the management of the server cluster in the cloud platform is facilitated.
In one embodiment of the present application, after a server cluster is newly registered, a history image file needs to be transmitted to the newly added server cluster. In this embodiment, because each server cluster in the cloud platform may include image files corresponding to different data, the history image file in this embodiment is used to represent image files in all server clusters or in a part of server clusters in the cloud platform, and the integrity of data in the newly added server cluster is ensured by reading the history image file in each server cluster, so that the newly added server cluster can store data of other server clusters in the same cloud platform.
In step S720, a transmission thread corresponding to each history image file is determined.
In an embodiment of the present application, because the number of history files that need to be transmitted is large, in the embodiment, a transmission thread corresponding to each history image file is determined for each history image file. And transmitting each history image file to the newly added server cluster in parallel based on the transmission threads.
In step S730, each history image file is sent to the newly added server cluster in parallel based on the transmission thread corresponding to each history image file.
In the operation process of the cloud platform in the embodiment of the application, a newly registered server cluster is provided successively. In this embodiment, the newly registered server clusters are detected and used as new server clusters, so as to perform parallel mirror image file transmission on the new server clusters. The problem of low efficiency that each historical image file is transmitted to a newly-added server cluster in sequence is solved, the efficiency of transmitting the historical image files to the newly-added server cluster is improved by transmitting the historical image files in parallel, and the virtual machine of the cluster can be established based on the second level of the image files.
In an embodiment of the present application, a cluster identifier of a registered server cluster in a cloud platform may be obtained; comparing the historical cluster identification stored in the storage component of the cloud platform with the cluster identification of the registered server cluster to obtain the server cluster corresponding to the cluster identification which is not stored in the storage component. And identifying the cluster identifier which is not stored in the storage component as a newly added identifier corresponding to the newly added server cluster, and taking the server cluster as the newly added server cluster. And parallelly sending each history image file to a newly added server cluster corresponding to the newly added identifier by a transmission thread corresponding to each history image file.
In an embodiment of the application, a cluster identifier of a registered server cluster is obtained, based on a history cluster identifier pre-stored in a storage component of a cloud platform, for example, a Volume-type set formed by each of probes of a gland periodically detected is compared with a memory in a circle store module, and a cluster corresponding to a Volume-type that the circle store does not have is a newly added server cluster.
In an embodiment of the application, the periodic detection may be performed based on a set detection period, for example, 5 minutes, 1 hour, and the like, and the efficiency of monitoring the server cluster may be improved by the periodic detection, so as to improve the intelligence of cloud platform management.
In an embodiment of the application, in the process of sending each history image file to a newly added server cluster in parallel based on a transmission thread corresponding to each history image file, each history image file forms a queue, and image files with preset data volume are read from the queue in parallel based on the queue formed by each history image file; transmitting a preset number of image files to a transmission thread corresponding to each image file; and sending the image files to the newly added server cluster in parallel through the transmission thread until all the historical image files are sent to the newly added server cluster.
Fig. 8 is a schematic diagram of mirror data synchronization of a newly added cluster according to an embodiment of the present application.
As shown in fig. 8, in this embodiment, the synchronization process of the mirrored data of the newly added cluster is performed in the storage library 810 of the cloud platform management node. The method includes the steps of firstly obtaining historical image files of each server cluster in the cloud platform, such as image 1 to image 3, forming an image queue 820, and successively reading a preset number of image files from the image queue 820. And then, transmitting a preset number of image files to the transmission threads corresponding to the historical image files in the thread set 830. For example, the data in mirror 1 to mirror 3 are acquired by thread 1 to thread 3 in thread set 830, respectively. And finally, based on the transmission threads of the historical image files, sending the historical image files to the newly added server cluster in parallel, for example, respectively transmitting the data in the images 1 to 3 to the clusters 1 to 3 through the threads 1 to 3 in the thread set 830.
In an embodiment of the present application, the data of the corresponding number of threads may be obtained through the sliding window 840, so as to ensure load balancing of the newly added server cluster.
In an embodiment of the present application, when a server cluster of a cloud platform creates a virtual machine, each server cluster searches an image file in its own cluster. The virtual machine may be created based on the latest image file, or may be created based on all image files, and specifically, the second-starting virtual machine may be implemented by a snapshot and clone technology inside the server cluster.
In an embodiment of the application, perception of the Glance to the multiple clusters is achieved through detection and discovery of the multiple clusters, mirror image data are uploaded to the multiple clusters through concurrence, and meanwhile mirror image synchronization can be conducted during cluster expansion, so that the second-starting function of a virtual machine under the condition of the multiple clusters is achieved. This has no perception to the user side and no influence to the service. Through the mirror image management, stable operation of multiple storage clusters of the cloud platform is guaranteed, and stable and reliable operation of data storage and processing is further guaranteed.
Fig. 9 illustrates a flow diagram of a cloud-based multi-cluster management method that may be performed by a server cluster, which may be the server cluster illustrated in fig. 1, according to one embodiment of the present application. Referring to fig. 9, the cloud-based multi-cluster management method at least includes steps S910 to S940, which are described in detail as follows:
in step S910, mirror image data sent by a management node in the cloud platform is obtained based on a transmission thread corresponding to a cluster identifier of the server cluster, where the transmission thread is created by the management node for the cluster identifier of the server cluster and is independent of transmission threads corresponding to other server clusters in the cloud platform.
In an embodiment of the application, when a server cluster of a cloud platform is generated, a management node creates a transmission thread corresponding to a cluster identifier of the server cluster. And the transmission thread created by the management node for the server cluster is independent from the transmission thread created for other server clusters in the cloud platform, so that the server cluster acquires the image file sent by the management node based on the transmission thread. By the method, each server cluster can acquire the image file in a single thread without interference, and the acquisition efficiency of the image file is improved.
It should be noted that the image file acquiring method in this embodiment corresponds to the image file transmitting method in the embodiment corresponding to fig. 2, and specifically, refer to the description in the embodiment corresponding to fig. 2.
In step S920, when the mirror image data is obtained, the obtained mirror image data is synthesized according to the data bits to obtain a mirror image file.
In an embodiment of the present application, since the mirror image data is partially and dispersedly transmitted to the server cluster, in this embodiment, when the mirror image data is completely acquired, the acquired mirror image data is synthesized according to the data bits, so as to obtain a complete mirror image file.
In step S930, the image file is synchronized to the server in the server cluster.
In an embodiment of the present application, after the server cluster obtains the complete image file, the image file is synchronized to the server in the server cluster. The process of synchronizing the mirror image file may be to synchronize to a part of servers in the server cluster, or to synchronize to all servers in the server cluster.
In step S940, a virtual machine is created in the server according to the image file.
In an embodiment of the application, after the image file is obtained, the servers in the server cluster search the image file in respective memories, and the second-starting virtual machine is realized through a snapshot and clone technology inside the server cluster.
In an embodiment of the present application, before acquiring the mirror image data sent by the management node in the cloud platform based on the transmission thread corresponding to the cluster identifier of the server cluster, the method further includes: sending a registration request to a cloud platform; if the registration in the cloud platform is completed, acquiring historical image files sent by the management nodes in parallel based on transmission threads corresponding to the historical image files in other server clusters in the cloud platform; and creating the virtual machine according to the historical image file.
In an embodiment of the present application, when a server cluster is newly registered in a cloud platform, image files of all server clusters in the cloud platform need to be acquired. At this time, in this embodiment, a transmission thread corresponding to each server cluster is created based on the history image file in each server cluster, so as to obtain image data through the transmission thread corresponding to each history image file, and after obtaining the history image data, a virtual machine is created based on the history image data.
In an embodiment of the application, the newly registered server cluster can efficiently acquire the historical image file and efficiently create the virtual machine through the scheme, and therefore the efficiency of registering the server cluster in the cloud platform and the management efficiency of the server cluster in the cloud platform are improved.
In an embodiment of the present application, after acquiring the mirror image data sent by the management node in the cloud platform based on the transmission thread corresponding to the cluster identifier of the server cluster, the method further includes: and storing the image file and generating the local position information of the image file. And adding the storage position of the image file into the metadata information of the image file for later processing such as retrieval of the image file.
In an embodiment of the application, mirror image data is uploaded to multiple clusters concurrently, and mirror image synchronization can be performed during cluster expansion, so that the second-starting function of a virtual machine under the condition of multiple clusters is realized. The method realizes no perception to the user side and has no influence on the service. Through the mirror image management, stable operation of multiple storage clusters of the cloud platform is guaranteed, and stable and reliable operation of data storage and processing is further guaranteed.
The following describes embodiments of an apparatus of the present application, which may be used to perform the cloud-based multi-cluster management method in the above embodiments of the present application. It will be appreciated that the apparatus may be a computer program (comprising program code) running on a computer device, for example an application software; the apparatus may be used to perform the corresponding steps in the methods provided by the embodiments of the present application. For details not disclosed in the embodiments of the apparatus of the present application, please refer to the embodiments of the cloud-based multi-cluster management method described above in the present application.
Fig. 10 illustrates a block diagram of a cloud-based multi-cluster management apparatus according to an embodiment of the present application.
Referring to fig. 10, a cloud-based multi-cluster management apparatus 1000 according to an embodiment of the present application, corresponding to a management node, includes: a reading unit 1010, configured to read an image file used for creating a virtual machine; an obtaining unit 1020, configured to obtain a cluster identifier of each server cluster accessing the cloud platform; a creating unit 1030, configured to determine transmission threads corresponding to each cluster identifier respectively; the sending unit 1040 is configured to send the image file to each server cluster corresponding to each cluster identifier in parallel based on the transmission thread corresponding to each cluster identifier.
In some embodiments of the present application, based on the foregoing scheme, the reading unit 1010 includes: the virtual machine comprises a first reading unit, a second reading unit and a third reading unit, wherein the first reading unit is used for successively reading mirror image data with preset data volume from a mirror image file used for creating a virtual machine; and the data adding unit is used for adding the read mirror image data to the mirror image data queue according to the reading sequence.
In some embodiments of the present application, based on the foregoing scheme, the sending unit 1040 includes: the second reading unit is used for reading mirror image data with preset data volume from the mirror image data queue; the first broadcasting unit is used for broadcasting the read mirror image data to the transmission thread corresponding to each cluster identifier; and the second sending unit is used for sending the read image data to each server cluster corresponding to each cluster identifier in parallel through the transmission thread until the image file is sent to each server cluster.
In some embodiments of the present application, based on the foregoing solution, the obtaining unit 1020 includes: the detection unit is used for calling the detection component and detecting the information of the server cluster contained in the storage component of the cloud platform; and the first determining unit is used for determining the cluster identification of the server cluster accessed to the cloud platform based on the information of the server cluster contained in the storage component.
In some embodiments of the present application, based on the foregoing scheme, the sending unit 1040 includes: the area creating unit is used for determining a blank storage area corresponding to the cluster identifier in the storage component of the server cluster based on the cluster identifier; and the parallel sending unit is used for sending the image file to a blank storage area corresponding to the cluster identifier in parallel based on the transmission thread corresponding to each server identifier.
In some embodiments of the present application, based on the foregoing solution, the detection unit includes: and the period detection unit is used for controlling a detection component in the management node to call the service corresponding to the storage component based on a preset period so as to acquire the cluster identifier of the server cluster managed by the storage component.
In some embodiments of the present application, based on the foregoing solution, the cloud-based multi-cluster management apparatus 1000 further includes: the third reading unit is used for reading a historical mirror image file of an original server cluster in the cloud platform when a newly added server cluster is registered in the cloud platform; the history mirror image file is used for creating a virtual machine; the second determining unit is used for determining a transmission thread corresponding to each history image file; and the second sending unit is used for sending the historical image files to the newly added server cluster in parallel based on the transmission threads corresponding to the historical image files respectively so that the newly added server cluster can establish the virtual machine based on the historical image files.
In some embodiments of the present application, based on the foregoing scheme, the second sending unit includes: the identification acquisition unit is used for acquiring the cluster identification of the registered server cluster in the cloud platform; the newly-added determining unit is used for identifying cluster identifications which are not stored in the storage component as newly-added identifications corresponding to the newly-added server clusters based on historical cluster identifications stored in the storage component of the cloud platform and cluster identifications of the registered server clusters; and the third sending unit is used for sending each history image file to the newly added server cluster corresponding to the newly added identifier in parallel based on the transmission thread corresponding to each history image file.
In some embodiments of the present application, based on the foregoing scheme, the second sending unit includes: the fourth reading unit is used for reading the image files with preset data volume in parallel from the queue based on the queue formed by the historical image files; the second transmission unit is used for transmitting the preset number of image files to the transmission thread corresponding to each image file; and the fourth sending unit is used for sending the image files to the newly added server cluster in parallel through the transmission thread until all the historical image files are sent to the newly added server cluster.
Fig. 11 illustrates a block diagram of a cloud-based multi-cluster management apparatus according to an embodiment of the present application.
Referring to fig. 11, a cloud-based multi-cluster management apparatus 1100 according to an embodiment of the present application, corresponding to a server cluster, includes: the data transmission unit 1110 is configured to obtain mirror image data sent by a management node in the cloud platform based on a transmission thread corresponding to a cluster identifier of a server cluster, where the transmission thread is created by the management node for the cluster identifier of the server cluster and is independent of transmission threads corresponding to other server clusters in the cloud platform; the file synthesis unit 1120 is configured to, when the mirror image data is obtained, synthesize the obtained mirror image data according to the data bits to obtain a mirror image file; a file synchronization unit 1130, configured to synchronize the mirror image file to a server in the server cluster; and a virtual machine creating unit 1140 for creating a virtual machine in the server according to the image file.
In some embodiments of the present application, based on the foregoing solution, the cloud-based multi-cluster management apparatus 1100 further includes: the registration request unit is used for sending a registration request to the cloud platform; the historical data acquisition unit is used for acquiring historical image files which are sent by the management node in parallel based on transmission threads corresponding to the historical image files in other server clusters in the cloud platform if the registration in the cloud platform is finished; and the first creating unit is used for creating the virtual machine according to the historical image file.
In some embodiments of the present application, based on the foregoing solution, the cloud-based multi-cluster management apparatus 1100 further includes: the file storage unit is used for storing the mirror image file; and the position adding unit is used for adding the storage position of the image file into the metadata information of the image file.
FIG. 12 illustrates a schematic structural diagram of a computer system suitable for use in implementing the electronic device of an embodiment of the present application.
It should be noted that the computer system 1200 of the electronic device shown in fig. 12 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 12, the computer system 1200 includes a Central Processing Unit (CPU)1201, which can perform various appropriate actions and processes, such as performing the methods in the above-described embodiments, according to a program stored in a Read-Only Memory (ROM) 1202 or a program loaded from a storage section 1208 into a Random Access Memory (RAM) 1203. In the RAM 1203, various programs and data necessary for system operation are also stored. The CPU 1201, ROM 1202, and RAM 1203 are connected to each other by a bus 1204. An Input/Output (I/O) interface 1205 is also connected to bus 1204.
The following components are connected to the I/O interface 1205: an input section 1206 including a keyboard, a mouse, and the like; an output section 1207 including a Display device such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and a speaker; a storage section 1208 including a hard disk and the like; and a communication section 1209 including a network interface card such as a LAN (Local area network) card, a modem, or the like. The communication section 1209 performs communication processing via a network such as the internet. A driver 1210 is also connected to the I/O interface 1205 as needed. A removable medium 1211, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like, is mounted on the drive 1210 as necessary, so that a computer program read out therefrom is mounted into the storage section 1208 as necessary.
In particular, according to embodiments of the application, the processes described above with reference to the flow diagrams may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising a computer program for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 1209, and/or installed from the removable medium 1211. The computer program executes various functions defined in the system of the present application when executed by a Central Processing Unit (CPU) 1201.
It should be noted that the computer readable medium shown in the embodiments of the present application may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a Read-Only Memory (ROM), an Erasable Programmable Read-Only Memory (EPROM), a flash Memory, an optical fiber, a portable Compact Disc Read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with a computer program embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. The computer program embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. Each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present application may be implemented by software, or may be implemented by hardware, and the described units may also be disposed in a processor. Wherein the names of the elements do not in some way constitute a limitation on the elements themselves.
As another aspect, the present application also provides a computer-readable medium, which may be contained in the electronic device described in the above embodiments; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs which, when executed by an electronic device, cause the electronic device to implement the method described in the above embodiments.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the application. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the embodiments of the present application.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the embodiments disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains.
It will be understood that the present application is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (15)

1. A cloud-based multi-cluster management method, comprising:
reading an image file for creating a virtual machine;
acquiring cluster identification of each server cluster accessed to the cloud platform;
determining a transmission thread corresponding to each cluster identifier;
and based on the transmission thread corresponding to each cluster identifier, the image file is sent to each server cluster corresponding to each cluster identifier in parallel.
2. The method of claim 1, wherein reading the image file used to create the virtual machine comprises:
successively reading mirror image data with preset data volume from the mirror image file for creating the virtual machine;
and adding the read mirror image data to a mirror image data queue according to the reading sequence.
3. The method according to claim 2, wherein the sending the image file to the respective server clusters corresponding to each cluster identifier in parallel based on the transmission thread corresponding to each cluster identifier comprises:
reading mirror image data with a preset data volume from the mirror image data queue;
broadcasting the read mirror image data to the transmission thread corresponding to each cluster identifier;
and sending the read mirror image data to each server cluster corresponding to each cluster identifier in parallel through the transmission thread until the mirror image file is sent to each server cluster.
4. The method of claim 1, wherein the obtaining the cluster identifier of each server cluster accessing the cloud platform comprises:
calling a detection component to detect information of a server cluster contained in a storage component of the cloud platform;
and determining the cluster identification of the server cluster accessed to the cloud platform based on the information of the server cluster contained in the storage component.
5. The method of claim 1, wherein the sending the image file to the respective server clusters corresponding to each cluster identifier in parallel based on the transmission thread corresponding to each cluster identifier comprises:
determining a blank storage area corresponding to the cluster identifier in a storage component of the server cluster based on the cluster identifier;
and based on the transmission thread corresponding to each server identifier, sending the image file to a blank storage area corresponding to the cluster identifier in parallel.
6. The method of claim 4, wherein the invoking a detection component to detect information of a server cluster contained in a storage component of the cloud platform comprises:
and controlling a detection component in the management node to call the service corresponding to the storage component based on a preset period, and acquiring the information of the server cluster managed by the storage component.
7. The method of claim 1, further comprising:
when a newly added server cluster is registered in the cloud platform, reading a historical mirror image file of an original server cluster in the cloud platform; the history mirror image file is used for creating a virtual machine;
determining a transmission thread corresponding to each history mirror image file;
and based on the transmission thread corresponding to each history image file, sending each history image file to the newly added server cluster in parallel.
8. The method according to claim 7, wherein the sending the history image files to the newly added server cluster in parallel based on the transmission thread corresponding to each history image file comprises:
acquiring a cluster identifier of a registered server cluster in the cloud platform;
identifying cluster identifiers which are not stored in a storage component of the cloud platform as newly added identifiers corresponding to the newly added server clusters based on historical cluster identifiers stored in the storage component and the cluster identifiers of the registered server clusters;
and based on the transmission thread corresponding to each history image file, sending each history image file to a newly added server cluster corresponding to the newly added identifier in parallel.
9. The method according to claim 7, wherein the sending the history image files to the newly added server cluster in parallel based on the transmission thread corresponding to each history image file comprises:
reading the image files with preset data volume in parallel from the queue based on the queue formed by the historical image files;
transmitting the preset number of image files to a transmission thread corresponding to each image file;
and sending the image files to the newly added server cluster in parallel through the transmission thread until all historical image files are sent to the newly added server cluster.
10. A cloud-based multi-cluster management method, comprising:
acquiring mirror image data sent by a management node in a cloud platform based on a transmission thread corresponding to a cluster identifier of a server cluster, wherein the transmission thread is created by the management node aiming at the cluster identifier of the server cluster and is independent of transmission threads corresponding to other server clusters in the cloud platform;
when the mirror image data is obtained, synthesizing the obtained mirror image data according to data bits to obtain a mirror image file;
synchronizing the mirror image file to a server in the server cluster;
and creating a virtual machine in the server according to the image file.
11. The method according to claim 10, before acquiring the mirror image data sent by the management node in the cloud platform based on the transmission thread corresponding to the cluster identifier of the server cluster, further comprising:
sending a registration request to the cloud platform;
if the registration in the cloud platform is completed, acquiring historical image files sent by the management node in parallel based on transmission threads corresponding to the historical image files in other server clusters in the cloud platform;
and creating a virtual machine according to the historical image file.
12. The method according to claim 10, wherein after acquiring the mirror image data sent by the management node in the cloud platform based on the transmission thread corresponding to the cluster identifier of the server cluster, the method further includes:
storing the mirror image file;
and adding the storage position of the image file to the metadata information of the image file.
13. A cloud-based multi-cluster management apparatus, comprising:
the reading unit is used for reading an image file used for creating a virtual machine;
the acquisition unit is used for acquiring cluster identifiers of all server clusters accessed to the cloud platform;
the determining unit is used for determining the transmission thread corresponding to each cluster identifier;
and the sending unit is used for sending the image file to each server cluster corresponding to each cluster identifier in parallel based on the transmission thread corresponding to each cluster identifier.
14. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out a method for cloud-based multi-cluster management according to any one of claims 1 to 12.
15. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs that, when executed by the one or more processors, cause the one or more processors to implement the cloud-based multi-cluster management method of any of claims 1 to 12.
CN202010505429.1A 2020-06-05 2020-06-05 Cloud-based multi-cluster management method, device, medium and electronic equipment Pending CN111800468A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010505429.1A CN111800468A (en) 2020-06-05 2020-06-05 Cloud-based multi-cluster management method, device, medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010505429.1A CN111800468A (en) 2020-06-05 2020-06-05 Cloud-based multi-cluster management method, device, medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN111800468A true CN111800468A (en) 2020-10-20

Family

ID=72802866

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010505429.1A Pending CN111800468A (en) 2020-06-05 2020-06-05 Cloud-based multi-cluster management method, device, medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN111800468A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113726638A (en) * 2021-11-04 2021-11-30 北京比格大数据有限公司 Method, device and equipment for managing multi-cloud multi-core container and storage medium
CN114205231A (en) * 2021-12-06 2022-03-18 湖北美和易思教育科技有限公司 Method and system for starting hadoop clusters in batch and readable storage medium
CN114265888A (en) * 2021-11-25 2022-04-01 中国建设银行股份有限公司 Multi-cluster container management method and device, electronic equipment and storage medium
CN115309548A (en) * 2022-08-03 2022-11-08 北京火山引擎科技有限公司 Cluster resource publishing method and device and electronic equipment
CN116033020A (en) * 2022-12-27 2023-04-28 中国联合网络通信集团有限公司 Method, device, equipment and storage medium for enhancing physical gateway computing power
US20230289164A1 (en) * 2022-03-08 2023-09-14 Vmware, Inc. User interface for applying an existing server image to a cluster

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113726638A (en) * 2021-11-04 2021-11-30 北京比格大数据有限公司 Method, device and equipment for managing multi-cloud multi-core container and storage medium
CN113726638B (en) * 2021-11-04 2022-04-01 北京比格大数据有限公司 Method, device and equipment for managing multi-cloud multi-core container and storage medium
CN114265888A (en) * 2021-11-25 2022-04-01 中国建设银行股份有限公司 Multi-cluster container management method and device, electronic equipment and storage medium
CN114205231A (en) * 2021-12-06 2022-03-18 湖北美和易思教育科技有限公司 Method and system for starting hadoop clusters in batch and readable storage medium
US20230289164A1 (en) * 2022-03-08 2023-09-14 Vmware, Inc. User interface for applying an existing server image to a cluster
CN115309548A (en) * 2022-08-03 2022-11-08 北京火山引擎科技有限公司 Cluster resource publishing method and device and electronic equipment
CN116033020A (en) * 2022-12-27 2023-04-28 中国联合网络通信集团有限公司 Method, device, equipment and storage medium for enhancing physical gateway computing power

Similar Documents

Publication Publication Date Title
CN111800468A (en) Cloud-based multi-cluster management method, device, medium and electronic equipment
CN114008605A (en) Big data application lifecycle management
CN111324571B (en) Container cluster management method, device and system
CN112214330A (en) Method and device for deploying master nodes in cluster and computer-readable storage medium
CN107291750B (en) Data migration method and device
CN109032796B (en) Data processing method and device
CN111984269A (en) Method for providing application construction service and application construction platform
CN111399764B (en) Data storage method, data reading device, data storage equipment and data storage medium
CN110162334B (en) Code management method, device and storage medium
CN111209090B (en) Method and assembly for creating virtual machine in cloud platform and server
CN111064626B (en) Configuration updating method, device, server and readable storage medium
CN111984270A (en) Application deployment method and system
CN111258726B (en) Task scheduling method and device
WO2020215752A1 (en) Graph computing method and device
CN110968331A (en) Method and device for running application program
CN111831567B (en) Application test environment configuration method, device, system and medium
CN110798358B (en) Distributed service identification method and device, computer readable medium and electronic equipment
CN111147226A (en) Data storage method, device and storage medium
CN115293365A (en) Management method, device, management platform and storage medium of machine learning model
CN115037757A (en) Multi-cluster service management system
CN114385570A (en) Data synchronization method and device, electronic equipment and readable medium
CN111431951B (en) Data processing method, node equipment, system and storage medium
CN114675872A (en) Data processing method, device and equipment for application program and storage medium
CN112181401A (en) Application construction method and application construction platform
CN109947727B (en) Data processing method, device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40029472

Country of ref document: HK

SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination