CN109814881A - Method and apparatus for disposing data-base cluster - Google Patents

Method and apparatus for disposing data-base cluster Download PDF

Info

Publication number
CN109814881A
CN109814881A CN201711167300.9A CN201711167300A CN109814881A CN 109814881 A CN109814881 A CN 109814881A CN 201711167300 A CN201711167300 A CN 201711167300A CN 109814881 A CN109814881 A CN 109814881A
Authority
CN
China
Prior art keywords
container
presetting database
mirror image
slave node
dilatation
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
CN201711167300.9A
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.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201711167300.9A priority Critical patent/CN109814881A/en
Publication of CN109814881A publication Critical patent/CN109814881A/en
Pending legal-status Critical Current

Links

Abstract

The embodiment of the present application discloses the method and apparatus for disposing data-base cluster.One specific embodiment of method includes: to receive the request for the cluster that user disposes presetting database, the deployment configuration template that the container of operation presetting database is created according to request pulls the container mirror image of operation presetting database based on deployment configuration template scheduling slave node from mirror image warehouse and creates the container instance of operation presetting database.The embodiment does not need to be initialized by platform server when disposing data-base cluster, so as to fast and efficiently dispose data-base cluster.

Description

Method and apparatus for disposing data-base cluster
Technical field
The invention relates to field of computer technology, and in particular to Internet technical field more particularly to a kind of use In the method and apparatus of deployment data-base cluster.
Background technique
With the fast development of internet, the background framework using the number sharp increase of internet, large-scale website also exists Constantly change.On from all service arrangements such as initial services and database service to a physical server, after arriving The reliability that database is improved using data-base cluster come is to adapt to growing amount of access.
The deployment of data-base cluster at present generallys use single example deployment, that is, in newly-built and dilatation data-base cluster When, need to be related to data-base cluster every server initiation (format diskette, install software package, distribute configuration file, Open safety shell protocol trust), script startup data-base cluster is then carried by database software packet.
Summary of the invention
The embodiment of the present application proposes a kind of method and apparatus for disposing data-base cluster.
In a first aspect, method includes: the reception Ministry of Revenue this application provides a kind of method for disposing data-base cluster Affix one's name to the request of the cluster of presetting database, wherein request includes the identification information of presetting database;It is pre- according to request creation operation If the deployment configuration template of the container of database, wherein deployment configuration template includes: the information of the slave node of deployment container, fortune The information for the network mode that the identification information of the container mirror image of row presetting database, container starting use, container carry storage letter Breath, container running environment information, wherein the mark of the identification information of the container mirror image of operation presetting database and presetting database Information matches;The container mirror of operation presetting database is pulled from mirror image warehouse based on deployment configuration template scheduling slave node Picture and the container instance for creating operation presetting database.
Second aspect, this application provides a kind of for disposing the device of data-base cluster, and device includes: receiving unit, It is configured to receive the request for the cluster that user disposes presetting database, wherein request includes the identification information of presetting database; Creating unit is configured to create the deployment configuration template of the container of operation presetting database according to request, wherein deployment configuration Template includes: the information of the slave node of deployment container, the identification information of the container mirror image of operation presetting database, container starting The information of the network mode used, container carry store information, container running environment information, wherein the appearance of operation presetting database The identification information of device mirror image and the identification information of presetting database match;Scheduling unit is configured to based on deployment configuration mould Plate scheduling slave node pulls the container mirror image of presetting database from mirror image warehouse and creates the container of operation presetting database Example.
The third aspect, this application provides a kind of servers, including one or more processors;Storage device, for depositing One or more programs are stored up, when one or more programs are executed by one or more processors, so that one or more processors Realize the method for disposing data-base cluster of first aspect.
Fourth aspect, the application improve a kind of computer readable storage medium, are stored thereon with computer program, the journey The method for disposing data-base cluster such as first aspect is realized when sequence is executed by processor.
Method and apparatus provided by the embodiments of the present application for disposing data-base cluster, by receiving user's deployment first The request of the cluster of presetting database, wherein the request includes the identification information of the presetting database;Then according to Request creates the deployment configuration template for running the container of the presetting database, is finally based on the deployment configuration template tune The slave node is spent to pull the container mirror image of the presetting database from mirror image warehouse and create the operation preset data The container instance in library.It does not need to carry out by platform server when disposing data-base cluster using method provided by the embodiments of the present application Initialization, does not need to be initialized by platform server.So as to quick, efficient deployment data-base cluster.
Detailed description of the invention
By reading a detailed description of non-restrictive embodiments in the light of the attached drawings below, the application's is other Feature, objects and advantages will become more apparent upon:
Fig. 1 is that this application can be applied to exemplary system architecture figures therein;
Fig. 2 is the flow chart according to one embodiment of the method for disposing data-base cluster of the application;
Fig. 3 is the schematic diagram according to an application scenarios of the method for disposing data-base cluster of the application;
Fig. 4 is the structural schematic diagram according to one embodiment of the device for disposing data-base cluster of the application;
Fig. 5 is adapted for the structural schematic diagram for the computer system for realizing the server of the embodiment of the present application.
Specific embodiment
The application is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining related invention, rather than the restriction to the invention.It also should be noted that in order to Convenient for description, part relevant to related invention is illustrated only in attached drawing.
It should be noted that in the absence of conflict, the features in the embodiments and the embodiments of the present application can phase Mutually combination.The application is described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
Fig. 1 is shown can be using the application for disposing the method for data-base cluster or for disposing data-base cluster Device embodiment exemplary system architecture 100.
As shown in Figure 1, system architecture 100 may include first server 101, second server 102,103,104, third Server 105 and network 106,107 and 108.Network 106 is in first server 101 and second server 102,103,104 Between provide communication link medium.Network 107 is between second server 102,103,104 and third server 105 The medium of communication link is provided.Network 108 is to provide communication link between first server 101 and third server 105 Medium.Network 106,107 and 108 may include various connection types, such as wired, wireless communication link or fiber optic cables Etc..
First server 101 can be to provide the server of various services, such as manage second server by network 106 102, the server of the data run on 103,104.
Second server 102,103,104 can be to provide the server of various services, such as provide a user database The server of service.In addition, second server 102,103,104 can be according to the first server received by network 106 101 instruction obtains data from third server 105 by network 107.
Third server 105 can be to provide the server of various services, such as store the server of various data images.
First server 101 can be interacted by network 108 and third server 105, to send and receive information Deng.
In application scenes, physical equipment corresponding to above-mentioned first server 101 can and second server 102, physical equipment corresponding to 103,104 is identical.
It should be noted that for disposing the method for data-base cluster generally by the first clothes provided by the embodiment of the present application Business device 101 executes, and correspondingly, the device for disposing data-base cluster is generally positioned in first server 101.
It should be understood that the first server, second server, third server, the number of network in Fig. 1 are only to illustrate Property.According to needs are realized, any number of first server, second server, third server and network can have.
With continued reference to Fig. 2, one embodiment of the method for disposing data-base cluster according to the application is shown Process 200.The method for being used to dispose data-base cluster, comprising the following steps:
Step 201, the request that user disposes the cluster of presetting database is received.
Usual data-base cluster may include the server at least two operation data libraries, above-mentioned at least two operation datas The server in library constitutes a virtual centralized database logical image.The database picture operated at least two-server is single Database is the same, and transparent data service is provided to client.(each node can correspond to one to each node of data-base cluster Server) operating system all having the same and database version.Furthermore the operating system patch on each node of data-base cluster The version of packet and the version of database service packs also tend to be consistent.
Container is commonly used for the dependence between the life cycle of management object, different objects.Such as it can make With a configuration file, must be set after the title, producing method, which object that object is defined above in configuration file generate Attribute etc. as some object.After starting container, all objects can directly be taken, without writing any a line Program code generates object, or establishes the dependence between object and object.For conceptually, container be one into Journey, the process only know the thing that it is apprised of.In addition, container process is with can also being assigned the network protocol IP of own Location.Once giving a network protocol IP address, which is exactly that can know in network that the physical machine where container is located at Other resource.Container IP address can be mapped to the IP address that can access public network, so that container can be visited as one on network The stand-alone machine asked.
The request of the cluster of above-mentioned deployment presetting database may include the identification information of above-mentioned preset data.Above-mentioned mark Information for example may include the title of presetting database.In application scenes, above-mentioned identification information can also include default The version of database.
In the present embodiment, above-mentioned presetting database can dispose in a reservoir.Container herein for example may include but It is not limited to the container created using Docker container engine, Rocket container engine.Exploitation can be allowed using said vesse engine Person is packaged their application packet into a transplantable container, and above-mentioned transplantable container is then published to operation Linux In the equipment of system or Windows system.
Said vesse engine (such as Docker container engine and Rocket container engine) can be in individual server Deployment container.It the use of container engine is between each other usually mutually to completely cut off between the container disposed in multiple servers.
It in the present embodiment, can be in above-mentioned electronic equipment and the corresponding physical machine of each slave node (such as Fig. 1 institute The second server 102 that shows, 103,104) above-mentioned installation container cluster management system.Container cluster management system can be unified to manage All kinds of containers are managed, cluster is formed.
In the present embodiment, container cluster management system can be used to dispose above-mentioned presetting database cluster.Sets of containers Cluster management system may include management node and slave node.
In the present embodiment, the method for disposing data-base cluster runs electronic equipment thereon (such as shown in Fig. 1 First server 101) on can be equipped with it is corresponding with container cluster management system for managing the software application of container, example Such as Kubernetes software application.Above-mentioned electronic equipment can be used as the management node of the cluster of presetting database.It is above-mentioned respectively from It can also be equipped in the corresponding physical machine of category node above-mentioned corresponding with container cluster management system for managing the soft of container Part application.
In addition, be also equipped in above-mentioned each slave node for creating container said vesse engine (such as Docker container engine and Rocket container engine).
Above-mentioned electronic equipment can receive the request of the cluster of the deployment presetting database of user's sending.In deployment present count It may include the identification information of presetting database in request according to the cluster in library.
Here, presetting database can be various types of databases, including but not limited to following one: Hbase data The databases such as library, Redis database, Mongodb database, MySQL database, Oracle data, sybase database.Accordingly Ground, the identification information of above-mentioned presetting database can for above-mentioned Hbase database, Redis database, Mongodb database, MySQL database, oracle database, sybase database.
In application scenes, for example, above-mentioned presetting database be Hbase database when, due to run Hbase data It needs to call Hadoop database when library, then Hadoop database can also be installed in advance in each slave node.
Step 202, the deployment configuration template of the container of operation presetting database is created according to request.
In the present embodiment, the method for disposing data-base cluster runs electronic equipment thereon (such as shown in Fig. 1 First server 101) fortune can be created according to the request of the cluster of the deployment presetting database received in step 201 The deployment configuration template of the container of row presetting database.
In the present embodiment, management node of the above-mentioned electronic equipment as the cluster of presetting database, connects in step 201 Receive user dispose presetting database cluster request after, can according to container engine (such as Docker container engine and Rocket container engine) default form create above-mentioned deployment configuration template.Above-mentioned deployment configuration template is to be created The template that container is stated.
The above-mentioned deployment configuration template of creation may include: the information of the slave node of deployment container, operation preset data Information, the container carry storage information, container operation for the network mode that the identification information of the container mirror image in library, container starting use Environmental information.Wherein, the identification information of container mirror image and the identification information of presetting database for running presetting database match.
The information of the slave node of above-mentioned deployment container can state that above-mentioned operation will be disposed on which slave node The information of the container of presetting database.
The identification information of the container mirror image of above-mentioned operation presetting database can be stated to use the mirror image storehouse pre-established Which of library runs the information of the mirror image of the container of presetting database.In the present embodiment, the appearance of presetting database is run The identification information of device mirror image can be identical with the identification information of presetting database.
The network mode that uses of said vesse starting include but is not limited to virtual bridge (Bridge) mode, host mode and Container mode.Above-mentioned virtual bridge (Bridge) mode, host (Host) mode and container (Container) mode are containers Common network configuration, details are not described herein again.
Said vesse carry storage can include but is not limited to run presetting database in a reservoir since user accesses Storage location of the generated data in the physical machine where the container.
Container running environment may include hardware environment and software environment.Wherein hardware environment can be physics where container The hardware configuration of machine, including but not limited to central processing unit, memory, hard disk.Software environment includes but is not limited to operating system etc.. Operating system herein can be for example Windows operating system or (SuSE) Linux OS etc..
Step 203, operation presetting database is pulled from mirror image warehouse based on deployment configuration template scheduling slave node Container mirror image and the container instance for creating operation presetting database.
After creating above-mentioned deployment configuration template in step 202, above-mentioned electronic equipment, which can be dispatched, is mounted on deployment Each slave node specified on configuration template pulls the container mirror image of above-mentioned presetting database from above-mentioned image warehouse.And in portion Affix one's name to the container instance of creation operation presetting database on the specified slave node of configuration template.Specifically, it is mounted on above-mentioned electronics The software (such as Kubernetes software) for managing container in equipment can be by being mounted on above-mentioned each slave node pair The software (such as Kubernetes software) for managing container in the physical machine answered is mounted on each slave node pair to dispatch Container engine in the physical machine answered is pre- using operation is pulled from mirror image warehouse (such as third server 105 shown in FIG. 1) If the container mirror image of database.Any slave node pulled from mirror image warehouse operation presetting database container mirror image it Afterwards, so that it may the container instance of creation operation presetting database in the physical machine where the slave node.When above-mentioned operation is default The container instance of database is when the slave node is run, it is believed that above-mentioned presetting database is run in the slave node.
Above-mentioned image warehouse can be the official's mirror image warehouse of setting on the remote server, can also be and is arranged in local Privately owned mirror image warehouse.
It may include multiple containers mirror image in above-mentioned image warehouse.An application can be corresponded in each container mirror image.Appoint Anticipating corresponding application in two container mirror images can not be identical.It may include running above-mentioned preset data in above-mentioned image warehouse The container mirror image in library.
In addition, the software for managing container being mounted on each slave node may be implemented to be arranged on different nodes Run the communication between the container of presetting database.
Show with continued reference to one of application scenarios that Fig. 3, Fig. 3 are the methods for disposing data-base cluster of the present embodiment It is intended to.In the application scenarios 300 of Fig. 3, above-mentioned electronic equipment 301 receives the request of the deployment presetting database cluster of user 302.Above-mentioned electronic equipment 301 creates operation presetting database according to the request 302 of the deployment presetting database cluster of user The deployment configuration template 303 of container.Following information is stated in above-mentioned deployment configuration template: each slave node of deployment container The information for the network mode that information, the identification information of the container mirror image of the operation presetting database, the starting of each container use is held Device carry stores information, container running environment information.Above-mentioned electronic equipment 301 is based on above-mentioned deployment configuration template to slave node 305 transmission dispatch commands 304 pull the container mirror of operation presetting database to dispatch slave node 305 from mirror image warehouse 306 As and slave node 305 creates the container embodiments for running presetting database.
Method provided in this embodiment for disposing data-base cluster disposes the collection of presetting database by receiving user The request of group creates the deployment configuration template of the container of operation presetting database according to above-mentioned request, is finally based on deployment configuration Template scheduling slave node pulls the container mirror image of operation presetting database from mirror image warehouse and creates operation presetting database Container instance.So that not needing to be initialized by platform server when disposing data-base cluster, so as to quick, efficient Data-base cluster is disposed on ground.
In some optional implementations of the present embodiment, the operation to be created in slave node of above-mentioned deployment configuration template Network protocol IP address corresponding to the container of the presetting database and port.In the present embodiment, a slave node can With a corresponding physical machine (namely server).Above-mentioned electronic equipment can be set in slave node in deployment configuration template and wait for The network protocol IP address that the container of the operation presetting database of creation is be mapped to.In addition, above-mentioned electronic equipment can also be The corresponding port of container of slave node operation presetting database to be created is set in above-mentioned deployment configuration template.Some In application scenarios, the corresponding network protocol IP address of container of the above-mentioned operation presetting database on a slave node can be with The network protocol IP address of physical machine corresponding with the node is identical, can not also be identical.It sets on a slave node After running network protocol IP address and the port of the container of presetting database, user can by above-mentioned network protocol IP Location and port access the presetting database being arranged on the slave node.
In some optional implementations of the present embodiment, slave node is being dispatched from mirror image storehouse based on deployment configuration template It is above-mentioned to be used for portion after pulling the container mirror image of operation presetting database in library and creating the container instance of operation presetting database Administration data-base cluster method can also include: above-mentioned electronic equipment in response to user (user herein can be database The guardian of developer's either database) dilatation of the cluster of presetting database is requested, dilatation configuration template is created, wherein Dilatation configuration template includes the information of multiple slave nodes and the information of dilatation port;For each in multiple slave nodes A slave node executes following dilatation operation: based on the scheduling slave node creation of dilatation configuration template and the slave node The identical dilatation container of container of presetting database is run, and dilatation container is corresponding with dilatation port.
In application scenes, above-mentioned electronic equipment can also be according to the operation preset data on each slave node The load state of container carries out dilatation to the cluster of above-mentioned presetting database.
As described above, it when carrying out dilatation to above-mentioned presetting database, can first check for being provided with operation present count Whether the data access amount according to the slave node of the container in library has allowance, if having allowance, can operationally state first default Dilatation container is created on the slave node of the container of database.It is created when on the slave node in the container of operation presetting database When building dilatation container, above-mentioned electronic equipment can create dilatation configuration template first.Above-mentioned dilatation configuration template can be stated to expand Hold the information of the corresponding slave node information of container, the information for the container for running presetting database and dilatation port.Then, on State electronic equipment dilatation configuration template can be dispatched according to above-mentioned dilatation configuration template specified by appearance on any slave node Device engine creates dilatation container identical with the container of operation presetting database on the slave node.Finally above-mentioned dilatation is matched The dilatation container set on any slave node that template is stated is corresponding with the dilatation port of statement, in order to which user accesses, In the present embodiment, the network protocol IP address of above-mentioned dilatation container can also be arranged in above-mentioned electronic equipment.In application scenes In, the network protocol IP address of above-mentioned dilatation container can network protocol IP address corresponding with above-mentioned slave node it is identical.
So, the container instance of multiple operation presetting databases can be set in the same slave node.Same The corresponding port of container for the multiple operation presetting databases being arranged in one node can be different.
It, can be first in existing server when presetting database needs dilatation in these optional implementations Middle carry out dilatation, so not only can quick dilatation, but also can divide again using existing server realize dilatation come reduce dilatation at This.
In some optional implementations of the present embodiment, slave node is being dispatched from mirror image storehouse based on deployment configuration template It is above-mentioned to be used for portion after pulling the container mirror image of operation presetting database in library and creating the container instance of operation presetting database The method for affixing one's name to data-base cluster further include: (user here for example can be database to above-mentioned electronic equipment according to user is received Developer either database guardian) send presetting database cluster update request, above-mentioned update request packet The update packet of above-mentioned presetting database is included, packet then will be updated and stores to mirror image warehouse, and operation is set comprising updating the pre- of packet If the information of the version of the container mirror image of database;Then the version of the container mirror image in deployment configuration template is modified to comprising more The version of the container mirror image newly wrapped;Each slave node is finally dispatched using modified deployment configuration template.
It, can be in each slave node when being updated to above-mentioned presetting database in these optional implementations Using the deployment configuration template of the version of the container mirror image of the modified presetting database including operation comprising updating packet, so that it may The above-mentioned present count of operation in a reservoir is updated according to modified deployment configuration template on each slave node to realize According to library.So as to simplify the operation for updating presetting database, and then reduces maintenance and update the cost of presetting database.
In some optional implementations of the present embodiment, slave node is being dispatched from mirror image storehouse based on deployment configuration template It is above-mentioned for disposing number after pulling the container mirror image of presetting database in library and creating the container instance for running presetting database According to the method for library cluster further include: above-mentioned electric business equipment is in response to listening to the presetting database example of any one slave node It is operating abnormally, dispatches slave node hang-up and lay equal stress on and start shipment the container instance of row presetting database.
With further reference to Fig. 4, as the realization to method shown in above-mentioned each figure, this application provides one kind for disposing number According to one embodiment of the device of library cluster, the Installation practice is corresponding with embodiment of the method shown in Fig. 2, and the device is specific It can be applied in various electronic equipments.
As shown in figure 4, the device 400 for disposing data-base cluster of the present embodiment includes: receiving unit 401, creation Unit 402 and scheduling unit 403.Wherein, receiving unit 401 are configured to receive the cluster of user's deployment presetting database Request, wherein request includes the identification information of presetting database;Creating unit 402 is configured to according to request creation for transporting The deployment configuration template of the container of row presetting database, wherein deployment configuration template includes: the letter of the slave node of deployment container The information for the network mode that breath, the identification information of the container mirror image of operation presetting database, container starting use, container carry are deposited Information, container running environment information are stored up, wherein the identification information and presetting database of the container mirror image of operation presetting database Identification information matches;Scheduling unit 403 is configured to draw from mirror image warehouse based on deployment configuration template scheduling slave node It takes the container mirror image of presetting database and creates the container instance of operation presetting database.
In the present embodiment, for disposing receiving unit 401, creating unit 402 and the tune of the device 400 of data-base cluster The specific processing and its brought technical effect for spending unit 403 can be respectively with reference to steps 201, step in Fig. 2 corresponding embodiment 202, the related description of step 203, details are not described herein.
In some optional implementations of the present embodiment, above-mentioned deployment configuration template further includes to be created in slave node Operation presetting database container corresponding to network protocol IP address and port.
In some optional implementations of the present embodiment, the above-mentioned device 400 for disposing data-base cluster further includes Dilatation unit (not shown), dilatation unit are configured to: being based on deployment configuration template in scheduling unit 403 and dispatched subordinate section It puts from the container mirror image for pulling operation presetting database in mirror image warehouse and after creating the container instance for running presetting database, In response to the dilatation request of the cluster to presetting database of user, dilatation configuration template is created, wherein dilatation configuration template packet Include the information of multiple slave nodes and the information of dilatation port;For each of multiple slave nodes slave node, hold The following dilatation operation of row: based on the scheduling slave node creation of dilatation configuration template and the operation presetting database on the slave node The identical dilatation container of container, and it is dilatation container is corresponding with dilatation port.
In some optional implementations of the present embodiment, the device 400 for disposing data-base cluster further includes updating Unit (not shown).Above-mentioned updating unit is configured to: being based on deployment configuration template in scheduling unit 403 and is dispatched subordinate section It puts from the container mirror image for pulling operation presetting database in mirror image warehouse and after creating the container instance for running presetting database, The update request for receiving the cluster for the presetting database that user sends, updates the update packet that request includes presetting database, will more New packet is stored to mirror image warehouse, and the information of the version of the container mirror image of presetting database of the operation comprising updating packet is arranged, and is repaired Change the version of the container mirror image in deployment configuration template to the version of the container mirror image comprising updating packet, dispatches each slave node and answer With modified deployment configuration template.
In some optional implementations of the present embodiment, data-base cluster includes multiple slave nodes.It is above-mentioned to be used for portion The device 400 of administration's data-base cluster further includes hanging up unit (not shown), hangs up unit and is configured to: in scheduling unit 403 pull the container mirror image of presetting database based on deployment configuration template scheduling slave node from mirror image warehouse and create operation After the container instance of presetting database, the presetting database example in response to listening to any one slave node runs different Often, it dispatches and presetting database example is hung up and restarted on the slave node.
Referring to FIG. 5, it illustrates the structural representations of the computer system 500 for the server for being applicable in the embodiment of the present application Figure.
As shown in figure 5, computer system 500 includes central processing unit (CPU, Central Processing Unit) 501, it can be according to the program being stored in read-only memory (ROM, Read Only Memory) 502 or from storage section 506 programs being loaded into random access storage device (RAM, Random Access Memory) 503 and execute various appropriate Movement and processing.In RAM 503, also it is stored with system 500 and operates required various programs and data.CPU 501,ROM 502 and RAM 503 is connected with each other by bus 504.Input/output (I/O, Input/Output) interface 505 is also connected to Bus 504.
I/O interface 505 is connected to lower component: the storage section 506 including hard disk etc.;And including such as LAN (local Net, Local Area Network) card, modem etc. network interface card communications portion 507.Communications portion 507 passes through Communication process is executed by the network of such as internet.Driver 508 is also connected to I/O interface 505 as needed.Detachable media 509, such as disk, CD, magneto-optic disk, semiconductor memory etc., are mounted on as needed on driver 508, in order to from The computer program read thereon is mounted into storage section 506 as needed.
Particularly, in accordance with an embodiment of the present disclosure, it may be implemented as computer above with reference to the process of flow chart description Software program.For example, embodiment of the disclosure includes a kind of computer program product comprising be carried on computer-readable medium On computer program, which includes the program code for method shown in execution flow chart.In such reality It applies in example, which can be downloaded and installed from network by communications portion 507, and/or from detachable media 509 are mounted.When the computer program is executed by central processing unit (CPU) 501, limited in execution the present processes Above-mentioned function.It should be noted that the computer-readable medium of the application can be computer-readable signal media or calculating Machine readable storage medium storing program for executing either the two any combination.Computer readable storage medium for example can be --- but it is unlimited In system, device or the device of --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor, or any above combination.It calculates The more specific example of machine readable storage medium storing program for executing can include but is not limited to: have the electrical connection, portable of one or more conducting wires Formula computer disk, hard disk, random access storage device (RAM), read-only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory device or The above-mentioned any appropriate combination of person.In this application, computer readable storage medium can be it is any include or storage program Tangible medium, which can be commanded execution system, device or device use or in connection.And in this Shen Please in, computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal, In carry computer-readable program code.The data-signal of this propagation can take various forms, including but not limited to Electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be computer-readable Any computer-readable medium other than storage medium, the computer-readable medium can send, propagate or transmit for by Instruction execution system, device or device use or program in connection.The journey for including on computer-readable medium Sequence code can transmit with any suitable medium, including but not limited to: wireless, electric wire, optical cable, RF etc. are above-mentioned Any appropriate combination.Computer readable storage medium for example may be-but not limited to-electricity, magnetic, optical, electromagnetic, infrared The system of line or semiconductor, device or device, or any above combination.Computer readable storage medium it is more specific Example can include but is not limited to: have electrical connection, portable computer diskette, hard disk, the random visit of one or more conducting wires Ask memory (RAM), read-only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable Compact disc read-only memory (CD-ROM), light storage device, magnetic memory device or above-mentioned any appropriate combination.? In the application, computer readable storage medium can be any tangible medium for including or store program, which can be referred to Enable execution system, device or device use or in connection.And in this application, computer-readable signal media It may include in a base band or as the data-signal that carrier wave a part is propagated, wherein carrying computer-readable program generation Code.The data-signal of this propagation can take various forms, including but not limited to electromagnetic signal, optical signal or above-mentioned any Suitable combination.Computer-readable signal media can also be any computer-readable other than computer readable storage medium Medium, the computer-readable medium can be sent, propagated or transmitted for being used by instruction execution system, device or device Or program in connection.The program code for including on computer-readable medium can pass with any suitable medium It is defeated, including but not limited to: wireless, electric wire, optical cable, RF etc. or above-mentioned any appropriate combination.
Flow chart and block diagram in attached drawing are illustrated according to the system of the various embodiments of the application, method and computer journey The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation A part of one module, program segment or code of table, a part of the module, program segment or code include one or more use The executable instruction of the logic function as defined in realizing.It should also be noted that in some implementations as replacements, being marked in box The function of note can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are actually It can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it to infuse Meaning, the combination of each box in block diagram and or flow chart and the box in block diagram and or flow chart can be with holding The dedicated hardware based system of functions or operations as defined in row is realized, or can use specialized hardware and computer instruction Combination realize.
Being described in unit involved in the embodiment of the present application can be realized by way of software, can also be by hard The mode of part is realized.Described unit also can be set in the processor, for example, can be described as: a kind of processor packet Include receiving unit, creating unit and scheduling unit.Wherein, the title of these units is not constituted under certain conditions to the unit The restriction of itself, for example, receiving unit is also described as " receiving the list of the request of the cluster of user's deployment presetting database Member ".
As on the other hand, present invention also provides a kind of computer-readable medium, which be can be Included in device described in above-described embodiment;It is also possible to individualism, and without in the supplying device.Above-mentioned calculating Machine readable medium carries one or more program, when said one or multiple programs are executed by the device, so that should Device: the request that user disposes the cluster of presetting database is received, wherein request includes the identification information of presetting database;Root The deployment configuration template of the container of operation presetting database is created according to request, wherein deployment configuration template includes: deployment container The letter for the network mode that the information of slave node, the identification information of the container mirror image of operation presetting database, container starting use Breath, container carry store information, container running environment information, wherein operation presetting database container mirror image identification information with The identification information of presetting database matches;It is pre- that operation is pulled from mirror image warehouse based on deployment configuration template scheduling slave node If the container mirror image of database and the container instance for creating operation presetting database.
Above description is only the preferred embodiment of the application and the explanation to institute's application technology principle.Those skilled in the art Member is it should be appreciated that invention scope involved in the application, however it is not limited to technology made of the specific combination of above-mentioned technical characteristic Scheme, while should also cover in the case where not departing from foregoing invention design, it is carried out by above-mentioned technical characteristic or its equivalent feature Any combination and the other technical solutions formed.Such as features described above has similar function with (but being not limited to) disclosed herein Can technical characteristic replaced mutually and the technical solution that is formed.

Claims (12)

1. a kind of method for disposing data-base cluster, which comprises
Receive the request that user disposes the cluster of presetting database, wherein the request includes the mark of the presetting database Information;
The deployment configuration template that the container of the presetting database is run according to the request creation, wherein the deployment configuration mould Plate includes: the information for disposing the slave node of the container, the identification information of the container mirror image of the operation presetting database, institute Information, the container carry storage information, the container running environment information of the network mode that container starting uses are stated, wherein The identification information of container mirror image and the identification information of the presetting database of the operation presetting database match;
The slave node is dispatched based on the deployment configuration template, and the operation presetting database is pulled from mirror image warehouse Container mirror image simultaneously creates the container instance for running the presetting database.
2. the method according to claim 1, wherein the deployment configuration template further includes waiting creating in slave node Network protocol IP address and port corresponding to the container for the operation presetting database built.
3. according to the method described in claim 2, it is characterized in that, dispatching the subordinate section based on the deployment configuration template Point pulls the container mirror image for running the presetting database from mirror image warehouse and creates the container for running the presetting database After example, the method also includes:
The dilatation of the cluster of the presetting database is requested in response to user, dilatation configuration template is created, wherein the dilatation Configuration template includes the information of multiple slave nodes and the information of dilatation port;
For each of the multiple slave node slave node, executes following dilatation operation: being configured based on the dilatation Template is dispatched slave node creation dilatation identical with the container of the operation presetting database on the slave node and is held Device, and the dilatation container is corresponding with the dilatation port.
4. the method according to claim 1, wherein dispatching the subordinate section based on the deployment configuration template Point pulls the container mirror image for running the presetting database from mirror image warehouse and creates the container for running the presetting database After example, the method also includes:
The update request of the cluster for the presetting database that user sends is received, the update request includes the preset data The update packet in library;
Update packet is stored to the mirror image warehouse, and container of the operation comprising the presetting database for updating packet is set The information of the version of mirror image;
The version of the container mirror image in the deployment configuration template is modified to comprising the version for updating the container mirror image wrapped This;
Each slave node is dispatched using modified deployment configuration template.
5. the method according to claim 1, wherein the data-base cluster includes multiple slave nodes, and
The presetting database is pulled from mirror image warehouse based on the deployment configuration template scheduling slave node described Container mirror image and after creating the container instance for running the presetting database, the method also includes:
The presetting database example in response to listening to any one slave node is operating abnormally, and dispatches slave node extension It rises and restarts the presetting database example.
6. a kind of for disposing the device of data-base cluster, described device includes:
Receiving unit is configured to receive the request for the cluster that user disposes presetting database, wherein the request includes described The identification information of presetting database;
Creating unit is configured to run the deployment configuration template of the container of the presetting database according to the request creation, Wherein the deployment configuration template includes: the appearance of the information for disposing the slave node of the container, the operation presetting database Information, the container carry storage information, the appearance for the network mode that the identification information of device mirror image, container starting use Device running environment information, wherein the identification information of the container mirror image of the operation presetting database and the presetting database Identification information match;
Scheduling unit is configured to pull from mirror image warehouse based on the deployment configuration template scheduling slave node described The container mirror image of presetting database simultaneously creates the container instance for running the presetting database.
7. device according to claim 6, which is characterized in that the deployment configuration template further includes waiting creating in slave node Network protocol IP address corresponding to the container for the operation presetting database built and port.
8. device according to claim 7, which is characterized in that described device further includes dilatation unit, the dilatation unit It is configured to:
The deployment configuration template scheduling slave node is based in the scheduling unit, and operation institute is pulled from mirror image warehouse After stating the container mirror image of presetting database and creating the container instance for running the presetting database, in response to user to institute State the cluster of presetting database dilatation request, create dilatation configuration template, wherein the dilatation configuration template include it is multiple from Belong to the information of node and the information of dilatation port;For each of the multiple slave node slave node, execute such as Lower dilatation operation: it is described pre- with the operation on the slave node that the slave node creation is dispatched based on the dilatation configuration template If the identical dilatation container of the container of database, and the dilatation container is corresponding with the dilatation port.
9. device according to claim 5, which is characterized in that described device further includes updating unit, the updating unit It is configured to:
The deployment configuration template scheduling slave node is based in the scheduling unit, and operation institute is pulled from mirror image warehouse After stating the container mirror image of presetting database and creating the container instance for running the presetting database, the institute that user sends is received The update for stating the cluster of presetting database is requested, described to update the update packet that request includes the presetting database, by described in more New packet is stored to the mirror image warehouse, and the version of container mirror image of the operation comprising the presetting database for updating packet is set Information modifies the version of the container mirror image in the deployment configuration template to comprising the version for updating the container mirror image wrapped This, dispatches each slave node using modified deployment configuration template.
10. device according to claim 6, which is characterized in that the data-base cluster includes multiple slave nodes, and
Described device further includes hanging up unit, and the hang-up unit is configured to:
The deployment configuration template scheduling slave node is based in the scheduling unit, and operation institute is pulled from mirror image warehouse It is any in response to listening to after stating the container mirror image of presetting database and creating the container instance for running the presetting database The presetting database example of one slave node is operating abnormally, and is dispatched the slave node and is hung up and restart the preset data Library example.
11. a kind of server, comprising:
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processors Realize such as method as claimed in any one of claims 1 to 5.
12. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is by processor Such as method as claimed in any one of claims 1 to 5 is realized when execution.
CN201711167300.9A 2017-11-21 2017-11-21 Method and apparatus for disposing data-base cluster Pending CN109814881A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711167300.9A CN109814881A (en) 2017-11-21 2017-11-21 Method and apparatus for disposing data-base cluster

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711167300.9A CN109814881A (en) 2017-11-21 2017-11-21 Method and apparatus for disposing data-base cluster

Publications (1)

Publication Number Publication Date
CN109814881A true CN109814881A (en) 2019-05-28

Family

ID=66600632

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711167300.9A Pending CN109814881A (en) 2017-11-21 2017-11-21 Method and apparatus for disposing data-base cluster

Country Status (1)

Country Link
CN (1) CN109814881A (en)

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110389832A (en) * 2019-06-21 2019-10-29 深圳市汇川技术股份有限公司 ZooKeeper container cluster dispositions method, system, equipment and storage medium
CN110389766A (en) * 2019-06-21 2019-10-29 深圳市汇川技术股份有限公司 HBase container cluster dispositions method, system, equipment and computer readable storage medium
CN110502252A (en) * 2019-08-16 2019-11-26 苏州浪潮智能科技有限公司 A kind of database all-in-one machine configuration method and device
CN110780888A (en) * 2019-10-09 2020-02-11 北京市天元网络技术股份有限公司 Method for deploying cloud database
CN111427592A (en) * 2020-03-20 2020-07-17 广州锦行网络科技有限公司 High-availability system for virtual deployment of mysql
CN112187925A (en) * 2020-09-28 2021-01-05 江苏银承网络科技股份有限公司 Offline cluster management method and device for big data platform
CN112328184A (en) * 2020-12-03 2021-02-05 北京联创信安科技股份有限公司 Cluster capacity expansion method, device, equipment and storage medium
WO2021035553A1 (en) * 2019-08-27 2021-03-04 西门子股份公司 Application program development and deployment method and apparatus, and computer readable medium
CN112527780A (en) * 2020-12-23 2021-03-19 平安银行股份有限公司 Redis cluster creating and managing method, system, computer device and storage medium
CN112671576A (en) * 2020-12-23 2021-04-16 北京浪潮数据技术有限公司 Kafka cluster security control service deployment method, device and equipment
CN112925770A (en) * 2021-03-09 2021-06-08 京东数字科技控股股份有限公司 Database capacity expansion method, device, equipment and medium
CN114064148A (en) * 2021-11-17 2022-02-18 北京百度网讯科技有限公司 Data processing method and device, electronic equipment and storage medium
WO2022056845A1 (en) * 2020-09-18 2022-03-24 Zte Corporation A method of container cluster management and system thereof
CN117348975A (en) * 2023-12-05 2024-01-05 中电云计算技术有限公司 Cluster deployment method, device, equipment and storage medium
EP4258609A4 (en) * 2020-12-28 2024-01-17 Huawei Tech Co Ltd Container cluster management method and apparatus

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106325975A (en) * 2016-09-09 2017-01-11 浪潮软件股份有限公司 Method for automatically deploying and managing big data clusters through Docker container
CN106790660A (en) * 2017-01-18 2017-05-31 咪咕视讯科技有限公司 A kind of dispositions method and device for realizing distributed memory system
CN106790483A (en) * 2016-12-13 2017-05-31 武汉邮电科学研究院 Hadoop group systems and fast construction method based on container technique
CN106850621A (en) * 2017-02-07 2017-06-13 南京云创大数据科技股份有限公司 A kind of method based on container cloud fast construction Hadoop clusters
CN106888254A (en) * 2017-01-20 2017-06-23 华南理工大学 A kind of exchange method between container cloud framework based on Kubernetes and its each module
CN106961351A (en) * 2017-03-03 2017-07-18 南京邮电大学 Intelligent elastic telescopic method based on Docker container clusters
CN107016059A (en) * 2017-03-10 2017-08-04 北京聚睿智能科技有限公司 A kind of data-base cluster dispositions method, device and physical server
US20170257432A1 (en) * 2011-02-09 2017-09-07 Cliqr Technologies Inc. Apparatus, systems and methods for container based service deployment

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170257432A1 (en) * 2011-02-09 2017-09-07 Cliqr Technologies Inc. Apparatus, systems and methods for container based service deployment
CN106325975A (en) * 2016-09-09 2017-01-11 浪潮软件股份有限公司 Method for automatically deploying and managing big data clusters through Docker container
CN106790483A (en) * 2016-12-13 2017-05-31 武汉邮电科学研究院 Hadoop group systems and fast construction method based on container technique
CN106790660A (en) * 2017-01-18 2017-05-31 咪咕视讯科技有限公司 A kind of dispositions method and device for realizing distributed memory system
CN106888254A (en) * 2017-01-20 2017-06-23 华南理工大学 A kind of exchange method between container cloud framework based on Kubernetes and its each module
CN106850621A (en) * 2017-02-07 2017-06-13 南京云创大数据科技股份有限公司 A kind of method based on container cloud fast construction Hadoop clusters
CN106961351A (en) * 2017-03-03 2017-07-18 南京邮电大学 Intelligent elastic telescopic method based on Docker container clusters
CN107016059A (en) * 2017-03-10 2017-08-04 北京聚睿智能科技有限公司 A kind of data-base cluster dispositions method, device and physical server

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
李杰等: "Hadoop分布式集群的自动化容器部署研究", 《计算机应用研究》 *
腾讯云容器服务团队: "Kubernetes中Pod弹性伸缩详解与使用", 《HTTPS://CLOUD.TENCENT.COM/DEVELOPER/ARTICLE/1005406》 *
阳明: "Kubernetes Deployment滚动升级", 《HTTPS://WWW.QIKQIAK.COM/POST /KUBERNETES-ROLLOUT-UPDATE/》 *

Cited By (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110389766A (en) * 2019-06-21 2019-10-29 深圳市汇川技术股份有限公司 HBase container cluster dispositions method, system, equipment and computer readable storage medium
CN110389832A (en) * 2019-06-21 2019-10-29 深圳市汇川技术股份有限公司 ZooKeeper container cluster dispositions method, system, equipment and storage medium
CN110389832B (en) * 2019-06-21 2022-12-27 深圳市汇川技术股份有限公司 ZooKeeper container cluster deployment method, system, device and storage medium
CN110389766B (en) * 2019-06-21 2022-12-27 深圳市汇川技术股份有限公司 HBase container cluster deployment method, system, equipment and computer readable storage medium
CN110502252A (en) * 2019-08-16 2019-11-26 苏州浪潮智能科技有限公司 A kind of database all-in-one machine configuration method and device
WO2021035553A1 (en) * 2019-08-27 2021-03-04 西门子股份公司 Application program development and deployment method and apparatus, and computer readable medium
US11797283B2 (en) 2019-08-27 2023-10-24 Siemens Aktiengesellschaft Application program development and deployment method and apparatus, and computer-readable medium
CN110780888A (en) * 2019-10-09 2020-02-11 北京市天元网络技术股份有限公司 Method for deploying cloud database
CN111427592A (en) * 2020-03-20 2020-07-17 广州锦行网络科技有限公司 High-availability system for virtual deployment of mysql
WO2022056845A1 (en) * 2020-09-18 2022-03-24 Zte Corporation A method of container cluster management and system thereof
EP4185949A4 (en) * 2020-09-18 2024-03-27 Zte Corp A method of container cluster management and system thereof
CN112187925A (en) * 2020-09-28 2021-01-05 江苏银承网络科技股份有限公司 Offline cluster management method and device for big data platform
CN112328184B (en) * 2020-12-03 2023-11-21 北京联创信安科技股份有限公司 Cluster capacity expansion method, device, equipment and storage medium
CN112328184A (en) * 2020-12-03 2021-02-05 北京联创信安科技股份有限公司 Cluster capacity expansion method, device, equipment and storage medium
CN112671576B (en) * 2020-12-23 2022-05-24 北京浪潮数据技术有限公司 Kafka cluster security control service deployment method, device and equipment
CN112671576A (en) * 2020-12-23 2021-04-16 北京浪潮数据技术有限公司 Kafka cluster security control service deployment method, device and equipment
CN112527780A (en) * 2020-12-23 2021-03-19 平安银行股份有限公司 Redis cluster creating and managing method, system, computer device and storage medium
EP4258609A4 (en) * 2020-12-28 2024-01-17 Huawei Tech Co Ltd Container cluster management method and apparatus
CN112925770A (en) * 2021-03-09 2021-06-08 京东数字科技控股股份有限公司 Database capacity expansion method, device, equipment and medium
CN114064148A (en) * 2021-11-17 2022-02-18 北京百度网讯科技有限公司 Data processing method and device, electronic equipment and storage medium
CN114064148B (en) * 2021-11-17 2023-09-01 北京百度网讯科技有限公司 Data processing method, device, electronic equipment and storage medium
CN117348975A (en) * 2023-12-05 2024-01-05 中电云计算技术有限公司 Cluster deployment method, device, equipment and storage medium
CN117348975B (en) * 2023-12-05 2024-03-15 中电云计算技术有限公司 Cluster deployment method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN109814881A (en) Method and apparatus for disposing data-base cluster
CN109582441A (en) For providing system, the method and apparatus of container service
CN111290854B (en) Task management method, device, system, computer storage medium and electronic equipment
CN104823163B (en) Virtual machine configuration based on metadata
US20160291964A1 (en) Enterprise wide software version recommendation
US10884727B2 (en) Rolling upgrade of a distributed application
CN109697075A (en) File updating method, system and device
CN108337314B (en) Distributed system, information processing method and device for primary server
CN109861842A (en) O&M method, apparatus, electronic equipment and the storage medium of server cluster
CN104021078B (en) Software supervision device and method
CN109564527A (en) The security configuration of cloud computing node
CN109413127A (en) A kind of method of data synchronization and device
CN110324169A (en) A kind of method and apparatus of interface management
CN110413379A (en) Information processing method and its device, system, electronic equipment and medium
CN110019080A (en) Data access method and device
CN110096424A (en) Processing method, device, electronic equipment and the storage medium of test
CN109032620A (en) The configuration file generation method and device of application program
WO2015154435A1 (en) Software parameter management method and device
CN109241033A (en) The method and apparatus for creating real-time data warehouse
CN108563509A (en) Data query implementation method, device, medium and electronic equipment
US20150006736A1 (en) Method and System for Deploying and Modifying a Service-Oriented Architecture Deployment Environment
CN113709810A (en) Method, device and medium for configuring network service quality
CN109213536A (en) Resource exhibition method, resource show configuration method, device and the equipment of class control
CN114040009B (en) Method for realizing micro-service management platform gateway, storage medium and electronic equipment
CN110442349A (en) Method and apparatus for servicing dilatation

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20190528

RJ01 Rejection of invention patent application after publication