CN111581042B - Cluster deployment method, deployment platform and server to be deployed - Google Patents

Cluster deployment method, deployment platform and server to be deployed Download PDF

Info

Publication number
CN111581042B
CN111581042B CN201910115985.5A CN201910115985A CN111581042B CN 111581042 B CN111581042 B CN 111581042B CN 201910115985 A CN201910115985 A CN 201910115985A CN 111581042 B CN111581042 B CN 111581042B
Authority
CN
China
Prior art keywords
server
deployed
deployment
service
operation command
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910115985.5A
Other languages
Chinese (zh)
Other versions
CN111581042A (en
Inventor
刘冰芳
邱锦鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wangsu Science and Technology Co Ltd
Original Assignee
Wangsu Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wangsu Science and Technology Co Ltd filed Critical Wangsu Science and Technology Co Ltd
Priority to CN201910115985.5A priority Critical patent/CN111581042B/en
Publication of CN111581042A publication Critical patent/CN111581042A/en
Application granted granted Critical
Publication of CN111581042B publication Critical patent/CN111581042B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3006Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is distributed, e.g. networked systems, clusters, multiprocessor systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3055Monitoring arrangements for monitoring the status of the computing system or of the computing system component, e.g. monitoring if the computing system is on, off, available, not available
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2201/00Indexing scheme relating to error detection, to error correction, and to monitoring
    • G06F2201/875Monitoring of systems including the internet

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computing Systems (AREA)
  • Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Computer And Data Communications (AREA)

Abstract

The embodiment of the application provides a cluster deployment method, a deployment platform and a server to be deployed, wherein the method comprises the following steps: and the deployment platform generates a deployment operation command according to the deployment parameters and sends the deployment operation command to the server to be deployed. And the server to be deployed executes the deployment operation command to complete the deployment service, and obtains the execution content and the execution result of the deployment operation command. And then generating a monitoring command corresponding to the deployment operation command according to the attribute information of the server to be deployed, and acquiring the state information of the service in the server to be deployed. And then, the execution content and the execution result of the deployment operation command are sent to the deployment platform, so when the influence of cluster deployment on the server to be deployed needs to be checked under the conditions of faults and the like of the server to be deployed, the execution content and the execution result of each deployment operation command in the deployment process can be directly obtained from the deployment platform without gradually executing the deployment operation command to check the execution result, thereby improving the checking efficiency on one hand and reducing the workload on the other hand.

Description

Cluster deployment method, deployment platform and server to be deployed
Technical Field
The embodiment of the application relates to the field of automatic operation and maintenance, in particular to a cluster deployment method, a deployment platform and a server to be deployed.
Background
The cluster deployment system can perform rapid and accurate service deployment on a large number of servers, and meanwhile, the deployment flow and the coarse-grained information of the execution result are displayed. However, in the deployment process, the influence of each step on the server and the information change condition of the server cannot be known, for example, a certain parameter in the server is modified in a certain step, and a certain program package is installed in the server. When the influence of the deployment process on the server needs to be known, such as the server fails, the deployment process needs to be gradually executed when the reasons need to be checked, and then the execution result is checked, so that the workload of manual checking is large and the time consumption is long.
Disclosure of Invention
In the prior art, when the influence of a cluster deployment process on a server is known, the problem that the workload is large and the time is long is caused by gradually executing the acquisition result.
In one aspect, an embodiment of the present application provides a cluster deployment method, including:
Aiming at each server to be deployed in a server cluster, a deployment platform generates at least one deployment operation command according to deployment parameters of the server to be deployed;
the deployment platform sends the at least one deployment operation command to the server to be deployed so that the server to be deployed executes the at least one deployment operation command to deploy a service and obtains execution content and execution results of the at least one deployment operation command, and generates a monitoring command corresponding to the at least one deployment operation command according to attribute information of the server to be deployed, wherein the monitoring command is used for obtaining state information of services in the server to be deployed after the server to be deployed executes the at least one deployment operation command;
the deployment platform receives the execution content and the execution result of the at least one deployment operation command sent by the server to be deployed and the state information of the service in the server to be deployed.
Optionally, the deployment parameters of the server to be deployed include a deployment type of the server to be deployed;
the deployment platform generates at least one deployment operation command according to the deployment parameters of the server to be deployed, and the deployment platform comprises:
And the deployment platform generates at least one deployment operation command according to the deployment type of the server to be deployed.
Optionally, each of the at least one deployment operation command corresponds to one monitoring command.
Optionally, the method further comprises:
the deployment platform generates a deployment record of the server cluster according to the execution content and the execution result of the at least one deployment operation command sent by each server to be deployed in the server cluster and the state information of the service in the server to be deployed.
Optionally, the at least one deployment operation command includes a service operation command, and a monitoring command corresponding to the service operation command is a command for acquiring service information;
the deployment platform sends the at least one deployment operation command to the server to be deployed, so that the server to be deployed executes the at least one deployment operation command to deploy a service and obtains execution content and execution results of the at least one deployment operation command, and generates a monitoring command corresponding to the at least one deployment operation command according to attribute information of the server to be deployed, wherein the monitoring command is used for obtaining state information of services in the server to be deployed after the server to be deployed executes the at least one deployment operation command, and the monitoring command comprises:
The deployment platform sends the service operation command to the server to be deployed so that the server to be deployed executes the service operation command and modifies the service state of the server to be deployed; and acquiring execution content and execution results of the service operation command, and generating a command for acquiring service information according to the attribute information of the server to be deployed, wherein the command for acquiring the service information is used for acquiring the state information of the service in the server to be deployed after the server to be deployed executes the service operation command.
Optionally, the at least one deployment operation command includes a service operation command, and the monitoring command corresponding to the service operation command is a command for acquiring a service self-starting state;
the deployment platform sends the at least one deployment operation command to the server to be deployed, so that the server to be deployed executes the at least one deployment operation command to deploy a service and obtains execution content and execution results of the at least one deployment operation command, and generates a monitoring command corresponding to the at least one deployment operation command according to attribute information of the server to be deployed, wherein the monitoring command is used for obtaining state information of services in the server to be deployed after the server to be deployed executes the at least one deployment operation command, and the monitoring command comprises:
The deployment platform sends the service operation command to the server to be deployed so that the server to be deployed executes the service operation command, self-starting parameters of the service of the server to be deployed are set, execution content and execution results of the service operation command are obtained, a command for obtaining a service self-starting state is generated according to attribute information of the server to be deployed, and the command for obtaining the service self-starting state is used for obtaining self-starting state information of the service in the server to be deployed after the server to be deployed executes the service operation command.
In one aspect, an embodiment of the present application provides a cluster deployment method, including:
the method comprises the steps that a server to be deployed receives at least one deployment operation command sent by a deployment platform, wherein the at least one deployment operation command is determined by the deployment platform according to deployment parameters of the server to be deployed, and the server to be deployed is any server to be deployed in a server cluster;
the server to be deployed executes the deployment service of the at least one deployment operation command, and obtains execution content and execution results of the at least one deployment operation command;
The server to be deployed generates a monitoring command corresponding to the at least one deployment operation command according to the attribute information of the server to be deployed;
the server to be deployed executes the monitoring command and acquires the state information of the service in the server to be deployed;
and the server to be deployed sends the execution content and the execution result of the at least one deployment operation command and the state information of the service in the server to be deployed to the deployment platform.
Optionally, each of the at least one deployment operation command corresponds to one monitoring command.
Optionally, the at least one deployment operation command includes a service operation command, and a monitoring command corresponding to the service operation command is a command for acquiring service information;
the server to be deployed executes the deployment service of the at least one deployment operation command, and obtains execution content and execution results of the at least one deployment operation command, including:
the server to be deployed executes the service operation command, modifies the service state of the server to be deployed, and obtains the execution content and the execution result of the at least one service operation command;
the server to be deployed generates a monitoring command corresponding to the at least one deployment operation command according to the attribute information of the server to be deployed, and the monitoring command comprises:
The server to be deployed generates a command for acquiring service information according to the attribute information of the server to be deployed;
the server to be deployed executes the monitoring command, and obtains the state information of the service in the server to be deployed, including:
and the server to be deployed executes the command for acquiring the service information and acquires the state information of the service in the server to be deployed after the server to be deployed executes the service operation command.
Optionally, the at least one deployment operation command includes a service operation command, and the monitoring command corresponding to the service operation command is a command for acquiring a service self-starting state;
the server to be deployed executes the deployment service of the at least one deployment operation command, and obtains execution content and execution results of the at least one deployment operation command, including:
the server to be deployed executes the service operation command, sets the self-starting parameters of the service of the server to be deployed, and obtains the execution content and the execution result of the service operation command;
the server to be deployed generates a monitoring command corresponding to the at least one deployment operation command according to the attribute information of the server to be deployed, and the monitoring command comprises:
The server to be deployed generates a command for acquiring the service self-starting state according to the attribute information of the server to be deployed;
the server to be deployed executes the monitoring command, and obtains the state information of the service in the server to be deployed, including:
and the server to be deployed executes the command for acquiring the service self-starting state, and acquires the self-starting state information of the service in the server to be deployed after the server to be deployed executes the service operation command.
In one aspect, an embodiment of the present application provides a deployment platform, including:
the first processing module is used for generating at least one deployment operation command according to the deployment parameters of each server to be deployed in the server cluster;
the first sending module is used for sending the at least one deployment operation command to the server to be deployed so that the server to be deployed executes the at least one deployment operation command to deploy a service and obtains execution content and an execution result of the at least one deployment operation command, and generating a monitoring command corresponding to the at least one deployment operation command according to attribute information of the server to be deployed, wherein the monitoring command is used for obtaining state information of services in the server to be deployed after the server to be deployed executes the at least one deployment operation command;
The first receiving module is used for receiving the execution content and the execution result of the at least one deployment operation command sent by the server to be deployed and the state information of the service in the server to be deployed.
Optionally, the deployment parameters of the server to be deployed include a deployment type of the server to be deployed;
the first processing module is specifically configured to:
and generating at least one deployment operation command according to the deployment type of the server to be deployed.
Optionally, each of the at least one deployment operation command corresponds to one monitoring command.
Optionally, the first processing module is further configured to:
and generating a deployment record of the server cluster according to the execution content and the execution result of the at least one deployment operation command sent by each server to be deployed in the server cluster and the state information of the service in the server to be deployed.
Optionally, the at least one deployment operation command includes a service operation command, and a monitoring command corresponding to the service operation command is a command for acquiring service information;
the first sending module is specifically configured to:
the service operation command is sent to the server to be deployed, so that the server to be deployed executes the service operation command, the service state of the server to be deployed is modified, the execution content and the execution result of the service operation command are obtained, and a command for obtaining service information is generated according to the attribute information of the server to be deployed, and the command for obtaining the service information is used for obtaining the state information of the service in the server to be deployed after the server to be deployed executes the service operation command.
Optionally, the at least one deployment operation command includes a service operation command, and the monitoring command corresponding to the service operation command is a command for acquiring a service self-starting state;
the first sending module is specifically configured to:
the service operation command is sent to the server to be deployed, so that the server to be deployed executes the service operation command, self-starting parameters of the service of the server to be deployed are set, execution content and execution results of the service operation command are obtained, a command for obtaining a service self-starting state is generated according to attribute information of the server to be deployed, and the command for obtaining the service self-starting state is used for obtaining self-starting state information of the service in the server to be deployed after the server to be deployed executes the service operation command.
In one aspect, an embodiment of the present application provides a server to be deployed, including:
the second receiving module is used for receiving at least one deployment operation command sent by a deployment platform, wherein the at least one deployment operation command is determined by the deployment platform according to the deployment parameters of the servers to be deployed, and the servers to be deployed are any one server to be deployed in a server cluster;
The second processing module is used for executing the at least one deployment operation command deployment service and acquiring the execution content and the execution result of the at least one deployment operation command; generating a monitoring command corresponding to the at least one deployment operation command according to the attribute information of the server to be deployed; executing the monitoring command and acquiring the state information of the service in the server to be deployed;
and the second sending module is used for sending the execution content and the execution result of the at least one deployment operation command and the state information of the service in the server to be deployed to the deployment platform.
Optionally, each of the at least one deployment operation command corresponds to one monitoring command.
Optionally, the at least one deployment operation command includes a service operation command, and a monitoring command corresponding to the service operation command is a command for acquiring service information;
the second processing module is specifically configured to:
executing the service operation command, modifying the service state of the server to be deployed, and acquiring the execution content and the execution result of the service operation command; generating a command for acquiring service information according to the attribute information of the server to be deployed; and executing the command for acquiring the service information, and acquiring the state information of the service in the server to be deployed after the server to be deployed executes the service operation command.
Optionally, the at least one deployment operation command includes a service operation command, and the monitoring command corresponding to the service operation command is a command for acquiring a service self-starting state;
the second processing module is specifically configured to:
executing the service operation command, setting a self-starting parameter of the service of the server to be deployed, and acquiring execution content and execution result of the service operation command; generating a command for acquiring the service self-starting state according to the attribute information of the server to be deployed; and executing the command for acquiring the service self-starting state, and acquiring the self-starting state information of the service in the server to be deployed after the server to be deployed executes the service operation command.
In the embodiment of the application, at least one deployment operation command is generated according to the deployment parameters for each server to be deployed and sent to the server to be deployed. And the server to be deployed executes at least one deployment operation command to complete the deployment service, and obtains the execution content and the execution result of the at least one deployment operation command. And then generating a monitoring command corresponding to at least one deployment operation command according to the attribute information of the monitoring command, wherein the monitoring command is used for acquiring the state information of the service in the server to be deployed. And then, the execution content and the execution result of the deployment operation commands and the state information of the service in the server to be deployed are sent to the deployment platform, so that the deployment platform can learn the influence of each deployment operation command on the server to be deployed in the deployment process, and when the influence of cluster deployment on the server to be deployed needs to be checked under the condition that the server to be deployed breaks down, the execution content and the execution result of each deployment operation command in the deployment process and the state information of the service in the server to be deployed can be directly acquired from the deployment platform, and the execution result does not need to be checked by gradually executing the deployment operation commands, thereby improving the checking efficiency on one hand and reducing the workload on the other hand.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly described below, it will be apparent that the drawings in the following description are only some embodiments of the present application, and that other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a diagram of an application scenario in which an embodiment of the present application is applicable;
fig. 2 is a schematic flow chart of a cluster deployment method according to an embodiment of the present application;
fig. 3 is a schematic flow chart of a cluster deployment method according to an embodiment of the present application;
fig. 4 is a schematic flow chart of a cluster deployment method according to an embodiment of the present application;
fig. 5 is a schematic flow chart of a cluster deployment method according to an embodiment of the present application;
FIG. 6 is a schematic structural diagram of a deployment platform according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a server to be deployed according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantageous effects of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
The cluster deployment method in the embodiment of the application can be applied to an application scene shown in fig. 1, wherein the application scene comprises a deployment platform 101 and a server cluster 102 to be deployed.
When a user needs to deploy a server cluster, the user can select or customize to add the server 103 to be deployed and the deployment parameters of the server 103 to be deployed in the deployment interface of the deployment platform 101. For each server to be deployed 103 that a user needs to deploy, the deployment platform 101 generates at least one deployment operation command according to the deployment parameters of the server to be deployed 103 and sends the deployment operation command to the servers to be deployed 103 in the server cluster to be deployed 102. The server to be deployed 103 executes at least one deployment operation command to complete the deployment server, and obtains execution content and execution results of the at least one deployment operation command. The server 103 to be deployed generates a monitoring command corresponding to at least one deployment operation command according to the attribute information of the server 103 to be deployed, executes the monitoring command, and acquires the state information of the service in the server 103 to be deployed. The server to be deployed 103 transmits the execution content and execution result of at least one deployment operation command and the state information of the service in the server to be deployed 103 to the deployment platform 101.
Based on the application scenario diagram shown in fig. 1, the embodiment of the application provides a cluster deployment method, and the flow of the method can be interactively executed by a deployment platform and a server to be deployed, as shown in fig. 2, and the method comprises the following steps:
step S201, for each server to be deployed in the server cluster, the deployment platform generates at least one deployment operation command according to the deployment parameters of the server to be deployed.
The deployment parameters of the server to be deployed include attribute information and deployment type of the server to be deployed, wherein the deployment type of the server to be deployed includes, but is not limited to, search service (elastic search), open source stream processing platform (kakfa), authentication service (key), mirror service (glance). The attribute information of the server to be deployed includes the operating system type, operating system version, number of the server to be deployed, and the like of the server to be deployed. In step S202, the deployment platform sends at least one deployment operation command to the server to be deployed. Step S203, the server to be deployed executes at least one deployment operation command deployment service, and obtains execution content and execution result of at least one deployment operation command.
The server to be deployed sequentially executes a plurality of deployment operation commands to complete deployment service, and after each deployment operation command is executed by the server to be deployed, an execution result of the deployment operation command is obtained.
Illustratively, when the kakfa is configured to be deployed in the server to be deployed, the command for modifying the configuration file is executed, and after the server to be deployed modifies the configuration file, information such as the name, the storage location, the modified content and the like of the configuration file modified in the server to be deployed is obtained.
Step S204, the server to be deployed generates at least one monitoring command corresponding to the deployment operation command according to the attribute information of the server to be deployed.
Optionally, after the user authorization is obtained, the deployment platform may carry instruction information for generating the monitoring command in the deployment operation command, so that after the server to be deployed executes the deployment operation command, at least one monitoring command corresponding to the deployment operation command is generated according to the attribute information of the server to be deployed, and the attribute information of different servers to be deployed corresponds to different monitoring commands.
Step S205, the server to be deployed executes the monitoring command to acquire the state information of the service in the server to be deployed.
In step S206, the server to be deployed sends the execution content and the execution result of the at least one deployment operation command and the status information of the service in the server to be deployed to the deployment platform.
When the server to be deployed is deployed, the server to be deployed executes the deployment operation command to deploy the service, the execution content and the execution result of the deployment operation command are obtained, and the execution monitoring command obtains the state information of the service in the server to be deployed and sends the state information to the deployment platform, so that after the cluster service is deployed, accurate and fine-grained information is provided for operation and maintenance personnel, the operation and maintenance personnel can confirm the deployment result in time, and deployment errors are avoided. When the server to be deployed has faults and the like and the influence of cluster deployment on the server to be deployed is required to be checked, the execution content and the execution result of each deployment operation command in the deployment process and the service state after each deployment operation command is executed can be directly obtained from the deployment platform, and the execution result is not required to be checked by gradually executing the deployment operation commands, so that the checking efficiency is improved on one hand, and the workload is reduced on the other hand.
Optionally, in the step S201, the deployment platform generates at least one deployment operation command according to the deployment type of the server to be deployed.
Specifically, for a deployment type, such as deployment kakfa, a deployment operation command to be executed may be determined according to a process of deploying kakfa, and further, the deployment operation command may be adjusted according to the operating system type and the attribute information such as the operating system version of the server to be deployed, so that the deployment operation command can be executed in the server to be deployed.
Optionally, in the above step S204, the attribute information of the server to be deployed includes an operating system type, an operating system version, and the like of the server to be deployed. And determining a monitoring command corresponding to the deployment operation command based on the deployment operation command, the type of the operating system of the server to be deployed, the version of the operating system and other attribute information.
In one possible implementation, when the monitoring command corresponding to the at least one deployment operation command is generated, each deployment operation command in the at least one deployment operation command corresponds to one monitoring command. Illustratively, when the kakfa is deployed in the server to be deployed, 8 deployment operation commands are generated, and then 8 corresponding monitoring commands are generated according to the 8 deployment operation commands and the attribute information of the server to be deployed.
In another possible implementation manner, when the monitoring command corresponding to the at least one deployment operation command is generated, the number of the monitoring commands is smaller than the number of the deployment operation commands. Illustratively, when the kakfa is deployed in the server to be deployed, 8 deployment operation commands are generated, and then 1 corresponding monitoring command is generated according to the 8 deployment operation commands and the attribute information of the server to be deployed.
When the cluster service is deployed, the deployment operation command and the monitoring command are executed in the server to be deployed, the execution content and the execution result of the deployment operation command and the state information of the service in the server to be deployed are obtained by executing the monitoring command, fine-granularity deployment information is provided for operation and maintenance personnel, the operation and maintenance personnel can confirm the deployment result in time, and deployment errors are avoided.
Optionally, in the step S206, after the server to be deployed sends the execution content and the execution result of the at least one deployment operation command and the state of the service in the server to be deployed to the deployment platform, the deployment platform generates the deployment record of the server cluster according to the execution content and the execution result of the at least one deployment operation command sent by each server to be deployed in the server cluster and the state of the service in the server to be deployed, so that the user queries the influence of each deployment operation command on the server to be deployed in the deployment process, and ensures standardization in the operation and maintenance process.
In one possible implementation manner, for each server to be deployed in the server cluster, after the server to be deployed executes a deployment operation command, a corresponding monitoring command is executed, and execution content and execution result of the deployment operation command and a state of a service in the server to be deployed are obtained and sent to the deployment platform.
In one possible implementation manner, after executing a deployment operation command, the server to be deployed executes a corresponding monitoring command, obtains execution content and execution result of the deployment operation command and a state of a service in the server to be deployed, and stores the state in the server to be deployed. After the deployment is finished, the server to be deployed sends the execution content and the execution result of each deployment operation command acquired in the deployment process and the state of the service in the server to be deployed to the deployment platform.
Optionally, when the at least one deployment operation command includes a service operation command, and the monitoring command corresponding to the service operation command is a command for obtaining service information, the deployment platform performs cluster deployment in the following manner, as shown in fig. 3, and includes the following steps:
In step S301, the deployment platform determines a service operation command according to the deployment parameters.
In step S302, the deployment platform sends the service operation command to the server to be deployed.
Step S303, the server to be deployed executes the service operation command, modifies the state of the service of the server to be deployed, and obtains the execution content and the execution result of the service operation command.
Step S304, the server to be deployed generates a command for acquiring service information according to the attribute information of the server to be deployed.
In step S305, the server to be deployed executes the command for acquiring the service information, and acquires the state information of the service in the server to be deployed after the server to be deployed executes the service operation command.
In step S306, the server to be deployed sends the execution content and the execution result of the service operation command and the status information of the service in the server to be deployed to the deployment platform.
Specifically, the service operation command includes at least a start service, an update service, a stop service, and the like. When the service operation command is a service start command, the server to be deployed executes the service start command, and the state of the service of the server to be deployed is modified from the original service stop to the service start. And then executing a command for acquiring service information, and acquiring the current state of the service, the starting mode of the service, the process identification and the like in the server to be deployed. And then, the execution content and the execution result of the acquired service operation command are sent to the deployment platform.
Optionally, when the at least one deployment operation command includes a service operation command, and the monitoring command corresponding to the service operation command is a command for acquiring a service self-starting state, the deployment platform performs cluster deployment in the following manner, as shown in fig. 4, and includes the following steps:
in step S401, the deployment platform determines a service operation command according to the deployment parameters.
In step S402, the deployment platform sends a service operation command to the server to be deployed.
Step S403, the server to be deployed executes the service operation command, sets the self-starting parameters of the service of the server to be deployed, and obtains the execution content and the execution result of the service operation command.
Step S404, the server to be deployed generates a command for acquiring the service self-starting state according to the attribute information of the server to be deployed.
Step S405, the server to be deployed executes the command for obtaining the service self-starting state, and obtains the self-starting state information of the service in the server to be deployed after the server to be deployed executes the service operation command.
Step S406, the server to be deployed sends the execution content and the execution result of the service operation command to the deployment platform.
Specifically, the service operation command further includes setting service self-start and setting service non-self-start. When the service operation command is a set service self-start, the server to be deployed executes the service operation command, and the self-start parameter of the service of the server to be deployed is set as the service self-start. And then executing a command for acquiring the service self-starting state, and acquiring the self-starting state and the self-starting mode of the service in the server to be deployed.
In order to better explain the embodiments of the present application, a cluster deployment method provided by the present application is described below in connection with a specific implementation scenario, where the method may be performed interactively by a deployment platform and a server to be deployed, and a user is set to deploy kakfa in the servers to be deployed of a server cluster, where the server cluster includes 5 servers to be deployed, which are respectively a first server to a fifth server to be deployed, and specifically includes the following steps, as shown in fig. 5:
step S501, aiming at the first server to be deployed, the deployment platform generates 3 deployment operation commands according to the deployment parameters of the first server to be deployed.
In step S502, the deployment platform sends 3 deployment operation commands to the first server to be deployed.
In step S503, the first server to be deployed sequentially executes 3 deployment operation commands, and after each deployment operation command is executed, the execution content and the execution result of the deployment operation command are obtained.
In step S504, the first server to be deployed generates 1 monitoring command according to its own attribute information.
In step S505, after executing one deployment operation command, the first server to be deployed executes the monitoring command to obtain the state information of the service.
In step S506, the first server to be deployed sends the execution content and the execution result of the 3 deployment operation commands and the state information of the service after each execution of one deployment operation command to the deployment platform.
It should be noted that, the method for deploying the second to fifth servers to be deployed is the same as the method for deploying the first server to be deployed, and will not be repeated here.
In step S507, the deployment platform generates a deployment record of the server cluster according to the execution content and the execution result of the deployment operation command sent by each server to be deployed in the server cluster and the state information of the service.
When the server cluster is deployed, the servers to be deployed in the server cluster execute the deployment operation command to deploy the service, the execution content and the execution result of the deployment operation command are obtained, the execution monitoring command obtains the state information of the services in the servers to be deployed and sends the state information to the deployment platform, so that accurate and fine-grained information is provided for operation and maintenance personnel, the operation and maintenance personnel can confirm the deployment result in time, and deployment errors are avoided. When the server to be deployed has faults and the like and the influence of cluster deployment on the server to be deployed is required to be checked, the execution content and the execution result of each deployment operation command in the deployment process and the service state after each deployment operation command is executed can be directly obtained from the deployment platform, and the execution result is not required to be checked by gradually executing the deployment operation commands, so that the checking efficiency is improved on one hand, and the workload is reduced on the other hand.
Based on the same technical concept, the embodiment of the present invention provides a deployment platform, as shown in fig. 6, the deployment platform 600 includes:
a first processing module 602, configured to generate, for each server to be deployed in the server cluster, at least one deployment operation command according to a deployment parameter of the server to be deployed;
a first sending module 603, configured to send the at least one deployment operation command to the server to be deployed, so that the server to be deployed executes the at least one deployment operation command to deploy a service and obtains execution content and an execution result of the at least one deployment operation command, and generate, according to attribute information of the server to be deployed itself, a monitoring command corresponding to the at least one deployment operation command, where the monitoring command is used to obtain, after the server to be deployed executes the at least one deployment operation command, status information of a service in the server to be deployed;
the first receiving module 601 is configured to receive execution content and execution result of the at least one deployment operation command sent by the server to be deployed, and status information of a service in the server to be deployed.
Optionally, the deployment parameters of the server to be deployed include attribute information and deployment type of the server to be deployed;
optionally, the deployment parameters of the server to be deployed include a deployment type of the server to be deployed;
the first processing module 602 is specifically configured to:
and generating at least one deployment operation command according to the deployment type of the server to be deployed.
Optionally, each of the at least one deployment operation command corresponds to one monitoring command.
Optionally, the first processing module 602 is further configured to:
and generating a deployment record of the server cluster according to the execution content and the execution result of the at least one deployment operation command sent by each server to be deployed in the server cluster and the state information of the service in the server to be deployed.
Optionally, the at least one deployment operation command includes a service operation command, and a monitoring command corresponding to the service operation command is a command for acquiring service information;
the first sending module 603 is specifically configured to:
the service operation command is sent to the server to be deployed, so that the server to be deployed executes the service operation command, the service state of the server to be deployed is modified, the execution content and the execution result of the service operation command are obtained, and a command for obtaining service information is generated according to the attribute information of the server to be deployed, and the command for obtaining the service information is used for obtaining the state information of the service in the server to be deployed after the server to be deployed executes the service operation command.
Optionally, the at least one deployment operation command includes a service operation command, and the monitoring command corresponding to the service operation command is a command for acquiring a service self-starting state;
the first sending module 603 is specifically configured to:
the service operation command is sent to the server to be deployed, so that the server to be deployed executes the service operation command, self-starting parameters of the service of the server to be deployed are set, execution content and execution results of the service operation command are obtained, a command for obtaining a service self-starting state is generated according to attribute information of the server to be deployed, and the command for obtaining the service self-starting state is used for obtaining self-starting state information of the service in the server to be deployed after the server to be deployed executes the service operation command.
Based on the same technical concept, the embodiment of the present invention provides a server to be deployed, as shown in fig. 7, the server to be deployed 700 includes:
a second receiving module 701, configured to receive at least one deployment operation command sent by a deployment platform, where the at least one deployment operation command is determined by the deployment platform according to a deployment parameter of the server to be deployed, and the server to be deployed is any one server to be deployed in a server cluster;
A second processing module 702, configured to execute the at least one deployment operation command deployment service, and obtain execution content and execution result of the at least one deployment operation command; generating a monitoring command corresponding to the at least one deployment operation command according to the attribute information of the server to be deployed; executing the monitoring command and acquiring the state information of the service in the server to be deployed;
a second sending module 703, configured to send the execution content and the execution result of the at least one deployment operation command and the status information of the service in the server to be deployed to the deployment platform.
Optionally, each of the at least one deployment operation command corresponds to one monitoring command.
Optionally, the at least one deployment operation command includes a service operation command, and a monitoring command corresponding to the service operation command is a command for acquiring service information;
the second processing module 702 is specifically configured to:
executing the service operation command, modifying the service state of the server to be deployed, and acquiring the execution content and the execution result of the service operation command; generating a command for acquiring service information according to the attribute information of the server to be deployed; and executing the command for acquiring the service information, and acquiring the state information of the service in the server to be deployed after the server to be deployed executes the service operation command.
Optionally, the at least one deployment operation command includes a service operation command, and the monitoring command corresponding to the service operation command is a command for acquiring a service self-starting state;
the second processing module 702 is specifically configured to:
executing the service operation command, setting a self-starting parameter of the service of the server to be deployed, and acquiring execution content and execution result of the service operation command; generating a command for acquiring the service self-starting state according to the attribute information of the server to be deployed; and executing the command for acquiring the service self-starting state, and acquiring the self-starting state information of the service in the server to be deployed after the server to be deployed executes the service operation command.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present invention without departing from the spirit or scope of the invention. Thus, it is intended that the present invention also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.

Claims (20)

1. A cluster deployment method, comprising:
aiming at each server to be deployed in a server cluster, a deployment platform generates at least one deployment operation command according to deployment parameters of the server to be deployed;
the deployment platform sends the at least one deployment operation command to the server to be deployed so that the server to be deployed executes the at least one deployment operation command to deploy a service and obtains execution content and execution results of each deployment operation command, and generates a monitoring command corresponding to the at least one deployment operation command according to attribute information of the server to be deployed, wherein the monitoring command is used for obtaining state information of services in the server to be deployed after the server to be deployed executes each deployment operation command;
the deployment platform receives the execution content and the execution result of each deployment operation command sent by the server to be deployed and the state information of the service in the server to be deployed.
2. The method of claim 1, wherein the deployment parameters of the server to be deployed comprise a deployment type of the server to be deployed;
the deployment platform generates at least one deployment operation command according to the deployment parameters of the server to be deployed, and the deployment platform comprises:
and the deployment platform generates at least one deployment operation command according to the deployment type of the server to be deployed.
3. The method of claim 1, wherein each of the at least one deployment operation command corresponds to a monitor command.
4. The method as recited in claim 1, further comprising:
the deployment platform generates a deployment record of the server cluster according to the execution content and the execution result of the at least one deployment operation command sent by each server to be deployed in the server cluster and the state information of the service in the server to be deployed.
5. The method according to any one of claims 1 to 4, wherein the at least one deployment operation command includes a service operation command, and a monitoring command corresponding to the service operation command is a command for acquiring service information;
the deployment platform sends the at least one deployment operation command to the server to be deployed, so that the server to be deployed executes the at least one deployment operation command to deploy a service and obtains execution content and execution results of each deployment operation command, and generates a monitoring command corresponding to the at least one deployment operation command according to attribute information of the server to be deployed, wherein the monitoring command is used for obtaining state information of services in the server to be deployed after the server to be deployed executes each deployment operation command, and the monitoring command comprises the following steps:
The deployment platform sends the service operation command to the server to be deployed so that the server to be deployed executes the service operation command and modifies the service state of the server to be deployed; and acquiring execution content and execution results of the service operation command, and generating a command for acquiring service information according to the attribute information of the server to be deployed, wherein the command for acquiring the service information is used for acquiring the state information of the service in the server to be deployed after the server to be deployed executes the service operation command.
6. The method according to any one of claims 1 to 4, wherein the at least one deployment operation command includes a service operation command, and the monitoring command corresponding to the service operation command is a command for acquiring a service self-starting state;
the deployment platform sends the at least one deployment operation command to the server to be deployed, so that the server to be deployed executes the at least one deployment operation command to deploy a service and obtains execution content and execution results of each deployment operation command, and generates a monitoring command corresponding to the at least one deployment operation command according to attribute information of the server to be deployed, wherein the monitoring command is used for obtaining state information of services in the server to be deployed after the server to be deployed executes each deployment operation command, and the monitoring command comprises the following steps:
The deployment platform sends the service operation command to the server to be deployed so that the server to be deployed executes the service operation command, self-starting parameters of the service of the server to be deployed are set, execution content and execution results of the service operation command are obtained, a command for obtaining a service self-starting state is generated according to attribute information of the server to be deployed, and the command for obtaining the service self-starting state is used for obtaining self-starting state information of the service in the server to be deployed after the server to be deployed executes the service operation command.
7. A cluster deployment method, comprising:
the method comprises the steps that a server to be deployed receives at least one deployment operation command sent by a deployment platform, wherein the at least one deployment operation command is determined by the deployment platform according to deployment parameters of the server to be deployed, and the server to be deployed is any server to be deployed in a server cluster;
the server to be deployed executes the deployment service of the at least one deployment operation command, and obtains the execution content and the execution result of each deployment operation command;
the server to be deployed generates a monitoring command corresponding to the at least one deployment operation command according to the attribute information of the server to be deployed;
The server to be deployed executes the monitoring command, and state information of services in the server to be deployed is obtained after the server to be deployed executes each deployment operation command;
and the server to be deployed sends the execution content and the execution result of each deployment operation command and the state information of the service in the server to be deployed to the deployment platform.
8. The method of claim 7, wherein each of the at least one deployment operation command corresponds to a monitor command.
9. The method according to claim 7 or 8, wherein the at least one deployment operation command includes a service operation command, and the monitoring command corresponding to the service operation command is a command for acquiring service information;
the server to be deployed executes the deployment service of the at least one deployment operation command, and obtains execution content and execution results of each deployment operation command, including:
the server to be deployed executes the service operation command, modifies the service state of the server to be deployed, and obtains the execution content and the execution result of the service operation command;
the server to be deployed generates a monitoring command corresponding to the at least one deployment operation command according to the attribute information of the server to be deployed, and the monitoring command comprises:
The server to be deployed generates a command for acquiring service information according to the attribute information of the server to be deployed;
the server to be deployed executes the monitoring command, and obtains the state information of the service in the server to be deployed after the server to be deployed executes each deployment operation command, including:
and the server to be deployed executes the command for acquiring the service information and acquires the state information of the service in the server to be deployed after the server to be deployed executes the service operation command.
10. The method according to claim 7 or 8, wherein the at least one deployment operation command includes a service operation command, and the monitoring command corresponding to the service operation command is a command for acquiring a service self-starting state;
the server to be deployed executes the deployment service of the at least one deployment operation command, and obtains execution content and execution result of each deployment operation command, including:
the server to be deployed executes the service operation command, sets the self-starting parameters of the service of the server to be deployed, and obtains the execution content and the execution result of the service operation command;
the server to be deployed generates a monitoring command corresponding to the at least one deployment operation command according to the attribute information of the server to be deployed, and the monitoring command comprises:
The server to be deployed generates a command for acquiring the service self-starting state according to the attribute information of the server to be deployed;
the server to be deployed executes the monitoring command, and obtains the state information of the service in the server to be deployed after the server to be deployed executes each deployment operation command, including:
and the server to be deployed executes the command for acquiring the service self-starting state, and acquires the self-starting state information of the service in the server to be deployed after the server to be deployed executes the service operation command.
11. A deployment platform, comprising:
the first processing module is used for generating at least one deployment operation command according to the deployment parameters of each server to be deployed in the server cluster;
the first sending module is used for sending the at least one deployment operation command to the server to be deployed so that the server to be deployed executes the at least one deployment operation command to deploy a service and obtains execution content and execution results of each deployment operation command, and generating a monitoring command corresponding to the at least one deployment operation command according to attribute information of the server to be deployed, wherein the monitoring command is used for obtaining state information of services in the server to be deployed after the server to be deployed executes each deployment operation command;
The first receiving module is used for receiving the execution content and the execution result of each deployment operation command sent by the server to be deployed and the state information of the service in the server to be deployed.
12. The deployment platform of claim 11, wherein the deployment parameters of the server to be deployed comprise a deployment type of the server to be deployed;
the first processing module is specifically configured to:
and generating at least one deployment operation command according to the deployment type of the server to be deployed.
13. The deployment platform of claim 11, wherein each of the at least one deployment operation command corresponds to a monitor command.
14. The deployment platform of claim 11, wherein the first processing module is further to:
and generating a deployment record of the server cluster according to the execution content and the execution result of the at least one deployment operation command sent by each server to be deployed in the server cluster and the state information of the service in the server to be deployed.
15. The deployment platform of any of claims 11 to 14, wherein the at least one deployment operation command comprises a service operation command, and the monitoring command corresponding to the service operation command is a command for acquiring service information;
The first sending module is specifically configured to:
the service operation command is sent to the server to be deployed, so that the server to be deployed executes the service operation command, the service state of the server to be deployed is modified, the execution content and the execution result of the service operation command are obtained, and a command for obtaining service information is generated according to the attribute information of the server to be deployed, and the command for obtaining the service information is used for obtaining the state information of the service in the server to be deployed after the server to be deployed executes the service operation command.
16. The deployment platform of any one of claims 11 to 14, wherein the at least one deployment operation command comprises a service operation command, and the monitoring command corresponding to the service operation command is a command for acquiring a service self-starting state;
the first sending module is specifically configured to:
the service operation command is sent to the server to be deployed, so that the server to be deployed executes the service operation command, self-starting parameters of the service of the server to be deployed are set, execution content and execution results of the service operation command are obtained, a command for obtaining a service self-starting state is generated according to attribute information of the server to be deployed, and the command for obtaining the service self-starting state is used for obtaining self-starting state information of the service in the server to be deployed after the server to be deployed executes the service operation command.
17. A server to be deployed, comprising:
the second receiving module is used for receiving at least one deployment operation command sent by a deployment platform, wherein the at least one deployment operation command is determined by the deployment platform according to the deployment parameters of the servers to be deployed, and the servers to be deployed are any one server to be deployed in a server cluster;
the second processing module is used for executing the at least one deployment operation command deployment service and acquiring the execution content and the execution result of each deployment operation command; generating a monitoring command corresponding to the at least one deployment operation command according to the attribute information of the server to be deployed; executing the monitoring command, and acquiring state information of services in the server to be deployed after the server to be deployed executes each deployment operation command;
and the second sending module is used for sending the execution content and the execution result of each deployment operation command and the state information of the service in the server to be deployed to the deployment platform.
18. The server to be deployed of claim 17, wherein each of the at least one deployment operation command corresponds to a monitoring command.
19. The server to be deployed according to claim 17 or 18, wherein the at least one deployment operation command includes a service operation command, and the monitoring command corresponding to the service operation command is a command for acquiring service information;
the second processing module is specifically configured to:
executing the service operation command, modifying the service state of the server to be deployed, and acquiring the execution content and the execution result of the service operation command; generating a command for acquiring service information according to the attribute information of the server to be deployed; and executing the command for acquiring the service information, and acquiring the state information of the service in the server to be deployed after the server to be deployed executes the service operation command.
20. The server to be deployed according to claim 17 or 18, wherein the at least one deployment operation command includes a service operation command, and the monitoring command corresponding to the service operation command is a command for acquiring a service self-starting state;
the second processing module is specifically configured to:
executing the service operation command, setting a self-starting parameter of the service of the server to be deployed, and acquiring execution content and execution result of the service operation command; generating a command for acquiring the service self-starting state according to the attribute information of the server to be deployed; and executing the command for acquiring the service self-starting state, and acquiring the self-starting state information of the service in the server to be deployed after the server to be deployed executes the service operation command.
CN201910115985.5A 2019-02-15 2019-02-15 Cluster deployment method, deployment platform and server to be deployed Active CN111581042B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910115985.5A CN111581042B (en) 2019-02-15 2019-02-15 Cluster deployment method, deployment platform and server to be deployed

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910115985.5A CN111581042B (en) 2019-02-15 2019-02-15 Cluster deployment method, deployment platform and server to be deployed

Publications (2)

Publication Number Publication Date
CN111581042A CN111581042A (en) 2020-08-25
CN111581042B true CN111581042B (en) 2023-09-12

Family

ID=72110812

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910115985.5A Active CN111581042B (en) 2019-02-15 2019-02-15 Cluster deployment method, deployment platform and server to be deployed

Country Status (1)

Country Link
CN (1) CN111581042B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112199256A (en) * 2020-10-16 2021-01-08 济南浪潮数据技术有限公司 Deployment event monitoring method, device and equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017067449A1 (en) * 2015-10-19 2017-04-27 中兴通讯股份有限公司 Deployment method and system for cloud platform
WO2017206667A1 (en) * 2016-06-03 2017-12-07 中兴通讯股份有限公司 Method and device for distributively deploying hadoop cluster
CN108763471A (en) * 2018-05-29 2018-11-06 郑州云海信息技术有限公司 The method and system of HTTP file servers in a kind of deployment cluster

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103873279B (en) * 2012-12-13 2015-07-15 腾讯科技(深圳)有限公司 Server management method and server management device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017067449A1 (en) * 2015-10-19 2017-04-27 中兴通讯股份有限公司 Deployment method and system for cloud platform
WO2017206667A1 (en) * 2016-06-03 2017-12-07 中兴通讯股份有限公司 Method and device for distributively deploying hadoop cluster
CN108763471A (en) * 2018-05-29 2018-11-06 郑州云海信息技术有限公司 The method and system of HTTP file servers in a kind of deployment cluster

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
秦中盛 ; 王寅峰 ; 董小社 ; .支持网格监控服务自动部署的系统.华中科技大学学报(自然科学版).2006,(S1),全文. *

Also Published As

Publication number Publication date
CN111581042A (en) 2020-08-25

Similar Documents

Publication Publication Date Title
CN109302522B (en) Test method, test device, computer system, and computer medium
CN110908859B (en) Application service processing method, device, terminal and storage medium
CN108874678B (en) Automatic testing method and device for intelligent program
CN106612204B (en) Service checking method and device
CN107015902B (en) Test method and test equipment
CN110750415B (en) Interface service configuration method, device, medium and computer equipment
CN110532021B (en) Processing method of configuration file of distributed control system, client and service device
CN111159039A (en) Service simulation method, system, device and storage medium
CN111258913A (en) Automatic algorithm testing method and device, computer system and readable storage medium
WO2023125851A1 (en) Remote diagnostics method and apparatus, electronic device and storage medium
CN112463588A (en) Automatic test system and method, storage medium and computing equipment
CN112114897B (en) Parameter configuration method and device based on industrial control screen and computer equipment
US9380001B2 (en) Deploying and modifying a service-oriented architecture deployment environment model
CN111258591A (en) Program deployment task execution method and device, computer equipment and storage medium
CN111651365B (en) Automatic interface testing method and device
CN111506358B (en) Method and device for updating container configuration
CN108628733B (en) Method and device for testing batch service processing operation
CN111581042B (en) Cluster deployment method, deployment platform and server to be deployed
CN113094251A (en) Embedded system testing method and device, computer equipment and storage medium
CN115129574A (en) Code testing method and device
CN110737426B (en) Program block creating method, program block creating device, computer equipment and storage medium
CN113590494B (en) Automatic testing method for cloud native environment vulnerability
CN106528402B (en) Method and system for testing terminal
CN115495367A (en) Test method and test device
CN114610446A (en) Method, device and system for automatically injecting probe

Legal Events

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