CN116244035A - Virtual cluster creation method and device - Google Patents

Virtual cluster creation method and device Download PDF

Info

Publication number
CN116244035A
CN116244035A CN202211662425.XA CN202211662425A CN116244035A CN 116244035 A CN116244035 A CN 116244035A CN 202211662425 A CN202211662425 A CN 202211662425A CN 116244035 A CN116244035 A CN 116244035A
Authority
CN
China
Prior art keywords
cluster
physical
virtual
configuration information
node
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
CN202211662425.XA
Other languages
Chinese (zh)
Inventor
卢照旭
李家兴
蔡博文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China United Network Communications Group Co Ltd
Unicom Digital Technology Co Ltd
Unicom Cloud Data Co Ltd
Original Assignee
China United Network Communications Group Co Ltd
Unicom Digital Technology Co Ltd
Unicom Cloud Data Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China United Network Communications Group Co Ltd, Unicom Digital Technology Co Ltd, Unicom Cloud Data Co Ltd filed Critical China United Network Communications Group Co Ltd
Priority to CN202211662425.XA priority Critical patent/CN116244035A/en
Publication of CN116244035A publication Critical patent/CN116244035A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45562Creating, deleting, cloning virtual machine instances
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45595Network integration; Enabling network access in virtual machine instances

Landscapes

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

Abstract

The application provides a virtual cluster creation method and device, relates to the technical field of computers, and can effectively improve the efficiency of virtual cluster creation. The method comprises the following steps: when a creation instruction for creating a virtual cluster for at least one physical cluster is received, respectively determining configuration files of the physical clusters; and then creating virtual clusters corresponding to the physical clusters according to configuration information contained in the configuration files of the physical clusters. The embodiment of the application is used in the virtual cluster creation process.

Description

