CN111736993A - Cluster high-availability service configuration method, system, terminal and storage medium - Google Patents

Cluster high-availability service configuration method, system, terminal and storage medium Download PDF

Info

Publication number
CN111736993A
CN111736993A CN202010536957.3A CN202010536957A CN111736993A CN 111736993 A CN111736993 A CN 111736993A CN 202010536957 A CN202010536957 A CN 202010536957A CN 111736993 A CN111736993 A CN 111736993A
Authority
CN
China
Prior art keywords
nodes
virtual
cluster
configuration file
load balancing
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.)
Withdrawn
Application number
CN202010536957.3A
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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202010536957.3A priority Critical patent/CN111736993A/en
Publication of CN111736993A publication Critical patent/CN111736993A/en
Withdrawn 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention provides a method, a system, a terminal and a storage medium for configuring a cluster high-availability service, which comprise the following steps: setting virtual IPs of all nodes in the cluster in the configuration file, and storing the virtual IPs of all the nodes to a main management node; a plurality of nodes are designated in a configuration file as load balancing nodes; appointing the binding interface of the main management node monitoring the virtual IP in the configuration file; and updating the configuration file to the cluster by utilizing an automatic operation and maintenance tool. The invention can realize the rapid configuration and deployment of the integral high-availability service of the cluster, and compared with the existing split high-availability configuration, the invention enhances the stability of cluster operation and saves human resources and configuration time.

Description

