WO2017162173A1 - Method and device for establishing connection of cloud server cluster - Google Patents

Method and device for establishing connection of cloud server cluster Download PDF

Info

Publication number
WO2017162173A1
WO2017162173A1 PCT/CN2017/077738 CN2017077738W WO2017162173A1 WO 2017162173 A1 WO2017162173 A1 WO 2017162173A1 CN 2017077738 W CN2017077738 W CN 2017077738W WO 2017162173 A1 WO2017162173 A1 WO 2017162173A1
Authority
WO
WIPO (PCT)
Prior art keywords
virtual machine
cloud server
server cluster
standby
host
Prior art date
Application number
PCT/CN2017/077738
Other languages
French (fr)
Chinese (zh)
Inventor
周莉
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2017162173A1 publication Critical patent/WO2017162173A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1034Reaction to server failures by a load balancer
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/40Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass for recovering from a failure of a protocol instance or entity, e.g. service redundancy protocols, protocol state redundancy or protocol service redirection

Definitions

  • the present disclosure relates to the field of cloud server technologies, for example, to a method and apparatus for establishing a connection of a cloud server cluster.
  • Cloud server downtime may bring losses to the enterprise.
  • the host hosting the service system fails, it needs to switch to the standby machine in a short time.
  • the technology to achieve this application requirement is "high-availability cluster technology", which is a server cluster technology aimed at reducing service interruption time, protecting users' business application systems from providing uninterrupted services to software, hardware or The impact of human-induced failures on the business is minimized.
  • the virtualization management software only supervises the virtual machine itself.
  • the virtual machine When the virtual machine has a problem, the virtual machine is migrated, and the services on the virtual machine form a cluster, define the order in which the services are started, clone the services on the virtual machine, and define the number of service failures.
  • the functions are not perfect, and the high availability of the cloud server cluster is poor.
  • the present disclosure proposes a method and apparatus for establishing a connection of a cloud server cluster, which can ensure high availability of a cloud server cluster.
  • This embodiment provides a method for establishing a connection between a cloud server cluster, including: performing host name resolution on the primary virtual machine and the standby virtual machine of the cloud server cluster, and configuring a dual-machine mutual trust mechanism; in the primary virtual machine and the Installing a preset high-availability application on the standby virtual machine, and configuring the installed high-availability application; adding a preset monitoring script, where the preset monitoring script is used to describe the service of the preset high-availability application; Presetting the service of the highly available application to execute the preset monitoring script and setting an Internet Protocol (IP) address interconnected between the floating networks to establish a highly available connection of the cloud server cluster.
  • IP Internet Protocol
  • This embodiment provides a device for establishing a connection between a cloud server cluster, and includes: a parsing module, configured to perform host name resolution on the primary virtual machine and the standby virtual machine of the cloud server cluster, and configure a dual-machine mutual trust mechanism; the configuration module is set to Installing a preset high-availability application on the primary virtual machine and the standby virtual machine, and configuring the installed high-availability application; adding a module, adding a preset monitoring script, where the preset monitoring script is used Describe the service of the preset high-availability application; the startup module is configured to start the service of the preset high-availability application, execute the preset monitoring script, and set a floating IP address to establish the cloud server cluster Highly available connection.
  • a parsing module configured to perform host name resolution on the primary virtual machine and the standby virtual machine of the cloud server cluster, and configure a dual-machine mutual trust mechanism
  • the configuration module is set to Installing a preset high-availability application on the primary virtual machine and
  • the embodiment further provides a computer readable storage medium storing computer executable instructions for executing the method for establishing a connection by the cloud server cluster.
  • the embodiment further provides a cloud server, the cloud server comprising one or more processors, a memory and one or more programs, the one or more programs being stored in the memory when executed by one or more processors.
  • the method of establishing a connection by the above cloud server cluster is performed.
  • the embodiment further provides a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions, when the program instructions are executed by a computer a method of causing the computer to perform a connection establishment of the cloud server cluster.
  • This embodiment provides a method and device for establishing a connection between a cloud server cluster, and configuring a dual-machine mutual trust mechanism of the primary virtual machine and the standby virtual machine of the cloud server cluster to install a preset high-availability application, and installing the highly available application after installation.
  • Configure and add a preset monitoring script is used to describe the service of the preset high-availability application, start the service of the preset high-availability application, execute the preset monitoring script, and set the floating IP to establish the cloud server.
  • the cluster's highly available connections ensure high availability of cloud server clusters.
  • FIG. 1 is a schematic flowchart of a method for establishing a connection of a cloud server cluster according to the embodiment.
  • FIG. 2 is a schematic flowchart of a method for establishing a connection of a cloud server cluster according to the embodiment.
  • FIG. 3 is a schematic structural diagram of an apparatus for establishing a connection of a cloud server cluster according to the embodiment.
  • FIG. 4 is a schematic structural diagram of an apparatus for establishing a connection of a cloud server cluster according to the embodiment.
  • FIG. 5 is a schematic structural diagram of a hardware of a cloud server according to this embodiment.
  • FIG. 1 is a schematic flowchart of a method for establishing a connection of a cloud server cluster according to the embodiment.
  • This embodiment is exemplified by the method in which the cloud server cluster is connected to establish a connection.
  • the device can be set in a cloud server cluster.
  • the method in this embodiment can be applied after the virtualization function of the cloud server cluster is started.
  • the method can include S110-S140.
  • the primary virtual machine and the standby virtual machine of the cloud server cluster are used for host name resolution, and a dual-machine mutual trust mechanism is configured.
  • the host name resolution of the primary virtual machine and the standby virtual machine of the cloud server cluster may be as follows:
  • the format of the content added in the hosts file can be the network IP address of the main virtual machine (for example, 192.168.56.101); the host name or domain name of the active virtual machine (for example, Master.Cluster.com); the main virtual The host name alias of the machine (for example, Master).
  • the difference between the host name and the domain name includes: usually using the host name in the LAN, and then through the hosts file, the host name is resolved to the corresponding IP address.
  • the host name of the standby virtual machine may be modified to a slave according to the method of modifying the host name of the active virtual machine to be the master.
  • a dual-machine mutual trust mechanism can be configured, that is, a key is created to allow all users who hold the key to log in to the cloud server. Cluster.
  • a first Secure Shell (SSH) passwordless login mode from the primary virtual machine to the standby virtual machine may be established; and a second SSH passwordless login is established from the standby virtual machine to the primary virtual machine. mode.
  • SSH Secure Shell
  • the configuration of the dual-machine mutual trust mechanism can be exemplified as follows.
  • the ssh-keygen command can be used to generate the ssh login key.
  • the primary virtual machine when the directory and file name are not entered, the primary virtual machine generates a public key and a key in the current directory, and then inputs the ssh login password, enters the password when the key is used, or does not enter the ssh login password.
  • the first SSH passwordless login mode from the primary virtual machine to the standby virtual machine is established, which is convenient to use.
  • the public key and key of ssh to the active virtual machine are generated under /root/.ssh of the primary virtual machine.
  • /root/.ssh/authorized_keys modify the permissions of authorized_keys to 600.
  • the second SSH passwordless login mode from the standby virtual machine to the active virtual machine may also be established according to the above example.
  • a preset high availability application is installed on the primary virtual machine and the standby virtual machine, and the installed high availability application is configured.
  • the preset high availability applications may include a Pacemaker application, a Corosync application, a Crmsh application, and a Distributed Replicated Block Device (DRBD) application.
  • a Pacemaker application may include a Pacemaker application, a Corosync application, a Crmsh application, and a Distributed Replicated Block Device (DRBD) application.
  • DRBD Distributed Replicated Block Device
  • the preset high availability application is installed on the primary virtual machine and the standby virtual machine, and the installed high availability application is configured, as exemplified below.
  • Threads is the starting thread, the value of threads means to start a preset number of threads to transmit heartbeat information.
  • the thread value can be modified to 1, that is, a thread is started to perform heartbeat information transmission.
  • Bindnetaddr 192.168.56.0.
  • Bindnetaddr is the IP address segment monitored by the cloud server cluster.
  • the IP address of the network card is associated with the gateway.
  • the network segment where the active virtual machine communicates can be obtained.
  • the IP address in this embodiment can be 192.168.56.101.
  • the IP address and the mask are logically ANDed to obtain 192.168.56.0.
  • To_logfile yes. Among them, set to_logfile to yes to enable local log storage.
  • Logfile /var/log/cluster/corosync.log. You can set the file directory to save the local logfile by setting the logfile. In the actual application scenario, the /var/log/cluster directory already exists. You can create the corosync.log file in the /var/log/cluster directory.
  • To_syslog yes. Among them, to_syslog can be set to write to the system log. If to_syslog is set to yes, the system log can be written to /var/log/messages.
  • the quorum indicates that the voting mechanism is enabled. Assume that the initial voting mechanism requires at least 3 votes.
  • the cloud server cluster includes the host and standby examples, and only two nodes can change the expected voting number to 2.
  • the authentication function can be used when the Corosync application is enabled, ie the key can be generated for the Corosync application.
  • Transfer the corosync key files authkey and corosync configuration files to the /etc/corosync directory of the standby virtual machine.
  • the DRBD application is a storage and replication solution that implements software, has no sharing, and mirrors block device content between servers.
  • the primary virtual machine and the standby virtual machine can all allocate a part of the space to the DRBD management.
  • the DRBD application automatically synchronizes to the standby standby.
  • the host fails, the same data can be used on the standby. Read and write operations.
  • the services of the DRBD application may be predefined and created, and the examples are as follows:
  • protocol C indicates that protocol C is used, and protocol C indicates that the write confirmation is received by the remote host, and then the write completion is considered.
  • Address 192.168.56.101:7898 indicates that the listening port of the DRBD application is set to communicate with another virtual machine.
  • Address 192.168.56.102:7898 indicates that another listening port for the DRBD application is set up to communicate with another virtual machine.
  • the partition required for the DRBD application synchronization data can also be created.
  • the storage space of the host and the backup machine is the same. You can enter the following command in the Vi command editor:
  • a preset monitoring script is added, and the preset monitoring script is used to describe a service of the preset high-availability application.
  • the preset monitoring script may include a start function, a stop function, and a monitor function.
  • adding a preset monitoring script can be exemplified as follows.
  • Services for the Pacemaker application include the Linux Standards Base (LSB) service and the OCF service.
  • the LSB service can be a script in the /etc/init.d directory.
  • Pacemaker application The LSB service can be used to start and stop the service.
  • the OCF service is an extension of the LSB service and adds services such as fault monitoring for high-availability cluster management. High availability guarantees for cloud management system services can be achieved by implementing OCF services.
  • a preset monitoring script may be added, where the preset monitoring script may be an OCF service script, and the OCF service script is an executable file, wherein the preset monitoring script may include a start function, a stop function, and a monitor function.
  • start the cloud server cluster start the cloud server cluster and set the timeout period to 20s.
  • stop function you can stop the cloud server cluster and set the timeout period to 20s.
  • monitor function you can monitor the cloud server cluster and set the timeout period to 10s and the interval to 5s.
  • the metadata function may be written.
  • the data in the xml format is output, and the data in the xml format may be the OCF service.
  • Meta information The description, parameter definitions, and command definitions for each OCF service can be described by data in xml format, and then the timeout period for configuring metadata can be 5s.
  • validate-all that is, the validity of the detected parameter.
  • the timeout of the configured validate-all is 5s.
  • S140 the service of the preset high-availability application is started to execute a preset monitoring script, and a floating IP address is set to establish a high-availability connection of the cloud server cluster.
  • starting the service of the preset high-availability application to execute the preset monitoring script and setting the floating IP address to establish a high-availability connection of the cloud server cluster can be exemplified as follows.
  • the IP address of the primary virtual machine is 192.168.56.101
  • the IP address of the standby virtual machine is 192.168.56.102
  • the virtual IP address is 192.168.56.254.
  • Cidr_netmask 24 ⁇
  • the monitoring script is used to describe the service of the preset high-availability application, start the service of the preset high-availability application, execute the preset monitoring script, and set the floating IP address to establish a high-availability connection of the cloud server cluster, which can effectively ensure the cloud. High availability of server clusters.
  • the high availability of a cloud server cluster can be measured by the reliability and maintainability of the cluster.
  • the availability of the cluster can usually be measured by Mean Time Between Failures (MTBF), and the maintainability of the cluster is measured by Mean time to repair (MTTR).
  • MTBF Mean Time Between Failures
  • MTTR Mean time to repair
  • the service carried by the cloud server cannot be executed, and the primary virtual machine and the standby virtual machine are set in the cloud server cluster, and are used on the primary virtual machine and the standby virtual machine.
  • the high-availability application is running.
  • the status information can be periodically sent to the standby virtual machine.
  • the standby virtual machine does not receive the status information sent by the active virtual machine within the preset time, The standby virtual machine can start the high-availability application and take over the current service of the active virtual machine through the floating IP address, thus ensuring high availability of the cloud server cluster.
  • the primary virtual machine returns to normal, it can send status information to the standby virtual machine, and when the standby virtual machine receives the primary virtual machine.
  • FIG. 2 is a schematic flowchart of a method for establishing a connection of a cloud server cluster according to the embodiment.
  • This embodiment is exemplified by the method in which the cloud server cluster is connected to establish a connection.
  • the device can be set in a cloud server cluster.
  • the method in this embodiment can be applied after the virtualization function of the cloud server cluster is started.
  • the method includes S210-S280.
  • the first virtual machine is installed on the host of the cloud server cluster as the primary virtual machine
  • the second virtual machine is installed as the standby virtual machine on the standby of the cloud server cluster.
  • this step can be exemplified as follows.
  • the binary installation file when installing the Virtualbox virtual machine may be a virtual desktop infrastructure (VDI) file, and the VDI file is a virtual disk image file of the VirtualBox.
  • VDI virtual desktop infrastructure
  • the name of the active virtual machine and the operating system type enabled by the virtual machine For example, the Linux operating system can be selected, and the version can be Linux2.6/3.X ( 64bit), you can also set the memory size of the active virtual machine, for example, set to 2048M, then load the hard disk file VDI of the specified virtual machine, and then create it.
  • the Linux operating system can be selected, and the version can be Linux2.6/3.X ( 64bit)
  • the VDI file for creating the primary virtual machine may be copied and the copied VDI file may be renamed, or the copied VDI file may be set to be readable and modifiable. Then follow the steps to create a primary virtual machine to recreate an alternate virtual machine.
  • the virtualization of the host and the standby device enables flexible scheduling of physical resources of the cloud server cluster and cross-domain sharing, thereby improving resource utilization.
  • a virtual Host-only network is established, and the virtual Host-only network is mounted to the primary virtual machine and the standby virtual machine.
  • the example of establishing a virtual Host-only network is as follows: Select File-->Preferences-->network-->Host-only Networks operation path in the virtual machine VirtualBox.
  • the Host-only Networks Details interface configure the IP address and network mask of the Adapter in the TAB page of the Adapter.
  • DHCP Dynamic Host Configuration Protocol
  • the active virtual machine can be set.
  • the network card of the active virtual machine is Attatched to: Host-only Adapter, and the name is vboxnet0, and then the Promiscuous Mode is set to Allow. All mode, click OK, that is, the main virtual machine
  • the virtual NIC is mounted on the host-only network plane.
  • the NIC of the standby virtual machine may be mounted to the virtual Host-only network according to the foregoing operation.
  • the DHCPServer service on the host-only NIC assigns an IP address to the virtual machine, and the assigned IP address is established.
  • the virtual Host-only network starts with the Lower Address Bound (address 192.168.56.100).
  • the DHCP server assigns the primary virtual machine an IP address of 192.168.56.101, and then starts the standby virtual machine.
  • the DHCP Server service on the Host-only network card assigns an IP address to the standby virtual machine.
  • the DHCP Server will assign the primary virtual machine an IP address of 192.168.56.102.
  • the primary virtual machine and the standby virtual machine of the cloud server cluster are used for host name resolution, and a dual-machine mutual trust mechanism is configured.
  • the host name resolution of the primary virtual machine and the standby virtual machine of the cloud server cluster may be as follows:
  • the format of the content added in the hosts file can be the network IP address of the main virtual machine (for example, 192.168.56.101); the host name or domain name of the active virtual machine (for example, Master.Cluster.com); the main virtual The host name alias of the machine (for example, Master).
  • the difference between a host name and a domain name is that the host name is usually used in the LAN, and then the host file is resolved to the corresponding IP address through the hosts file.
  • the host name of the standby virtual machine may be modified to a slave according to the method of modifying the host name of the active virtual machine to be the master.
  • a dual-machine mutual trust mechanism can be configured, that is, a key is created to allow all users who hold the key to log in to the cloud server. Cluster.
  • a first SSH passwordless login mode from the primary virtual machine to the standby virtual machine may be established; and a second SSH passwordless login mode from the standby virtual machine to the primary virtual machine is established.
  • the configuration of the dual-machine mutual trust mechanism can be exemplified as follows.
  • the ssh-keygen command can be used to generate the ssh login key.
  • the main use when not entering the directory and file name, the main use
  • the virtual machine generates the public key and key in the current directory, then enters the ssh login password, enters the password when using the key, or enters the ssh login password, which can be used to establish the first SSH from the primary virtual machine to the standby virtual machine. No password login mode, easy to use.
  • the public key and key of ssh to the active virtual machine are generated under /root/.ssh of the primary virtual machine.
  • /root/.ssh/authorized_keys modify the permissions of authorized_keys to 600.
  • the second SSH passwordless login mode from the standby virtual machine to the active virtual machine may be established according to the foregoing example, and details are not described herein again.
  • NTP Network Time Protocol
  • the number of NTP time clients is the same as the number of standby virtual machines.
  • This step can be exemplified as follows: You can install NTP time server by executing yum install-y ntp in the Vi command editor.
  • an NTP standard time server on the Internet can also be set to select the NTP standard time server closest to the user.
  • This example assumes that the cloud server cluster is implemented in Shanghai. You can configure the three NTP time servers closest to Shanghai in the ntp.conf configuration file:
  • ntp.conf After setting the ntp.conf configuration file, you can execute ntpdate-u1.cn.pool.ntp.org to force the time server to synchronize with the standard NTP time server. Then, run the service ntpd start command to restart the ntpd service. .
  • the NTP time client can be configured as an example.
  • the server 192.168.56.101 can set the IP address of the primary NTP time server.
  • the IP address of the NTP time server of the cloud server cluster is 192.168.56.101.
  • the NTP time client starts to synchronize with the NTP time server.
  • a preset high availability application is installed on the primary virtual machine and the standby virtual machine, and the installed high availability application is configured.
  • the preset high availability applications may include a Pacemaker application, a Corosync application, a Crmsh application, and a DRBD application.
  • the preset high availability application is installed on the primary virtual machine and the standby virtual machine, and the installed high availability application is configured, as exemplified below.
  • threads is the starting thread
  • the value of threads means to start a preset number of threads to transmit heartbeat information.
  • 0 is the default value.
  • the thread value can be modified to 1, that is, a thread is started to perform heartbeat information transmission.
  • Bindnetaddr 192.168.56.0.
  • Bindnetaddr is the IP address segment monitored by the cloud server cluster.
  • the IP address of the network card is associated with the gateway.
  • the network segment where the active virtual machine communicates can be obtained.
  • the IP address in this embodiment can be 192.168.56.101. It is 255.255.255.0, then the phase is 192.168.56.0.
  • To_logfile yes. Among them, set to_logfile to yes to enable local log storage.
  • Logfile /var/log/cluster/corosync.log. You can set the file directory to save the local logfile by setting the logfile. In the actual application scenario, /var/log/cluster The record already exists, you can create the corosync.log file in the /var/log/cluster directory.
  • To_syslog yes. Among them, to_syslog can be set to write to the system log. If to_syslog is set to yes, the system log can be written to /var/log/messages.
  • the quorum indicates that the voting mechanism is enabled. Assume that the initial voting mechanism requires at least 3 votes.
  • the cloud server cluster includes the host and standby examples, and only two nodes can change the expected voting number to 2.
  • the authentication function can be used when the Corosync application is enabled, ie the key can be generated for the Corosync application.
  • the file is transferred to the /etc/corosync directory of the standby VM.
  • the DRBD application is a storage and replication solution that implements software, has no sharing, and mirrors block device content between servers.
  • the primary virtual machine and the standby virtual machine can allocate a part of space to the DRBD management.
  • the DRBD application automatically synchronizes to the standby standby.
  • the host fails, the same data can be used on the standby. Read and write operations.
  • the services of the DRBD application may be predefined and created, and the examples are as follows:
  • protocol C indicates that protocol C is used, and protocol C indicates that the write confirmation is received by the remote host, and then the write completion is considered.
  • Address 192.168.56.101:7898 indicates that the listening port of the DRBD application is set to communicate with another virtual machine.
  • Address 192.168.56.102:7898 indicates that another listening port for the DRBD application is set up to communicate with another virtual machine.
  • the partition required for the DRBD application synchronization data can also be created.
  • the storage space of the host and the backup machine is the same. You can enter the following command in the Vi command editor:
  • a preset monitoring script is added, and the preset monitoring script is used to describe the service of the preset high-availability application.
  • the preset monitoring script may include a start function, a stop function, and a monitor function.
  • adding a preset monitoring script can be exemplified as follows:
  • Services for Pacemaker applications can include LSB services and OCF services, where the LSB service is a Linux standard service, usually a script in the /etc/init.d directory.
  • the Pacemaker application can use the LSB service to start and stop services.
  • the OCF service is an extension of the LSB service, adding features such as fault monitoring and other services for high-availability cluster management. High availability guarantees for cloud management system services can be achieved by implementing OCF services.
  • a preset monitoring script may be added, where the preset monitoring script may be an OCF service script, and the OCF service script is an executable file, where the preset monitoring script includes a start function, a stop function, and a monitor function.
  • start the cloud server cluster start the cloud server cluster and set the timeout period to 20s.
  • stop function you can stop the cloud server cluster and set the timeout period to 20s.
  • monitor function you can monitor the cloud server cluster and set the timeout period to 10s and the interval to 5s.
  • the metadata function may be written.
  • the data in the xml format may be output, and the data in the xml format may be the OCF service.
  • Meta information The description, parameter definition and command definition of each OCF service can be described by the data in xml format, and then the timeout period of the metadata can be configured to be 5s.
  • validate-all that is, the validity of the detected parameter.
  • the timeout of the configured validate-all is 5s.
  • a service of the preset high availability application is started to execute a preset monitoring script, and a floating IP address is set to establish a high availability connection of the cloud server cluster.
  • starting the service of the preset high-availability application to execute the preset monitoring script and setting the floating IP address to establish a high-availability connection of the cloud server cluster can be exemplified as follows.
  • the IP address of the primary virtual machine is 192.168.56.101
  • the IP address of the standby virtual machine is 192.168.56.102
  • the virtual IP address is 192.168.56.254.
  • Cidr_netmask 24 ⁇
  • the network IP address is expanded in the size of the cloud server cluster, which can greatly save the IP address resources. At the same time, only one IP address is used.
  • the cloud server cluster fails, the user does not need to change the access IP address when the host and the standby switch are switched. User experience.
  • the preset monitoring script is added, and the preset monitoring script is written by the cloud server cluster administrator.
  • the cloud server cluster can be started, monitored, and stopped by the preset preset monitoring script, and the cloud server cluster can be monitored. Conduct intelligent, efficient and secure control.
  • Install a preset high-availability application by configuring the dual-machine mutual trust mechanism between the active virtual machine and the standby virtual machine of the cloud server cluster, configure the installed high-availability application, and add preset monitoring feet.
  • the preset monitoring script is used to describe the service of the preset high-availability application, start the service of the preset high-availability application, execute the preset monitoring script, and set the floating IP address to establish a high-availability connection of the cloud server cluster. Effectively ensure high availability of cloud server clusters.
  • FIG. 3 is a schematic structural diagram of an apparatus for establishing a connection of a cloud server cluster according to the embodiment.
  • the device can be set in a cloud server cluster.
  • the apparatus 30 can include a parsing module 301, a configuration module 302, an adding module 303, and a launching module 304.
  • the parsing module 301 is configured to perform host name resolution on the active virtual machine and the standby virtual machine of the cloud server cluster, and configure a dual-machine mutual trust mechanism.
  • the parsing module 301 is further configured to: establish a first SSH passwordless login mode from the primary virtual machine to the standby virtual machine; and establish a second SSH passwordless login mode from the standby virtual machine to the primary virtual machine. .
  • the configuration module 302 is configured to install a preset high availability application on the primary virtual machine and the standby virtual machine, and configure the installed high availability application.
  • the adding module 303 is configured to add a preset monitoring script, and the preset monitoring script is used to describe a service of the preset high-availability application.
  • the preset monitoring script may include a start function, a stop function, and a monitor function.
  • the startup module 304 is configured to start a service of the preset high availability application to execute a preset monitoring script and set a floating IP address to establish a high availability connection of the cloud server cluster.
  • the apparatus 30 may further include:
  • the installation module 305 is configured to install the first virtual machine on the host of the cloud server cluster as the primary virtual machine, and install the second virtual machine as the standby virtual machine on the standby of the cloud server cluster.
  • the establishing module 306 is configured to establish a virtual Host-only network and mount the virtual Host-only network to the primary virtual machine and the standby virtual machine.
  • the setting module 307 is configured to set an NTP time server of the Host-only network and configure an NTP time client.
  • the number of NTP time clients is the same as the number of standby virtual machines.
  • the module 308 is enabled to be set to enable the virtualization function of the cloud server cluster.
  • the dual-machine mutual trust mechanism of the active virtual machine and the standby virtual machine of the cloud server cluster is configured to install a preset high-availability application, and the installed high-availability application is configured, and a preset monitoring script is added.
  • the preset monitoring script is used to describe the service of the preset high-availability application, start the service of the preset high-availability application, execute the preset monitoring script, and set the floating IP address to establish a high-availability connection of the cloud server cluster, which can effectively ensure High availability for cloud server clusters.
  • FIG. 9 is a schematic diagram of a hardware structure of a cloud server according to this embodiment.
  • the cloud server includes a processor 410 and a memory 420; and may further include a communications interface 430 and a bus 440.
  • the processor 410, the memory 420, and the communication interface 430 can complete communication with each other through the bus 440.
  • Communication interface 430 can be used for information transmission.
  • the processor 410 can invoke the logic instructions in the memory 420 to perform the method of establishing a connection by any one of the cloud server clusters in the above embodiments.
  • the logic instructions in the memory 420 described above may be implemented in the form of software functional units and sold or used as separate products, and may be stored in a computer readable storage medium.
  • the technical solution of the present disclosure may be embodied in the form of a software product stored in a storage medium, including a plurality of instructions for causing a computer device (which may be a personal computer, a server, or a network) The device or the like) performs all or part of the steps of the method described in this embodiment.
  • the foregoing storage medium may be a non-transitory storage medium, including: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
  • Any process or method description in the flowcharts or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a particular logical function or process. And the scope of the above embodiments includes an additional implementation in which The functions are performed in the order shown or discussed, including in a substantially simultaneous manner or in the reverse order, depending on the functionality involved.
  • the technical solution of the embodiment may be implemented by hardware, software, firmware, or a combination thereof.
  • multiple steps or methods may be implemented in software or hardware stored in a memory and executed by a suitable instruction execution system.
  • the hardware can include discrete logic circuits with logic gates for implementing logic functions on data signals, application specific integrated circuits with suitable combinational logic gates, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs) )Wait.
  • All or part of the steps carried by the method of the above embodiment may also be completed by a program to instruct related hardware, and the program may be stored in a computer readable storage medium, and when executed, the steps of the method embodiment are included.
  • the program may be stored in a computer readable storage medium, and when executed, the steps of the method embodiment are included.
  • the multiple functional units in this embodiment may be integrated into one processing module, or each unit may exist physically separately, or two or more units may be integrated into one module.
  • the above integrated modules can be implemented in the form of hardware or in the form of software functional modules.
  • the integrated modules, if implemented in the form of software functional modules and sold or used as stand-alone products, may also be stored in a computer readable storage medium.
  • the present disclosure provides a method and apparatus for establishing a connection of a cloud server cluster, which can ensure high availability of a cloud server cluster.