Virtual cluster creation method and device
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a virtual cluster creation method and apparatus.
Background
Kubernetes provides a tool for creating a virtual cluster of the Kubernetes cluster, the virtual cluster can be created in the Kubernetes cluster by using the Kubernetes, and a test is performed on the virtual cluster to obtain a performance index of the virtual cluster, the obtained performance index of the virtual cluster is used as test data of a K8s cluster, namely, the test data of the virtual cluster is used as test data of a real physical cluster, so that the test of the real physical cluster is realized.
Currently, when a virtual cluster is created by using a Kubemark, the virtual cluster is created by manually executing a script of the Kubemark, and the method has certain complexity, so that the efficiency of creating the virtual cluster is reduced.
Disclosure of Invention
The application provides a virtual cluster creation method and device, which can effectively improve the efficiency of virtual cluster creation.
In order to achieve the above purpose, the present application adopts the following technical scheme:
in a first aspect, the present application provides a virtual cluster creation method, including:
when a creation instruction for creating a virtual cluster for at least one physical cluster is received, respectively determining configuration files of each physical cluster;
and creating virtual clusters corresponding to each physical cluster according to the configuration information contained in the configuration files of each physical cluster.
Based on the above technical solution, in the virtual cluster creation method provided in the embodiments of the present application, when a creation instruction for creating a virtual cluster for at least one physical cluster is received, configuration files of each physical cluster are determined respectively; and then creating virtual clusters corresponding to the physical clusters according to configuration information contained in the configuration files of the physical clusters. By the method, the virtual clusters corresponding to the physical clusters can be created through the configuration information contained in the configuration files of the physical clusters, and the creation of the script of the Kubemark is not needed to be manually executed, so that the efficiency of creating the virtual clusters can be effectively improved.
Optionally, the configuration file of each physical cluster includes physical configuration information and virtual configuration information; creating a virtual cluster corresponding to each physical cluster according to configuration information contained in the configuration file of each physical cluster, including:
respectively acquiring control components of each physical cluster according to the physical configuration information of each physical cluster;
based on the virtual configuration information corresponding to each physical cluster, and through the control components of each physical cluster, virtual clusters corresponding to each physical cluster are respectively created.
Optionally, the physical configuration information includes an address identifier and an access identifier; according to the physical configuration information of each physical cluster, respectively obtaining the control components of each physical cluster, including:
establishing connection with the corresponding physical clusters according to the address identifiers contained in the physical configuration information of each physical cluster;
and acquiring the control components of the corresponding physical clusters according to the access identifiers contained in the physical configuration information of each physical cluster.
Optionally, the at least one physical cluster includes a first physical cluster; the virtual configuration information of the first physical cluster includes the number and cluster names of virtual nodes included in the virtual cluster corresponding to the first physical cluster.
Optionally, after creating the virtual cluster corresponding to each physical cluster, the method further includes:
and responding to the update of the configuration information contained in the configuration file of any physical cluster, and updating the node information of each virtual node contained in the virtual cluster corresponding to the physical cluster according to the updated configuration information.
Optionally, creating a virtual cluster corresponding to each physical cluster includes:
creating each virtual node contained in the virtual cluster corresponding to each physical cluster in sequence to obtain a current virtual node, and executing the following steps on the current virtual node:
acquiring node registration information corresponding to a current virtual node; the node registration information is that the current virtual node is registered in the corresponding physical cluster;
and deleting the current virtual node and re-creating the current virtual node in response to the fact that the node registration information of the current virtual node is inconsistent with the node running state of the current virtual node until the node registration information of the current virtual node is consistent with the node running state of the current virtual node.
In a second aspect, the present application provides a virtual cluster creating apparatus, including:
the receiving unit is used for respectively determining configuration files of each physical cluster when receiving a creation instruction for creating a virtual cluster for at least one physical cluster;
the creation unit is used for creating the virtual clusters corresponding to the physical clusters according to the configuration information contained in the configuration files of the physical clusters.
Optionally, the configuration file of each physical cluster includes physical configuration information and virtual configuration information; the creation unit is specifically configured to:
respectively acquiring control components of each physical cluster according to the physical configuration information of each physical cluster;
based on the virtual configuration information corresponding to each physical cluster, and through the control components of each physical cluster, virtual clusters corresponding to each physical cluster are respectively created.
Optionally, the physical configuration information includes an address identifier and an access identifier; the creation unit is specifically configured to:
establishing connection with the corresponding physical clusters according to the address identifiers contained in the physical configuration information of each physical cluster;
and acquiring the control components of the corresponding physical clusters according to the access identifiers contained in the physical configuration information of each physical cluster.
Optionally, the at least one physical cluster includes a first physical cluster; the virtual configuration information of the first physical cluster includes the number and cluster names of virtual nodes included in the virtual cluster corresponding to the first physical cluster.
In a third aspect, the present application provides a virtual cluster creating apparatus, including: a processor and a communication interface; the communication interface is coupled to a processor for running a computer program or instructions to implement the virtual cluster creation method as described in the first aspect and any one of the possible implementations of the first aspect.
In a fourth aspect, the present application provides a computer readable storage medium having instructions stored therein which, when run on a terminal, cause the terminal to perform a virtual cluster creation method as described in any one of the possible implementations of the first aspect and the first aspect.
In a fifth aspect, embodiments of the present application provide a computer program product comprising instructions which, when run on a virtual cluster creating apparatus, cause the virtual cluster creating apparatus to perform the virtual cluster creating method as described in any one of the possible implementations of the first aspect and the first aspect.
In a sixth aspect, embodiments of the present application provide a chip comprising a processor and a communication interface, the communication interface and the processor being coupled, the processor being configured to execute a computer program or instructions to implement a virtual cluster creation method as described in any one of the possible implementations of the first aspect and the first aspect.
Specifically, the chip provided in the embodiments of the present application further includes a memory, configured to store a computer program or instructions.
Drawings
Fig. 1 is an application scenario diagram of a virtual cluster creating method provided in an embodiment of the present application;
fig. 2 is a schematic diagram of a virtual cluster creation method according to an embodiment of the present application;
fig. 3 is a flowchart of a virtual cluster creation method provided in an embodiment of the present application;
FIG. 4 is a flowchart for creating a virtual cluster according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a virtual cluster creating device according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of another virtual cluster creating apparatus according to an embodiment of the present application.
Detailed Description
The following describes a virtual cluster creation method and device provided in the embodiments of the present application in detail with reference to the accompanying drawings.
The term "and/or" is herein merely an association relationship describing an associated object, meaning that there may be three relationships, e.g., a and/or B, may represent: a exists alone, A and B exist together, and B exists alone.
The terms "first" and "second" and the like in the description and in the drawings are used for distinguishing between different objects or for distinguishing between different processes of the same object and not for describing a particular sequential order of objects.
Furthermore, references to the terms "comprising" and "having" and any variations thereof in the description of the present application are intended to cover a non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed but may optionally include other steps or elements not listed or inherent to such process, method, article, or apparatus.
It should be noted that, in the embodiments of the present application, words such as "exemplary" or "such as" are used to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "exemplary" or "for example" should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete fashion.
Some of the terms in the embodiments of the present application are explained below to facilitate understanding by those skilled in the art:
1、Kubemark:
kubemark is a tool provided by K8s for virtual cluster creation of K8s clusters, where K8s clusters are the physical clusters of the present application. The virtual cluster simulation method can simulate a virtual cluster, is not limited by resources, and can test a virtual cluster with a much larger scale than a real cluster. Kubemark is a running test on a simulated virtual cluster to obtain a performance index of the virtual cluster. The test data of the virtual cluster, while slightly erroneous from the real cluster, may represent the data of the real cluster.
2、K8s:
K8s is known as kubernetes, an abbreviation for 8 instead of 8 characters "kubernete". Is an open source for managing containerized applications on multiple hosts in a cloud platform, and the goal of Kubernetes is to make deploying containerized applications simple and efficient, kubernetes provides a mechanism for application deployment, planning, updating, and maintenance.
3、Pod
Pod is the minimum unit of K8 s. The IP address of Pod is random and deleting Pod changes the IP. The Pod has a root container, one Pod may be composed of one or more containers, one Pod has a shared network namespace of the root container, and one Pod has a network address provided by the root container.
4. Cluster
A cluster is a computer system that is connected by a loosely-integrated set of computer software and/or hardware to perform computing work in a highly-tight, coordinated manner. Individual computers in a clustered computer system are often referred to as nodes, and the individual nodes are typically connected by a local area network, although other connection arrangements are possible. Clustered computer systems are commonly used to improve the computational speed and/or reliability of individual computers.
Fig. 1 is an application scenario schematic diagram of a virtual cluster creation method provided in an embodiment of the present application, where, as shown in fig. 1, the application scenario may include a terminal device 101 and a server 102. The terminal device 101 is installed and runs various applications, and the terminal device 101 may be an electronic device used by a user, where the electronic device may be a personal computer, a mobile phone, a tablet computer, a notebook, an electronic book reader, or a computer device with a certain computing capability and running instant messaging software and a website or social software and a website.
The server 102 may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or may be a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, a content delivery network (Content Delivery Network, CDN), basic cloud computing services such as big data and an artificial intelligence platform.
The terminal device 101 and the server 102 may communicate with each other via a communication network. The communication network may be a wired network or a wireless network. The terminal device 101 may be indirectly connected to the server 102 through the wireless access point 103 or the terminal device 101 may be directly connected to the server 102 through the internet, which is not limited herein.
In one possible application scenario, the server 102 may be a physical cluster of multiple physical machines, and the physical cluster may be a cluster of controllers pre-deployed with controllers. When the server 102 receives a creation instruction for creating a virtual cluster for any one or more physical clusters, which is sent by a user through the terminal device 101, the server 102 may determine configuration files of each physical cluster, and create a virtual cluster corresponding to each physical cluster according to configuration information included in the configuration files of each physical cluster.
Fig. 2 is a schematic diagram of a virtual cluster creating method according to an embodiment of the present application. In this architecture diagram, more or fewer physical clusters may be included, and fig. 2 shows an architecture diagram of three physical clusters. As shown in fig. 2, the three physical clusters are physical cluster a, physical cluster B and physical cluster C, where each physical cluster includes a physical cluster control plane, and each physical cluster control plane includes a component, for example, an API (Application Programming Interface ) server component, etc. The physical cluster A is a controller cluster deployed with a controller, after receiving a user-triggered creation instruction for creating a virtual cluster for the physical cluster A, the physical cluster B and the physical cluster C, the controller cluster can be respectively connected with the physical cluster A, the physical cluster B and the physical cluster C through an API server component, and the virtual cluster is created in each physical cluster through a control component corresponding to each physical cluster according to configuration information contained in a configuration file corresponding to each physical cluster. A virtual cluster may be composed of multiple groups of physical machines that contain multiple virtual nodes.
Kubernetes provides a tool for creating a virtual cluster of the Kubernetes cluster, the virtual cluster can be created in the Kubernetes cluster by using the Kubernetes, and a test is performed on the virtual cluster to obtain a performance index of the virtual cluster, the obtained performance index of the virtual cluster is used as test data of a K8s cluster, namely, the test data of the virtual cluster is used as test data of a real physical cluster, so that the test of the real physical cluster is realized. Currently, when a virtual cluster is created by using a Kubemark, the virtual cluster is created by manually executing a script of the Kubemark, and the method has certain complexity, so that the efficiency of creating the virtual cluster is reduced.
In order to solve the above technical problems, in the virtual cluster creation method provided in the embodiments of the present application, when a creation instruction for creating a virtual cluster for at least one physical cluster is received, configuration files of each physical cluster are respectively determined; and then creating virtual clusters corresponding to the physical clusters according to configuration information contained in the configuration files of the physical clusters. By the method, the virtual clusters corresponding to the physical clusters can be created through the configuration information contained in the configuration files of the physical clusters, and the creation of the script of the Kubemark is not needed to be manually executed, so that the efficiency of creating the virtual clusters can be effectively improved.
Fig. 3 is a flowchart of a virtual cluster creation method according to an embodiment of the present application, as shown in fig. 3, where the method includes the following steps:
in step S301, when a creation instruction for creating a virtual cluster for at least one physical cluster is received, configuration files of the physical clusters are respectively determined.
Specifically, the server may receive, through a controller cluster in which a controller is deployed in advance, a creation instruction for creating a virtual cluster for at least one physical cluster, which is sent by a user through a terminal device, and after receiving the creation instruction, determine a configuration file of each physical cluster according to a cluster identifier of a corresponding physical cluster included in each creation instruction. The configuration file may be preset in the controller cluster.
In the embodiment of the present application, the configuration file may be stored in a CRD (Custom ResourceDefinition, custom resource) format, which is not limited in this application.
In the embodiment of the present application, the controller cluster in which the controller is pre-deployed may be a physical cluster that needs to create a virtual cluster, or may be any physical cluster except a physical cluster that needs to create a virtual cluster, but when the controller cluster is any physical cluster except a physical cluster that needs to create a virtual cluster, the controller cluster and the physical cluster that needs to create a virtual cluster may communicate through a network.
In one embodiment, the process of deploying the controller in the K8s cluster belongs to the process of deploying the controller in the containerized scene, so that the controller can be deployed by one key by using yaml files according to the related mirror images of the deployment controller in the containerized scene, and corresponding development resources, CRD and RBAC (Role-based access control) resources are generated in the deployment process.
Step S302, creating virtual clusters corresponding to the physical clusters according to configuration information contained in the configuration files of the physical clusters.
Specifically, after the configuration information contained in the configuration file of each physical cluster is determined, the configuration information contained in the configuration file of each physical cluster may be sent to the corresponding physical cluster, and the virtual cluster corresponding to each physical cluster is created through the control component contained in each physical cluster.
By the method, when the virtual clusters are created by utilizing the Kubemark, the virtual clusters corresponding to the physical clusters can be automatically created directly through the configuration information contained in the configuration files of the physical clusters, and the user does not need to manually execute the script of the Kubemark for creation, so that the efficiency of creating the virtual clusters can be effectively improved.
In an alternative embodiment, the configuration file of each physical cluster may include physical configuration information and virtual configuration information corresponding to each physical cluster. Accordingly, in performing the above step S302, reference may be made to the method illustrated in fig. 4, which may include, as illustrated in fig. 4, the steps of:
step S401, respectively obtaining control components of each physical cluster according to the physical configuration information of each physical cluster.
Specifically, in an alternative embodiment, the physical configuration information may include an address identifier and an access identifier, the server may obtain physical configuration information of each physical cluster from the controller cluster, and after obtaining the physical configuration information of each physical cluster, may establish connection with a corresponding physical cluster through the controller cluster according to the address identifier included in the physical configuration information of each physical cluster, and obtain a control component of the physical cluster according to the access identifier included in the physical configuration information.
In this embodiment of the present application, the address identifier may include, but is not limited to, a cluster control plane address corresponding to the physical cluster, and the access identifier may include, but is not limited to, a token (flag) corresponding to a service account number of the physical cluster.
In this embodiment of the present application, before executing step S401, that is, before acquiring the control components of each physical cluster according to the physical configuration information of each physical cluster, a service account may be created in advance for each physical cluster that needs to create a virtual machine group.
Specifically, when a user creates a service account, a service account may be created in a physical cluster where a virtual cluster needs to be created, and the service account is bound with a cluster-admin (cluster role), after detecting that the user binds the service account and the cluster-admin, the server may obtain a token of the corresponding service account, and the controller cluster may reduce the operable authority of the controller cluster to the corresponding physical cluster through the token of the service account.
In this embodiment of the present application, the physical configuration information of each physical cluster may further include information such as a name space name of each physical cluster, a secret name for connecting to a control plane, and the like, which is not limited in this application.
Step S402, based on the virtual configuration information corresponding to each physical cluster, and through the control components of each physical cluster, virtual clusters corresponding to each physical cluster are respectively created.
Specifically, after the connection is established between the controller cluster and the corresponding physical cluster, a virtual cluster creation request can be sent to each physical cluster through the controller cluster, virtual configuration information corresponding to each physical cluster is sent to the corresponding physical cluster through the controller cluster, and after the physical cluster receives the virtual configuration information, the corresponding virtual cluster can be created through the control component according to the virtual configuration information.
In the embodiment of the present application, the virtual configuration information may include a cluster name of the virtual cluster and the number of virtual nodes. For example, assuming that the first physical cluster is a physical cluster in which a virtual machine group needs to be created, the virtual configuration information corresponding to the first physical cluster may include a cluster name of the virtual cluster corresponding to the first physical cluster and the number of virtual nodes included in the virtual cluster corresponding to the first physical cluster. For example, the node prefix, the number of groups, and the number of virtual nodes included in each group of virtual nodes included in the virtual cluster corresponding to the first physical cluster.
In an alternative embodiment, the statefulset resource controller may be used in creating virtual clusters corresponding to each physical cluster by the control component of each physical cluster, because the names of virtual nodes created by the statefulset resource controller are ordered, and when a virtual node fails and needs to be rebuilt, original name information is still reserved, and dirty data is not generated in reconnecting to the clusters.
In an optional embodiment, in step S302, when creating virtual clusters corresponding to each physical cluster according to configuration information included in the configuration file of each physical cluster, each virtual node included in the virtual cluster corresponding to each physical cluster may be sequentially created to obtain a current virtual node, and the following steps are performed on the current virtual node:
acquiring node registration information corresponding to a current virtual node; if the node registration information of the current virtual node is consistent with the node running state of the current virtual node, creating a next virtual node; if the node registration information of the current virtual node is inconsistent with the node running state of the current virtual node, deleting the current virtual node and re-creating until the node registration information of the current virtual node is consistent with the node running state of the current virtual node; namely, deleting the current virtual node and re-creating the current virtual node in response to the fact that the node registration information of the current virtual node is inconsistent with the node running state of the current virtual node. The node registration information is that the current virtual node is registered in the corresponding physical cluster.
In an optional implementation manner, after the virtual clusters corresponding to the physical clusters are created, configuration information contained in configuration files of the physical clusters may be detected, an operation of updating the configuration information contained in the configuration file of any physical cluster may be responded, and node information of each virtual node contained in the virtual cluster corresponding to the physical cluster is updated according to the updated configuration information. Wherein, the configuration information generation update can comprise addition, deletion, modification and the like of the virtual node.
In an exemplary embodiment, when a user intends to delete a virtual cluster corresponding to any physical cluster, the user may delete a configuration file of the physical cluster included in the controller cluster, and when the server detects that the configuration file is deleted through the controller cluster, the server may delete virtual nodes (pod) included in a virtual machine group corresponding to the physical cluster, and delete virtual data corresponding to each virtual node after the deletion is completed, that is, delete virtual node dirty data corresponding to each virtual node.
By the method, when any virtual cluster needs to be deleted, each virtual node contained in the virtual cluster and virtual node dirty data corresponding to the virtual node can be automatically deleted without manual deletion by a user.
Fig. 5 is a schematic structural diagram of a virtual cluster creating apparatus according to an embodiment of the present application, where, as shown in fig. 5, the apparatus includes:
a receiving unit 501, configured to determine configuration files of each physical cluster when receiving a creation instruction for creating a virtual cluster for at least one physical cluster;
the creating unit 502 is configured to create a virtual cluster corresponding to each physical cluster according to configuration information included in the configuration file of each physical cluster.
Optionally, the configuration file of each physical cluster includes physical configuration information and virtual configuration information; the creation unit 502 is specifically configured to:
respectively acquiring control components of each physical cluster according to the physical configuration information of each physical cluster;
based on the virtual configuration information corresponding to each physical cluster, and through the control components of each physical cluster, virtual clusters corresponding to each physical cluster are respectively created.
Optionally, the physical configuration information includes an address identifier and an access identifier; the creation unit 502 is specifically configured to:
establishing connection with the corresponding physical clusters according to the address identifiers contained in the physical configuration information of each physical cluster;
and acquiring the control components of the corresponding physical clusters according to the access identifiers contained in the physical configuration information of each physical cluster.
Optionally, the at least one physical cluster includes a first physical cluster; the virtual configuration information of the first physical cluster includes the number and cluster names of virtual nodes included in the virtual cluster corresponding to the first physical cluster.
Optionally, after creating the unit 502, the apparatus further includes:
the searching unit is used for responding to the configuration information contained in the configuration file of any physical cluster to update, and updating the node information of each virtual node contained in the virtual cluster corresponding to the physical cluster according to the updated configuration information.
Optionally, the creating unit 502 is specifically configured to:
creating each virtual node contained in the virtual cluster corresponding to each physical cluster in sequence to obtain a current virtual node, and executing the following steps on the current virtual node:
acquiring node registration information corresponding to a current virtual node; the node registration information is that the current virtual node is registered in the corresponding physical cluster;
and deleting the current virtual node and re-creating the current virtual node in response to the fact that the node registration information of the current virtual node is inconsistent with the node running state of the current virtual node until the node registration information of the current virtual node is consistent with the node running state of the current virtual node.
Fig. 6 shows still another possible structural diagram of the virtual cluster creating apparatus involved in the above-described embodiment. The virtual cluster creation device includes: a processor 601 and a communication interface 602. The processor 601 is configured to control and manage actions of the virtual cluster creating device, and the communication interface 602 is configured to support communication between the virtual cluster creating device and other network entities. The virtual cluster creating device may further comprise a memory 603 and a bus 604, the memory 603 being for storing program codes and data of the virtual cluster creating device.
Wherein the memory 603 may be a memory in the virtual cluster creating device or the like, which may include a volatile memory, such as a random access memory; the memory may also include non-volatile memory, such as read-only memory, flash memory, hard disk or solid state disk; the memory may also comprise a combination of the above types of memories.
The processor 601 may be implemented or executed with the various exemplary logic blocks, modules and circuits described in connection with this disclosure. The processor may be a central processing unit, a general purpose processor, a digital signal processor, an application specific integrated circuit, a field programmable gate array or other programmable logic device, a transistor logic device, a hardware component, or any combination thereof. Which may implement or perform the various exemplary logic blocks, modules, and circuits described in connection with this disclosure. The processor may also be a combination that performs the function of a computation, e.g., a combination comprising one or more microprocessors, a combination of a DSP and a microprocessor, etc.
Bus 604 may be an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus or the like. The bus 604 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in fig. 6, but not only one bus or one type of bus.
From the foregoing description of the embodiments, it will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of functional modules is illustrated, and in practical application, the above-described functional allocation may be implemented by different functional modules according to needs, i.e. the internal structure of the apparatus is divided into different functional modules to implement all or part of the functions described above. The specific working processes of the above-described systems, devices and units may refer to the corresponding processes in the foregoing method embodiments, which are not described herein.
The present application provides a computer program product comprising instructions which, when run on a computer, cause the computer to perform the virtual cluster creation method of the method embodiments described above.
The embodiment of the application also provides a computer readable storage medium, in which instructions are stored, which when executed on a computer, cause the computer to execute the virtual cluster creation method in the method flow shown in the method embodiment.
The 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 a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random access Memory (Random AccessMemory, RAM), a Read-Only Memory (ROM), an erasable programmable Read-Only Memory (Erasable Programmable Read Only Memory, EPROM), a register, a hard disk, 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, or any other form of computer readable storage medium known in the art. An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an application specific integrated circuit (Application SpecificIntegrated Circuit, ASIC). In the context of 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.
Embodiments of the present invention provide a computer program product comprising instructions which, when executed on a computer, cause the computer to perform the virtual cluster creation method provided herein.
Since the virtual cluster creating apparatus, the computer readable storage medium, and the computer program product in the embodiments of the present invention can be applied to the above-mentioned method, the technical effects that can be obtained by the virtual cluster creating apparatus and the computer readable storage medium can also refer to the above-mentioned method embodiments, and the embodiments of the present invention are not described herein again.
In the several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interface, indirect coupling or communication connection of devices or units, electrical, mechanical, or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The foregoing is merely a specific embodiment of the present application, but the protection scope of the present application is not limited thereto, and any changes or substitutions within the technical scope of the present disclosure should be covered in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (12)

