CN114647501A - Mycat system deployment, operation and maintenance method, device, equipment and storage medium - Google Patents

Mycat system deployment, operation and maintenance method, device, equipment and storage medium Download PDF

Info

Publication number
CN114647501A
CN114647501A CN202011499252.5A CN202011499252A CN114647501A CN 114647501 A CN114647501 A CN 114647501A CN 202011499252 A CN202011499252 A CN 202011499252A CN 114647501 A CN114647501 A CN 114647501A
Authority
CN
China
Prior art keywords
information
target
mycat
host
deployment
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
CN202011499252.5A
Other languages
Chinese (zh)
Inventor
钟易程
彭磊
周新
宋爱举
苗军师
练育旺
付增庆
曾小豹
尹昌
王钊彬
刘林
江志
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
SF Technology Co Ltd
Original Assignee
SF 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 SF Technology Co Ltd filed Critical SF Technology Co Ltd
Priority to CN202011499252.5A priority Critical patent/CN114647501A/en
Publication of CN114647501A publication Critical patent/CN114647501A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5083Techniques for rebalancing the load in a distributed system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Computing Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application discloses a Mycat system deployment, operation and maintenance method, a device, equipment and a storage medium, wherein the method comprises the steps of obtaining deployment information of a target Mycat, wherein the deployment information carries a deployment area identifier for deploying the target Mycat and specification information of the target Mycat; searching a target deployment area corresponding to the deployment area identification and a resource pool bound with the target deployment area, wherein the resource pool comprises a plurality of clusters, and each cluster comprises a plurality of hosts; searching a host matched with the specification information from a plurality of hosts to obtain a target host; performing resource pre-occupation on the target host according to the specification information to obtain pre-occupation information; and (4) according to the preemption information, creating resources in the target host to finish the deployment, operation and maintenance of the target Mycat. The method and the device realize rapid and automatic Mycat deployment, operation and maintenance, greatly improve deployment, operation and maintenance efficiency and reduce workload of service personnel.

Description