Cluster high-availability service configuration method, system, terminal and storage medium
Technical Field
The invention relates to the technical field of cluster high availability, in particular to a method, a system, a terminal and a storage medium for configuring cluster high availability service.
Background
Most of existing cloud platform load balancing methods adopt a load balancer mode to perform load balancing on service nodes, namely the load balancer forwards a request sent to a fault node to a normal service node, and high availability of the service nodes is achieved. Then, in order to improve the high availability of the load balancer, Keeplived software is adopted to carry out high-availability control on the load balancer. The two modes are usually deployed separately by running independently, and the deployment methods of the two modes are different. However, cross parameters exist between the two modes, and the number of nodes in the cloud platform cluster is very large, so that deployment of highly available services of the cloud platform is very complex, and manpower and time resources are consumed.
Disclosure of Invention
In view of the above-mentioned deficiencies of the prior art, the present invention provides a method, a system, a terminal and a storage medium for configuring a cluster high-availability service, so as to solve the above-mentioned technical problems.
In a first aspect, the present invention provides a method for configuring a cluster high available service, including:
setting virtual IPs of all nodes in the cluster in the configuration file, and storing the virtual IPs of all the nodes to a main management node;
a plurality of nodes are designated in a configuration file as load balancing nodes;
appointing the binding interface of the main management node monitoring the virtual IP in the configuration file;
and updating the configuration file to the cluster by utilizing an automatic operation and maintenance tool.
Further, the setting, in the configuration file, the virtual IPs of all service nodes in the cluster includes:
the internal virtual IP and external virtual IP of all nodes are updated in the network configuration item.
Further, the designating a plurality of nodes in the configuration file as load balancing nodes includes:
acquiring basic parameters of all nodes;
selecting a plurality of nodes with the best basic parameters as load balancing nodes;
the nodes except the load balancing nodes are averagely distributed into lower nodes of a plurality of load balancing nodes;
and storing the virtual IP of all the corresponding subordinate nodes by the load balancing node.
Further, the method further comprises:
setting the virtual IP priority of a route redundancy protocol in a configuration file;
the priority parameter of the HAproxy/Keepalived instance is customized.
Further, the method further comprises:
the deployment of the updated nodes is limited and the cluster node services which are not updated are updated.
In a second aspect, the present invention provides a cluster high-availability service configuration system, including:
the IP setting unit is used for setting the virtual IP of all the nodes in the cluster in the configuration file and storing the virtual IP of all the nodes to the main management node;
a node specifying unit configured to specify a plurality of nodes as load balancing nodes in a configuration file;
an interface specifying unit configured to specify a binding interface of the master management node monitoring the virtual IP in the configuration file;
and the configuration updating unit is configured to update the configuration file to the cluster by using an automatic operation and maintenance tool.
Further, the IP setting unit includes:
and the IP updating module is configured for updating the internal virtual IP and the external virtual IP of all the nodes in the network configuration item.
Further, the node specifying unit includes:
the parameter acquisition module is configured to acquire basic parameters of all nodes;
the node selection module is configured to select a plurality of nodes with the best basic parameters as load balancing nodes;
the node distribution module is configured for evenly distributing the nodes except the load balancing nodes into lower nodes of a plurality of load balancing nodes;
and the IP distribution module is used for configuring the virtual IP of all the corresponding subordinate nodes stored by the load balancing node.
In a third aspect, a terminal is provided, including:
a processor, a memory, wherein,
the memory is used for storing a computer program which,
the processor is used for calling and running the computer program from the memory so as to make the terminal execute the method of the terminal.
In a fourth aspect, a computer storage medium is provided having stored therein instructions that, when executed on a computer, cause the computer to perform the method of the above aspects.
The beneficial effect of the invention is that,
according to the cluster high-availability service configuration method, the system, the terminal and the storage medium, the virtual IP of each node is configured in advance, the load balancing node and the monitoring interface are designated, and then the configuration file is updated to the cluster by using an automatic operation and maintenance tool. The invention can realize the rapid configuration and deployment of the integral high-availability service of the cluster, and compared with the existing split high-availability configuration, the invention enhances the stability of cluster operation and saves human resources and configuration time.
In addition, the invention has reliable design principle, simple structure and very wide application prospect.
Drawings
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present invention, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without creative efforts.
FIG. 1 is a schematic flow diagram of a method of one embodiment of the invention.
FIG. 2 is a schematic block diagram of a system of one embodiment of the present invention.
Fig. 3 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
Detailed Description
In order to make those skilled in the art better understand the technical solution of the present invention, the technical solution in the embodiment of the present invention will be clearly and completely described below with reference to the drawings in the embodiment of the present invention, and it is obvious that the described embodiment is only a part of the embodiment of the present invention, and not all 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 invention.
The following explains key terms appearing in the present invention.
Figure BDA0002537342910000041
FIG. 1 is a schematic flow diagram of a method of one embodiment of the invention. The execution subject in fig. 1 may configure a system for a cluster of highly available services.
As shown in fig. 1, the method 100 includes:
step 110, setting virtual IPs of all nodes in the cluster in the configuration file, and storing the virtual IPs of all the nodes to a main management node;
step 120, designating a plurality of nodes in a configuration file as load balancing nodes;
step 130, appointing the binding interface of the main management node monitoring virtual IP in the configuration file;
and step 140, updating the configuration file to the cluster by using an automatic operation and maintenance tool.
In order to facilitate understanding of the present invention, the principle of the cluster high available service configuration method of the present invention is combined with the process of configuring the cluster high available service in the embodiment, and the cluster high available service configuration method provided by the present invention is further described below.
Specifically, the cluster high-availability service configuration method includes:
s1, setting the virtual IP of all nodes in the cluster in the configuration file, and saving the virtual IP of all nodes to the main management node.
Among the OpenStack service node deployments that are mature at present, the initial deployment is extended using three nodes running general services including databases and message queues. On this basis, network scope and server information are described in/etc/openstack _ default/openstack _ user _ config. A method for specifying network-wide and server information includes, in the above document, first updating the internal and external VIP addresses in the global _ overrates configuration section, and then adjusting the Virtual Ip (VIP) addresses of all nodes to point to the endpoint of HAProxy (the primary management node).
The method of updating the internal and external VIP addresses is as follows:
Figure BDA0002537342910000051
furthermore, updating the internal and external VIP addresses may also be achieved by setting a hash _ keyed _ internal _ VIP _ cid and a hash _ keyed _ external _ VIP _ cid, which correspond to the internal and external VIP addresses, respectively, and the default configuration may be seen at/etc/openstack _ default/user _ variables.
S2, designating a plurality of nodes in the configuration file as load balancing nodes.
First, nodes of different roles are defined in a cluster. In the configuration file, a plurality of nodes with excellent performance are selected as load balancing nodes according to basic parameters of all the nodes, and load balancers are operated on the load balancing nodes. After the load balancing nodes are selected, the nodes except the load balancing nodes are evenly distributed into the subordinate nodes of the load balancing nodes, and the load balancing nodes store the virtual IP of all the corresponding subordinate nodes, so that the load balancing nodes have the management authority of the subordinate nodes.
The method for configuring the load balancing node includes:
Figure BDA0002537342910000061
by default, HAProxy's playbook uses variables defined in/var/configs/HAProxy _ config.yml. The load balancer configuration allows for various default services such as Galera, RabbitMQ, Glance, Keystone, Neutron, Nova, Cinder, Horizon, Aodh, Gnocchi, Ceilometer. Each configuration entry in the HAProxy starts with a service label and is followed by a service name, a backend node, an SSL termination, a port, and a load balancing type. Shown below is the configuration fragment of the OpenStack mirroring service API in the HAProxy default configuration file as follows:
Figure BDA0002537342910000071
and S3, the binding interface of the virtual IP monitored by the main management node is appointed in the configuration file.
In the configuration file, the interfaces where Keepalived needs to be bound in the control node monitoring internal and external VIPs are specified, and the following configuration fragments are specified as Keepalived internal and external interfaces in user _ variables.
haproxy_keepalived_internal_interface:br-mgmt
haproxy_keepalived_external_interface:enp0s3
And S4, updating the configuration file to the cluster by utilizing an automatic operation and maintenance tool.
Install and update the service configuration of HAProxy and Keepalived on the main management node, run HAProxy-install.
#openstack-ansible haproxy-install.yml
The deployment of the updated nodes is limited, and then other OpenStack services which are not updated are updated, as follows:
#openstack-ansible setup-openstack.yml--limithaproxy_hosts
and invoking an automation operation and maintenance tool Ansine to update and deploy the configuration file to the OpenStack cluster.
As shown in fig. 2, the system 200 includes:
an IP setting unit 210 configured to set virtual IPs of all nodes in the cluster in the configuration file, and store the virtual IPs of all nodes to a master management node;
a node specifying unit 220 configured to specify a plurality of nodes as load balancing nodes in a configuration file;
an interface specification unit 230 configured to specify a binding interface of the primary management node monitoring a virtual IP in the configuration file;
a configuration updating unit 240 configured to update the configuration file to the cluster by using an automation operation and maintenance tool.
Optionally, as an embodiment of the present invention, the IP setting unit includes:
and the IP updating module is configured for updating the internal virtual IP and the external virtual IP of all the nodes in the network configuration item.
Optionally, as an embodiment of the present invention, the node specifying unit includes:
the parameter acquisition module is configured to acquire basic parameters of all nodes;
the node selection module is configured to select a plurality of nodes with the best basic parameters as load balancing nodes;
the node distribution module is configured for evenly distributing the nodes except the load balancing nodes into lower nodes of a plurality of load balancing nodes;
and the IP distribution module is used for configuring the virtual IP of all the corresponding subordinate nodes stored by the load balancing node.
Fig. 3 is a schematic structural diagram of a terminal system 300 according to an embodiment of the present invention, where the terminal system 300 may be used to execute the method for configuring a cluster high availability service according to the embodiment of the present invention.
The terminal system 300 may include: a processor 310, a memory 320, and a communication unit 330. The components communicate via one or more buses, and those skilled in the art will appreciate that the architecture of the servers shown in the figures is not intended to be limiting, and may be a bus architecture, a star architecture, a combination of more or less components than those shown, or a different arrangement of components.
The memory 320 may be used for storing instructions executed by the processor 310, and the memory 320 may be implemented by any type of volatile or non-volatile storage terminal or combination thereof, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The executable instructions in memory 320, when executed by processor 310, enable terminal 300 to perform some or all of the steps in the method embodiments described below.
The processor 310 is a control center of the storage terminal, connects various parts of the entire electronic terminal using various interfaces and lines, and performs various functions of the electronic terminal and/or processes data by operating or executing software programs and/or modules stored in the memory 320 and calling data stored in the memory. The processor may be composed of an Integrated Circuit (IC), for example, a single packaged IC, or a plurality of packaged ICs connected with the same or different functions. For example, the processor 310 may include only a Central Processing Unit (CPU). In the embodiment of the present invention, the CPU may be a single operation core, or may include multiple operation cores.
A communication unit 330, configured to establish a communication channel so that the storage terminal can communicate with other terminals. And receiving user data sent by other terminals or sending the user data to other terminals.
The present invention also provides a computer storage medium, wherein the computer storage medium may store a program, and the program may include some or all of the steps in the embodiments provided by the present invention when executed. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a Random Access Memory (RAM).
Therefore, the invention updates the configuration file to the cluster by using the automatic operation and maintenance tool through pre-configuring the virtual IP of each node and appointing the load balancing node and the monitoring interface. The invention can realize the rapid configuration and deployment of the integral high-availability service of the cluster, enhances the stability of cluster operation and saves human resources and configuration time compared with the existing split high-availability configuration, and the technical effect achieved by the embodiment can be seen in the description above and is not repeated herein.
Those skilled in the art will readily appreciate that the techniques of the embodiments of the present invention may be implemented as software plus a required general purpose hardware platform. Based on such understanding, the technical solutions in the embodiments of the present invention may be embodied in the form of a software product, where the computer software product is stored in a storage medium, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and the like, and the storage medium can store program codes, and includes instructions for enabling a computer terminal (which may be a personal computer, a server, or a second terminal, a network terminal, and the like) to perform all or part of the steps of the method in the embodiments of the present invention.
The same and similar parts in the various embodiments in this specification may be referred to each other. Especially, for the terminal embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant points can be referred to the description in the method embodiment.
In the embodiments provided in the present invention, it should be understood that the disclosed system and method can be implemented in other ways. For example, the above-described system embodiments are merely illustrative, and for example, the division of the units is only one logical functional division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, systems or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
Although the present invention has been described in detail by referring to the drawings in connection with the preferred embodiments, the present invention is not limited thereto. Various equivalent modifications or substitutions can be made on the embodiments of the present invention by those skilled in the art without departing from the spirit and scope of the present invention, and these modifications or substitutions are within the scope of the present invention/any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A cluster high-availability service configuration method is characterized by comprising the following steps:
setting virtual IPs of all nodes in the cluster in the configuration file, and storing the virtual IPs of all the nodes to a main management node;
a plurality of nodes are designated in a configuration file as load balancing nodes;
appointing the binding interface of the main management node monitoring the virtual IP in the configuration file;
and updating the configuration file to the cluster by utilizing an automatic operation and maintenance tool.
2. The method of claim 1, wherein setting the virtual IP of all service nodes in the cluster in the configuration file comprises:
the internal virtual IP and external virtual IP of all nodes are updated in the network configuration item.
3. The method of claim 1, wherein designating the plurality of nodes in the configuration file as load balancing nodes comprises:
acquiring basic parameters of all nodes;
selecting a plurality of nodes with the best basic parameters as load balancing nodes;
the nodes except the load balancing nodes are averagely distributed into lower nodes of a plurality of load balancing nodes;
and storing the virtual IP of all the corresponding subordinate nodes by the load balancing node.
4. The method of claim 1, further comprising:
setting the virtual IP priority of a route redundancy protocol in a configuration file;
the priority parameter of the HAproxy/Keepalived instance is customized.
5. The method of claim 1, further comprising:
the deployment of the updated nodes is limited and the cluster node services which are not updated are updated.
6. A cluster high availability service configuration system, comprising:
the IP setting unit is used for setting the virtual IP of all the nodes in the cluster in the configuration file and storing the virtual IP of all the nodes to the main management node;
a node specifying unit configured to specify a plurality of nodes as load balancing nodes in a configuration file;
an interface specifying unit configured to specify a binding interface of the master management node monitoring the virtual IP in the configuration file;
and the configuration updating unit is configured to update the configuration file to the cluster by using an automatic operation and maintenance tool.
7. The system according to claim 6, wherein the IP setting unit comprises:
and the IP updating module is configured for updating the internal virtual IP and the external virtual IP of all the nodes in the network configuration item.
8. The system according to claim 6, wherein the node specifying unit includes:
the parameter acquisition module is configured to acquire basic parameters of all nodes;
the node selection module is configured to select a plurality of nodes with the best basic parameters as load balancing nodes;
the node distribution module is configured for evenly distributing the nodes except the load balancing nodes into lower nodes of a plurality of load balancing nodes;
and the IP distribution module is used for configuring the virtual IP of all the corresponding subordinate nodes stored by the load balancing node.
9. A terminal, comprising:
a processor;
a memory for storing instructions for execution by the processor;
wherein the processor is configured to perform the method of any one of claims 1-5.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-5.
CN202010536957.3A 2020-06-12 2020-06-12 Cluster high-availability service configuration method, system, terminal and storage medium Withdrawn CN111736993A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010536957.3A CN111736993A (en) 2020-06-12 2020-06-12 Cluster high-availability service configuration method, system, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010536957.3A CN111736993A (en) 2020-06-12 2020-06-12 Cluster high-availability service configuration method, system, terminal and storage medium