Abstract

A method and device for establishing a connection of a cloud server cluster. The method for establishing a connection of a cloud server cluster comprises: performing host name resolution on a primary virtual machine and a backup virtual machine of a cloud server cluster, and configuring a dual-machine confidence building mechanism; mounting a preset highly available application on the primary virtual machine and the backup virtual machine, and configuring the mounted highly available application; adding a preset monitoring script which is used for describing a service of the preset highly available application; and starting the service of the preset highly available application to execute the preset monitoring script, and setting a floating Internet protocol (IP) address to establish a highly available connection of the cloud server cluster.

Description

云服务器集群建立连接的方法和装置Method and device for establishing connection of cloud server cluster 技术领域Technical field
本公开涉及云服务器技术领域,例如涉及一种云服务器集群建立连接的方法和装置。The present disclosure relates to the field of cloud server technologies, for example, to a method and apparatus for establishing a connection of a cloud server cluster.
背景技术Background technique
云服务器宕机可能会给企业带来损失,当承载业务系统的主机出现故障,需要在短时间内切换到备机。实现这种应用需求的技术是“高可用集群技术”,它是一种以减少服务中断时间为目的的服务器集群技术,保护用户的业务应用系统对外不间断地提供服务,把因软件、硬件或人为造成的故障对业务的影响降低到最小程度。Cloud server downtime may bring losses to the enterprise. When the host hosting the service system fails, it needs to switch to the standby machine in a short time. The technology to achieve this application requirement is "high-availability cluster technology", which is a server cluster technology aimed at reducing service interruption time, protecting users' business application systems from providing uninterrupted services to software, hardware or The impact of human-induced failures on the business is minimized.
虚拟化管理软件只监管虚拟机本身,当虚拟机出现问题时才进行虚拟机的迁移,并且对于虚拟机上的服务组成集群、定义服务启动的顺序,克隆虚拟机上的服务、定义服务故障次数等功能都不完善,云服务器集群的高可用性差。The virtualization management software only supervises the virtual machine itself. When the virtual machine has a problem, the virtual machine is migrated, and the services on the virtual machine form a cluster, define the order in which the services are started, clone the services on the virtual machine, and define the number of service failures. The functions are not perfect, and the high availability of the cloud server cluster is poor.
发明内容Summary of the invention
本公开提出了一种云服务器集群建立连接的方法和装置,能够确保云服务器集群的高可用性。The present disclosure proposes a method and apparatus for establishing a connection of a cloud server cluster, which can ensure high availability of a cloud server cluster.
本实施例提出了云服务器集群建立连接的方法,包括:对云服务器集群的主用虚拟机和备用虚拟机作主机名解析,并配置双机互信机制;在所述主用虚拟机和所述备用虚拟机上安装预设高可用应用,并对安装后的高可用应用进行配置;添加预设监控脚本,所述预设监控脚本用于描述所述预设高可用应用的服务;启动所述预设高可用应用的服务,以执行所述预设监控脚本,并设置浮动网络之间互连的协议(Internet Protocol,IP)地址,以建立所述云服务器集群的高可用连接。 This embodiment provides a method for establishing a connection between a cloud server cluster, including: performing host name resolution on the primary virtual machine and the standby virtual machine of the cloud server cluster, and configuring a dual-machine mutual trust mechanism; in the primary virtual machine and the Installing a preset high-availability application on the standby virtual machine, and configuring the installed high-availability application; adding a preset monitoring script, where the preset monitoring script is used to describe the service of the preset high-availability application; Presetting the service of the highly available application to execute the preset monitoring script and setting an Internet Protocol (IP) address interconnected between the floating networks to establish a highly available connection of the cloud server cluster.
本实施例提出了云服务器集群建立连接的装置,包括:解析模块,设置为对云服务器集群的主用虚拟机和备用虚拟机作主机名解析,并配置双机互信机制;配置模块,设置为在所述主用虚拟机和所述备用虚拟机上安装预设高可用应用,并对安装后的高可用应用进行配置;添加模块,设置为添加预设监控脚本,所述预设监控脚本用于描述所述预设高可用应用的服务;启动模块,设置为启动所述预设高可用应用的服务,以执行所述预设监控脚本,并设置浮动IP地址,以建立所述云服务器集群的高可用连接。This embodiment provides a device for establishing a connection between a cloud server cluster, and includes: a parsing module, configured to perform host name resolution on the primary virtual machine and the standby virtual machine of the cloud server cluster, and configure a dual-machine mutual trust mechanism; the configuration module is set to Installing a preset high-availability application on the primary virtual machine and the standby virtual machine, and configuring the installed high-availability application; adding a module, adding a preset monitoring script, where the preset monitoring script is used Describe the service of the preset high-availability application; the startup module is configured to start the service of the preset high-availability application, execute the preset monitoring script, and set a floating IP address to establish the cloud server cluster Highly available connection.
本实施例还提供一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令用于执行上述云服务器集群建立连接的方法。The embodiment further provides a computer readable storage medium storing computer executable instructions for executing the method for establishing a connection by the cloud server cluster.
本实施例还提供一种云服务器,该云服务器包括一个或多个处理器、存储器以及一个或多个程序,所述一个或多个程序存储在存储器中,当被一个或多个处理器执行时,执行上述云服务器集群建立连接的方法。The embodiment further provides a cloud server, the cloud server comprising one or more processors, a memory and one or more programs, the one or more programs being stored in the memory when executed by one or more processors The method of establishing a connection by the above cloud server cluster is performed.
本实施例还提供了一种计算机程序产品,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,使所述计算机执行上述云服务器集群建立连接的方法。The embodiment further provides a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions, when the program instructions are executed by a computer a method of causing the computer to perform a connection establishment of the cloud server cluster.
本实施例提出了云服务器集群建立连接的方法和装置,通过配置云服务器集群的主用虚拟机和备用虚拟机的双机互信机制,安装预设高可用应用,并对安装后的高可用应用进行配置,以及添加预设监控脚本,预设监控脚本用于描述预设高可用应用的服务,启动预设高可用应用的服务,以执行预设监控脚本,并设置浮动IP,以建立云服务器集群的高可用连接,能够有效确保云服务器集群的高可用性。This embodiment provides a method and device for establishing a connection between a cloud server cluster, and configuring a dual-machine mutual trust mechanism of the primary virtual machine and the standby virtual machine of the cloud server cluster to install a preset high-availability application, and installing the highly available application after installation. Configure and add a preset monitoring script. The preset monitoring script is used to describe the service of the preset high-availability application, start the service of the preset high-availability application, execute the preset monitoring script, and set the floating IP to establish the cloud server. The cluster's highly available connections ensure high availability of cloud server clusters.
附图说明DRAWINGS
图1是本实施例提出的云服务器集群建立连接的方法的流程示意图。FIG. 1 is a schematic flowchart of a method for establishing a connection of a cloud server cluster according to the embodiment.
图2是本实施例提出的云服务器集群建立连接的方法的流程示意图。2 is a schematic flowchart of a method for establishing a connection of a cloud server cluster according to the embodiment.
图3是本实施例提出的云服务器集群建立连接的装置的结构示意图。 FIG. 3 is a schematic structural diagram of an apparatus for establishing a connection of a cloud server cluster according to the embodiment.
图4是本实施例提出的云服务器集群建立连接的装置的结构示意图。FIG. 4 is a schematic structural diagram of an apparatus for establishing a connection of a cloud server cluster according to the embodiment.
图5是本实施例提供的云服务器的硬件结构示意图。FIG. 5 is a schematic structural diagram of a hardware of a cloud server according to this embodiment.
具体实施方式detailed description
下面对实施例进行相关描述,所述实施例的示例在附图中示出,相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,仅用于解释本公开,而不能理解为对本公开的限制。在不冲突的情况下,以下实施例和实施例中的特征可以相互组合。The embodiments are described in the following, and the examples of the embodiments are shown in the drawings, and the same or similar reference numerals indicate the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are intended to be illustrative only, and are not to be construed as limiting. The features of the following embodiments and embodiments may be combined with each other without conflict.
图1是本实施例提出的云服务器集群建立连接的方法的流程示意图。FIG. 1 is a schematic flowchart of a method for establishing a connection of a cloud server cluster according to the embodiment.
本实施例以该方法被配置在云服务器集群建立连接的装置中来举例说明。其中,该装置可以设置在云服务器集群中。This embodiment is exemplified by the method in which the cloud server cluster is connected to establish a connection. The device can be set in a cloud server cluster.
本实施例的方法可以应用在云服务器集群的虚拟化功能启动后。The method in this embodiment can be applied after the virtualization function of the cloud server cluster is started.
参见图1,该方法可以包括S110-S140。Referring to Figure 1, the method can include S110-S140.
在S110中,对云服务器集群的主用虚拟机和备用虚拟机作主机名解析,并配置双机互信机制。In S110, the primary virtual machine and the standby virtual machine of the cloud server cluster are used for host name resolution, and a dual-machine mutual trust mechanism is configured.
可选地,对云服务器集群的主用虚拟机和备用虚拟机作主机名解析可以示例如下:Optionally, the host name resolution of the primary virtual machine and the standby virtual machine of the cloud server cluster may be as follows:
例如,可以在主用虚拟机的节点上,在Vi命令编辑界面中编辑路径为/etc/hosts文件,在hosts文件中添加以下内容:For example, on the node of the active virtual machine, edit the path to the /etc/hosts file in the Vi command editing interface, and add the following content to the hosts file:
192.168.56.101 Master.Cluster.com Master;192.168.56.101 Master.Cluster.com Master;
192.168.56.102 Slave.Cluster.com Slave;192.168.56.102 Slave.Cluster.com Slave;
其中,hosts文件中所添加内容的格式可以为主用虚拟机的网络IP地址(例如,192.168.56.101);主用虚拟机的主机名或域名(例如,Master.Cluster.com);主用虚拟机的主机名别名(例如,Master)。主机名和域名的区别包括:通常在局域网内使用主机名,随后通过hosts文件,主机名被解析到对应IP地址。The format of the content added in the hosts file can be the network IP address of the main virtual machine (for example, 192.168.56.101); the host name or domain name of the active virtual machine (for example, Master.Cluster.com); the main virtual The host name alias of the machine (for example, Master). The difference between the host name and the domain name includes: usually using the host name in the LAN, and then through the hosts file, the host name is resolved to the corresponding IP address.
还可以在Vi命令编辑界面中修改主用虚拟机上的/etc/sysconfig/network 文件,将network文件中的HOSTNAME修改为HOSTNAME=Master。通过这种方式,在再次重启云服务器的主机,登录主用虚拟机时,主用虚拟机的主机名可以修改为Master。You can also modify /etc/sysconfig/network on the active VM in the Vi command editing interface. File, modify the HOSTNAME in the network file to HOSTNAME=Master. In this way, when you restart the host of the cloud server and log in to the active VM, the host name of the active VM can be changed to Master.
可选地,可以按照上述将主用虚拟机的主机名修改为Master的方法,将备用虚拟机的主机名为修改为Slave。Optionally, the host name of the standby virtual machine may be modified to a slave according to the method of modifying the host name of the active virtual machine to be the master.
可选地,在对主用虚拟机和备用虚拟机的主机名进行解析后,可以配置双机互信机制,即创建一个密钥(key),以允许所有持有这个密钥的用户登录云服务器集群。Optionally, after the host names of the active virtual machine and the standby virtual machine are parsed, a dual-machine mutual trust mechanism can be configured, that is, a key is created to allow all users who hold the key to log in to the cloud server. Cluster.
可选地,可以建立从主用虚拟机到备用虚拟机的第一安全外壳协议(Secure Shell,SSH)无密码登录模式;以及建立从备用虚拟机到主用虚拟机的第二SSH无密码登录模式。Optionally, a first Secure Shell (SSH) passwordless login mode from the primary virtual machine to the standby virtual machine may be established; and a second SSH passwordless login is established from the standby virtual machine to the primary virtual machine. mode.
可选地,配置双机互信机制可以示例如下。Optionally, the configuration of the dual-machine mutual trust mechanism can be exemplified as follows.
例如,可以在主用虚拟机上使用ssh-keygen命令创建一个SSH密钥,并激活SSH密钥,其中,ssh-keygen命令可以用来生成ssh登录的key,可以在远程登录主用虚拟机时无需再输入远程主用虚拟机的key,输入公钥和密钥所在的目录和文件名,可以存储在目录/root/.ssh下。可选地,在不输入目录和文件名时,主用虚拟机会在当前目录下生成公钥和密钥,随后输入ssh登录密码,输入使用key时的密码,也可以不输入ssh登录密码,可以实现建立从主用虚拟机到备用虚拟机的第一SSH无密码登录模式,方便使用。For example, you can use the ssh-keygen command on the active VM to create an SSH key and activate the SSH key. The ssh-keygen command can be used to generate the ssh login key. You can log in to the active VM remotely. Instead of entering the key of the remote active virtual machine, enter the directory and file name where the public key and key are located, which can be stored in the directory /root/.ssh. Optionally, when the directory and file name are not entered, the primary virtual machine generates a public key and a key in the current directory, and then inputs the ssh login password, enters the password when the key is used, or does not enter the ssh login password. The first SSH passwordless login mode from the primary virtual machine to the standby virtual machine is established, which is convenient to use.
并且在主用虚拟机的/root/.ssh下生成了ssh到主用虚拟机的公钥和密钥。还可以将主用虚拟机上生成的公钥文件Master_rsa.pub拷贝到备用虚拟机的/root/.ssh下,以及将主用虚拟机上生成的公钥文件Master_rsa.pub拷贝到备用虚拟机的/root/.ssh/authorized_keys中,并将authorized_keys的权限修改为600,通过该示例中的步骤,可以建立从主用虚拟机到备用虚拟机的第一SSH无密码登录模式。And the public key and key of ssh to the active virtual machine are generated under /root/.ssh of the primary virtual machine. You can also copy the public key file Master_rsa.pub generated on the primary virtual machine to /root/.ssh of the standby virtual machine, and copy the public key file Master_rsa.pub generated on the primary virtual machine to the standby virtual machine. In /root/.ssh/authorized_keys, modify the permissions of authorized_keys to 600. Through the steps in this example, you can establish the first SSH passwordless login mode from the primary virtual machine to the standby virtual machine.
可选地,也可以按照上述示例,建立从备用虚拟机到主用虚拟机的第二SSH无密码登录模式。 Optionally, the second SSH passwordless login mode from the standby virtual machine to the active virtual machine may also be established according to the above example.
在S120中,在主用虚拟机和备用虚拟机上安装预设高可用应用,并对安装后的高可用应用进行配置。In S120, a preset high availability application is installed on the primary virtual machine and the standby virtual machine, and the installed high availability application is configured.
可选地,预设高可用应用可以包括Pacemaker应用、Corosync应用、Crmsh应用,以及分布式复制块设备(Distributed Replicated Block Device,DRBD)应用。Optionally, the preset high availability applications may include a Pacemaker application, a Corosync application, a Crmsh application, and a Distributed Replicated Block Device (DRBD) application.
可选地,在主用虚拟机和备用虚拟机上安装预设高可用应用,并对安装后的高可用应用进行配置,可以示例如下。Optionally, the preset high availability application is installed on the primary virtual machine and the standby virtual machine, and the installed high availability application is configured, as exemplified below.
例如,在主用虚拟机上执行命令:yum install-y pacemaker corosync crmsh drbd。在安装Pacemaker应用、Corosync应用、Crmsh应用,以及DRBD应用完毕后,可以配置Corosync应用,即在路径cd/etc/corosync下,执行命令scp corosync.conf.example corosync.conf,即复制Corosync应用的配置文件,例如可以通过Vi命令编辑器修改修改的内容如下:For example, execute the command on the primary virtual machine: yum install-y pacemaker corosync crmsh drbd. After installing the Pacemaker application, the Corosync application, the Crmsh application, and the DRBD application, you can configure the Corosync application. In the path cd/etc/corosync, execute the command scp corosync.conf.example corosync.conf, which copies the configuration of the Corosync application. The file, for example, can be modified by the Vi command editor as follows:
threads:1。其中,threads为启动的线程,threads的值表示启动预设数量个线程来进行心跳信息传递,在云服务器集群节点比较多且当主机多核时,可以启动多个线程来监控,0为默认值,本实施例可以将threads值修改为1,即启动一个线程来进行心跳信息传递。Threads: 1. Among them, threads is the starting thread, the value of threads means to start a preset number of threads to transmit heartbeat information. When there are many nodes in the cloud server cluster and when the host is multi-core, multiple threads can be started to monitor, 0 is the default value. In this embodiment, the thread value can be modified to 1, that is, a thread is started to perform heartbeat information transmission.
bindnetaddr:192.168.56.0。其中,bindnetaddr为云服务器集群监控的IP地址段,将网卡的IP地址与网关相与,可以得出主用虚拟机通信的网段,本实施例中的IP地址可以为192.168.56.101,掩码为255.255.255.0,将IP地址和掩码进行逻辑与运算,得到192.168.56.0。Bindnetaddr: 192.168.56.0. Bindnetaddr is the IP address segment monitored by the cloud server cluster. The IP address of the network card is associated with the gateway. The network segment where the active virtual machine communicates can be obtained. The IP address in this embodiment can be 192.168.56.101. For 255.255.255.0, the IP address and the mask are logically ANDed to obtain 192.168.56.0.
to_logfile:yes。其中,将to_logfile设置为yes可以开启本地日志存储。To_logfile:yes. Among them, set to_logfile to yes to enable local log storage.
logfile:/var/log/cluster/corosync.log。其中,可以通过设置logfile,设置保存本地logfile的文件目录,在实际应用场景中,/var/log/cluster目录已经存在,可以创建/var/log/cluster目录下的corosync.log文件。Logfile: /var/log/cluster/corosync.log. You can set the file directory to save the local logfile by setting the logfile. In the actual application scenario, the /var/log/cluster directory already exists. You can create the corosync.log file in the /var/log/cluster directory.
to_syslog:yes。其中,通过to_syslog可以设置是否写入系统日志,如果将to_syslog设置为yes,则可以系统日志写入/var/log/messages。 To_syslog: yes. Among them, to_syslog can be set to write to the system log. If to_syslog is set to yes, the system log can be written to /var/log/messages.
Figure PCTCN2017077738-appb-000001
Figure PCTCN2017077738-appb-000001
其中,quorum表示启用投票机制,假设初始投票机制需要至少3票,在本实施例中,以云服务器集群包含主机和备机示例,只有2个节点,则可以将期望投票数修改为2。two_node:1,其中,表示云服务器集群包含主机和备机2个节点时,只需要投1票,主要可以用于主机。The quorum indicates that the voting mechanism is enabled. Assume that the initial voting mechanism requires at least 3 votes. In this embodiment, the cloud server cluster includes the host and standby examples, and only two nodes can change the expected voting number to 2. Two_node: 1, which means that when the cloud server cluster contains two nodes, the host and the standby, only one vote is required, which can be mainly used for the host.
可选地,在启用Corosync应用时可以使用认证功能,即可以给Corosync应用生成密钥。例如,可以在主用虚拟机上使用corosync-keygen命令给Corosync应用生成key,可以将生成的密钥文件保存在/etc/corosync/authkey路径中。将corosync的密钥文件authkey和corosync的配置文件传输至备用虚拟机的/etc/corosync目录下。可以执行service corosync start启动corosync应用服务,在启动完毕后,可以检测corosync是否正常启动。Optionally, the authentication function can be used when the Corosync application is enabled, ie the key can be generated for the Corosync application. For example, you can use the corosync-keygen command on the primary virtual machine to generate a key for the Corosync application. You can save the generated key file in the /etc/corosync/authkey path. Transfer the corosync key files authkey and corosync configuration files to the /etc/corosync directory of the standby virtual machine. You can run the service corosync start to start the corosync application service. After the startup is complete, you can detect whether the corosync starts normally.
其中,DRBD应用是用软件实现、无共享,服务器之间镜像块设备内容的存储复制解决方案。例如,主用虚拟机和备用虚拟机可以均分出一部分空间给DRBD管理,当主机上的数据被修改会被DRBD应用自动同步到备机备机,当主机故障时,可以对备机上相同数据进行读写操作。Among them, the DRBD application is a storage and replication solution that implements software, has no sharing, and mirrors block device content between servers. For example, the primary virtual machine and the standby virtual machine can all allocate a part of the space to the DRBD management. When the data on the host is modified, the DRBD application automatically synchronizes to the standby standby. When the host fails, the same data can be used on the standby. Read and write operations.
可选地,可以预先定义和创建DRBD应用的服务,可以示例如下:Optionally, the services of the DRBD application may be predefined and created, and the examples are as follows:
在Vi命令编辑器中输入以下命令:Enter the following command in the Vi command editor:
Figure PCTCN2017077738-appb-000002
Figure PCTCN2017077738-appb-000002
Figure PCTCN2017077738-appb-000003
Figure PCTCN2017077738-appb-000003
其中,protocol C表示使用协议C,协议C表示收到远程主机的写入确认后,则认为写入完成。address 192.168.56.101:7898表示设置DRBD应用的监听端口,用于与另一台虚拟机进行通信。address 192.168.56.102:7898表示设置DRBD应用的另一个监听端口,用于与另一台虚拟机进行通信。Wherein, protocol C indicates that protocol C is used, and protocol C indicates that the write confirmation is received by the remote host, and then the write completion is considered. Address 192.168.56.101:7898 indicates that the listening port of the DRBD application is set to communicate with another virtual machine. Address 192.168.56.102:7898 indicates that another listening port for the DRBD application is set up to communicate with another virtual machine.
可选地,也可以创建DRBD应用同步数据时所需要的分区,主机和备机的存储空间一致,可以在Vi命令编辑器中输入以下命令:Optionally, the partition required for the DRBD application synchronization data can also be created. The storage space of the host and the backup machine is the same. You can enter the following command in the Vi command editor:
fdisk/dev/sdc;Fdisk/dev/sdc;
drbdadm create-md mysql;Drbdadm create-md mysql;
service drbd start。Service drbd start.
以及,可以设置主用虚拟机为DRBD应用的主节点,仅在主用虚拟机上的Vi命令编辑器中输入以下命令:And, you can set the primary virtual machine to be the primary node of the DRBD application. Enter the following command only in the Vi command editor on the primary virtual machine:
drbdadm——overwrite-data-of-peer primary mysql。Drbdadm - overwrite-data-of-peer primary mysql.
可选地,也可以创建文件系统,可以Vi命令编辑器中输入以下命令:Optionally, you can also create a file system, you can enter the following command in the Vi command editor:
mkfs-t ext4/dev/drbd0。Mkfs-t ext4/dev/drbd0.
在S130中,添加预设监控脚本,预设监控脚本用于描述预设高可用应用的服务。In S130, a preset monitoring script is added, and the preset monitoring script is used to describe a service of the preset high-availability application.
其中,预设监控脚本中可以包含start函数、stop函数,以及monitor函数。The preset monitoring script may include a start function, a stop function, and a monitor function.
可选地,添加预设监控脚本可以如下示例。Optionally, adding a preset monitoring script can be exemplified as follows.
Pacemaker应用的服务包括Linux标准库(Linux Standards Base,LSB)服务和OCF服务。LSB服务可以是/etc/init.d目录下的脚本。Pacemaker应用 可以用LSB服务来启停服务。OCF服务是对LSB服务的扩展,增加了高可用集群管理的功能如故障监控等服务。可通过实现OCF服务可以对云管理系统服务进行高可用保障。Services for the Pacemaker application include the Linux Standards Base (LSB) service and the OCF service. The LSB service can be a script in the /etc/init.d directory. Pacemaker application The LSB service can be used to start and stop the service. The OCF service is an extension of the LSB service and adds services such as fault monitoring for high-availability cluster management. High availability guarantees for cloud management system services can be achieved by implementing OCF services.
可选地,可以添加预设监控脚本,该预设监控脚本可以为OCF服务脚本,OCF服务脚本是可执行文件,其中,预设监控脚本中可以包含start函数、stop函数,以及monitor函数。Optionally, a preset monitoring script may be added, where the preset monitoring script may be an OCF service script, and the OCF service script is an executable file, wherein the preset monitoring script may include a start function, a stop function, and a monitor function.
可选地,在start函数中,对云服务器集群进行启动,并设置超时时间为20s。在stop函数中,可以对云服务器集群进行停止,并设置超时时间为20s。在monitor函数中,可以对云服务器集群进行监控,并设置超时时间为10s,间隔时间为5s。Optionally, in the start function, start the cloud server cluster and set the timeout period to 20s. In the stop function, you can stop the cloud server cluster and set the timeout period to 20s. In the monitor function, you can monitor the cloud server cluster and set the timeout period to 10s and the interval to 5s.
可选地,在OCF服务脚本中,可以编写metadata函数,在执行metadata函数后,在Vi命令编辑界面输入meta-data命令时,会输出xml格式的数据,该xml格式的数据可以为OCF服务的元信息。每个OCF服务的说明、参数定义和命令定义都可以由xml格式的数据说明,随后可以配置metadata的超时时间为5s。Optionally, in the OCF service script, the metadata function may be written. After the metadata function is executed, when the meta-data command is input in the Vi command editing interface, the data in the xml format is output, and the data in the xml format may be the OCF service. Meta information. The description, parameter definitions, and command definitions for each OCF service can be described by data in xml format, and then the timeout period for configuring metadata can be 5s.
可选地,在OCF服务脚本中,还可以定义validate-all,即检测参数的合法性,配置的validate-all的超时时间为5s。Optionally, in the OCF service script, you can also define validate-all, that is, the validity of the detected parameter. The timeout of the configured validate-all is 5s.
在S140中,启动预设高可用应用的服务,以执行预设监控脚本,并设置浮动IP地址,以建立云服务器集群的高可用连接。In S140, the service of the preset high-availability application is started to execute a preset monitoring script, and a floating IP address is set to establish a high-availability connection of the cloud server cluster.
可选地,启动预设高可用应用的服务,以执行预设监控脚本,并设置浮动IP地址,以建立云服务器集群的高可用连接可以示例如下。Optionally, starting the service of the preset high-availability application to execute the preset monitoring script and setting the floating IP address to establish a high-availability connection of the cloud server cluster can be exemplified as follows.
例如,主用虚拟机的IP地址为192.168.56.101,备用虚拟机的IP地址为192.168.56.102,浮动IP地址即虚拟IP地址为192.168.56.254。For example, the IP address of the primary virtual machine is 192.168.56.101, the IP address of the standby virtual machine is 192.168.56.102, and the virtual IP address is 192.168.56.254.
将主用虚拟机和备用虚拟机的Vi命令编辑模式切换到crm命令行编辑模式下,使用如下的命令:To switch the Vi command edit mode of the active virtual machine and the standby virtual machine to the crm command line edit mode, use the following command:
configure primitive vip ocf:heartbeat:IPaddr2\;Configure primitive vip ocf:heartbeat:IPaddr2\;
params ip=192.168.56.254\; Params ip=192.168.56.254\;
nic=eth0\;Nic=eth0\;
cidr_netmask=24\;Cidr_netmask=24\;
op start timeout=20s interval=0s on-fail=stop\;Op start timeout=20s interval=0s on-fail=stop\;
op monitor timeout=20s interval=10s on-fail=restart\;Op monitor timeout=20s interval=10s on-fail=restart\;
op stop timeout=20s interval=0s on-fail=block\;Op stop timeout=20s interval=0s on-fail=block\;
verify;Verify
commit;Commit;
可选地,可以创建云服务器集群服务,并设定云服务器集群的启动、停止、监控的超时时间。如果主用虚拟机上的云服务器集群异常,可以被OCF服务脚本中的monitor监控到。根据用户创建时指定的操作,决定是在主机启动几次后,再切换到备机,还是直接切换到备机。Optionally, you can create a cloud server cluster service and set the timeout period for starting, stopping, and monitoring the cloud server cluster. If the cloud server cluster on the primary virtual machine is abnormal, it can be monitored by the monitor in the OCF service script. According to the operation specified when the user is created, it is decided to switch to the standby machine after the host starts several times, or directly switch to the standby machine.
可选地,通过配置云服务器集群的主用虚拟机和备用虚拟机的双机互信机制,安装预设高可用应用,并对安装后的高可用应用进行配置,以及添加预设监控脚本,预设监控脚本用于描述预设高可用应用的服务,启动预设高可用应用的服务,以执行预设监控脚本,并设置浮动IP地址,以建立云服务器集群的高可用连接,能够有效确保云服务器集群的高可用性。Optionally, by configuring a dual-machine mutual trust mechanism between the active virtual machine and the standby virtual machine of the cloud server cluster, installing a preset high-availability application, configuring the installed high-availability application, and adding a preset monitoring script, The monitoring script is used to describe the service of the preset high-availability application, start the service of the preset high-availability application, execute the preset monitoring script, and set the floating IP address to establish a high-availability connection of the cloud server cluster, which can effectively ensure the cloud. High availability of server clusters.
云服务器集群的高可用(High Available)可以通过集群的可靠性和可维护性来衡量。通常可以用平均无故障时间(Mean Time Between Failures,MTBF)来衡量集群的可用性,用平均维修时间(Mean time to repair,MTTR)来衡量集群的可维护性。The high availability of a cloud server cluster can be measured by the reliability and maintainability of the cluster. The availability of the cluster can usually be measured by Mean Time Between Failures (MTBF), and the maintainability of the cluster is measured by Mean time to repair (MTTR).
可选地,为了防止云服务器宕机时,云服务器承载的业务无法被执行的情况出现,在云服务器集群中设置主用虚拟机和备用虚拟机,并在主用虚拟机和备用虚拟机上均运行高可用应用,主用虚拟机正常工作情况下,可以周期性地向备用虚拟机发送状态信息,当备用虚拟机在预设时间内未收到主用虚拟机发送的状态信息时,则备用虚拟机可以启动高可用应用,并通过浮动IP地址接管主用虚拟机的当前业务,从而确保云服务器集群的高可用性。当主用虚拟机回复正常时,可以向备用虚拟机发送状态信息,当备用虚拟机收到主用虚拟机的 状态信息时,可以选择释放该浮动IP地址,并由主用虚拟机接管当前业务。Optionally, in order to prevent the cloud server from being down, the service carried by the cloud server cannot be executed, and the primary virtual machine and the standby virtual machine are set in the cloud server cluster, and are used on the primary virtual machine and the standby virtual machine. The high-availability application is running. When the active virtual machine is working normally, the status information can be periodically sent to the standby virtual machine. When the standby virtual machine does not receive the status information sent by the active virtual machine within the preset time, The standby virtual machine can start the high-availability application and take over the current service of the active virtual machine through the floating IP address, thus ensuring high availability of the cloud server cluster. When the primary virtual machine returns to normal, it can send status information to the standby virtual machine, and when the standby virtual machine receives the primary virtual machine. When the status information is available, you can choose to release the floating IP address and take over the current service by the active virtual machine.
图2是本实施例提出的云服务器集群建立连接的方法的流程示意图。2 is a schematic flowchart of a method for establishing a connection of a cloud server cluster according to the embodiment.
本实施例以该方法被配置在云服务器集群建立连接的装置中来举例说明。其中,该装置可以设置在云服务器集群中。This embodiment is exemplified by the method in which the cloud server cluster is connected to establish a connection. The device can be set in a cloud server cluster.
本实施例的方法可以应用在云服务器集群的虚拟化功能启动后。The method in this embodiment can be applied after the virtualization function of the cloud server cluster is started.
参见图2,该方法包括S210-S280。Referring to Figure 2, the method includes S210-S280.
在S210中,开启云服务器集群的虚拟化功能。In S210, the virtualization function of the cloud server cluster is started.
例如,可以将云服务器集群中的单板或者主机的虚拟化功能开启,开启方式例如是进入到BIOS,将虚拟化设置为enable即可。For example, you can enable the virtualization function of the board or host in the cloud server cluster. For example, enter the BIOS and set the virtualization to enable.
在S220中,在云服务器集群的主机上安装第一虚拟机,作为主用虚拟机,以及在云服务器集群的备机上安装第二虚拟机,作为备用虚拟机。In S220, the first virtual machine is installed on the host of the cloud server cluster as the primary virtual machine, and the second virtual machine is installed as the standby virtual machine on the standby of the cloud server cluster.
以第一虚拟机和第二虚拟机是Virtualbox为例,本步骤可以示例如下。Taking the first virtual machine and the second virtual machine as Virtualbox as an example, this step can be exemplified as follows.
可以在Virtualbox网站上下载云服务器集群的主机操作系统对应的Virtualbox二进制安装文件,再运行Virtualbox二进制安装文件,将开启安装向导,在安装Virtualbox虚拟机时,允许用户定制VirtualBox特性,选择任意快捷方式并指定安装目录,还可以安装USB设备驱动以及VirtualBoxhost-only网络适配器。You can download the Virtualbox binary installation file corresponding to the host operating system of the cloud server cluster on the Virtualbox website, and then run the Virtualbox binary installation file to open the installation wizard. When installing the Virtualbox virtual machine, you can customize the VirtualBox feature and select any shortcut. Specify the installation directory, you can also install the USB device driver and the VirtualBoxhost-only network adapter.
可选地,在安装Virtualbox虚拟机时的二进制安装文件可以是虚拟桌面基础设施(Virtual Desktop Infrastructure,VDI)文件,VDI文件即VirtualBox的硬盘镜像文件。Optionally, the binary installation file when installing the Virtualbox virtual machine may be a virtual desktop infrastructure (VDI) file, and the VDI file is a virtual disk image file of the VirtualBox.
可选地,在创建云服务器集群的主用虚拟机,可以定义主用虚拟机的名称、虚拟机启用的操作系统类型,例如可以选用Linux操作系统,版本可以为Linux2.6/3.X(64bit),也可以设置主用虚拟机的内存大小,例如设置为2048M,随后加载指定的虚拟机的硬盘文件VDI,然后创建即可。Optionally, in creating the active virtual machine of the cloud server cluster, you can define the name of the active virtual machine and the operating system type enabled by the virtual machine. For example, the Linux operating system can be selected, and the version can be Linux2.6/3.X ( 64bit), you can also set the memory size of the active virtual machine, for example, set to 2048M, then load the hard disk file VDI of the specified virtual machine, and then create it.
本步骤中能够实现直接加载预先准备好的VDI文件,无需在每台虚拟机上重新安装操作系统,只要第一台机器安装需要使用的操作系统,然后其他需要 使用此操作系统的虚拟机直接加载即可,有效减少了安装部署的时间。In this step, you can directly load the pre-prepared VDI files without reinstalling the operating system on each virtual machine. As long as the first machine is installed, you need to use the operating system, and then other needs. The virtual machine using this operating system can be directly loaded, which effectively reduces the time for installation and deployment.
可选地,在创建云服务器集群的备用虚拟机之前,可以把创建主用虚拟机的VDI文件复制并将复制后的VDI文件重新命名,也可以设置复制后的VDI文件为可读可修改,随后再按照创建主用虚拟机的步骤,重新创建一台备用虚拟机。Optionally, before creating the standby virtual machine of the cloud server cluster, the VDI file for creating the primary virtual machine may be copied and the copied VDI file may be renamed, or the copied VDI file may be set to be readable and modifiable. Then follow the steps to create a primary virtual machine to recreate an alternate virtual machine.
可选地,通过主机和备机实现虚拟化,可以实现云服务器集群的物理资源灵活调度,跨域共享,提高了资源的利用率。Optionally, the virtualization of the host and the standby device enables flexible scheduling of physical resources of the cloud server cluster and cross-domain sharing, thereby improving resource utilization.
在S230中,建立虚拟Host-only网络,并将虚拟Host-only网络挂载至主用虚拟机和备用虚拟机上。In S230, a virtual Host-only network is established, and the virtual Host-only network is mounted to the primary virtual machine and the standby virtual machine.
其中,建立虚拟Host-only网络可以示例如下:选择主用虚拟机VirtualBox中的File-->Preferences-->network-->Host-only Networks操作路径。在Host-only Networks Details的界面中,在Adapter的TAB页面中,配置Adapter的IP地址和网络掩码,本实施例中可以配置IPv4地址为192.168.56.1,掩码为255.255.255.0,IPv6的地址暂不配置,未启用。也可以在需要启用时对IPv6的地址进行配置。随后在Host-only Networks Details的动态主机配置协议(Dynamic Host Configuration Protocol,DHCP)Server的界面中选中Enable Server前的复选框,表示启用DCHCP Server,在建立虚拟机时可以由DHCP服务器来动态分配虚拟机的IP地址,可以配置DHCP的Server Address,设置值为192.168.56.100,Server Mask:255.255.255.0,Lower Address Bound:192.168.56.101(表示DHCP服务器分配的起始地址),Upper Address Bound:192.168.56.254(表示DHCP服务器分配的终止地址),此时,虚拟Host-only网络vboxnet0建立完毕。The example of establishing a virtual Host-only network is as follows: Select File-->Preferences-->network-->Host-only Networks operation path in the virtual machine VirtualBox. In the Host-only Networks Details interface, configure the IP address and network mask of the Adapter in the TAB page of the Adapter. In this example, you can configure the IPv4 address as 192.168.56.1 and the mask as 255.255.255.0. Not configured yet, not enabled. It is also possible to configure the IPv6 address when it needs to be enabled. Then select the check box in front of the Enable Server in the interface of the Dynamic Host Configuration Protocol (DHCP) Server of the Host-only Networks Details, indicating that the DCHCP Server is enabled, and can be dynamically allocated by the DHCP server when the VM is created. The IP address of the virtual machine, you can configure the DHCP Server Address, the setting value is 192.168.56.100, Server Mask: 255.255.255.0, Lower Address Bound: 192.168.56.101 (indicating the starting address assigned by the DHCP server), Upper Address Bound: 192.168 .56.254 (represents the termination address assigned by the DHCP server). At this time, the virtual Host-only network vboxnet0 is established.
可选地,在虚拟Host-only网络vboxnet0建立完毕后,可以设定主用虚拟机。Optionally, after the virtual host-only network vboxnet0 is established, the active virtual machine can be set.
例如,可以在主用虚拟机的Setting-->Network-->Adapter1的操作路径中,将主用虚拟机的网卡Attatched to:Host-only Adapter,选择Name为vboxnet0,随后将Promiscuous Mode设置为Allow All模式,点击确定,即把主用虚拟机 的虚拟网卡挂载到Host-only的网络平面上。可选地,还可以按照上述操作,将备用虚拟机的网卡挂载到虚拟Host-only网络。将主用虚拟机和备用虚拟机挂载到Host-only虚拟机网卡,启动主用虚拟机时,Host-only网卡上的DHCPServer服务就会给虚拟机分配IP地址,分配的IP地址从建立的虚拟Host-only网络的Lower Address Bound(地址为192.168.56.100)开始。在主用虚拟机以第一顺序启动时,DHCP Server会给主用虚拟机分配IP地址192.168.56.101,随后启动备用虚拟机,Host-only网卡上的DHCP Server服务给备用虚拟机分配IP地址,DHCP Server会给主用虚拟机分配IP地址192.168.56.102。For example, in the operation path of Setting-->Network-->Adapter1 of the active virtual machine, the network card of the active virtual machine is Attatched to: Host-only Adapter, and the name is vboxnet0, and then the Promiscuous Mode is set to Allow. All mode, click OK, that is, the main virtual machine The virtual NIC is mounted on the host-only network plane. Optionally, the NIC of the standby virtual machine may be mounted to the virtual Host-only network according to the foregoing operation. When the primary virtual machine and the standby virtual machine are mounted to the host-only virtual machine NIC, when the active virtual machine is started, the DHCPServer service on the host-only NIC assigns an IP address to the virtual machine, and the assigned IP address is established. The virtual Host-only network starts with the Lower Address Bound (address 192.168.56.100). When the primary virtual machine is started in the first order, the DHCP server assigns the primary virtual machine an IP address of 192.168.56.101, and then starts the standby virtual machine. The DHCP Server service on the Host-only network card assigns an IP address to the standby virtual machine. The DHCP Server will assign the primary virtual machine an IP address of 192.168.56.102.
在一种异常状态中,如果启动备用虚拟机时,DHCP Server未能获取eth0网卡,则可以删除/etc/udev/rules.d/70-persistent-net.rules后重启备用虚拟机。In an abnormal state, if the DHCP server fails to obtain the eth0 NIC when the standby VM is started, you can delete the standby VM after deleting /etc/udev/rules.d/70-persistent-net.rules.
在S240中,对云服务器集群的主用虚拟机和备用虚拟机作主机名解析,并配置双机互信机制。In S240, the primary virtual machine and the standby virtual machine of the cloud server cluster are used for host name resolution, and a dual-machine mutual trust mechanism is configured.
可选地,对云服务器集群的主用虚拟机和备用虚拟机作主机名解析可以示例如下:Optionally, the host name resolution of the primary virtual machine and the standby virtual machine of the cloud server cluster may be as follows:
例如,可以在主用虚拟机的节点上,在Vi命令编辑界面中编辑路径为/etc/hosts文件,在hosts文件中添加以下内容:For example, on the node of the active virtual machine, edit the path to the /etc/hosts file in the Vi command editing interface, and add the following content to the hosts file:
192.168.56.101 Master.Cluster.com Master;192.168.56.101 Master.Cluster.com Master;
192.168.56.102 Slave.Cluster.com Slave;192.168.56.102 Slave.Cluster.com Slave;
其中,hosts文件中所添加内容的格式可以为主用虚拟机的网络IP地址(例如,192.168.56.101);主用虚拟机的主机名或域名(例如,Master.Cluster.com);主用虚拟机的主机名别名(例如,Master)。主机名和域名的区别在于,通常在局域网内使用主机名,随后通过hosts文件,主机名就被解析到对应IP地址。The format of the content added in the hosts file can be the network IP address of the main virtual machine (for example, 192.168.56.101); the host name or domain name of the active virtual machine (for example, Master.Cluster.com); the main virtual The host name alias of the machine (for example, Master). The difference between a host name and a domain name is that the host name is usually used in the LAN, and then the host file is resolved to the corresponding IP address through the hosts file.
同时,可以在Vi命令编辑界面中修改主用虚拟机上的/etc/sysconfig/network文件,将network文件中的HOSTNAME修改为HOSTNAME=Master,通过这种方式,在再次重启云服务器的主机,登录主用虚拟 机时,主用虚拟机的主机名可以修改为Master。At the same time, you can modify the /etc/sysconfig/network file on the active VM in the Vi command editing interface, and change the HOSTNAME in the network file to HOSTNAME=Master. In this way, restart the cloud server host again and log in. Active virtual When the machine is in use, the host name of the active virtual machine can be changed to Master.
可选地,可以按照上述将主用虚拟机的主机名修改为Master的方法,将备用虚拟机的主机名为修改为Slave。Optionally, the host name of the standby virtual machine may be modified to a slave according to the method of modifying the host name of the active virtual machine to be the master.
可选地,在对主用虚拟机和备用虚拟机的主机名进行解析后,可以配置双机互信机制,即创建一个密钥(key),以允许所有持有这个密钥的用户登录云服务器集群。Optionally, after the host names of the active virtual machine and the standby virtual machine are parsed, a dual-machine mutual trust mechanism can be configured, that is, a key is created to allow all users who hold the key to log in to the cloud server. Cluster.
可选地,可以建立从主用虚拟机到备用虚拟机的第一SSH无密码登录模式;以及建立从备用虚拟机到主用虚拟机的第二SSH无密码登录模式。Optionally, a first SSH passwordless login mode from the primary virtual machine to the standby virtual machine may be established; and a second SSH passwordless login mode from the standby virtual machine to the primary virtual machine is established.
可选地,配置双机互信机制可以示例如下。Optionally, the configuration of the dual-machine mutual trust mechanism can be exemplified as follows.
例如,可以在主用虚拟机上使用ssh-keygen命令创建一个SSH密钥,并激活SSH密钥,其中,ssh-keygen命令可以用来生成ssh登录的key,可以在远程登录主用虚拟机时无需再输入远程主用虚拟机的key,输入公钥和密钥所在的目录和文件名,可以存储在目录/root/.ssh下,可选地,在不输入目录和文件名时,主用虚拟机会在当前目录下生成公钥和密钥,随后输入ssh登录密码,输入使用key时的密码,也可以不输入ssh登录密码,可以实现建立从主用虚拟机到备用虚拟机的第一SSH无密码登录模式,方便使用。For example, you can use the ssh-keygen command on the active VM to create an SSH key and activate the SSH key. The ssh-keygen command can be used to generate the ssh login key. You can log in to the active VM remotely. No need to enter the key of the remote active virtual machine, enter the directory and file name where the public key and key are located, and store it in the directory /root/.ssh. Optionally, when not entering the directory and file name, the main use The virtual machine generates the public key and key in the current directory, then enters the ssh login password, enters the password when using the key, or enters the ssh login password, which can be used to establish the first SSH from the primary virtual machine to the standby virtual machine. No password login mode, easy to use.
并且在主用虚拟机的/root/.ssh下生成了ssh到主用虚拟机的公钥和密钥。还可以将主用虚拟机上生成的公钥文件Master_rsa.pub拷贝到备用虚拟机的/root/.ssh下,以及将主用虚拟机上生成的公钥文件Master_rsa.pub拷贝到备用虚拟机的/root/.ssh/authorized_keys中,并将authorized_keys的权限修改为600,通过该示例中的步骤,可以建立从主用虚拟机到备用虚拟机的第一SSH无密码登录模式。And the public key and key of ssh to the active virtual machine are generated under /root/.ssh of the primary virtual machine. You can also copy the public key file Master_rsa.pub generated on the primary virtual machine to /root/.ssh of the standby virtual machine, and copy the public key file Master_rsa.pub generated on the primary virtual machine to the standby virtual machine. In /root/.ssh/authorized_keys, modify the permissions of authorized_keys to 600. Through the steps in this example, you can establish the first SSH passwordless login mode from the primary virtual machine to the standby virtual machine.
可选地,也可以按照上述示例,建立从备用虚拟机到主用虚拟机的第二SSH无密码登录模式,在此不再赘述。Optionally, the second SSH passwordless login mode from the standby virtual machine to the active virtual machine may be established according to the foregoing example, and details are not described herein again.
在S250中,设置Host-only网络的网络时间协议(Network Time Protocol,NTP)时间服务器,以及配置NTP时间客户端。In S250, set the Network Time Protocol (NTP) time server of the Host-only network, and configure the NTP time client.
其中,NTP时间客户端的个数与备用虚拟机的个数相同。 The number of NTP time clients is the same as the number of standby virtual machines.
本步骤可以示例如下:可以在Vi命令编辑器中执行yum install-y ntp,安装NTP时间服务器。This step can be exemplified as follows: You can install NTP time server by executing yum install-y ntp in the Vi command editor.
在配置内网的NTP时间服务器时,可以通过Vi命令修改/etc/ntp.conf配置文件,在/etc/ntp.conf配置文件中新增restrict 192.168.56.1 mask255.255.255.0 nomodify notrap,表示设置访问NTP时间服务器的IP地址段,掩码等。在命令行输入echo“server 192.168.56.101”>>/etc/ntp.conf,表示将主用虚拟机作为NTP时间服务器。When configuring the NTP time server on the intranet, you can use the Vi command to modify the /etc/ntp.conf configuration file and add restrict 192.168.56.1 mask255.255.255.0 nomodify notrap to the /etc/ntp.conf configuration file. Access the IP address segment of the NTP time server, mask, and so on. Enter echo "server 192.168.56.101">>/etc/ntp.conf at the command line to indicate that the primary virtual machine is the NTP time server.
可选地,还可以设置互联网上的NTP标准时间服务器,选择距离用户最近的NTP标准时间服务器。本实例假设在上海实施云服务器集群,可以在ntp.conf配置文件中配置离上海最近的3个NTP时间服务器:Optionally, an NTP standard time server on the Internet can also be set to select the NTP standard time server closest to the user. This example assumes that the cloud server cluster is implemented in Shanghai. You can configure the three NTP time servers closest to Shanghai in the ntp.conf configuration file:
server 1.cn.pool.ntp.org;Server 1.cn.pool.ntp.org;
server 3.asia.pool.ntp.org;Server 3.asia.pool.ntp.org;
server 0.asia.pool.ntp.org。Server 0.asia.pool.ntp.org.
随后,再修改ntp.conf配置文件,设置在外部时间服务器不可用时,启用本地时间服务器作为时间服务器,可以在ntp.conf配置文件增加以下内容:Then, modify the ntp.conf configuration file to set the local time server as the time server when the external time server is unavailable. You can add the following to the ntp.conf configuration file:
server 127.127.1.0 #local clock;Server 127.127.1.0 #local clock;
fudge 127.127.1.0 #startnum 10。Fudge 127.127.1.0 #startnum 10.
对ntp.conf配置文件设置完毕后,就可以执行ntpdate-u1.cn.pool.ntp.org,表示强制时间服务器和标准NTP时间服务器同步,然后,执行service ntpd start命令,即重启ntpd服务即可。After setting the ntp.conf configuration file, you can execute ntpdate-u1.cn.pool.ntp.org to force the time server to synchronize with the standard NTP time server. Then, run the service ntpd start command to restart the ntpd service. .
可选地,可以对NTP时间客户端进行配置,示例如下。Optionally, the NTP time client can be configured as an example.
在备用虚拟机上执行yum install-y ntp安装NTP服务,将NTP服务配置为自启动,通过Vi命令修改/etc/ntp.conf配置文件,可以新增如下内容:Run the yum install-y ntp command to install the NTP service on the standby VM. Configure the NTP service to be self-starting. Use the Vi command to modify the /etc/ntp.conf configuration file. You can add the following content:
restrict 192.168.56.101 mask nomodify notrap;Restrict 192.168.56.101 mask nomodify notrap;
server 192.168.56.101。Server 192.168.56.101.
其中,命令server 192.168.56.101可以设置主用NTP时间服务器的IP地址,该云服务器集群NTP时间服务器的IP地址为192.168.56.101,设置完毕后, 保存ntp.conf配置文件。最后,在修改完毕后,可以执行ntpdate-u192.168.56.101,即通过ntpdate命令强制NTP时间客户端和NTP时间服务器同步,重启NTP时间客户端即开始NTP时间客户端与NTP时间服务器同步。The server 192.168.56.101 can set the IP address of the primary NTP time server. The IP address of the NTP time server of the cloud server cluster is 192.168.56.101. After the setting is completed, Save the ntp.conf configuration file. Finally, after the modification is complete, you can execute ntpdate-u192.168.56.101, that is, the NTP time client is forced to synchronize with the NTP time server through the ntpdate command. When the NTP time client is restarted, the NTP time client starts to synchronize with the NTP time server.
在S260中,在主用虚拟机和备用虚拟机上安装预设高可用应用,并对安装后的高可用应用进行配置。In S260, a preset high availability application is installed on the primary virtual machine and the standby virtual machine, and the installed high availability application is configured.
可选地,预设高可用应用可以包括Pacemaker应用、Corosync应用、Crmsh应用,以及DRBD应用。Alternatively, the preset high availability applications may include a Pacemaker application, a Corosync application, a Crmsh application, and a DRBD application.
可选地,在主用虚拟机和备用虚拟机上安装预设高可用应用,并对安装后的高可用应用进行配置,可以示例如下。Optionally, the preset high availability application is installed on the primary virtual machine and the standby virtual machine, and the installed high availability application is configured, as exemplified below.
例如,在主用虚拟机上执行命令:yum install-y pacemaker corosync crmsh drbd;在安装Pacemaker应用、Corosync应用、Crmsh应用,以及DRBD应用完毕后,可以首先开始配置Corosync应用,即在路径cd/etc/corosync下,执行命令scp corosync.conf.example corosync.conf,即复制Corosync应用的配置文件,例如可以通过Vi命令编辑器修改修改的内容如下:For example, execute the command on the main virtual machine: yum install-y pacemaker corosync crmsh drbd; after installing the Pacemaker application, Corosync application, Crmsh application, and DRBD application, you can start to configure the Corosync application first, ie in the path cd/etc /corosync, execute the command scp corosync.conf.example corosync.conf, that is, copy the configuration file of the Corosync application. For example, you can modify the modified content through the Vi command editor as follows:
threads:1;Threads:1;
其中,threads为启动的线程,threads的值表示启动预设数量个线程来进行心跳信息传递,在云服务器集群节点比较多且当主机多核时,可以启动多个线程来监控,0为默认值,本实施例可以将threads值修改为1,即启动一个线程来进行心跳信息传递。Among them, threads is the starting thread, the value of threads means to start a preset number of threads to transmit heartbeat information. When there are many nodes in the cloud server cluster and when the host is multi-core, multiple threads can be started to monitor, 0 is the default value. In this embodiment, the thread value can be modified to 1, that is, a thread is started to perform heartbeat information transmission.
bindnetaddr:192.168.56.0。其中,bindnetaddr为云服务器集群监控的IP地址段,将网卡的IP地址与网关相与,可以得出主用虚拟机通信的网段,本实施例中的IP地址可以为192.168.56.101,掩码为255.255.255.0,则相与后为192.168.56.0。Bindnetaddr: 192.168.56.0. Bindnetaddr is the IP address segment monitored by the cloud server cluster. The IP address of the network card is associated with the gateway. The network segment where the active virtual machine communicates can be obtained. The IP address in this embodiment can be 192.168.56.101. It is 255.255.255.0, then the phase is 192.168.56.0.
to_logfile:yes。其中,将to_logfile设置为yes可以开启本地日志存储。To_logfile:yes. Among them, set to_logfile to yes to enable local log storage.
logfile:/var/log/cluster/corosync.log。其中,可以通过设置logfile,设置保存本地logfile的文件目录,在实际应用场景中,/var/log/cluster目 录已经存在,可以创建/var/log/cluster目录下的corosync.log文件。Logfile: /var/log/cluster/corosync.log. You can set the file directory to save the local logfile by setting the logfile. In the actual application scenario, /var/log/cluster The record already exists, you can create the corosync.log file in the /var/log/cluster directory.
to_syslog:yes。其中,通过to_syslog可以设置是否写入系统日志,如果将to_syslog设置为yes,则可以系统日志写入/var/log/messages。To_syslog: yes. Among them, to_syslog can be set to write to the system log. If to_syslog is set to yes, the system log can be written to /var/log/messages.
Figure PCTCN2017077738-appb-000004
Figure PCTCN2017077738-appb-000004
其中,quorum表示启用投票机制,假设初始投票机制需要至少3票,在本实施例中,以云服务器集群包含主机和备机示例,只有2个节点,则可以将期望投票数修改为2。two_node:1,其中,表示云服务器集群包含主机和备机2个节点时,只需要投1票,主要可以用于主机。The quorum indicates that the voting mechanism is enabled. Assume that the initial voting mechanism requires at least 3 votes. In this embodiment, the cloud server cluster includes the host and standby examples, and only two nodes can change the expected voting number to 2. Two_node: 1, which means that when the cloud server cluster contains two nodes, the host and the standby, only one vote is required, which can be mainly used for the host.
可选地,在启用Corosync应用时可以使用认证功能,即可以给Corosync应用生成密钥。例如,可以在主用虚拟机上使用corosync-keygen命令给Corosync应用生成key,可以将生成的密钥文件保存在/etc/corosync/authkey路径中,再将corosync的密钥文件authkey和corosync的配置文件传输至备用虚拟机的/etc/corosync目录下,随后可以执行service corosync start启动corosync应用服务,在启动完毕后,可以检测corosync是否正常启动。Optionally, the authentication function can be used when the Corosync application is enabled, ie the key can be generated for the Corosync application. For example, you can use the corosync-keygen command on the active virtual machine to generate a key for the Corosync application. You can save the generated key file in the /etc/corosync/authkey path, and then configure the corosync key files authkey and corosync. The file is transferred to the /etc/corosync directory of the standby VM. You can then run the service corosync start to start the corosync application service. After the startup is complete, you can check whether the corosync starts normally.
其中,DRBD应用是用软件实现、无共享,服务器之间镜像块设备内容的存储复制解决方案。例如,主用虚拟机和备用虚拟机可以各分出一部分空间给DRBD管理,当主机上的数据被修改会被DRBD应用自动同步到备机备机,当主机故障时,可以对备机上相同数据进行读写操作。Among them, the DRBD application is a storage and replication solution that implements software, has no sharing, and mirrors block device content between servers. For example, the primary virtual machine and the standby virtual machine can allocate a part of space to the DRBD management. When the data on the host is modified, the DRBD application automatically synchronizes to the standby standby. When the host fails, the same data can be used on the standby. Read and write operations.
可选地,可以预先定义和创建DRBD应用的服务,可以示例如下:Optionally, the services of the DRBD application may be predefined and created, and the examples are as follows:
在Vi命令编辑器中输入以下命令:Enter the following command in the Vi command editor:
Figure PCTCN2017077738-appb-000005
Figure PCTCN2017077738-appb-000005
Figure PCTCN2017077738-appb-000006
Figure PCTCN2017077738-appb-000006
其中,protocol C表示使用协议C,协议C表示收到远程主机的写入确认后,则认为写入完成。address 192.168.56.101:7898表示设置DRBD应用的监听端口,用于与另一台虚拟机进行通信。address 192.168.56.102:7898表示设置DRBD应用的另一个监听端口,用于与另一台虚拟机进行通信。Wherein, protocol C indicates that protocol C is used, and protocol C indicates that the write confirmation is received by the remote host, and then the write completion is considered. Address 192.168.56.101:7898 indicates that the listening port of the DRBD application is set to communicate with another virtual machine. Address 192.168.56.102:7898 indicates that another listening port for the DRBD application is set up to communicate with another virtual machine.
可选地,也可以创建DRBD应用同步数据时所需要的分区,主机和备机的存储空间一致,可以在Vi命令编辑器中输入以下命令:Optionally, the partition required for the DRBD application synchronization data can also be created. The storage space of the host and the backup machine is the same. You can enter the following command in the Vi command editor:
fdisk/dev/sdc;Fdisk/dev/sdc;
drbdadm create-md mysql;Drbdadm create-md mysql;
service drbd start。Service drbd start.
以及,可以设置主用虚拟机为DRBD应用的主节点,仅在主用虚拟机上的Vi命令编辑器中输入以下命令:And, you can set the primary virtual machine to be the primary node of the DRBD application. Enter the following command only in the Vi command editor on the primary virtual machine:
drbdadm——overwrite-data-of-peer primary mysql。Drbdadm - overwrite-data-of-peer primary mysql.
可选地,也可以创建文件系统,可以Vi命令编辑器中输入以下命令:Optionally, you can also create a file system, you can enter the following command in the Vi command editor:
mkfs-t ext4/dev/drbd0。Mkfs-t ext4/dev/drbd0.
在S270中,添加预设监控脚本,预设监控脚本用于描述预设高可用应用的服务。In S270, a preset monitoring script is added, and the preset monitoring script is used to describe the service of the preset high-availability application.
其中,预设监控脚本中可以包含start函数、stop函数,以及monitor函数。 The preset monitoring script may include a start function, a stop function, and a monitor function.
可选地,添加预设监控脚本可以如下示例:Optionally, adding a preset monitoring script can be exemplified as follows:
Pacemaker应用的服务可以包括LSB服务和OCF服务,其中,LSB服务为Linux标准服务,通常是/etc/init.d目录下的脚本。Pacemaker应用可以用LSB服务来启停服务。而OCF服务是对LSB服务的扩展,增加了高可用集群管理的功能如故障监控等服务。通过实现OCF服务可以对云管理系统服务进行高可用保障。Services for Pacemaker applications can include LSB services and OCF services, where the LSB service is a Linux standard service, usually a script in the /etc/init.d directory. The Pacemaker application can use the LSB service to start and stop services. The OCF service is an extension of the LSB service, adding features such as fault monitoring and other services for high-availability cluster management. High availability guarantees for cloud management system services can be achieved by implementing OCF services.
可选地,可以添加预设监控脚本,该预设监控脚本可以为OCF服务脚本,OCF服务脚本是可执行文件,其中,预设监控脚本中包含start函数、stop函数,以及monitor函数。Optionally, a preset monitoring script may be added, where the preset monitoring script may be an OCF service script, and the OCF service script is an executable file, where the preset monitoring script includes a start function, a stop function, and a monitor function.
可选地,在start函数中,对云服务器集群进行启动,并设置超时时间为20s。在stop函数中,可以对云服务器集群进行停止,并设置超时时间为20s。在monitor函数中,可以对云服务器集群进行监控,并设置超时时间为10s,间隔时间为5s。Optionally, in the start function, start the cloud server cluster and set the timeout period to 20s. In the stop function, you can stop the cloud server cluster and set the timeout period to 20s. In the monitor function, you can monitor the cloud server cluster and set the timeout period to 10s and the interval to 5s.
可选地,在OCF服务脚本中,可以编写metadata函数,在执行metadata函数后,在Vi命令编辑界面输入meta-data命令时,可以输出xml格式的数据,该xml格式的数据可以为OCF服务的元信息。每个OCF服务的说明、参数定义和命令定义均可以由xml格式的数据说明,随后可以配置metadata的超时时间为5s。Optionally, in the OCF service script, the metadata function may be written. After the metadata function is executed, when the meta-data command is input in the Vi command editing interface, the data in the xml format may be output, and the data in the xml format may be the OCF service. Meta information. The description, parameter definition and command definition of each OCF service can be described by the data in xml format, and then the timeout period of the metadata can be configured to be 5s.
可选地,在OCF服务脚本中,还可以定义validate-all,即检测参数的合法性,配置的validate-all的超时时间为5s。Optionally, in the OCF service script, you can also define validate-all, that is, the validity of the detected parameter. The timeout of the configured validate-all is 5s.
在S280中,启动预设高可用应用的服务,以执行预设监控脚本,并设置浮动IP地址,以建立云服务器集群的高可用连接。In S280, a service of the preset high availability application is started to execute a preset monitoring script, and a floating IP address is set to establish a high availability connection of the cloud server cluster.
可选地,启动预设高可用应用的服务,以执行预设监控脚本,并设置浮动IP地址,以建立云服务器集群的高可用连接可以示例如下。Optionally, starting the service of the preset high-availability application to execute the preset monitoring script and setting the floating IP address to establish a high-availability connection of the cloud server cluster can be exemplified as follows.
例如,主用虚拟机的IP地址为192.168.56.101,备用虚拟机的IP地址为192.168.56.102,浮动IP地址即虚拟IP地址为192.168.56.254。For example, the IP address of the primary virtual machine is 192.168.56.101, the IP address of the standby virtual machine is 192.168.56.102, and the virtual IP address is 192.168.56.254.
将主用虚拟机和备用虚拟机的Vi命令编辑模式切换到crm命令行编辑模式下,使用如下的命令: To switch the Vi command edit mode of the active virtual machine and the standby virtual machine to the crm command line edit mode, use the following command:
configure primitive vip ocf:heartbeat:IPaddr2\;Configure primitive vip ocf:heartbeat:IPaddr2\;
params ip=192.168.56.254\;Params ip=192.168.56.254\;
nic=eth0\;Nic=eth0\;
cidr_netmask=24\;Cidr_netmask=24\;
op start timeout=20s interval=0s on-fail=stop\;Op start timeout=20s interval=0s on-fail=stop\;
op monitor timeout=20s interval=10s on-fail=restart\;Op monitor timeout=20s interval=10s on-fail=restart\;
op stop timeout=20s interval=0s on-fail=block\;Op stop timeout=20s interval=0s on-fail=block\;
verify;Verify
commit;Commit;
可选地,可以创建云服务器集群服务,并设定云服务器集群的启动、停止、监控的超时时间。如果主用虚拟机上的云服务器集群异常,可以被OCF服务脚本中的monitor监控到,根据用户创建时指定的操作,决定是在主机启动几次后,再切换到备机,还是直接切换到备机。Optionally, you can create a cloud server cluster service and set the timeout period for starting, stopping, and monitoring the cloud server cluster. If the cloud server cluster on the active VM is abnormal, it can be monitored by the monitor in the OCF service script. According to the operation specified when the user is created, it is decided to switch to the standby machine after the host starts several times, or directly switch to Standby machine.
本实施例中,能够实现直接加载预先准备好的VDI文件,无需在每台虚拟机上重新安装操作系统,只要第一台机器安装需要使用的操作系统,然后其他需要使用此操作系统的虚机直接加载即可,有效减少了安装部署的时间。通过主机和备机实现虚拟化,可以实现云服务器集群的物理资源灵活调度,跨域共享,提高了资源的利用率。通过建立虚拟Host-only网络,可以设置独立的IP地址,可以与主机、其他虚拟机进行网络通信,实现了主用虚拟机和备用虚拟机只占用一个对外IP地址,内部网络全部采用DHCP分配内网IP地址,在云服务器集群规模扩展,可以大大节省IP地址资源,同时,对外只使用一个IP地址,当云服务器集群产生故障时,主机和备机切换时用户无需更换访问的IP地址,提升用户的使用体验。另外,添加预设监控脚本,预设监控脚本是云服务器集群管理员自定义编写的,通过自定义编写的预设监控脚本对云服务器集群进行启动、监控、停止,可以对云服务器集群的监控进行智能、高效、安全的控制。通过配置云服务器集群的主用虚拟机和备用虚拟机的双机互信机制,安装预设高可用应用,并对安装后的高可用应用进行配置,以及添加预设监控脚 本,预设监控脚本用于描述预设高可用应用的服务,启动预设高可用应用的服务,以执行预设监控脚本,并设置浮动IP地址,以建立云服务器集群的高可用连接,能够有效确保云服务器集群的高可用性。In this embodiment, it is possible to directly load a pre-prepared VDI file without reinstalling the operating system on each virtual machine, as long as the first machine is installed with an operating system to be used, and then other virtual machines that need to use the operating system. Load directly, which reduces the time for installation and deployment. Virtualization of the host and the standby device enables flexible scheduling of physical resources of the cloud server cluster and cross-domain sharing, which improves resource utilization. By establishing a virtual host-only network, you can set up an independent IP address, and you can communicate with the host and other virtual machines. The active virtual machine and the standby virtual machine occupy only one external IP address. The internal network is all configured in DHCP. The network IP address is expanded in the size of the cloud server cluster, which can greatly save the IP address resources. At the same time, only one IP address is used. When the cloud server cluster fails, the user does not need to change the access IP address when the host and the standby switch are switched. User experience. In addition, the preset monitoring script is added, and the preset monitoring script is written by the cloud server cluster administrator. The cloud server cluster can be started, monitored, and stopped by the preset preset monitoring script, and the cloud server cluster can be monitored. Conduct intelligent, efficient and secure control. Install a preset high-availability application by configuring the dual-machine mutual trust mechanism between the active virtual machine and the standby virtual machine of the cloud server cluster, configure the installed high-availability application, and add preset monitoring feet. The preset monitoring script is used to describe the service of the preset high-availability application, start the service of the preset high-availability application, execute the preset monitoring script, and set the floating IP address to establish a high-availability connection of the cloud server cluster. Effectively ensure high availability of cloud server clusters.
图3是本实施例提出的云服务器集群建立连接的装置的结构示意图。其中,该装置可以设置在云服务器集群中。FIG. 3 is a schematic structural diagram of an apparatus for establishing a connection of a cloud server cluster according to the embodiment. The device can be set in a cloud server cluster.
参见图3,该装置30可以包括:解析模块301、配置模块302、添加模块303,以及启动模块304。Referring to FIG. 3, the apparatus 30 can include a parsing module 301, a configuration module 302, an adding module 303, and a launching module 304.
解析模块301,设置为对云服务器集群的主用虚拟机和备用虚拟机作主机名解析,并配置双机互信机制。The parsing module 301 is configured to perform host name resolution on the active virtual machine and the standby virtual machine of the cloud server cluster, and configure a dual-machine mutual trust mechanism.
可选地,解析模块301还可以设置为:建立从主用虚拟机到备用虚拟机的第一SSH无密码登录模式;以及建立从备用虚拟机到主用虚拟机的第二SSH无密码登录模式。Optionally, the parsing module 301 is further configured to: establish a first SSH passwordless login mode from the primary virtual machine to the standby virtual machine; and establish a second SSH passwordless login mode from the standby virtual machine to the primary virtual machine. .
配置模块302,设置为在主用虚拟机和备用虚拟机上安装预设高可用应用,并对安装后的高可用应用进行配置。The configuration module 302 is configured to install a preset high availability application on the primary virtual machine and the standby virtual machine, and configure the installed high availability application.
添加模块303,设置为添加预设监控脚本,预设监控脚本用于描述预设高可用应用的服务。The adding module 303 is configured to add a preset monitoring script, and the preset monitoring script is used to describe a service of the preset high-availability application.
可选地,预设监控脚本中可以包含start函数、stop函数,以及monitor函数。Optionally, the preset monitoring script may include a start function, a stop function, and a monitor function.
启动模块304,设置为启动预设高可用应用的服务,以执行预设监控脚本,并设置浮动IP地址,以建立云服务器集群的高可用连接。The startup module 304 is configured to start a service of the preset high availability application to execute a preset monitoring script and set a floating IP address to establish a high availability connection of the cloud server cluster.
可选地,参见图4,该装置30还可以包括:Optionally, referring to FIG. 4, the apparatus 30 may further include:
安装模块305,设置为在云服务器集群的主机上安装第一虚拟机,作为主用虚拟机,以及在云服务器集群的备机上安装第二虚拟机,作为备用虚拟机。The installation module 305 is configured to install the first virtual machine on the host of the cloud server cluster as the primary virtual machine, and install the second virtual machine as the standby virtual machine on the standby of the cloud server cluster.
建立模块306,设置为建立虚拟Host-only网络,并将虚拟Host-only网络挂载至主用虚拟机和备用虚拟机上。The establishing module 306 is configured to establish a virtual Host-only network and mount the virtual Host-only network to the primary virtual machine and the standby virtual machine.
设置模块307,设置为设置Host-only网络的NTP时间服务器,以及配置NTP时间客户端。 The setting module 307 is configured to set an NTP time server of the Host-only network and configure an NTP time client.
可选地,NTP时间客户端的个数与备用虚拟机的个数相同。Optionally, the number of NTP time clients is the same as the number of standby virtual machines.
开启模块308,设置为开启云服务器集群的虚拟化功能。The module 308 is enabled to be set to enable the virtualization function of the cloud server cluster.
本实施例中,通过配置云服务器集群的主用虚拟机和备用虚拟机的双机互信机制,安装预设高可用应用,并对安装后的高可用应用进行配置,以及添加预设监控脚本,预设监控脚本用于描述预设高可用应用的服务,启动预设高可用应用的服务,以执行预设监控脚本,并设置浮动IP地址,以建立云服务器集群的高可用连接,能够有效确保云服务器集群的高可用性。In this embodiment, the dual-machine mutual trust mechanism of the active virtual machine and the standby virtual machine of the cloud server cluster is configured to install a preset high-availability application, and the installed high-availability application is configured, and a preset monitoring script is added. The preset monitoring script is used to describe the service of the preset high-availability application, start the service of the preset high-availability application, execute the preset monitoring script, and set the floating IP address to establish a high-availability connection of the cloud server cluster, which can effectively ensure High availability for cloud server clusters.
图9是本实施例提供的一种云服务器的硬件结构示意图。该云服务器包括:处理器(processor)410和存储器(memory)420;还可以包括通信接口(Communications Interface)430和总线440。FIG. 9 is a schematic diagram of a hardware structure of a cloud server according to this embodiment. The cloud server includes a processor 410 and a memory 420; and may further include a communications interface 430 and a bus 440.
其中,处理器410、存储器420和通信接口430可以通过总线440完成相互间的通信。通信接口430可以用于信息传输。处理器410可以调用存储器420中的逻辑指令,以执行上述实施例中任意一种云服务器集群建立连接的方法。The processor 410, the memory 420, and the communication interface 430 can complete communication with each other through the bus 440. Communication interface 430 can be used for information transmission. The processor 410 can invoke the logic instructions in the memory 420 to perform the method of establishing a connection by any one of the cloud server clusters in the above embodiments.
此外,上述的存储器420中的逻辑指令可以通过软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本公开的技术方案可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本实施例所述方法的全部或部分步骤。而前述的存储介质可以是非暂态存储介质,包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质,也可以是暂态存储介质。In addition, the logic instructions in the memory 420 described above may be implemented in the form of software functional units and sold or used as separate products, and may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present disclosure may be embodied in the form of a software product stored in a storage medium, including a plurality of instructions for causing a computer device (which may be a personal computer, a server, or a network) The device or the like) performs all or part of the steps of the method described in this embodiment. The foregoing storage medium may be a non-transitory storage medium, including: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk. A medium that can store program code, or a transitory storage medium.
在上述实施例的描述中,术语“第一”、“第二”等仅用于描述目的,而不能理解为指示或暗示相对重要性。此外,除非另有说明,“多个”的含义是两个或两个以上。In the description of the above embodiments, the terms "first", "second", and the like are used for descriptive purposes only, and are not to be construed as indicating or implying relative importance. Further, "multiple" means two or more unless otherwise stated.
流程图中或在此以其他方式描述的任何过程或方法描述可以被理解为,表示包括一个或更多个用于实现特定逻辑功能或过程的步骤的可执行指令的代码的模块、片段或部分,并且上述实施方式的范围包括另外的实现,其中可以不 按所示出或讨论的顺序,包括根据所涉及的功能按基本同时的方式或按相反的顺序,来执行功能。Any process or method description in the flowcharts or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a particular logical function or process. And the scope of the above embodiments includes an additional implementation in which The functions are performed in the order shown or discussed, including in a substantially simultaneous manner or in the reverse order, depending on the functionality involved.
应当理解,本实施例的技术方案可以用硬件、软件、固件或它们的组合来实现。在上述实施方式中,多个步骤或方法可以用存储在存储器中且由合适的指令执行系统执行的软件或硬件来实现。例如,硬件可以包括具有用于对数据信号实现逻辑功能的逻辑门电路的离散逻辑电路,具有合适的组合逻辑门电路的专用集成电路,可编程门阵列(PGA),现场可编程门阵列(FPGA)等。It should be understood that the technical solution of the embodiment may be implemented by hardware, software, firmware, or a combination thereof. In the above-described embodiments, multiple steps or methods may be implemented in software or hardware stored in a memory and executed by a suitable instruction execution system. For example, the hardware can include discrete logic circuits with logic gates for implementing logic functions on data signals, application specific integrated circuits with suitable combinational logic gates, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs) )Wait.
上述实施例方法携带的全部或部分步骤还可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,该程序在执行时,包括方法实施例的步骤之一或其组合。All or part of the steps carried by the method of the above embodiment may also be completed by a program to instruct related hardware, and the program may be stored in a computer readable storage medium, and when executed, the steps of the method embodiment are included. One or a combination thereof.
此外,在本实施例中的多个功能单元可以集成在一个处理模块中,也可以是每个单元单独物理存在,也可以两个或两个以上单元集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。In addition, the multiple functional units in this embodiment may be integrated into one processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules. The integrated modules, if implemented in the form of software functional modules and sold or used as stand-alone products, may also be stored in a computer readable storage medium.
参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的特征、结构、材料或者特点包含于至少一个实施例或示例中。在实施例中,对上述术语的示意性表述不一定指的是相同的实施例或示例。而且,描述的特征、结构、材料或者特点可以在任何的一个或多个实施例或示例中以合适的方式结合。The description of the terms "one embodiment", "some embodiments", "example", "specific examples", or "some examples" and the like means that the features, structures, materials, or characteristics described in connection with the embodiments or examples are included in At least one embodiment or example. In the embodiments, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Furthermore, the described features, structures, materials, or characteristics may be combined in a suitable manner in any one or more embodiments or examples.
工业实用性Industrial applicability
本公开提供了一种云服务器集群建立连接的方法和装置,可以确保云服务器集群的高可用性。 The present disclosure provides a method and apparatus for establishing a connection of a cloud server cluster, which can ensure high availability of a cloud server cluster.