Mycat system deployment, operation and maintenance method, device, equipment and storage medium
Technical Field
The application relates to the technical field of databases, in particular to a Mycat system deployment operation and maintenance method, device, equipment and storage medium.
Background
Mycat is an open-source distributed database system, is a server which realizes MySQL protocol, a front-end user can regard it as a database proxy middleware and access it by MySQL client tools and commands, and a back-end person can communicate with a plurality of MySQL servers by MySQL native protocol or most mainstream database servers by JDBC protocol, and the core function is table and database division, namely, a large table is divided into a plurality of small tables which are stored in a back-end MySQL server or other databases. Therefore, Mycat reduces the pressure of a single database, and can realize master-slave, hot standby and sub-database and sub-table, thereby realizing the distributed architecture of the database.
Due to the distributed architecture of the Mycat, in the prior art, when the distributed architecture is deployed, a server with resources needs to be found manually, then the Mycat service deployment is performed on the server, the configuration of the Mycat service is modified according to different requirements, and meanwhile, the standard cluster architecture of the Mycat needs to deploy 5 Mycat services, and the 5 Mycat services are required to be deployed in different machine rooms.
In view of the fact that in the prior art, the deployment of the Mycat needs to manually find a server with resources, and also needs to deploy the Mycat service in different machine rooms, which easily causes the complexity of the Mycat deployment to be large, and the operation and maintenance difficulty of the Mycat also increases exponentially with the increase of the number of fragments.
Disclosure of Invention
The application provides a Mycat system deployment operation and maintenance method, a Mycat system deployment operation and maintenance device, Mycat system deployment operation and maintenance equipment and a storage medium, and aims to solve the problems that in the prior art, a server with resources is found manually, and Mycat services are deployed in different machine rooms respectively, so that deployment complexity is high, and operation and maintenance difficulty rises exponentially along with increase of the number of fragments.
In a first aspect, the present application provides a method for deploying, operating and maintaining a Mycat system, including:
acquiring deployment information of the target Mycat, wherein the deployment information carries a deployment area identifier for deploying the target Mycat and specification information of the target Mycat;
searching a target deployment area corresponding to the deployment area identification and a resource pool bound with the target deployment area, wherein the resource pool comprises a plurality of clusters, and each cluster comprises a plurality of hosts;
searching a host matched with the specification information from a plurality of hosts to obtain a target host;
performing resource pre-occupation on the target host according to the specification information to obtain pre-occupation information;
and creating resources in the target host according to the pre-occupation information so as to complete the deployment, operation and maintenance of the target Mycat.
In a possible implementation manner of the present application, searching a host adapted to specification information from a plurality of hosts to obtain a target host includes:
and traversing each host in the plurality of clusters until the specification information is matched with the host specification of the host, and stopping traversing to obtain the target host.
In a possible implementation manner of the present application, the specification information includes instance information of the target Mycat, and resource preemption is performed on the target host according to the specification information to obtain preemption information, which includes:
binding the instance information with the target host, and storing binding information for recording the binding relationship between the instance information and the target host;
and subtracting the specification information from the host specification of the target host to complete resource preemption and obtain preemption information, wherein the preemption information comprises the specification information and the host information of the target host.
In a possible implementation manner of the present application, the instance information includes fragment host instance information and Mycat instance information, and resource creation is performed in the target host according to the preemption information, including:
generating basic information of the target Mycat according to the preemption information, wherein the basic information comprises a domain name of a target host;
acquiring a binding application of a virtual Internet protocol address of a target Mycat, and binding the virtual Internet protocol address with a domain name to enable the virtual Internet protocol address to be associated with the domain name;
according to the basic information, creating load balancing resources and monitoring services of the target Mycat, wherein the load balancing resources are used for distributing the load balancing to the target Mycat, and the monitoring services are used for monitoring the running condition of the load balancing resources;
and creating a fragmentation host instance and a Mycat instance according to the pre-occupation information, wherein the fragmentation host instance is matched with the fragmentation host instance information, and the Mycat instance is matched with the Mycat instance information.
In one possible implementation manner of the present application, obtaining a binding application of a virtual internet protocol address of a target Mycat, and binding the virtual internet protocol address with a domain name includes:
acquiring binding applications of the virtual Internet protocol address of the target Mycat, calculating the number of the binding applications, and establishing a corresponding virtual Internet protocol address list;
recording the virtual Internet protocol address list into basic information;
and binding the virtual Internet protocol addresses in the virtual Internet protocol address list with the domain names respectively.
In one possible implementation manner of the present application, the basic information includes connection information of the target Mycat, and the connection information is used to create a load balancing resource and monitor a service.
In a possible implementation manner of the present application, after the target Mycat deployment, operation, and maintenance are completed, the method further includes:
acquiring capacity expansion information of a target Mycat;
searching a host matched with the capacity expansion information in the plurality of hosts to obtain a capacity expansion host;
performing capacity expansion resource pre-occupation on the capacity expansion host according to the capacity expansion information to obtain capacity expansion pre-occupation information;
and carrying out capacity expansion arrangement on the capacity expansion host according to the capacity expansion pre-occupation information to complete the capacity expansion of the target Mycat.
In a second aspect, the present application further provides a Mycat system deployment, operation and maintenance device, including:
the acquisition module is used for acquiring deployment information of the target Mycat, wherein the deployment information carries a deployment area identifier for deploying the target Mycat and specification information of the target Mycat;
the system comprises a processing module, a deployment area identification module and a resource pool, wherein the processing module is used for searching a target deployment area corresponding to the deployment area identification and the resource pool bound with the target deployment area, the resource pool comprises a plurality of clusters, and each cluster comprises a plurality of hosts;
searching a host matched with the specification information from a plurality of hosts to obtain a target host;
performing resource pre-occupation on the target host according to the specification information to obtain pre-occupation information;
and the deployment module is used for creating resources in the target host according to the pre-occupation information so as to complete the deployment, operation and maintenance of the target Mycat.
In one possible implementation manner of the present application, the processing module is specifically configured to:
and traversing each host in the plurality of clusters until the specification information is matched with the host specification of the host, and stopping traversing to obtain the target host.
In a possible implementation manner of the present application, the specification information includes instance information of the target Mycat, and the processing module is further specifically configured to:
binding the instance information with the target host, and storing binding information for recording the binding relationship between the instance information and the target host;
and subtracting the specification information from the host specification of the target host to complete resource preemption and obtain preemption information, wherein the preemption information comprises the specification information and the host information of the target host.
In a possible implementation manner of the present application, the instance information includes fragment host instance information and Mycat instance information, and the deployment module is specifically configured to:
generating basic information of the target Mycat according to the pre-occupation information, wherein the basic information comprises a domain name of the target host;
acquiring a binding application of a virtual Internet protocol address of a target Mycat, and binding the virtual Internet protocol address with a domain name to enable the virtual Internet protocol address to be associated with the domain name;
according to the basic information, creating load balancing resources and monitoring services of the target Mycat, wherein the load balancing resources are used for distributing the load balancing to the target Mycat, and the monitoring services are used for monitoring the running condition of the load balancing resources;
and creating a fragmentation host instance and a Mycat instance according to the pre-occupation information, wherein the fragmentation host instance is matched with the fragmentation host instance information, and the Mycat instance is matched with the Mycat instance information.
In one possible implementation manner of the present application, the deployment module is further specifically configured to:
acquiring binding applications of the virtual Internet protocol address of the target Mycat, calculating the number of the binding applications, and establishing a corresponding virtual Internet protocol address list;
recording the virtual Internet protocol address list into basic information;
and binding the virtual Internet protocol addresses in the virtual Internet protocol address list with the domain names respectively.
In a possible implementation manner of the application, the obtaining module is specifically further configured to obtain capacity expansion information of the target Mycat;
the processing module is specifically used for searching a host which is matched with the capacity expansion information in the plurality of hosts to obtain a capacity expansion host;
performing capacity expansion resource pre-occupation on the capacity expansion host according to the capacity expansion information to obtain capacity expansion pre-occupation information;
and the deployment module is specifically used for carrying out capacity expansion arrangement on the capacity expansion host according to the capacity expansion pre-occupation information to complete the capacity expansion of the target Mycat.
In a third aspect, the present application further provides a Mycat system deployment operation and maintenance device, including:
one or more processors;
a memory; and
one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to implement the Mycat system deployment, operation and maintenance method of the first aspect.
In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, where the computer program is loaded by a processor to execute the steps in the method for deploying, operating and maintaining a Mycat system of the first aspect.
In the application, at first according to the deployment information of the target Mycat that the user set up, for the target host computer of target Mycat automatic matching rather than specification information adaptation, then carry out resource pre-occupation and resource creation to the target host computer according to specification information, realize the automatic deployment fortune dimension of target Mycat, no longer need the manual work to seek the computer lab and deploy to Mycat, labour saving and time saving, and the user need not to know the complete framework of Mycat, only need select the relevant deployment information that matches with self demand, just can accomplish Mycat deployment fast automatically, greatly promoted deployment efficiency, the staff work load has been alleviateed.
Drawings
In order to more clearly illustrate the technical solutions in the present application, the drawings that are needed to be used in the description of the present application will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without inventive effort.
FIG. 1 is a schematic diagram illustrating a scenario of an embodiment of a Mycat system deployment operation and maintenance system provided in the present application;
FIG. 2 is a schematic flow chart diagram illustrating an embodiment of a Mycat system deployment operation and maintenance method provided in the present application;
FIG. 3 is a schematic structural diagram illustrating one embodiment of the relationship between resource pools, clusters, and hosts provided in the present application;
FIG. 4 is a flow diagram illustrating one embodiment of obtaining preemption information in the present application;
FIG. 5 is a flow diagram illustrating one embodiment of resource creation in the present application;
FIG. 6 is a flow diagram illustrating one embodiment of binding a virtual Internet protocol address to a domain name according to the present application;
FIG. 7 is a flowchart illustrating one embodiment of implementing target Mycat expansion according to the present application;
FIG. 8 is a schematic structural diagram of an embodiment of a Mycat system deployment operation and maintenance device provided in the present application;
FIG. 9 is a schematic structural diagram of an embodiment of a Mycat system deployment operation and maintenance device provided in the present application.
Detailed Description
The technical solutions in the present application will be described clearly and completely with reference to the accompanying drawings in the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In the description of the present application, it is to be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc. indicate orientations or positional relationships based on those shown in the drawings, merely for convenience of description and simplicity of description, and do not indicate or imply that the device or element referred to must have a particular orientation, be constructed and operated in a particular orientation, and thus, should not be considered limiting of the present application. Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more features. In the description of the present application, "a plurality" means two or more unless specifically limited otherwise.
In this application, the word "exemplary" is used to mean "serving as an example, instance, or illustration. Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments. The following description is presented to enable any person skilled in the art to make and use the application. In the following description, details are set forth for the purpose of explanation. It will be apparent to one of ordinary skill in the art that the present application may be practiced without these specific details. In other instances, well-known structures and processes are not set forth in detail in order to avoid obscuring the description of the present application with unnecessary detail. Thus, the present application is not intended to be limited to the embodiments shown, but is to be accorded the widest scope consistent with the principles and features disclosed herein.
The application provides a method, a device, equipment and a storage medium for deploying, operating and maintaining a Mycat system, which are respectively described in detail below.
Referring to fig. 1, fig. 1 is a schematic view of a scene of an embodiment of a myct system deployment operation and maintenance system provided in the present application, where the myct system deployment operation and maintenance system may include a server 100 and an operation terminal 200, a myct system deployment operation and maintenance device is integrated in the server 100, an interaction interface is provided on the operation terminal 200, a user may set a parameter of the myct system through the interaction interface on the operation terminal 200, and the server 100 may communicate with the operation terminal 200 to process a parameter of the myct system uploaded by each operation terminal 200, thereby completing the deployment operation and maintenance of the myct system.
The server 100 is mainly used for acquiring deployment information of the target Mycat, wherein the deployment information carries a deployment area identifier for deploying the target Mycat and specification information of the target Mycat; searching a target deployment area corresponding to the deployment area identification and a resource pool bound with the target deployment area, wherein the resource pool comprises a plurality of clusters, and each cluster comprises a plurality of hosts; searching a host matched with the specification information from a plurality of hosts to obtain a target host; performing resource pre-occupation on the target host according to the specification information to obtain pre-occupation information; and creating resources in the target host according to the pre-occupation information so as to complete the deployment, operation and maintenance of the target Mycat.
In this application, the server 100 may be an independent server, or may be a server network or a server cluster composed of servers, for example, the server 100 described in this application includes, but is not limited to, a computer, a network host, a single network server, a plurality of network server sets, or a cloud server composed of a plurality of servers. Among them, the Cloud server is constituted by a large number of computers or web servers based on Cloud Computing (Cloud Computing).
In the present application, the server 100 and the operation terminal 200 may implement network communication through any communication manner, including but not limited to mobile communication based on the third Generation Partnership Project (3 GPP), Long Term Evolution (LTE), Worldwide Interoperability for Microwave Access (WiMAX), or computer network communication based on the TCP/IP Protocol Suite (TCP/IP), User Datagram Protocol (UDP), and the like. The operation terminal 200 may upload, to the server 100, deployment information about the Mycat system set by the user, such as specification information of the Mycat system, a deployment area of the Mycat system, and the like, in the communication manner described above.
In the present application, the operation terminal 200 may be a general-purpose computer device or a special-purpose computer device. In a specific implementation, the operation terminal 200 may be a palm computer, a Personal Digital Assistant (PDA), a mobile phone, a tablet computer, a wireless terminal device, and the like, and the application does not limit the type of the operation terminal 200.
Those skilled in the art can understand that the application environment shown in fig. 1 is only one application scenario adapted to the present application scheme, and does not constitute a limitation on the application scenario of the present application scheme, and that other application scenarios may further include more or fewer operation terminals 200 than those shown in fig. 1, for example, only 2 operation terminals 200 are shown in fig. 1, and it can be understood that the Mycat system deployment operation and maintenance system may further include other operation terminals in communication connection with the server 100, which is not limited herein.
In addition, as shown in fig. 1, the Mycat system deployment operation and maintenance system may further include a display 300, where the display 300 may be in communication connection with the server 100, and is used to show the Mycat system deployment operation and maintenance result to the user.
It should be noted that the scene schematic diagram of the Mycat system deployment operation and maintenance system shown in fig. 1 is only an example, and the Mycat system deployment operation and maintenance system and the scene described in this application are for more clearly illustrating the technical solution of this application, and do not form a limitation to the technical solution provided in this application, and as can be known by those skilled in the art, with the evolution of the Mycat system deployment operation and maintenance system and the appearance of a new service scene, the technical solution provided in this application is also applicable to similar technical problems.
Firstly, the application provides an operation and maintenance method for deploying a Mycat system, an execution main body of the operation and maintenance method for deploying the Mycat system is an operation and maintenance device for deploying the Mycat system, the operation and maintenance device for deploying the Mycat system is applied to a server 100, the server 100 is located in the operation and maintenance system for deploying the Mycat system, and the operation and maintenance method for deploying the Mycat system comprises the following steps: acquiring deployment information of the target Mycat, wherein the deployment information carries a deployment area identifier for deploying the target Mycat and specification information of the target Mycat; searching a target deployment area corresponding to the deployment area identification and a resource pool bound with the target deployment area, wherein the resource pool comprises a plurality of clusters, and each cluster comprises a plurality of hosts; searching a host matched with the specification information from a plurality of hosts to obtain a target host; performing resource pre-occupation on the target host according to the specification information to obtain pre-occupation information; and creating resources in the target host according to the pre-occupation information so as to complete the deployment, operation and maintenance of the target Mycat.
As shown in fig. 2, a schematic flow chart of an embodiment of a method for deploying, operating and maintaining a Mycat system provided in the present application is shown, where the method for deploying, operating and maintaining a Mycat system includes:
s201, acquiring deployment information of the target Mycat, wherein the deployment information carries a deployment area identifier for deploying the target Mycat and specification information of the target Mycat.
In the embodiment of the application, the manner in which the server acquires the deployment information of the target Mycat may be an active acquisition manner or a passive acquisition manner, for example, for the passive acquisition manner, the user may autonomously select the deployment information of the target Mycat through an interactive interface on the operation terminal, and after the user completes the selection of the deployment information, the operation terminal actively uploads the deployment information to the server, so that the server acquires the deployment information of the target Mycat; the active acquisition mode may be that the deployment information is stored by the operation terminal or a memory with a storage function after the user completes the selection of the deployment information at the operation terminal, the server periodically accesses the operation terminal or the memory according to a time interval preset by the user, and if new deployment information exists in the operation terminal or the memory, the deployment information is actively acquired.
In the embodiment of the application, the user may select the deployment information of the target myct according to the service requirement, for example, select a server area to be deployed by the target myct, a software version of the target myct to be deployed, specification information of the target myct, and the like, where the server area corresponds to a deployment area identifier uniquely identifying the server area.
For example, according to business requirements, a user needs to deploy a Mycat system with a software version Mycat1.5.3 in the Shenzhen ford region, specification information of the Mycat system is a database version mysql5.7.19 of Mycat docking, the hard disk 200G includes 8 main instances, namely a Master instance and 1 node, when the user selects the deployment information, the selected deployment region is identified as an identifier (e.g., "02") of the Shenzhen ford region, the software version is Mycat1.5.3, the specification information is the database version mysql5.7.19, the hard disk 200G, 8 Master instances and 1 node.
S202, searching a target deployment area corresponding to the deployment area identification and a resource pool bound with the target deployment area, wherein the resource pool comprises a plurality of clusters, and each cluster comprises a plurality of hosts.
In the embodiment of the present application, each deployment area is configured with a deployment area identifier capable of uniquely identifying the deployment area, so that the deployment area identifier is similar to an identification of the deployment area, each deployment area corresponds to a server host resource pool, the resource pool may include a plurality of server clusters, each server cluster may include a plurality of hosts, and the correspondence between the deployment area identifier, the deployment area, the resource pool, the clusters, and the hosts may be stored in a server in a form of a relationship table, where the expression form of the correspondence between the deployment area identifier, the deployment area, and the resource pool may be "deployment area identifier-deployment area-resource pool", and after obtaining the deployment area identifier of the target Mycat through S201, the server may find the target deployment area corresponding to the deployment area identifier by calling the relationship table, and a resource pool corresponding to the target deployment area.
If the "deployment region identifier-deployment region-resource pool" with 1 record in the information of the relationship table is "02-Shenzhen Futian region-resource pool", according to the deployment region identifier (e.g., "02"), it can be found through the relationship table that the corresponding deployment region is the Shenzhen Futian region, and the resource pool bound to the Shenzhen Futian region is the No. 1 resource pool. It should be noted that, in the present application, the corresponding relationship between the deployment region and the resource pool may be in a form of one-to-many or many-to-one, except for one-to-one correspondence, for example, except for being bound to the resource pool No. 1 by the shenzhen fotian region, the shenzhen south mountain region may also be bound to the resource pool No. 1 (for example, "01-shenzhen south mountain region — resource pool" 1 "), or the shenzhen fotian region may also be bound to the resource pool No. 2 (for example," 02-shenzhen fotian region — resource pool "2") besides being bound to the resource pool No. 1.
S203, searching a host matched with the specification information from the plurality of hosts to obtain a target host.
Since the resource pool may include a plurality of server clusters, each of which may include a plurality of hosts, no matter whether the resource pool bound to the target deployment area is 1 or more, a host adapted to the specification information of the target Mycat needs to be found from the plurality of hosts. In the embodiment of the present application, the host that is searched for the specification information adaptation may be a target host that is searched for the adaptation in the host according to the hard disk specification in the specification information, and it should be noted that the adaptation described in the embodiment of the present application is not limited to the case where the two are equal to each other, and in general, in order to avoid the condition of the myct service abnormality caused by insufficient resources, the hard disk specification in the specification information of the target myct should be smaller than the hard disk specification of the host, so as to ensure normal operation of the myct.
As shown in fig. 3, which is a schematic structural diagram of an embodiment of a relationship among a resource pool, a cluster and hosts provided in this application, if a resource pool bound to shenzhen futian region only has a resource pool No. 1, and the resource pool No. 1 includes 4 server clusters (e.g., "cluster 1-1", "cluster 1-2", "cluster 1-3" and "cluster 1-4"), and each cluster includes 8 hosts, the number of hosts in the whole resource pool is 32, and a host matching specification information needs to be searched from the 32 hosts. It should be noted that the host specifications of all hosts in the same cluster of the same resource pool may be the same or different, for example, in 8 hosts of "cluster 1-1", the host specification of each host may be "main memory 256G + hard disk 512G", or the host specification of "host 1-1-1" is "main memory 256G + hard disk 512G", the host specification of "host 1-1-2" is "main memory 125G + hard disk 256G", and the like, and the host specification of each host may be selected according to actual applications, and is not limited herein.
If the specification of the hard disk in the specification information of the target myct is 200G, the specification of the host of "host 1-1-1" is "main memory 256G + hard disk 512G", and the specification of the host of "host 1-1-2" is "main memory 125G + hard disk 256G", although the hard disks of "host 1-1-1" and "host 1-1-2" are both greater than 200G, the resource waste of "host 1-1-2" is less than that of "host 1-1-1", under the condition that the target myct can normally operate, so that the searched target host may be "host 1-1-2".
And S204, performing resource pre-occupation on the target host according to the specification information to obtain pre-occupation information.
In this embodiment of the present application, after the target host adapted to the specification information is found in S203, resource preemption may be performed on the target host first, and it is avoided that other programs preempt the target host, so when resource preemption is completed and preemption information is obtained, the host specification of the target host is different from the host specification before resource preemption, the host specification at this time is smaller than the host specification before resource preemption, and the reduced specification amount may be the specification amount of the specification information in the deployment information.
If the specification information of the target Mycat includes the hard disk 200G, the target host is "host 1-1-2" in S203, and the host specification is "host 125G + hard disk 256G", after resource pre-occupation is performed on the target host according to the specification information, the pre-occupation information may include that the target host is "host 1-1-2", the remaining hard disk specification of "host 1-1-2" is 56G, and the required hard disk specification of the target Mycat is 200G.
And S205, creating resources in the target host according to the pre-occupation information so as to complete the deployment, operation and maintenance of the target Mycat.
Since in general, the Mycat architecture may include a Virtual Internet Protocol address (VIP), a load balancing resource, a monitoring service, a Mycat instance, and a fragmented host instance, where the service Virtual Internet Protocol address points to the load balancing resource, the monitoring service is configured to monitor a working state of the load balancing resource, the load balancing resource is in communication connection with the Mycat instance, the Mycat instance is in communication connection with the fragmented host instance, after the service application server initiates an access request to a database, such as a MySQL database, the load balancing resource is accessed through the VIP, the load is distributed to the Mycat instance through the load balancing resource, an operation condition of the load balancing resource is monitored through the monitoring service, and the fragmented host instance is accessed through the Mycat last, so that the service application server accesses the database. Therefore, the resource creation according to the preemption information can include setting a virtual internet protocol address, creating a load balancing resource, a monitoring service, a fragmented host instance and a Mycat instance, and the like. It should be noted that, the resource creation performed in the embodiment of the present application may further include other relevant settings related to the Mycat deployment, such as a master-slave relationship, a master-master relationship, and the like of the fragmented host instance, which is not limited herein.
In the embodiment of the application, firstly, according to the deployment information of the target Mycat set by the user, the target host matched with the specification information of the target Mycat is automatically matched with the target Mycat, then, resource pre-occupation and resource creation are carried out on the target host according to the specification information, so that the automatic deployment, operation and maintenance of the target Mycat are realized, a machine room does not need to be manually searched, and Mycat deployment is carried out, time and labor are saved, the user does not need to know the complete framework of the Mycat, only needs to select the relevant deployment information matched with the self requirement, the Mycat deployment can be rapidly and automatically completed, the deployment efficiency is greatly improved, and the workload of service personnel is reduced.
In some embodiments of the present application, searching for a host adapted to the specification information from a plurality of hosts to obtain a target host, may further include:
and traversing each host in the plurality of clusters until the specification information is matched with the host specification of the host, and stopping traversing to obtain the target host.
In the embodiment of the present application, since the resource pool may include a plurality of server clusters, and each server cluster may include a plurality of hosts, when a host adapted to the specification information is searched, each host in each cluster may be traversed one by one.
If there are 4 clusters (e.g., "cluster 1-1", "cluster 1-2", "cluster 1-3", and "cluster 1-4") in the resource pool, each cluster has 8 hosts, the 1 st host in "cluster 1-1" is named "host 1-1-1", the 2 nd host in "cluster 1-1" is named "host 1-1-2", and so on, when traversing the hosts in the clusters, the 8 hosts in "cluster 1-1" can be traversed first, if there is no host adapted to the specification information, then the 8 hosts in "cluster 1-2" are traversed, if there is no host adapted to the specification information, then the 8 hosts in "cluster 1-3" are traversed, traversing according to the cluster arrangement sequence until a host which is suitable for the specification information is found, and stopping traversing; in addition to sequential traversal, the traversal can also be performed in reverse order according to the cluster arrangement, for example, first 8 hosts in the "clusters 1 to 4" are traversed, if no host adaptive to the specification information exists, then 8 hosts in the "clusters 1 to 3" are traversed, if no host adaptive to the specification information exists, then 8 hosts in the "clusters 1 to 2" are traversed, that is, the traversal is performed in reverse order according to the cluster arrangement, and the traversal is stopped until a host adaptive to the specification information is found; in addition, for 8 hosts in each cluster, traversal may also be performed by referring to the above traversal method for the cluster, which is not described herein again specifically. It should be noted that, besides traversing according to traversing manners such as a cluster arrangement order and a reverse order, the clusters can also be traversed randomly, and in practical application, the traversing manner can be selected according to a practical situation, and is not limited herein.
As shown in fig. 4, which is a flowchart illustrating an embodiment of obtaining preemption information in the present application, in some embodiments of the present application, the specification information includes instance information of the target Mycat, and resource preemption is performed on the target host according to the specification information to obtain preemption information, which further includes:
s401, binding the instance information with the target host, and storing binding information for recording the binding relationship between the instance information and the target host.
In the embodiment of the application, the instance information of the target myct may be the instance information of the fragmented host and the myct instance information, the instance information is bound with the target host, that is, the instance information of the fragmented host is bound with the target host, and the myct instance information is bound with the target host, so that corresponding relationships, that is, binding relationships, are formed between the instance information of the fragmented host and the target host, and between the instance information of the myct and the target host, and the binding information may include the corresponding relationships, and is stored in the server.
For example, the fragmented host instance information may include Relational Database Service (RDS) information and a fragmented host instance name, the Mycat instance information may include a target Mycat instance name, and the binding information may be RDS information, a fragmented host instance name, a binding relationship between the target Mycat instance name and the target host.
S402, subtracting the specification information from the host specification of the target host to complete resource pre-occupation to obtain pre-occupation information, wherein the pre-occupation information comprises the specification information and the host information of the target host.
In the embodiment of the present application, resource preemption of the target host can be regarded as resource preemption of the target host required for deploying the target Mycat according to the specification information of the target Mycat, so as to prevent other programs from occupying the target host resource before deploying the target Mycat.
If the specification information of the target Mycat includes the hard disk 200G, the target host is "host 1-1-2" in S203, and the host specification is "host 125G + hard disk 256G", the target host is pre-occupied with resources according to the specification information, that is, the hard disk 256G of "host 1-1-2" is subtracted from the hard disk 200G of the specification information, the pre-occupied information may include that the target host is "host 1-1-2", the remaining hard disk specification of "host 1-1-2" is 56G, and the specification information of the target Mycat is hard disk 200G.
As shown in fig. 5, which is a flowchart illustrating an embodiment of resource creation in the present application, in some embodiments of the present application, the instance information includes fragmented host instance information and Mycat instance information, and resource creation in the target host according to the preemption information may further include:
s501, generating basic information of the target Mycat according to the preemption information, wherein the basic information comprises a domain name of the target host.
In this embodiment, the basic information may include information of the target host, specification information, instance information, a Domain Name (DN) of the target host, and connection information between each part under the target myct structure, such as a virtual internet protocol address, a load balancing resource, a monitoring service, a myct instance, and a connection relationship between fragmented host instances, where the Domain Name is a Name used for identifying the target host on a network composed of a string of point-separated names, such as a local area network, and is used for locating and identifying the target host during data transmission.
S502, acquiring a binding application of the virtual Internet protocol address of the target Mycat, and binding the virtual Internet protocol address with the domain name to enable the virtual Internet protocol address to be associated with the domain name.
In the Mycat architecture, a virtual Internet Protocol address VIP is a floating access Internet Protocol address (Internet Protocol, VIP), and can be used for accessing a Mycat cluster, that is, a Mycat instance.
If the VIP address is "192.168.209.130", the domain name of the target host is "domain.com", the original IP address of the target host is "192.168.209.135", and after the VIP address and the domain name are bound, the access to the target host can be performed through the original IP address "192.168.209.135", or directly through the VIP address "192.168.209.130".
S503, creating load balancing resources of the target Mycat and monitoring services according to the basic information, wherein the load balancing resources are used for distributing the load balancing to the target Mycat, and the monitoring services are used for monitoring the running condition of the load balancing resources.
In the embodiment of the application, the load balancing resource and the monitoring service may be Haproxy combined with Keepalived, where Haproxy is free and open source code software written in C language, and may provide high availability, load balancing, and an application program agent based on Transmission Control Protocol (TCP) and HyperText Transfer Protocol (HTTP), and the load balancing resource may distribute load balancing to the target Mycat; keepalived is an exchange mechanism software, it can detect whether Haproxy can normally use, if Haproxy is down, or work breaks down, Keepalived will detect to reject Haproxy from the system, use other Haproxy to replace this Haproxy's work simultaneously, after Haproxy work is normal, Keepalived adds Haproxy to the system automatically, consequently, can monitor Haproxy's operating condition through Keepalived.
Specifically, in the embodiment of the present application, the load balancing resource and the monitoring service may be created according to the connection information in the basic information, for example, the connection relationship between the VIP address and the Haproxy, the connection relationship between the Haproxy and the Mycat instance, and the monitoring relationship between the Haproxy and Keepalived. In addition, in the embodiment of the present application, the configuration or deployment of the target Mycat may also be backed up at regular time according to the connection information.
S504, according to the pre-occupation information, a fragmented host instance and a Mycat instance are created, wherein the fragmented host instance is matched with the fragmented host instance information, and the Mycat instance is matched with the Mycat instance information.
In this embodiment of the present application, the fragmentation host instance information may be the number of fragmentation host instances created by the plan and the corresponding relationship between each fragmentation host instance, and the Mycat instance information may be the number of Mycat instances created by the plan and the corresponding relationship between each Mycat instance and the fragmentation host instance.
For example, the shard host instance information may be to create 2 shard host instances (e.g., "DB 1-DB 3" and "DB 2-DB 4"), where the shard host instance "DB 1-DB 3" is composed of Mysql instance "DB 1" and Mysql instance "DB 3" connections, the connection relationship is a master replication, the shard host instance "DB 2-DB 4" is composed of Mysql instance "DB 2" and Mysql instance "DB 4" connections, the connection relationship is a master replication; the Mycat instance information may be the creation of 2 Mycat instances (e.g., "Mycat 1" and "Mycat 2"), where each Mycat instance is connected to 2 shard host instances, respectively, "Mycat 1" is communicatively connected to "DB 1-DB 3" and "DB 2-DB4," respectively, and "Mycat 2" is communicatively connected to "DB 1-DB 3" and "DB 2-DB4," respectively.
As shown in fig. 6, which is a flowchart illustrating an embodiment of binding a virtual internet protocol address application and a domain name in the present application, in some embodiments of the present application, obtaining a binding application of a virtual internet protocol address of a target Mycat, and binding the virtual internet protocol address and the domain name may further include:
s601, obtaining binding applications of the virtual Internet protocol address of the target Mycat, calculating the number of the binding applications, and establishing a corresponding virtual Internet protocol address list.
In the embodiment of the application, one or more virtual internet protocol addresses may be provided, and specifically, the determination may be performed according to specification information of a target to be deployed, where one virtual internet protocol address corresponds to one binding application.
If the VIP addresses of the binding applications are sequentially provided as VIP address 1 (e.g., "192.168.209.130") and VIP address 2 (e.g., "192.168.209.132"), the first row of the virtual internet protocol address list may record, for example, "1-VIP address 1-192.168.209.130", and the second row may record, for example, "2-VIP address 2-192.168.209.130".
S602, recording the virtual Internet protocol address list into the basic information.
In this embodiment of the present application, after the virtual internet protocol address list is created, the virtual internet protocol address list may also be synchronously stored in the basic information of S501.
S603, binding the virtual Internet protocol addresses in the virtual Internet protocol address list with the domain names respectively.
In the embodiment of the application, the VIP addresses are respectively bound to domain names, so that the VIP addresses are respectively associated with the domain names one by one, for example, after the domain name of the target host is "domain.com", the original IP address of the target host is "192.168.209.135", and the VIP address 1 and the VIP address 2 are respectively bound to the domain names, the access to the target host can be performed through the VIP address 1 "192.168.209.130" or the VIP address 2 "192.168.209.132" instead of the original IP address "192.168.209.135".
As shown in fig. 7, which is a flowchart illustrating an embodiment of implementing capacity expansion of the target myct in the embodiment of the present application, in some embodiments of the present application, after the target myct deployment, operation, and maintenance are completed, the method may further include:
s701, acquiring capacity expansion information of the target Mycat;
s702, searching a host which is matched with the capacity expansion information in the plurality of hosts to obtain a capacity expansion host;
s703, performing capacity expansion resource pre-occupation on the capacity expansion host according to the capacity expansion information to obtain capacity expansion pre-occupation information;
s704, carrying out capacity expansion arrangement on the capacity expansion host according to the capacity expansion pre-occupation information to complete the capacity expansion of the target Mycat.
In this embodiment of the present application, the expansion information is similar to the deployment information, in S702 and S703, a capacity expansion host adapted to the expansion information is searched, and capacity expansion resource preemption is performed on the capacity expansion host, which is similar to searching for a target host and resource preemption on the target host in the above embodiment, and in S704, capacity expansion arrangement is performed on the capacity expansion host, which is also similar to resource creation on the target host in the above embodiment.
For example, a user needs to expand a target Mycat according to a service requirement, a Mycat system with a software version Mycat1.5.3 is deployed in the Shenzhen Futian region, similarly, specification information of the Mycat system is that a database version of MysqL5.7.19 butted by the Mycat, the hard disk 200G and the hard disk include 8 main instances, namely Master instances and 1 node, when the user selects the expansion information, the selected deployment region identifier is an identifier (such as '02') of the Shenzhen Futian region, the software version is Mycat1.5.3, the specification information is that a database version of MysqL5.7.19, the hard disk 200G, 8 Master instances and 1 node; then, the resource corresponding to the Shenzhen Futian area is found to be the resource pool No. 1 according to the relation table, in the resource pool No. 1, similarly, the host in the cluster is traversed, the host adapted to the capacity expansion information is found, for example, when the host is traversed to the host 1-1-4 in the cluster 1-1 (for example, the host specification of the host 1-1-4 is ' main memory 125G + hard disk 256G '), the traversal is stopped, the capacity expansion host is ' host 1-1-4 ', the capacity expansion resource pre-occupation is carried out on the host 1-1-4 ', that is, the capacity expansion pre-occupation information can include that the target host is ' host 1-1-4 ', the remaining hard disk specification of the ' host 1-1-4 ' is 56G, the capacity expansion requirement hard disk specification of the target Mycat is 200G, and then the capacity expansion arrangement is carried out according to the capacity expansion pre-occupation information, i.e. capacity expansion creation, and likewise, may include setting of virtual internet protocol addresses, creation of load balancing resources, monitoring services, fragmented host instances and Mycat instances, and the like.
In addition, in the embodiment of the present application, the method for deploying, operating and maintaining a Mycat system may further include performing offline management on the deployed target Mycat in the target host, where the offline management may include two stages, where the first stage is to obtain the target Mycat to be offline, and if there are multiple target Mycat to be offline managed, generating a corresponding offline list; the second stage is to delete the monitoring service, load balancing resource, domain name system, fragmentation host instance, and target myct Private network (VPC) corresponding to the target myct to be offline, so as to realize the offline of the target myct.
In order to better implement the method for deploying, operating and maintaining the myct system in the present application, based on the method for deploying, operating and maintaining the myct system, the present application further provides a device for deploying, operating and maintaining the myct system, as shown in fig. 8, and a schematic structural diagram of an embodiment of the device for deploying, operating and maintaining the myct system provided in the present application is shown, where the device 800 for deploying, operating and maintaining the myct system includes:
an obtaining module 801, configured to obtain deployment information of the target myct, where the deployment information carries a deployment area identifier for deploying the target myct and specification information of the target myct;
a processing module 802, configured to search a target deployment area corresponding to the deployment area identifier and a resource pool bound to the target deployment area, where the resource pool includes multiple clusters, and each cluster includes multiple hosts;
searching a host matched with the specification information from a plurality of hosts to obtain a target host;
performing resource pre-occupation on the target host according to the specification information to obtain pre-occupation information;
and the deployment module 803 is configured to create resources in the target host according to the preemption information, so as to complete the deployment, operation and maintenance of the target Mycat.
In some embodiments of the present application, the processing module 802 may be specifically configured to:
and traversing each host in the plurality of clusters until the specification information is matched with the host specification of the host, and stopping traversing to obtain the target host.
In some embodiments of the present application, the specification information includes instance information of the target Mycat, and the processing module 802 may be further configured to:
binding the instance information with the target host, and storing binding information for recording the binding relationship between the instance information and the target host;
and subtracting the specification information from the host specification of the target host to complete resource preemption and obtain preemption information, wherein the preemption information comprises the specification information and the host information of the target host.
In some embodiments of the present application, the instance information includes fragment host instance information and Mycat instance information, and the deployment module 803 may be specifically configured to:
generating basic information of the target Mycat according to the pre-occupation information, wherein the basic information comprises a domain name of the target host;
acquiring a binding application of a virtual Internet protocol address of a target Mycat, and binding the virtual Internet protocol address with a domain name;
according to the basic information, creating load balancing resources and monitoring services of the target Mycat, wherein the load balancing resources are used for distributing the load balancing to the target Mycat, and the monitoring services are used for monitoring the running condition of the load balancing resources;
and creating a fragmentation host instance and a Mycat instance according to the pre-occupation information, wherein the fragmentation host instance is matched with the fragmentation host instance information, and the Mycat instance is matched with the Mycat instance information.
In some embodiments of the present application, the deployment module 803 may be further specifically configured to:
acquiring binding applications of the virtual Internet protocol address of the target Mycat, calculating the number of the binding applications, and establishing a corresponding virtual Internet protocol address list;
recording the virtual Internet protocol address list into basic information;
and binding the virtual Internet protocol addresses in the virtual Internet protocol address list with the domain names respectively.
In some embodiments of the present application, the obtaining module 801 may be further configured to obtain capacity expansion information of the target Mycat;
the processing module 802 may be further configured to search for a host that is adapted to the capacity expansion information from among the multiple hosts, so as to obtain a capacity expansion host;
performing capacity expansion resource pre-occupation on the capacity expansion host according to the capacity expansion information to obtain capacity expansion pre-occupation information;
the deployment module 803 may further be specifically configured to perform capacity expansion arrangement on the capacity expansion host according to the capacity expansion preemption information, so as to complete the capacity expansion of the target Mycat.
It should be noted that, in the present application, relevant contents of the obtaining module 801, the processing module 802, and the deploying module 803 correspond to the above one to one, and it can be clearly understood by those skilled in the art that, for convenience and simplicity of description, the description of the operation and maintenance method for deploying a Mycat system and the corresponding module of the Mycat system in any embodiment corresponding to fig. 2 to fig. 7 may be referred to for a specific working process of the device for deploying an operation and maintenance system of a Mycat system and the corresponding module, and details are not repeated herein.
In order to better implement the method for deploying, operating and maintaining the Mycat system, on the basis of the method for deploying, operating and maintaining the Mycat system, the application further provides a device for deploying, operating and maintaining the Mycat system, which integrates any one of the devices for deploying, operating and maintaining the Mycat system, provided by the application, and the device comprises:
one or more processors 901;
a memory 902; and
one or more applications, wherein the one or more applications are stored in the memory 902 and configured to be executed by the processor 901 for performing the steps of the method for deploying and maintaining a Mycat system according to any of the embodiments of the method for deploying and maintaining a Mycat system.
Fig. 9 is a schematic structural diagram illustrating an embodiment of the Mycat system deployment operation and maintenance device according to the present application, specifically:
the apparatus may include components such as a processor 901 of one or more processing cores, memory 902 of one or more computer-readable storage media, a power supply 903, and an input unit 904. Those skilled in the art will appreciate that the device configuration shown in fig. 9 is not meant to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components. Wherein:
the processor 901 is a control center of the apparatus, connects various parts of the entire apparatus using various interfaces and lines, and performs various functions of the apparatus and processes data by running or executing software programs and/or modules stored in the memory 902 and calling data stored in the memory 902, thereby performing overall monitoring of the apparatus. Optionally, processor 901 may include one or more processing cores; the Processor 901 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, etc. The general purpose processor may be a microprocessor or the processor may be any conventional processor or the like, and preferably the processor 901 may integrate an application processor, which handles primarily the operating system, user interfaces, application programs, etc., and a modem processor, which handles primarily wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 901.
The memory 902 may be used to store software programs and modules, and the processor 901 executes various functional applications and data processing by operating the software programs and modules stored in the memory 902. The memory 902 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to use of the device, and the like. Further, the memory 902 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 902 may also include a memory controller to provide the processor 901 access to the memory 902.
The device further comprises a power supply 903 for supplying power to each component, and preferably, the power supply 903 may be logically connected to the processor 901 through a power management system, so that functions of managing charging, discharging, power consumption, and the like are realized through the power management system. The power supply 903 may also include any component including one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
The device may further comprise an input unit 904 and an output unit 905, the input unit 904 being operable to receive entered numeric or character information and to generate keyboard, mouse, joystick, optical or trackball signal inputs in relation to user settings and function control.
Although not shown, the apparatus may further include a display unit and the like, which will not be described in detail herein. Specifically, in the present application, the processor 901 in the device loads the executable file corresponding to the process of one or more application programs into the memory 902 according to the following instructions, and the processor 901 runs the application programs stored in the memory 902, thereby implementing various functions as follows:
acquiring deployment information of the target Mycat, wherein the deployment information carries a deployment area identifier for deploying the target Mycat and specification information of the target Mycat;
searching a target deployment area corresponding to the deployment area identification and a resource pool bound with the target deployment area, wherein the resource pool comprises a plurality of clusters, and each cluster comprises a plurality of hosts;
searching a host matched with the specification information from a plurality of hosts to obtain a target host;
performing resource pre-occupation on the target host according to the specification information to obtain pre-occupation information;
and creating resources in the target host according to the pre-occupation information so as to complete the deployment, operation and maintenance of the target Mycat.
It will be understood by those skilled in the art that all or part of the steps of the above methods may be performed by instructions or by instructions controlling associated hardware, and the instructions may be stored in a computer readable storage medium and loaded and executed by a processor.
To this end, the present application provides a computer-readable storage medium, which may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like. The system comprises a Mycat system deployment operation and maintenance method, a processor and a computer program, wherein the computer program is stored on the Mycat system deployment operation and maintenance method and is loaded by the processor to execute the steps of the Mycat system deployment operation and maintenance method provided by the application. For example, the computer program may be loaded by a processor to perform the steps of:
acquiring deployment information of the target Mycat, wherein the deployment information carries a deployment area identifier for deploying the target Mycat and specification information of the target Mycat;
searching a target deployment area corresponding to the deployment area identification and a resource pool bound with the target deployment area, wherein the resource pool comprises a plurality of clusters, and each cluster comprises a plurality of hosts;
searching a host matched with the specification information from a plurality of hosts to obtain a target host;
performing resource pre-occupation on the target host according to the specification information to obtain pre-occupation information;
and creating resources in the target host according to the pre-occupation information so as to complete the deployment, operation and maintenance of the target Mycat.
Since the instructions stored in the computer-readable storage medium may execute the steps in the method for deploying, operating and maintaining a Mycat system in any embodiment corresponding to fig. 2 to fig. 7 in the present application, beneficial effects that can be achieved by the method for deploying, operating and maintaining a Mycat system in any embodiment corresponding to fig. 2 to fig. 7 in the present application may be achieved, for details, see the foregoing description, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and parts that are not described in detail in a certain embodiment may refer to the above detailed descriptions of other embodiments, and are not described herein again.
In specific implementation, each unit or structure may be implemented as an independent entity, or may be combined arbitrarily to be implemented as the same entity or several entities, and specific implementation of each unit or structure may refer to the foregoing embodiment, which is not described herein again.
The method, the device, the equipment and the storage medium for deploying, operating and maintaining the Mycat system provided by the application are introduced in detail, a specific example is applied in the description to explain the principle and the implementation of the application, and the above description is only used for helping to understand the method and the core idea of the application; meanwhile, for those skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A Mycat system deployment, operation and maintenance method is characterized by comprising the following steps:
acquiring deployment information of a target Mycat, wherein the deployment information carries a deployment area identifier for deploying the target Mycat and specification information of the target Mycat;
searching a target deployment area corresponding to the deployment area identification and a resource pool bound with the target deployment area, wherein the resource pool comprises a plurality of clusters, and each cluster comprises a plurality of hosts;
searching a host adaptive to the specification information from the plurality of hosts to obtain a target host;
performing resource pre-occupation on the target host according to the specification information to obtain pre-occupation information;
and creating resources in the target host according to the pre-occupation information so as to complete the deployment, operation and maintenance of the target Mycat.
2. The method of claim 1, wherein said searching for a host that is adapted to the specification information from the plurality of hosts to obtain a target host comprises:
and traversing each host in the plurality of clusters until the specification information is matched with the host specification of the host, and stopping traversing to obtain the target host.
3. The method of claim 1, wherein the specification information includes instance information of the target Mycat, and wherein performing resource preemption on the target host according to the specification information to obtain preemption information comprises:
binding the instance information with the target host, and storing binding information for recording the binding relationship between the instance information and the target host;
and subtracting the specification information from the host specification of the target host to complete the resource preemption and obtain the preemption information, wherein the preemption information comprises the specification information and the host information of the target host.
4. The method according to claim 3, wherein the instance information includes fragmented host instance information and Mycat instance information, and the creating a resource in the target host according to the preemption information includes:
generating basic information of the target Mycat according to the pre-occupation information, wherein the basic information comprises a domain name of the target host;
acquiring a binding application of a virtual Internet protocol address of the target Mycat, and binding the virtual Internet protocol address with the domain name to enable the virtual Internet protocol address to be associated with the domain name;
according to the basic information, creating load balancing resources and monitoring services of the target Mycat, wherein the load balancing resources are used for distributing load balancing to the target Mycat, and the monitoring services are used for monitoring the running condition of the load balancing resources;
and creating a fragmented host instance and a Mycat instance according to the pre-occupation information, wherein the fragmented host instance is matched with the fragmented host instance information, and the Mycat instance is matched with the Mycat instance information.
5. The method of claim 4, wherein the obtaining a binding application for the virtual internet protocol address of the target Mycat to bind the virtual internet protocol address with the domain name comprises:
acquiring binding applications of the virtual Internet protocol address of the target Mycat, calculating the number of the binding applications, and establishing a corresponding virtual Internet protocol address list;
recording the virtual internet protocol address list into the basic information;
and binding the virtual Internet protocol addresses in the virtual Internet protocol address list with the domain names respectively.
6. The method of claim 4, wherein the base information comprises connection information of the target Mycat, and wherein the connection information is used for creating the load balancing resource and the monitoring service.
7. The method of claim 1, wherein after the target Mycat deployment, operation and maintenance is completed, the method further comprises:
acquiring capacity expansion information of the target Mycat;
searching a host which is matched with the capacity expansion information in the plurality of hosts to obtain a capacity expansion host;
performing capacity expansion resource pre-occupation on the capacity expansion host according to the capacity expansion information to obtain capacity expansion pre-occupation information;
and carrying out capacity expansion arrangement on the capacity expansion host according to the capacity expansion pre-occupation information to complete the capacity expansion of the target Mycat.
8. A Mycat system deployment operation and maintenance device is characterized by comprising:
the acquisition module is used for acquiring deployment information of the target Mycat, wherein the deployment information carries a deployment area identifier for deploying the target Mycat and specification information of the target Mycat;
a processing module, configured to search for a target deployment area corresponding to the deployment area identifier and a resource pool bound to the target deployment area, where the resource pool includes multiple clusters, and each cluster includes multiple hosts;
searching a host adaptive to the specification information from the plurality of hosts to obtain a target host;
performing resource pre-occupation on the target host according to the specification information to obtain pre-occupation information;
and the deployment module is used for creating resources in the target host according to the pre-occupation information so as to complete the deployment, operation and maintenance of the target Mycat.
9. A Mycat system deployment operation and maintenance device, characterized in that the device comprises:
one or more processors;
a memory; and
one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to implement the Mycat system deployment operation and maintenance method of any one of claims 1 to 7.
10. A computer readable storage medium, having stored thereon a computer program which is loaded by a processor to perform the steps of the method for deploying, operating and maintaining a Mycat system according to any of claims 1 to 7.
CN202011499252.5A 2020-12-17 2020-12-17 Mycat system deployment, operation and maintenance method, device, equipment and storage medium Pending CN114647501A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011499252.5A CN114647501A (en) 2020-12-17 2020-12-17 Mycat system deployment, operation and maintenance method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011499252.5A CN114647501A (en) 2020-12-17 2020-12-17 Mycat system deployment, operation and maintenance method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114647501A true CN114647501A (en) 2022-06-21