Publications (1)

Publication Number Publication Date
CN111736993A true CN111736993A (en) 2020-10-02

Family

ID=72648999

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010536957.3A Withdrawn CN111736993A (en) 2020-06-12 2020-06-12 Cluster high-availability service configuration method, system, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN111736993A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112333010A (en) * 2020-10-23 2021-02-05 苏州浪潮智能科技有限公司 Method and device for supporting automatic configuration of high-availability environment
CN113992574A (en) * 2021-09-30 2022-01-28 济南浪潮数据技术有限公司 Method, system and equipment for setting router binding node priority

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112333010A (en) * 2020-10-23 2021-02-05 苏州浪潮智能科技有限公司 Method and device for supporting automatic configuration of high-availability environment
CN112333010B (en) * 2020-10-23 2022-06-21 苏州浪潮智能科技有限公司 Method and device for supporting automatic configuration of high-availability environment
CN113992574A (en) * 2021-09-30 2022-01-28 济南浪潮数据技术有限公司 Method, system and equipment for setting router binding node priority

Similar Documents

Publication Publication Date Title
CN112087312A (en) Method, device and equipment for providing edge service
CN110719209B (en) Cluster network configuration method, system, equipment and readable storage medium
US20120230223A1 (en) Thin client environment providing system, server, thin client environment management method and thin client environment management program
CN112948063B (en) Cloud platform creation method and device, cloud platform and cloud platform implementation system
CN107451147A (en) A kind of method and apparatus of kafka clusters switching at runtime
CN111736993A (en) Cluster high-availability service configuration method, system, terminal and storage medium
CN110008005B (en) Cloud platform-based power grid communication resource virtual machine migration system and method
CN109710379A (en) Virtual operation management method, apparatus, system, computer equipment and storage medium
CN108737499A (en) server configuration method and device
CN112491592B (en) Storage resource grouping method, system, terminal and storage medium
CN109120680B (en) Control system, method and related equipment
CN112003794B (en) Floating IP current limiting method, system, terminal and storage medium
CN116800616B (en) Management method and related device of virtualized network equipment
US20140280914A1 (en) System and method for creating, deploying, and administering distinct virtual computer networks
CN112003730A (en) Method, system, terminal and storage medium for rapid cluster deployment
CN111866210A (en) Virtual IP balance distribution method, system, terminal and storage medium
CN111124669A (en) Operation method, system, terminal and storage medium of distributed SaaS software
CN114911589A (en) Cross-data-platform fusion computing method, system, terminal and storage medium
CN114564530A (en) Database access method, device, equipment and storage medium
CN111491039A (en) IP distribution method, system, terminal and storage medium for distributed file system
CN113535402A (en) Load balancing processing method and device based on 5G MEC and electronic equipment
CN113076111A (en) Customized cluster configuration method, system, terminal and storage medium
CN108768890B (en) Multi-tenant resource multiplexing method and device in SDN network and controller
CN112463748A (en) Storage system file lock identification method, system, terminal and storage medium
CN111124890A (en) Distributed database performance test method, system, terminal 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
WW01 Invention patent application withdrawn after publication

Application publication date: 20201002

WW01 Invention patent application withdrawn after publication