Claims (17)

  1. 一种云服务器集群建立连接的方法,包括:A method for establishing a connection of a cloud server cluster, comprising:
    对云服务器集群的主用虚拟机和备用虚拟机作主机名解析,并配置双机互信机制;Perform host name resolution for the primary virtual machine and the standby virtual machine of the cloud server cluster, and configure a dual-machine mutual trust mechanism;
    在所述主用虚拟机和所述备用虚拟机上安装预设高可用应用,并对安装后的高可用应用进行配置;Installing a preset high-availability application on the primary virtual machine and the standby virtual machine, and configuring the installed high-availability application;
    添加预设监控脚本,所述预设监控脚本用于描述所述预设高可用应用的服务;以及Adding a preset monitoring script, the preset monitoring script is used to describe a service of the preset high-availability application;
    启动所述预设高可用应用的服务,以执行所述预设监控脚本,并设置浮动网络互联协议IP地址,以建立所述云服务器集群的高可用连接。The service of the preset high-availability application is started to execute the preset monitoring script, and a floating network interconnection protocol IP address is set to establish a high-availability connection of the cloud server cluster.
  2. 如权利要求1所述的方法,在所述对云服务器集群的主用虚拟机和备用虚拟机作主机名解析,并配置双机互信机制之前,还包括:The method of claim 1, before the host name resolution of the active virtual machine and the standby virtual machine of the cloud server cluster, and the configuration of the dual-machine mutual trust mechanism, the method further includes:
    在所述云服务器集群的主机上安装第一虚拟机,作为所述主用虚拟机,以及在所述云服务器集群的备机上安装第二虚拟机,作为所述备用虚拟机。The first virtual machine is installed on the host of the cloud server cluster as the primary virtual machine, and the second virtual machine is installed as the standby virtual machine on the standby of the cloud server cluster.
  3. 如权利要求1所述的方法,还包括:The method of claim 1 further comprising:
    建立虚拟Host-only网络,并将所述虚拟Host-only网络挂载至所述主用虚拟机和所述备用虚拟机上。Establishing a virtual Host-only network and mounting the virtual Host-only network to the primary virtual machine and the standby virtual machine.
  4. 如权利要求3所述的方法,还包括:The method of claim 3 further comprising:
    设置所述Host-only网络的网络时间协议NTP时间服务器,以及配置NTP时间客户端。Set the network time protocol NTP time server of the Host-only network, and configure the NTP time client.
  5. 如权利要求4所述的方法,其中,所述NTP时间客户端的个数与所述备用虚拟机的个数相同。The method of claim 4 wherein the number of NTP time clients is the same as the number of the standby virtual machines.
  6. 如权利要求1所述的方法,其中,所述配置双机互信机制,包括:The method of claim 1 wherein said configuring a two-way mutual trust mechanism comprises:
    建立从所述主用虚拟机到所述备用虚拟机的第一安全外壳协议SSH无密码登录模式;以及Establishing a first secure shell protocol SSH passwordless login mode from the primary virtual machine to the standby virtual machine;
    建立从所述备用虚拟机到所述主用虚拟机的第二SSH无密码登录模式。Establishing a second SSH passwordless login mode from the standby virtual machine to the primary virtual machine.
  7. 如权利要求2或5或6所述的方法,其中,所述预设监控脚本中包含start函数、stop函数,以及monitor函数。 The method according to claim 2 or 5 or 6, wherein the preset monitoring script includes a start function, a stop function, and a monitor function.
  8. 如权利要求1-7任一项所述的方法,在所述对云服务器集群的主用虚拟机和备用虚拟机作主机名解析,并配置双机互信机制之前,还包括:The method according to any one of claims 1 to 7, before the host name resolution of the active virtual machine and the standby virtual machine of the cloud server cluster is configured, and the dual-machine mutual trust mechanism is configured, the method further includes:
    开启所述云服务器集群的虚拟化功能。Enable the virtualization function of the cloud server cluster.
  9. 一种云服务器集群建立连接的装置,包括:A device for establishing a connection of a cloud server cluster, comprising:
    解析模块,设置为对云服务器集群的主用虚拟机和备用虚拟机作主机名解析,并配置双机互信机制;The parsing module is configured to perform host name resolution on the primary virtual machine and the standby virtual machine of the cloud server cluster, and configure a dual-machine mutual trust mechanism;
    配置模块,设置为在所述主用虚拟机和所述备用虚拟机上安装预设高可用应用,并对安装后的高可用应用进行配置;a configuration module, configured to install a preset high-availability application on the primary virtual machine and the standby virtual machine, and configure the installed high-availability application;
    添加模块,设置为添加预设监控脚本,所述预设监控脚本用于描述所述预设高可用应用的服务;以及Adding a module, configured to add a preset monitoring script, the preset monitoring script is used to describe a service of the preset high-availability application;
    启动模块,设置为启动所述预设高可用应用的服务,以执行所述预设监控脚本,并设置浮动网络互联协议IP地址,以建立所述云服务器集群的高可用连接。The startup module is configured to start the service of the preset high-availability application to execute the preset monitoring script, and set a floating network interconnection protocol IP address to establish a high-availability connection of the cloud server cluster.
  10. 如权利要求9所述的装置,还包括:The apparatus of claim 9 further comprising:
    安装模块,设置为在解析模块对云服务器集群的主用虚拟机和备用虚拟机作主机名解析,并配置双机互信机制之前,在所述云服务器集群的主机上安装第一虚拟机,作为所述主用虚拟机,以及在所述云服务器集群的备机上安装第二虚拟机,作为所述备用虚拟机。The installation module is configured to install the first virtual machine on the host of the cloud server cluster before the resolution module performs the host name resolution on the primary virtual machine and the standby virtual machine of the cloud server cluster, and configures the dual-machine mutual trust mechanism. And installing, by the primary virtual machine, a second virtual machine on the standby machine of the cloud server cluster as the standby virtual machine.
  11. 如权利要求9所述的装置,还包括:The apparatus of claim 9 further comprising:
    建立模块,设置为建立虚拟Host-only网络,并将所述虚拟Host-only网络挂载至所述主用虚拟机和所述备用虚拟机上。Establishing a module, setting up to establish a virtual Host-only network, and mounting the virtual Host-only network to the primary virtual machine and the standby virtual machine.
  12. 如权利要求11所述的装置,还包括:The apparatus of claim 11 further comprising:
    设置模块,设置为设置所述Host-only网络的网络时间协议NTP时间服务器,以及配置NTP时间客户端。Set the module to set the network time protocol NTP time server of the Host-only network and configure the NTP time client.
  13. 如权利要求12所述的装置,其中,所述NTP时间客户端的个数与所述备用虚拟机的个数相同。The apparatus of claim 12, wherein the number of the NTP time clients is the same as the number of the standby virtual machines.
  14. 如权利要求9所述的装置,其中,所述解析模块还设置为: The apparatus of claim 9, wherein the parsing module is further configured to:
    建立从所述主用虚拟机到所述备用虚拟机的第一安全外壳协议SSH无密码登录模式;以及Establishing a first secure shell protocol SSH passwordless login mode from the primary virtual machine to the standby virtual machine;
    建立从所述备用虚拟机到所述主用虚拟机的第二SSH无密码登录模式。Establishing a second SSH passwordless login mode from the standby virtual machine to the primary virtual machine.
  15. 如权利要求10或13或14所述的装置,其中,所述预设监控脚本中包含start函数、stop函数,以及monitor函数。The apparatus according to claim 10 or 13 or 14, wherein the preset monitoring script includes a start function, a stop function, and a monitor function.
  16. 如权利要求9-15任一项所述的装置,还包括:The apparatus of any of claims 9-15, further comprising:
    开启模块,设置为开启所述云服务器集群的虚拟化功能。The module is enabled to be set to enable the virtualization function of the cloud server cluster.
  17. 一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令用于执行权利要求1-8任一项所述的云服务器集群建立连接的方法。 A computer readable storage medium storing computer executable instructions for performing the method of establishing a connection by a cloud server cluster according to any one of claims 1-8.