1. A virtual cluster creation method, the method comprising:
when a creation instruction for creating a virtual cluster for at least one physical cluster is received, respectively determining configuration files of each physical cluster;
and creating virtual clusters corresponding to the physical clusters according to configuration information contained in the configuration files of the physical clusters.
2. The method of claim 1, wherein the configuration file of each physical cluster includes physical configuration information and virtual configuration information; the creating the virtual cluster corresponding to each physical cluster according to the configuration information contained in the configuration file of each physical cluster includes:
respectively acquiring control components of each physical cluster according to the physical configuration information of each physical cluster;
based on the virtual configuration information corresponding to each physical cluster, and through the control components of each physical cluster, virtual clusters corresponding to each physical cluster are respectively created.
3. The method according to claim 2, wherein the physical configuration information includes an address identifier and an access identifier; the step of respectively obtaining the control components of each physical cluster according to the physical configuration information of each physical cluster includes:
establishing connection with the corresponding physical clusters according to the address identifiers contained in the physical configuration information of each physical cluster;
and acquiring the control components of the corresponding physical clusters according to the access identifiers contained in the physical configuration information of each physical cluster.
4. The method of claim 2, wherein the at least one physical cluster comprises a first physical cluster; the virtual configuration information of the first physical cluster includes the number and cluster names of virtual nodes included in the virtual cluster corresponding to the first physical cluster.
5. The method of claim 1, wherein after the creating of the virtual clusters corresponding to the respective physical clusters, the method further comprises:
and responding to the update of the configuration information contained in the configuration file of any physical cluster, and updating the node information of each virtual node contained in the virtual cluster corresponding to the physical cluster according to the updated configuration information.
6. The method of claim 1, wherein creating the virtual cluster corresponding to the respective physical cluster comprises:
creating each virtual node contained in the virtual cluster corresponding to each physical cluster in sequence to obtain a current virtual node, and executing the following steps on the current virtual node:
acquiring node registration information corresponding to the current virtual node; the node registration information is that the current virtual node is registered in a corresponding physical cluster;
and deleting the current virtual node and re-creating the current virtual node in response to the fact that the node registration information of the current virtual node is inconsistent with the node running state of the current virtual node until the node registration information of the current virtual node is consistent with the node running state of the current virtual node.
7. A virtual cluster creation apparatus, the apparatus comprising:
the receiving unit is used for respectively determining configuration files of each physical cluster when receiving a creation instruction for creating a virtual cluster for at least one physical cluster;
the creation unit is used for creating the virtual clusters corresponding to the physical clusters according to the configuration information contained in the configuration files of the physical clusters.
8. The apparatus of claim 7, wherein the configuration file of each physical cluster includes physical configuration information and virtual configuration information; the creation unit is specifically configured to:
respectively acquiring control components of each physical cluster according to the physical configuration information of each physical cluster;
based on the virtual configuration information corresponding to each physical cluster, and through the control components of each physical cluster, virtual clusters corresponding to each physical cluster are respectively created.
9. The apparatus of claim 8, wherein the physical configuration information includes an address identifier and an access identifier; the creation unit is specifically configured to:
establishing connection with the corresponding physical clusters according to the address identifiers contained in the physical configuration information of each physical cluster;
and acquiring the control components of the corresponding physical clusters according to the access identifiers contained in the physical configuration information of each physical cluster.
10. The apparatus of claim 8, wherein the at least one physical cluster comprises a first physical cluster; the virtual configuration information of the first physical cluster includes the number and cluster names of virtual nodes included in the virtual cluster corresponding to the first physical cluster.
11. A virtual cluster creation apparatus, comprising: a processor and a communication interface; the communication interface is coupled to the processor for running a computer program or instructions to implement the virtual cluster creation method as claimed in any of the claims 1-6.
12. A computer readable storage medium having instructions stored therein, characterized in that when executed by a computer, the computer performs the virtual cluster creation method of any of the preceding claims 1-6.
CN202211662425.XA 2022-12-23 2022-12-23 Virtual cluster creation method and device Pending CN116244035A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211662425.XA CN116244035A (en) 2022-12-23 2022-12-23 Virtual cluster creation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211662425.XA CN116244035A (en) 2022-12-23 2022-12-23 Virtual cluster creation method and device