Family

ID=81990981

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011499252.5A Pending CN114647501A (en) 2020-12-17 2020-12-17 Mycat system deployment, operation and maintenance method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114647501A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024055715A1 (en) * 2022-09-15 2024-03-21 华为云计算技术有限公司 Method and apparatus for determining big data cluster deployment scheme, cluster, and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024055715A1 (en) * 2022-09-15 2024-03-21 华为云计算技术有限公司 Method and apparatus for determining big data cluster deployment scheme, cluster, and storage medium

Similar Documents

Publication Publication Date Title
US10108632B2 (en) Splitting and moving ranges in a distributed system
US9031910B2 (en) System and method for maintaining a cluster setup
US11016941B2 (en) Delayed asynchronous file replication in a distributed file system
WO2019001017A1 (en) Inter-cluster data migration method and system, server, and computer storage medium
TWI746511B (en) Data table connection method and device
EP3379425A1 (en) Data conversion method and back-up server
US10996993B2 (en) Adaptive work distribution in distributed systems
US20150128150A1 (en) Data processing method and information processing apparatus
CN109886693B (en) Consensus realization method, device, equipment and medium for block chain system
KR20120018178A (en) Swarm-based synchronization over a network of object stores
WO2018192478A1 (en) Cloud management platform, virtual machine management method, system thereof
US9355106B2 (en) Sensor data locating
CN107666493B (en) Database configuration method and equipment thereof
US9483493B2 (en) Method and system for accessing a distributed file system
CN112199356B (en) Fault processing method, device, server and storage medium
CN107391033B (en) Data migration method and device, computing equipment and computer storage medium
CN108512684B (en) Firmware upgrading method and system and firmware upgrading management device
CN105095103A (en) Storage device management method and device used for cloud environment
US20240061712A1 (en) Method, apparatus, and system for creating training task on ai training platform, and medium
CN114647501A (en) Mycat system deployment, operation and maintenance method, device, equipment and storage medium
CN111274004B (en) Process instance management method and device and computer storage medium
US10275468B2 (en) Replication of data in a distributed file system using an arbiter
CN111126604A (en) Model training method, device, server and storage medium
CN112261097B (en) Object positioning method for distributed storage system and electronic equipment
CN112732198B (en) File management method, device, equipment and storage medium

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