PCT/CN2017/077738 2016-03-22 2017-03-22 Method and device for establishing connection of cloud server cluster WO2017162173A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610163739.3 2016-03-22
CN201610163739.3A CN107222320A (en) 2016-03-22 2016-03-22 The method and apparatus that Cloud Server cluster sets up High Availabitity connection

Publications (1)

Publication Number Publication Date
WO2017162173A1 true WO2017162173A1 (en) 2017-09-28

Family

ID=59899330

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/077738 WO2017162173A1 (en) 2016-03-22 2017-03-22 Method and device for establishing connection of cloud server cluster

Country Status (2)

Country Link
CN (1) CN107222320A (en)
WO (1) WO2017162173A1 (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107707688A (en) * 2017-10-19 2018-02-16 杭州数梦工场科技有限公司 A kind of method and device of kubernetes clusters parsing host host name
CN108810191A (en) * 2018-07-18 2018-11-13 郑州云海信息技术有限公司 Floating IP address detection method based on OpenStack and system
CN109660381A (en) * 2018-10-25 2019-04-19 中国平安人寿保险股份有限公司 Distribution management method, device, server and storage medium
CN110932914A (en) * 2019-12-16 2020-03-27 深信服科技股份有限公司 Deployment method, deployment device, hybrid cloud system architecture and computer storage medium
CN111371880A (en) * 2020-02-28 2020-07-03 厦门中横科技有限公司 Dialing cloud server capable of dynamically switching IP
CN111885201A (en) * 2020-07-31 2020-11-03 中国工商银行股份有限公司 Data transmission method, device, equipment and medium
CN111966379A (en) * 2020-08-19 2020-11-20 中国人民解放军战略支援部队信息工程大学 Simulation web cloud service system software cluster updating method and system
CN112769922A (en) * 2020-12-31 2021-05-07 南京视察者智能科技有限公司 Device and method for self-starting micro-service cluster
CN113741908A (en) * 2021-08-25 2021-12-03 杭州安恒信息技术股份有限公司 High-availability deployment method, device, electronic device and storage medium
CN113904802A (en) * 2021-09-06 2022-01-07 河南信大网御科技有限公司 Mimicry cloud application management method, communication agent module and cloud application management module
CN113938382A (en) * 2021-10-15 2022-01-14 湖南麒麟信安科技股份有限公司 Cluster management method, system and storage medium based on pacemaker

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107729183A (en) * 2017-10-12 2018-02-23 郑州云海信息技术有限公司 A kind of method and system backed up by FC agreements with recovering linux operating systems
CN109814935A (en) * 2017-11-16 2019-05-28 中标软件有限公司 The extended method and architecture system of High Availabitity host
CN108347472B (en) * 2018-01-12 2021-04-09 网宿科技股份有限公司 Configuration method of IP address, cloud server, cloud platform and readable storage medium
CN108804038A (en) * 2018-05-29 2018-11-13 新华三技术有限公司 Method, apparatus, server and the computer-readable medium of daily record data migration
CN108650142A (en) * 2018-07-17 2018-10-12 青岛海信智慧家居系统股份有限公司 The control method and device of multiple gateway equipment in intelligent domestic system
CN109495560B (en) * 2018-11-07 2021-06-29 郑州云海信息技术有限公司 Link establishment method, device, equipment and storage medium
CN110502326A (en) * 2019-08-27 2019-11-26 珠海格力电器股份有限公司 The method and terminal device of cloud service scheduling and recovery based on fault detection
CN112787795A (en) * 2019-11-07 2021-05-11 高新兴科技集团股份有限公司 Cloud server clock synchronization method, computer storage medium and electronic device
CN110995805B (en) * 2019-11-24 2022-02-18 浪潮电子信息产业股份有限公司 Method, device and equipment for determining cluster network card and readable storage medium
CN111163176A (en) * 2020-01-02 2020-05-15 山东超越数控电子股份有限公司 VirtualBox-based cluster management system
CN111538545A (en) * 2020-04-23 2020-08-14 京东方科技集团股份有限公司 Java application running method, device, medium and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103024060A (en) * 2012-12-20 2013-04-03 中国科学院深圳先进技术研究院 Open type cloud computing monitoring system for large scale cluster and method thereof
CN103425645A (en) * 2012-05-14 2013-12-04 阿里巴巴集团控股有限公司 Monitoring system and monitoring method for single point of failure of database cluster
CN103812699A (en) * 2014-02-17 2014-05-21 无锡华云数据技术服务有限公司 Monitoring management system based on cloud computing
US20140149352A1 (en) * 2012-11-29 2014-05-29 International Business Machines Corporation High availability for cloud servers

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103425645A (en) * 2012-05-14 2013-12-04 阿里巴巴集团控股有限公司 Monitoring system and monitoring method for single point of failure of database cluster
US20140149352A1 (en) * 2012-11-29 2014-05-29 International Business Machines Corporation High availability for cloud servers
CN103024060A (en) * 2012-12-20 2013-04-03 中国科学院深圳先进技术研究院 Open type cloud computing monitoring system for large scale cluster and method thereof
CN103812699A (en) * 2014-02-17 2014-05-21 无锡华云数据技术服务有限公司 Monitoring management system based on cloud computing

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
WANG JIANYI: "Research and Implementation of High Availability Features of Hybrid Desktop Cloud", ELECTRONIC TECHNOLOGY & INFORMATION SCIENCE, CHINA MASTER'S THESIS FULL-TEXT DATABASE(ELECTRONIC JOURNALS), 15 December 2015 (2015-12-15) *

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107707688A (en) * 2017-10-19 2018-02-16 杭州数梦工场科技有限公司 A kind of method and device of kubernetes clusters parsing host host name
CN108810191A (en) * 2018-07-18 2018-11-13 郑州云海信息技术有限公司 Floating IP address detection method based on OpenStack and system
CN109660381A (en) * 2018-10-25 2019-04-19 中国平安人寿保险股份有限公司 Distribution management method, device, server and storage medium
CN110932914B (en) * 2019-12-16 2023-04-07 深信服科技股份有限公司 Deployment method, deployment device, hybrid cloud system architecture and computer storage medium
CN110932914A (en) * 2019-12-16 2020-03-27 深信服科技股份有限公司 Deployment method, deployment device, hybrid cloud system architecture and computer storage medium
CN111371880A (en) * 2020-02-28 2020-07-03 厦门中横科技有限公司 Dialing cloud server capable of dynamically switching IP
CN111371880B (en) * 2020-02-28 2023-09-22 中海国盛(厦门)科技股份有限公司 Dial cloud server deployment method capable of dynamically switching IP
CN111885201B (en) * 2020-07-31 2022-11-08 中国工商银行股份有限公司 Data transmission method, device, equipment and medium
CN111885201A (en) * 2020-07-31 2020-11-03 中国工商银行股份有限公司 Data transmission method, device, equipment and medium
CN111966379A (en) * 2020-08-19 2020-11-20 中国人民解放军战略支援部队信息工程大学 Simulation web cloud service system software cluster updating method and system
CN112769922A (en) * 2020-12-31 2021-05-07 南京视察者智能科技有限公司 Device and method for self-starting micro-service cluster
CN113741908A (en) * 2021-08-25 2021-12-03 杭州安恒信息技术股份有限公司 High-availability deployment method, device, electronic device and storage medium
CN113904802A (en) * 2021-09-06 2022-01-07 河南信大网御科技有限公司 Mimicry cloud application management method, communication agent module and cloud application management module
CN113904802B (en) * 2021-09-06 2023-08-11 河南信大网御科技有限公司 Mimicry cloud application management method, communication proxy module and cloud application management module
CN113938382A (en) * 2021-10-15 2022-01-14 湖南麒麟信安科技股份有限公司 Cluster management method, system and storage medium based on pacemaker
CN113938382B (en) * 2021-10-15 2024-01-23 湖南麒麟信安科技股份有限公司 Parcemaker-based cluster management method, system and storage medium

Also Published As

Publication number Publication date
CN107222320A (en) 2017-09-29

Similar Documents

Publication Publication Date Title
WO2017162173A1 (en) Method and device for establishing connection of cloud server cluster
CN111193782B (en) PAAS cloud cluster construction method and device, electronic equipment and storage medium
CN104956332B (en) Method, storage medium and computing system for managing computing resources
US9336103B1 (en) Using a network bubble across multiple hosts on a disaster recovery site for fire drill testing of a multi-tiered application
CN111989681A (en) Automatically deployed Information Technology (IT) system and method
US20220245101A1 (en) Data migration method and apparatus
WO2019184164A1 (en) Method for automatically deploying kubernetes worker node, device, terminal apparatus, and readable storage medium
WO2021129733A1 (en) Cloud operating system management method and apparatus, server, management system, and medium
WO2019184116A1 (en) Method and device for automatically building kubernetes main node, terminal device and computer-readable storage medium
CN113572831B (en) Communication method, computer equipment and medium between Kubernetes clusters
WO2020024413A1 (en) Method for controlling deployment of cloud computing platform, server, and storage medium
US11201785B1 (en) Cluster deployment and management system
CN107666493B (en) Database configuration method and equipment thereof
CN113656147B (en) Cluster deployment method, device, equipment and storage medium
CN114270779A (en) Automatically deployed Information Technology (IT) system and method with enhanced security
EP3788772B1 (en) On-node dhcp implementation for virtual machines
US20220094749A1 (en) Computing system providing cloud-based user profile management for virtual sessions and related methods
WO2021113110A1 (en) Network function virtualization compute element image upgrade
US11044148B2 (en) Optimistic and failsafe network configuration
CN110069365B (en) Method for managing database and corresponding device, computer readable storage medium
US20240089234A1 (en) Hierarchical provisioning of network devices
US20240106708A1 (en) Fabric availability and synchronization
US20150127788A1 (en) Centralized enterprise image upgrades for distributed campus networks
Khalel et al. Enhanced load balancing in kubernetes cluster by minikube
CN115604120A (en) Multi-cloud cluster resource sharing method, device, equipment and storage medium

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17769450

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 17769450

Country of ref document: EP

Kind code of ref document: A1