Publications (1)

Publication Number Publication Date
CN116244035A true CN116244035A (en) 2023-06-09

Family

ID=86625122

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211662425.XA Pending CN116244035A (en) 2022-12-23 2022-12-23 Virtual cluster creation method and device

Country Status (1)

Country Link
CN (1) CN116244035A (en)

Similar Documents

Publication Publication Date Title
CN107690800A (en) Manage dynamic IP addressing distribution
CN111182089B (en) Container cluster system, method and device for accessing big data assembly and server
CN108683668B (en) Resource checking method, device, storage medium and equipment in content distribution network
CN110673941B (en) Migration method of micro-services in multiple computer rooms, electronic equipment and storage medium
US10089024B2 (en) Memory deduplication protection for memory pages
US11036535B2 (en) Data storage method and apparatus
US10073646B2 (en) Multi-tier data synchronizer based on concurrent linked list
CN113810230A (en) Method, device and system for carrying out network configuration on containers in container cluster
CN111787126A (en) Container creation method, server, and storage medium
CN111064786B (en) Account identifier management method and device
US10783073B2 (en) Chronologically ordered out-of-place update key-value storage system
CN111600833B (en) Network operating system and message forwarding method
CN114244555B (en) Security policy adjusting method
CN116244035A (en) Virtual cluster creation method and device
CN115174529B (en) Network processing method and device, electronic equipment and storage medium
CN110290172B (en) Container application cloning method and device, computer equipment and storage medium
CN107547607B (en) Cluster migration method and device
CN116155890B (en) Method and device for realizing distributed file system
CN113010600A (en) Data management system, method, related device and medium based on block chain
CN112650710A (en) Data migration sending method and device, storage medium and electronic device
CN113691575A (en) Communication method, device and system
CN113992574B (en) Method, system and equipment for setting router binding node priority
CN115277408B (en) Agent configuration information updating method, device, equipment and storage medium
CN112748981B (en) Processing method and device for software mirror image of virtual network function
CN110365742B (en) Multi-active load balancing application creation method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication