CN109271235B - Database cluster establishment method and device - Google Patents

Database cluster establishment method and device Download PDF

Info

Publication number
CN109271235B
CN109271235B CN201811037212.1A CN201811037212A CN109271235B CN 109271235 B CN109271235 B CN 109271235B CN 201811037212 A CN201811037212 A CN 201811037212A CN 109271235 B CN109271235 B CN 109271235B
Authority
CN
China
Prior art keywords
information
cluster
virtual machine
target
database 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.)
Active
Application number
CN201811037212.1A
Other languages
Chinese (zh)
Other versions
CN109271235A (en
Inventor
陈秋松
蔡础栋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Lizhi Network Technology Co ltd
Original Assignee
Guangzhou Lizhi Network Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Lizhi Network Technology Co ltd filed Critical Guangzhou Lizhi Network Technology Co ltd
Priority to CN201811037212.1A priority Critical patent/CN109271235B/en
Publication of CN109271235A publication Critical patent/CN109271235A/en
Application granted granted Critical
Publication of CN109271235B publication Critical patent/CN109271235B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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

Abstract

The invention provides a method and a device for establishing a database cluster, and relates to the technical field of database clusters. Creating a plurality of virtual machines on a private cloud according to target information, then installing pre-stored database software on each virtual machine, and acquiring cluster information of a pre-established target database cluster from a mirror server; selecting at least two target virtual machines from the plurality of virtual machines according to the cluster information; and finally, establishing the target database cluster by utilizing the at least two target virtual machines, wherein the at least two target virtual machines are connected in pairs. The database cluster establishing method and device provided by the invention have the advantages that the time for establishing the database cluster by operators is reduced, and the technical requirements on the operators are not high, so that the experience of the operators is improved.

Description

Database cluster establishment method and device
Technical Field
The present invention relates to the field of database cluster technologies, and in particular, to a method and apparatus for establishing a database cluster.
Background
Currently, with the rapid development of the internet, enterprise production relies more on database clusters, that is, at least two or more database servers are utilized to form a virtual single database logical image, and transparent data services are provided to clients like a single database system.
However, the database cluster is generally not automatic, and is generally manually built by operation and maintenance personnel, so that the time for building the database cluster is long, and meanwhile, the technical dependence on operators is strong.
In view of this, how to solve the above problems is an important point of attention of those skilled in the art.
Disclosure of Invention
In view of the above, the present invention aims to provide a database cluster building method, so as to solve the problems of long time for manually building a database cluster and strong technical dependence on operators in the building process in the prior art.
The invention further aims to provide a database cluster building device, which aims to solve the problems that in the prior art, the time for manually building the database cluster is long and the technical dependence on operators is strong in the building process.
In order to achieve the above object, the technical scheme adopted by the embodiment of the invention is as follows:
in one aspect, an embodiment of the present invention provides a method for establishing a database cluster, where the method for establishing a database cluster includes:
creating a plurality of virtual machines on the private cloud according to target information;
installing pre-stored database software on each virtual machine;
acquiring cluster information of a pre-established target database cluster from a mirror server;
selecting at least two target virtual machines from the plurality of virtual machines according to the cluster information;
and establishing the target database cluster by utilizing the at least two target virtual machines, wherein the at least two target virtual machines are connected in pairs.
On the other hand, the embodiment of the invention also provides a database cluster building device, which comprises:
the virtual machine creation unit is used for creating a plurality of virtual machines on the private cloud according to target information;
the software installation unit is used for installing prestored database software on each virtual machine;
the cluster information acquisition unit is used for acquiring the cluster information of the pre-established target database cluster from a mirror server;
the target virtual machine selection unit is used for selecting at least two target virtual machines from the plurality of virtual machines according to the cluster information;
the cluster establishing unit is used for establishing the target database cluster by utilizing the at least two target virtual machines, wherein the at least two target virtual machines are connected in pairs.
Compared with the prior art, the invention has the following beneficial effects:
the invention provides a database cluster building method and device, which are characterized in that a plurality of virtual machines are built on a private cloud according to target information, prestored database software is installed on each virtual machine, and cluster information of a pre-built target database cluster is acquired from a mirror server; selecting at least two target virtual machines from the plurality of virtual machines according to the cluster information; and finally, establishing the target database cluster by utilizing the at least two target virtual machines, wherein the at least two target virtual machines are connected in pairs. The database cluster establishment method provided by the invention can automatically establish the matched cluster through the system after the user inputs the cluster information of the pre-established target cluster, so that the time for manually establishing the database cluster by an operator can be reduced. Meanwhile, the method for establishing the database cluster is characterized in that the operator manually inputs cluster information to be established, and the system can automatically establish the required cluster, so that the technical requirements on the operator are not high, and the experience of the operator is improved.
In order to make the above objects, features and advantages of the present invention more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 shows a flowchart of a database cluster building method according to an embodiment of the present invention.
Fig. 2 shows a flow chart of the sub-steps of step S108 of fig. 1 provided by an embodiment of the present invention.
Fig. 3 is a schematic block diagram of a database cluster building apparatus according to an embodiment of the present invention.
Fig. 4 shows a schematic diagram of a submodule of the capacity expansion unit according to an embodiment of the present invention.
Icon: 100-database cluster building device; 110-a virtual machine creation unit; 120-a software installation unit; 130-a cluster information acquisition unit; 140-a target virtual machine selection unit; 150-a cluster building unit; 160-an inlet setting unit; 170-an information receiving unit; 180-expanding units; 181-judging module; 182-a virtual machine to be expanded determining module; 183-reject module; 184-capacity expansion module; 185-a data acquisition module; 186-cluster set-up module; 187-virtual machine creation module; 188-software installation module.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. The components of the embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. The components of the embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the invention, as presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be made by a person skilled in the art without making any inventive effort, are intended to be within the scope of the present invention.
It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures. Meanwhile, in the description of the present invention, it should also be noted that, unless explicitly specified and defined otherwise, the terms "connected", "connected" and "connected" should be construed broadly, and may be, for example, fixedly connected, detachably connected, or integrally connected; can be mechanically or electrically connected; can be directly connected or indirectly connected through an intermediate medium, and can be communication between two elements. The specific meaning of the above terms in the present invention will be understood in specific cases by those of ordinary skill in the art. Some embodiments of the present invention are described in detail below with reference to the accompanying drawings. The following embodiments and features of the embodiments may be combined with each other without conflict.
First embodiment
Referring to fig. 1, an embodiment of the present invention provides a method for establishing a database cluster, which is applied to a database cluster establishment system, wherein the database cluster establishment system is configured to automatically establish a database cluster according to cluster information input by a user when the user needs to establish the database cluster, so as to achieve an effect of quickly establishing the database cluster, and meanwhile, has lower operation difficulty for the user, and improves experience of the user.
Specifically, the database cluster building method includes:
step S101, a plurality of virtual machines are created on the private cloud according to target information.
In this embodiment, the database cluster is built based on a Private cloud, where the Private cloud (Private Clouds) is built for one customer to use alone, thus providing the most efficient control over data, security, and quality of service. The private cloud can be deployed in the firewall of the enterprise data center, and can also be deployed in a safe host hosting place, and the core attribute of the private cloud is a proprietary resource. When the database cluster needs to be established, a plurality of virtual machines need to be established in advance on the private cloud, and then the database cluster is established by utilizing the combination of the virtual machines. Wherein a Virtual Machine (Virtual Machine) refers to a complete computer system that runs in a completely isolated environment with complete hardware system functionality through software emulation.
Specifically, in the present embodiment, step S101 includes:
substep S1011, establishes a communication connection with the mirror server.
In this embodiment, the service contents of the mirror server and the main server are the same, but they are placed in different places, so as to share the load of the host. In short, the mirror server is shaped like a mirror, but is not an original although it can be seen. Two or more servers, which are identical in content on the network and updated synchronously, except the main server, are called mirror servers.
When the virtual machine is created, a user can input parameters of the virtual machine to be created, so that the database cluster building system can create a plurality of virtual machines according to the parameters, and certainly, the parameters input by the user can be acquired by establishing communication connection with the mirror image service device because the mirror image server and the data of the main server are synchronous, and meanwhile, the load pressure of the main server can be relieved by establishing communication connection with the mirror image server and acquiring the parameters, so that the normal operation of the main server is not influenced.
Of course, in other embodiments, the mirror server may pre-store certain parameter information, and the database cluster building system may also perform parameter acquisition by establishing a communication connection with the mirror server. Of course, certain parameter information may be stored in the mirror server, the user selects parameters of the virtual machine to be built, and after the database cluster building system is in communication connection with the mirror server, the parameter information selected by the user is obtained, which is not limited in this embodiment.
Sub-step S1012, obtaining the operating system, the memory information, the CPU information, the disk information, the partition rule, and the required software information of each virtual machine from the mirror server.
In this embodiment, the target information refers to parameter information of the virtual machine, where the parameter information of the virtual machine includes an operating system, memory information, CPU information, disk information, partition rules, and required software information, where the partition rules refer to a memory partition space of the virtual machine, for example, a memory space of 50G for a C disk and a memory space of 100G for a D disk of the virtual machine, which is not limited in this embodiment. The memory information refers to the total memory of the virtual machine, the disk information refers to the type division of the corresponding disk of the virtual machine, for example, the type division is divided into a C disk, a D disk, an E disk and the like, and the required software information is the software information prestored in the database cluster building system.
In step S1013, a plurality of virtual machines are created on the private cloud according to the operating system, the memory information, the CPU information, the disk information, the partition rule, and the required software information.
After the target information is obtained, the database cluster creation system can first create a plurality of virtual machines, wherein when a plurality of virtual machines are created by using the same target information, the information of the plurality of virtual machines is the same. Meanwhile, it should be noted that, after the creation of the virtual machine is completed, each virtual machine has a single IP address.
Step S102, pre-stored database software is installed on each virtual machine.
In this embodiment, after the virtual machine is created, a database cluster is formed by using multiple virtual machines, so that a user stores or reads data, and meanwhile, based on the virtual machine, corresponding database software needs to be installed to realize the storage and the reading of the data. Although the mysql database software used in this embodiment is not limited in this embodiment, other software may be used in other embodiments.
Step S103, obtaining the cluster information of the pre-established target database cluster from a mirror server.
In this embodiment, when a user needs a target database cluster, corresponding cluster information is set on a main server according to the need, where the cluster information in this embodiment mainly includes a cluster name, a cluster ID, and information about the number of virtual machines in the cluster. For example, the cluster name is "123", the cluster ID is "123456", the number of virtual machines in the cluster is set to 3, and of course, in other embodiments, the number of virtual machines in the cluster may be set to other forms, which is not limited in any way. In other embodiments, the cluster information may further include other data information, such as memory data information, that is, memory information of the target database cluster that can be defined by the user, which is not limited in this embodiment.
Step S104, selecting at least two target virtual machines from the plurality of virtual machines according to the cluster information.
After acquiring the cluster information of the target database cluster which the user wants to establish, the database cluster creation system selects a corresponding virtual machine according to the cluster information, wherein the number of virtual machines required can be determined according to the number information of the virtual machines in the cluster information, and the corresponding number of virtual machines is selected to create the target database cluster. When creating the database cluster, at least two virtual machines are required to construct a cluster system, so that the number of nodes of the virtual machines (i.e. the number of virtual machines) in the cluster information input by a user cannot be 1, and therefore, the database cluster creation system also selects at least two target virtual machines from a plurality of virtual machines.
Step S105, establishing the target database cluster by using the at least two target virtual machines, where the at least two target virtual machines are connected in pairs.
After the corresponding virtual machines are selected, a target database cluster can be established by using the selected virtual machines, wherein in the establishment of the target database cluster, the virtual machines in the target database cluster are required to be connected in pairs, so that the data stored by each virtual machine in the database cluster can be shared, and the purpose of acquiring the data or storing the data can be achieved no matter a user accesses or stores any virtual machine in the database cluster.
It should be noted that, for the virtual machines after the target database cluster is built, each virtual machine has a single IP address, and the target database cluster also has an ID number and a cluster name.
And S106, setting an external access entry for the target database cluster according to a polling rule.
After the target database cluster is established, in order to enable a user to normally store data or read data, an agreed external access entry needs to be set on the target database cluster, and a server can be connected with the target database cluster through the external access entry so as to store and read data.
Specifically, in this embodiment, in order to achieve the purpose of balancing the entries, the target database cluster sets an external access entry according to a polling rule, for example, the target database cluster includes A, B, C three virtual machines, where when a user needs to access the target database cluster, the connected entry may be an a virtual machine in the first access, and the connected entry may be a B virtual machine in the second access, and the connected entry may be a C virtual machine in the third access. And A, B, C are mutually synchronous, so that the data consistency in each virtual machine in the target database cluster is ensured, the disaster recovery capability of the target database cluster is improved, and more QPS (Query Per Second) can be supported.
Step S107, receiving a target database cluster expansion message.
In the actual use process, as the data of the user is continuously stored in the target database cluster, the memory of the target database cluster may not meet the storage requirement of the continuous user along with the continuous accumulation of the data quantity, so that the target database cluster needs to be expanded. In practical application, a user needs to send a capacity expansion instruction to the database building system, wherein the capacity expansion instruction comprises capacity expansion information.
In addition, in this embodiment, the capacity expansion information sent by the user is stored in the mirror image server, and the database cluster creating system can be in communication connection with the mirror image server, so as to obtain the capacity expansion information.
And S108, expanding the capacity of the target database cluster according to the type of the capacity expansion information.
After the database creation system acquires the capacity expansion information, the capacity expansion is performed according to the capacity expansion information.
Specifically, referring to fig. 2, in the present embodiment, step S108 includes:
and a substep S1081, wherein it is determined whether the capacity expansion information is of the first type, if yes, the substep S1082 is executed, and if not, the substep S1087 is executed.
In this embodiment, the capacity expansion information includes first type capacity expansion information and second type capacity expansion information, where the first type capacity expansion information is to expand the memory of the virtual machine in the target database cluster, and the second type capacity expansion information is to increase the new virtual machine in the target database cluster, so as to achieve the purpose of capacity expansion. Therefore, the database cluster creating system judges the type of the capacity expansion information after receiving the capacity expansion information, and then expands the capacity.
In the substep S1082, the virtual machine to be expanded is determined according to the target node.
In this embodiment, when the capacity expansion information is to expand the memory of the virtual machine in the target database cluster, the user needs to input a node that needs capacity expansion, and the node is the virtual machine that needs capacity expansion. For example, the target database cluster includes A, B, C three virtual machines, and when the capacity expansion node input by the user is the a virtual machine, the virtual machine to be expanded can be determined to be the a virtual machine according to the target node. Of course, in other embodiments, the target node may include more virtual machines, which the present embodiment does not limit in any way. Meanwhile, the target node may be any node when performing capacity expansion, which is not limited in this embodiment.
And substep S1083, eliminating the virtual machine to be expanded from the target database cluster.
After the virtual machine to be expanded is determined, the virtual machine to be expanded needs to be removed from the target database cluster because the expansion cannot be directly completed in the target database cluster.
And substep S1084, expanding the removed virtual machine to be expanded.
The capacity expansion information comprises capacity to be expanded besides capacity expansion types, and the database cluster creation system is also used for expanding the capacity of the virtual machine according to the capacity to be expanded.
For example, when the capacity of the user to be expanded is 50G, the database cluster creating system may increase the capacity of the virtual machine to be expanded by 50G.
And sub-step S1085, re-acquiring the cluster information of the target database cluster from the mirror server and eliminating the IP addresses of other virtual machines after the virtual machines to be expanded.
After the capacity expansion is completed, the virtual machines after the capacity expansion are required to be added into the target database cluster again, wherein the cluster information of the target database cluster is required to be acquired again through the mirror server, and meanwhile, after the target database cluster is added, the virtual machines after the capacity expansion are required to establish a communication relationship with other virtual machines in the target database cluster again in a pairwise manner, so that the IP addresses of other virtual machines after the virtual machines to be expanded are removed from the target database cluster are required to be acquired.
And a substep S1086, wherein the virtual machine after capacity expansion is rejoined into the target database cluster according to the cluster information and the IP addresses of the other virtual machines.
In this embodiment, the expanded virtual machine can be added to the target database cluster again according to the cluster information, and meanwhile, the expanded virtual machine can be connected with other virtual machines in pairs again according to the IP addresses of the other virtual machines.
In the substep S1087, a capacity expansion virtual machine is created on the private cloud according to the second type capacity expansion information.
When the capacity expansion information is the second type of capacity expansion information, a capacity expansion virtual machine is required to be reestablished. The capacity expansion information includes not only the capacity expansion type but also the capacity to be expanded, so that when the capacity expansion virtual machine is created, the virtual machine is created according to the capacity to be expanded, wherein the step of creating the capacity expansion virtual machine is similar to the step S101, and the details are not repeated here.
Substep S1088, installing pre-stored database software on the capacity-expanding virtual machine.
This step is similar to step S102, and will not be described here.
Substep S1089, re-acquiring, from the mirror server, the cluster information of the target database cluster and the IP address of each virtual machine within the target database cluster.
And a substep S1090, adding the capacity-expanding virtual machine into the target number library cluster according to the cluster information and the IP address of each virtual machine.
Second embodiment
Referring to fig. 3, the embodiment of the present invention further provides a database cluster creating apparatus 100, which is applied to a database cluster creating system, wherein the database cluster creating apparatus 100 includes:
the virtual machine creating unit 110 is configured to create a plurality of virtual machines on the private cloud according to a target information.
It is understood that step S101 may be performed by the virtual machine creation unit 110.
Wherein the virtual machine creation unit 110 includes:
and the connection establishment module is used for establishing communication connection with the mirror image server.
It will be appreciated that substep S1011 may be performed by means of a connection establishment module.
And the information acquisition module is used for acquiring the operating system, the memory information, the CPU information, the disk information, the partition rule and the required software information of each virtual machine from the mirror server.
It will be appreciated that sub-step S1012 may be performed using the information acquisition module.
The virtual machine creating module 187 is configured to create a plurality of virtual machines on the private cloud according to the operating system, the memory information, the CPU information, the disk information, the partition rule, and the required software information.
It will be appreciated that sub-step S1013 may be performed using virtual machine creation module 187.
And the software installation unit 120 is used for installing pre-stored database software on each virtual machine.
It is understood that step S102 may be performed by the software installation unit 120.
The cluster information acquiring unit 130 is configured to acquire cluster information of a pre-established target database cluster from a mirror server.
It is to be understood that step S103 may be performed by the cluster information acquiring unit 130.
The target virtual machine selecting unit 140 is configured to select at least two target virtual machines from the multiple virtual machines according to the cluster information.
It is understood that step S104 may be performed using the target virtual machine selection unit 140.
The cluster creating unit 150 is configured to create the target database cluster by using the at least two target virtual machines, where the at least two target virtual machines are connected in pairs.
It is understood that step S105 may be performed by the cluster-building unit 150.
And the entry setting unit 160 is configured to set an external access entry for the target database cluster according to a polling rule.
It is understood that step S106 may be performed using the inlet setting unit 160.
The information receiving unit 170 is configured to receive expansion information of a target database cluster.
It is understood that step S107 may be performed by the information receiving unit 170.
And the capacity expansion unit 180 is configured to expand the capacity of the target database cluster according to the type of the capacity expansion information.
It is understood that step S108 may be performed using the capacity expansion unit 180.
Referring to fig. 4, the capacity expansion unit 180 includes:
the judging module 181 is configured to judge whether the capacity expansion information is first type capacity expansion information.
It will be appreciated that sub-step S1081 may be performed using the determination module 181.
The virtual machine to be expanded determining module 182 is configured to determine a virtual machine to be expanded according to the target node.
It will be appreciated that sub-step S1082 may be performed using the virtual machine to be expanded determination module 182.
And the rejecting module 183 is configured to reject the virtual machine to be expanded from the target database cluster.
It will be appreciated that substep S1083 may be performed using the culling module 183.
And the capacity expansion module 184 is configured to expand the capacity of the removed virtual machine to be expanded.
It is appreciated that substep S1084 may be performed using the capacity expansion module 184.
And the data obtaining module 185 is configured to re-obtain cluster information of the target database cluster from the mirror server and reject IP addresses of other virtual machines after the virtual machine to be expanded.
It is understood that sub-step S1085 may be performed using the data acquisition module 185.
And the cluster establishing module 186 is configured to rejoin the expanded virtual machine to the target database cluster according to the cluster information and the IP addresses of the other virtual machines.
It will be appreciated that sub-step S1086 may be performed using cluster set-up module 186.
The virtual machine creating module 187 is configured to create a capacity-expansion virtual machine on the private cloud according to the second type of capacity-expansion information when the capacity-expansion information is the second type of capacity-expansion information.
It is appreciated that sub-step S1087 may be performed using virtual machine creation module 187.
And the software installation module 188 is used for installing prestored database software on the capacity expansion virtual machine.
It will be appreciated that substep S1088 may be performed using the software installation module 188.
The data obtaining module 185 is further configured to re-obtain, from the mirror server, the cluster information of the target database cluster and an IP address of each virtual machine in the target database cluster.
It is understood that substep S1089 may be performed using the data acquisition module 185.
The cluster building module 186 is further configured to add the capacity-expanding virtual machine to the target number library cluster according to the cluster information and the IP address of each virtual machine.
It will be appreciated that sub-step S1090 may be performed by the cluster-creation module 186.
In summary, the present invention provides a method and an apparatus for establishing a database cluster, which are implemented by creating multiple virtual machines on a private cloud according to a target information, then installing pre-stored database software on each virtual machine, and obtaining cluster information of the pre-established target database cluster from a mirror server; selecting at least two target virtual machines from the plurality of virtual machines according to the cluster information; and finally, establishing the target database cluster by utilizing the at least two target virtual machines, wherein the at least two target virtual machines are connected in pairs. The database cluster establishment method provided by the invention can automatically establish the matched cluster through the system after the user inputs the cluster information of the pre-established target cluster, so that the time for manually establishing the database cluster by an operator can be reduced. Meanwhile, the method for establishing the database cluster is characterized in that the operator manually inputs cluster information to be established, and the system can automatically establish the required cluster, so that the technical requirements on the operator are not high, and the experience of the operator is improved.
It should be noted that in this document, relational terms such as "first" and "second" and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the present invention, but various modifications and variations can be made to the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention. It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures.

Claims (6)

1. A database cluster building method, characterized in that the database cluster building method comprises:
creating a plurality of virtual machines on the private cloud according to target information;
installing pre-stored database software on each virtual machine;
acquiring cluster information of a pre-established target database cluster from a mirror server;
selecting at least two target virtual machines from the plurality of virtual machines according to the cluster information;
establishing the target database cluster by utilizing the at least two target virtual machines, wherein the at least two target virtual machines are connected in pairs;
after the step of establishing the target database cluster, the database cluster establishment method further includes:
receiving target database cluster expansion information;
when the capacity expansion information is the first type of capacity expansion information, determining a virtual machine to be expanded according to a target node;
removing the virtual machine to be expanded from the target database cluster;
expanding the capacity of the removed virtual machine to be expanded;
re-acquiring cluster information of the target database cluster from the mirror server, and removing IP addresses of other virtual machines after the virtual machines to be expanded;
adding the virtual machine subjected to capacity expansion into the target database cluster again according to the cluster information and the IP addresses of the other virtual machines;
when the capacity expansion information is second-class capacity expansion information, creating a capacity expansion virtual machine on the private cloud according to the second-class capacity expansion information;
installing pre-stored database software on the capacity-expansion virtual machine;
re-acquiring cluster information of the target database cluster and an IP address of each virtual machine in the target database cluster from the mirror server;
and adding the capacity-expanding virtual machine into the target database cluster according to the cluster information and the IP address of each virtual machine.
2. The method of claim 1, wherein the creating a plurality of virtual machines on the private cloud according to a target information comprises:
acquiring an operating system, memory information, CPU information, disk information, partition rules and required software information of each virtual machine from the mirror server;
and creating a plurality of virtual machines on the private cloud according to the operating system, the memory information, the CPU information, the disk information, the partition rules and the required software information.
3. The database cluster building method according to claim 1, wherein after the step of building the target database cluster, the database cluster building method further comprises:
and setting an external access inlet for the target database cluster according to a polling rule.
4. The database cluster building method according to claim 1, wherein the cluster information includes a cluster name, a cluster ID, and information on the number of virtual machines in the cluster.
5. A database cluster creation apparatus, characterized in that the database cluster creation apparatus comprises:
the virtual machine creation unit is used for creating a plurality of virtual machines on the private cloud according to target information;
the software installation unit is used for installing prestored database software on each virtual machine;
the cluster information acquisition unit is used for acquiring the cluster information of the pre-established target database cluster from a mirror server;
the target virtual machine selection unit is used for selecting at least two target virtual machines from the plurality of virtual machines according to the cluster information;
the cluster establishing unit is used for establishing the target database cluster by utilizing the at least two target virtual machines, wherein the at least two target virtual machines are connected in pairs;
the information receiving unit is used for receiving the expansion information of a target database cluster;
the capacity expansion unit is used for expanding the capacity of the target database cluster according to the type of the capacity expansion information;
the capacity expansion unit includes:
the virtual machine to be expanded determining module is used for determining the virtual machine to be expanded according to the target node when the expansion information is the first type expansion information;
the rejecting module is used for rejecting the virtual machine to be expanded from the target database cluster;
the capacity expansion module is used for expanding the removed virtual machines to be expanded;
the data acquisition module is used for re-acquiring cluster information of the target database cluster from the mirror server and eliminating IP addresses of other virtual machines after the virtual machine to be expanded;
the cluster building module is used for re-adding the virtual machine subjected to capacity expansion into the target database cluster according to the cluster information and the IP addresses of the other virtual machines;
the virtual machine creation module is used for creating a capacity expansion virtual machine on the private cloud according to the second type of capacity expansion information when the capacity expansion information is the second type of capacity expansion information;
the software installation module is used for installing prestored database software on the capacity-expansion virtual machine;
the data acquisition module is also used for re-acquiring the cluster information of the target database cluster and the IP address of each virtual machine in the target database cluster from the mirror server;
and the cluster building module is also used for adding the capacity-expansion virtual machine into the target database cluster according to the cluster information and the IP address of each virtual machine.
6. The database cluster-building apparatus according to claim 5, wherein the virtual machine creation unit includes:
the information acquisition module is used for acquiring an operating system, memory information, CPU information, disk information, partition rules and required software information of each virtual machine from the mirror server;
and the virtual machine creation module is used for creating a plurality of virtual machines on the private cloud according to the operating system, the memory information, the CPU information, the disk information, the partition rules and the required software information.
CN201811037212.1A 2018-09-06 2018-09-06 Database cluster establishment method and device Active CN109271235B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811037212.1A CN109271235B (en) 2018-09-06 2018-09-06 Database cluster establishment method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811037212.1A CN109271235B (en) 2018-09-06 2018-09-06 Database cluster establishment method and device

Publications (2)

Publication Number Publication Date
CN109271235A CN109271235A (en) 2019-01-25
CN109271235B true CN109271235B (en) 2023-12-19

Family

ID=65187404

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811037212.1A Active CN109271235B (en) 2018-09-06 2018-09-06 Database cluster establishment method and device

Country Status (1)

Country Link
CN (1) CN109271235B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110532243A (en) * 2019-08-20 2019-12-03 上海艾融软件股份有限公司 Data processing method, device and electronic equipment
CN110633325B (en) * 2019-09-20 2022-04-12 四川长虹电器股份有限公司 Docker-based database cluster capacity expansion method and device
CN114089917A (en) * 2021-11-19 2022-02-25 中国电信集团系统集成有限责任公司 Distributed object storage cluster, capacity expansion method and device thereof, and electronic equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103514044A (en) * 2012-06-29 2014-01-15 北京金山安全软件有限公司 Resource optimization method, device and system of dynamic behavior analysis system
CN106027671A (en) * 2016-07-05 2016-10-12 深圳前海大数点科技有限公司 Cloud computing based industrial data bus and data service system
CN106899518A (en) * 2017-02-27 2017-06-27 腾讯科技(深圳)有限公司 A kind of method for processing resource and device based on Internet data center
CN107666493A (en) * 2016-07-27 2018-02-06 腾讯科技(深圳)有限公司 A kind of configuration method for database and its equipment
CN107665141A (en) * 2016-07-27 2018-02-06 腾讯科技(深圳)有限公司 A kind of configuration method for database and its equipment
CN107783816A (en) * 2016-08-31 2018-03-09 阿里巴巴集团控股有限公司 The method and device that creation method and device, the big data cluster of virtual machine create
CN108293001A (en) * 2015-12-31 2018-07-17 华为技术有限公司 A kind of dispositions method of software definition data center and service cluster therein

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105282195A (en) * 2014-06-27 2016-01-27 中兴通讯股份有限公司 Network service providing, strategy rule evaluating and service component selecting method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103514044A (en) * 2012-06-29 2014-01-15 北京金山安全软件有限公司 Resource optimization method, device and system of dynamic behavior analysis system
CN108293001A (en) * 2015-12-31 2018-07-17 华为技术有限公司 A kind of dispositions method of software definition data center and service cluster therein
CN106027671A (en) * 2016-07-05 2016-10-12 深圳前海大数点科技有限公司 Cloud computing based industrial data bus and data service system
CN107666493A (en) * 2016-07-27 2018-02-06 腾讯科技(深圳)有限公司 A kind of configuration method for database and its equipment
CN107665141A (en) * 2016-07-27 2018-02-06 腾讯科技(深圳)有限公司 A kind of configuration method for database and its equipment
CN107783816A (en) * 2016-08-31 2018-03-09 阿里巴巴集团控股有限公司 The method and device that creation method and device, the big data cluster of virtual machine create
CN106899518A (en) * 2017-02-27 2017-06-27 腾讯科技(深圳)有限公司 A kind of method for processing resource and device based on Internet data center

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Virtual machine selection and placement for dynamic consolidation in Cloud computing environment;Xiong Fu等;《Frontiers of Computer Science》;第9卷;第 322–330页 *
基于云平台的高可用自动伸缩服务的设计与实现;武俊杰;《中国优秀硕士学位论文全文数据库 信息科技辑》(第4期);I139-498 *
基于云计算的互联网应用集群部署平台研究与设计;吕锦扬;《电信网技术》(第1期);第28-31页 *

Also Published As

Publication number Publication date
CN109271235A (en) 2019-01-25

Similar Documents

Publication Publication Date Title
CN114946166B (en) Method and system for dynamic resource movement in heterogeneous computing environments including cloud edge locations
CN109271235B (en) Database cluster establishment method and device
US20160308960A1 (en) Connection management system, and a method for linking connection management server in thin client system
CN116915787A (en) Multi-cluster portal
US11646939B2 (en) Network function NF management method and NF management device
CN107656988A (en) Document edit method and system
EP3442201B1 (en) Cloud platform construction method and cloud platform
US11716406B2 (en) Data caching for cloud services
CN111124595B (en) Method and system for providing cloud computing service
WO2017002222A1 (en) System deployment device and system deployment method
CN105897865B (en) A kind of network file service management system and method that agreement is unrelated
CN110417741A (en) A kind of method and apparatus of filtering safe group
JP2016126364A (en) Backup device and backup method of system
CN108769118A (en) The choosing method and device of host node in a kind of distributed system
CN112799849B (en) Data processing method, device, equipment and storage medium
CN114911577A (en) Method, device, equipment and storage medium for setting network isolation rule
JP4650607B2 (en) Network management system, network management method, and network management program
CN110110004B (en) Data operation method, device and storage medium
JP2019041241A (en) Distribution system
CN110333974A (en) A kind of switching method and equipment of cloud storage service
EP3126988A1 (en) Information processing system
JP2020057228A (en) Control unit, network construction system, network construction method, and program
US20230370331A1 (en) Parameter value setting system, control method of parameter value setting system and program
CN109857711B (en) Home network media sharing method and system based on vCPE
CN117097781A (en) Method, system, electronic equipment and storage medium for centralized management of Kafka

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant