Operation and maintenance method and device
By adopting a multi-cluster deployment method in the operation and maintenance tools, the bootstrapping and self-operation and maintenance of the operation and maintenance tools are realized, which solves the problems of low operation and maintenance efficiency and high cost of the operation and maintenance tools in the existing technology, and improves the reliability and reliability of the operation and maintenance. efficiency, reducing operation and maintenance costs and system complexity.
Patent Information
- Application Number
- CN202310315021.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-28
- Publication Date
- 2024-10-15
AI Technical Summary
The existing operation and maintenance tools themselves have low operation and maintenance efficiency, high cost and insufficient reliability. They lack efficient methods to support their own daily operation and maintenance, expansion and contraction and other operation and maintenance operations.
Adopting a multi-cluster deployment method, the first operation and maintenance cluster receives operation and maintenance instructions and performs operation and maintenance operations on the second operation and maintenance cluster, realizing the bootstrapping of operation and maintenance tools, reusing the capabilities of existing operation and maintenance tools, and providing unified and standardized Deployment process and automatic rollback capabilities reduce maintenance costs and system complexity.
It improves the reliability and efficiency of operation and maintenance tools, saves operation and maintenance costs, avoids dependence on external systems or services, and enhances disaster recovery capabilities and operation and maintenance reliability.
Smart Images

Figure CN118778992A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computers, and in particular to an operation and maintenance method and device. Background Art
[0002] With the increasing popularity of the DevOps development model, we increasingly emphasize the integration of development, testing, deployment, and operation and maintenance to achieve continuous response, rapid delivery, and rapid verification.
[0003] To this end, major manufacturers have built powerful deployment systems to provide software developers with unified, universal, automated, and end-state-based continuous integration, continuous delivery, and continuous deployment (CI / CD) capabilities to improve software delivery efficiency. Operation and maintenance (deployment) tools (which can be in the form of deployment systems, deployment services, etc.) operate and maintain the services they manage according to user needs, achieving efficient full life cycle management.
[0004] However, the operation and maintenance of the operation and maintenance tools themselves are usually implemented by customized scripts or relying on external modules, which is not only inefficient and costly, but also lacks reliability. Summary of the invention
[0005] The present application provides an operation and maintenance method and device to achieve efficient, highly reliable and cost-saving operation and maintenance of operation and maintenance tools.
[0006] In order to achieve the above purpose, the embodiment of the present application adopts the following technical solution:
[0007] In a first aspect, an operation and maintenance method is provided, the operation and maintenance method being applied to a first operation and maintenance cluster, wherein the operation and maintenance system in which the first operation and maintenance cluster is located further includes a second operation and maintenance cluster. The method may include: receiving an operation and maintenance instruction, the operation and maintenance instruction instructing to perform operation and maintenance on the first operation and maintenance cluster and the second operation and maintenance cluster, the first operation and maintenance cluster and the second operation and maintenance cluster are both used to run the same operation and maintenance tool, and are both used to perform operation and maintenance on the same service based on the operation and maintenance tool; and in response to the operation and maintenance instruction, performing an operation and maintenance operation on the second operation and maintenance cluster.
[0008] Through the solution provided by this application, the operation and maintenance tools are deployed in multiple clusters. When receiving the operation and maintenance instructions, one operation and maintenance cluster performs operation and maintenance operations on another cluster. Different clusters operate and maintain each other to achieve self-bootstrapping of the operation and maintenance tools. This process can reuse the capabilities of existing operation and maintenance tools, provide a unified and standard deployment process for all software in the system, as well as automatic rollback, final state-based capabilities, etc., saving operation and maintenance costs. Moreover, during the operation and maintenance process, clusters do not interfere with each other, and the operation and maintenance reliability is high. Furthermore, the multi-cluster self-operation and maintenance method no longer relies on additional systems or services, further reducing maintenance costs and system complexity.
[0009] In a possible implementation, the operation and maintenance instruction includes multiple operation and maintenance tasks, each of which carries the identifier of the target object. In response to the operation and maintenance instruction, the operation and maintenance operation is performed on the second operation and maintenance cluster. Specifically, it can be implemented as follows: according to the identifier of the target object, at least one operation and maintenance task corresponding to the second operation and maintenance cluster is determined; and at least one operation and maintenance task corresponding to the second operation and maintenance cluster is executed. The object of the operation and maintenance task is distinguished by the identifier of the target object. The first operation and maintenance cluster obtains at least one operation and maintenance task corresponding to the second operation and maintenance cluster according to the target object, and implements the operation and maintenance of the second operation and maintenance cluster.
[0010] In a possible implementation, multiple operation and maintenance tasks are stored in a message queue. Accordingly, the above-mentioned determining at least one operation and maintenance task corresponding to the second operation and maintenance cluster according to the identifier of the target object includes: reading the operation and maintenance task from the message queue; if the read operation and maintenance task corresponds to the second operation and maintenance cluster, executing the read operation and maintenance task; if the read operation and maintenance task corresponds to the first operation and maintenance cluster, returning the read operation and maintenance task to the message queue. The routing of the operation and maintenance tasks is realized through the message queue, which improves the feasibility of the solution.
[0011] In another possible implementation, the above-mentioned determining at least one operation and maintenance task corresponding to the second operation and maintenance cluster according to the identifier of the target object can be specifically implemented as follows: determining at least one operation and maintenance task corresponding to the second operation and maintenance cluster according to the operation and maintenance blacklist of the first operation and maintenance cluster, where the operation and maintenance blacklist is used to indicate that at least one operation and maintenance task corresponding to the first operation and maintenance cluster is not to be executed. By configuring the blacklist, the first operation and maintenance cluster obtains the operation and maintenance task corresponding to the second operation and maintenance cluster.
[0012] In another possible implementation, the method provided by the present application may further include: after the operation and maintenance of the operation and maintenance tool in the second operation and maintenance cluster is completed, the traffic of the operation and maintenance tool is switched to the second operation and maintenance cluster; if the operation and maintenance tool running in the second operation and maintenance cluster is abnormal, the operation and maintenance tool in the second operation and maintenance cluster is rolled back to the previous version. The operation and maintenance results are tracked, and the operation and maintenance tool is rolled back after the operation and maintenance results are abnormal.
[0013] In another possible implementation, the above-mentioned identifier may include one or more of the following: an identifier of an operation and maintenance tool, and an identifier of a service.
[0014] In another possible implementation, the method provided by the present application may further include: the operation and maintenance tool records the identification of the operation and maintenance tool for identifying the operation and maintenance task. After the operation and maintenance tool is initially deployed or redeployed in an extreme scenario, the identification information of the operation and maintenance tool is recorded by information reflux to accurately identify the task of operating and maintaining the operation and maintenance tool.
[0015] In another possible implementation, the second operation and maintenance cluster may be an operation and maintenance cluster, which enables the operation and maintenance tools to be deployed in the blue-green cluster. The blue and green clusters can operate each other to achieve the operation and maintenance of the operation and maintenance tools without relying on other modules, thereby achieving self-operation and maintenance of the operation and maintenance tools.
[0016] In another possible implementation, there may be multiple second operation and maintenance clusters.
[0017] In another possible implementation, different operation and maintenance clusters included in the operation and maintenance system where the first operation and maintenance cluster is located can be deployed in different availability zones (AZs) to improve disaster recovery capabilities, that is, when a single AZ fails, clusters in other AZs can still provide services.
[0018] In a second aspect, an operation and maintenance device is provided, which is deployed in a first operation and maintenance cluster. The operation and maintenance system where the first operation and maintenance cluster is located also includes a second operation and maintenance cluster. The first operation and maintenance cluster and the second operation and maintenance cluster are both used to run the same operation and maintenance tool, and are both used to operate and maintain the same service based on the operation and maintenance tool. The operation and maintenance device may include: a receiving unit and a processing unit. Among them:
[0019] The receiving unit is configured to receive an operation and maintenance instruction, wherein the operation and maintenance instruction instructs to perform operation and maintenance on the first operation and maintenance cluster and the second operation and maintenance cluster.
[0020] The processing unit is configured to execute an operation and maintenance operation on the second operation and maintenance cluster in response to the operation and maintenance instruction received by the receiving unit.
[0021] In a possible implementation, the operation and maintenance instruction includes multiple operation and maintenance tasks, each operation and maintenance task carries the identifier of the target object, and the processing unit is specifically used to: determine at least one operation and maintenance task corresponding to the second operation and maintenance cluster according to the identifier of the target object; and execute at least one operation and maintenance task corresponding to the second operation and maintenance cluster. The object of the operation and maintenance task is distinguished by the identifier of the target object, and the first operation and maintenance cluster obtains at least one operation and maintenance task corresponding to the second operation and maintenance cluster according to the target object, thereby implementing operation and maintenance of the second operation and maintenance cluster.
[0022] In another possible implementation, multiple operation and maintenance tasks are stored in a message queue; the processing unit is specifically used to: read the operation and maintenance task from the message queue; if the read operation and maintenance task corresponds to the second operation and maintenance cluster, execute the read operation and maintenance task; if the read operation and maintenance task corresponds to the first operation and maintenance cluster, return the read operation and maintenance task to the message queue. The routing of the operation and maintenance tasks is realized through the message queue, which improves the feasibility of the solution.
[0023] In another possible implementation, the processing unit is specifically used to: determine at least one operation and maintenance task corresponding to the second operation and maintenance cluster according to the operation and maintenance blacklist of the first operation and maintenance cluster, where the operation and maintenance blacklist is used to indicate that at least one operation and maintenance task corresponding to the first operation and maintenance cluster is not to be performed. By configuring the blacklist, the first operation and maintenance cluster obtains the operation and maintenance task corresponding to the second operation and maintenance cluster.
[0024] In another possible implementation, the operation and maintenance device may further include a control unit, which is used to switch the traffic of the operation and maintenance tool to the second operation and maintenance cluster after the operation and maintenance of the operation and maintenance tool in the second operation and maintenance cluster is completed; the processing unit is also used to roll back the operation and maintenance tool in the second operation and maintenance cluster to the previous version if the operation and maintenance tool running in the second operation and maintenance cluster is abnormal. The operation and maintenance results are tracked, and the operation and maintenance tool is rolled back after the operation and maintenance result is abnormal.
[0025] In another possible implementation, the above-mentioned identifier includes one or more of the following: an identifier of an operation and maintenance tool, and an identifier of a service.
[0026] In another possible implementation, the operation and maintenance device further includes a recording unit for recording the identification of the operation and maintenance tool to identify the operation and maintenance task including the identification of the operation and maintenance tool. After the operation and maintenance tool is initially deployed or redeployed in an extreme scenario, the identification information of the operation and maintenance tool is recorded by information backflow to accurately identify the task of operating and maintaining the operation and maintenance tool.
[0027] In another possible implementation, the second operation and maintenance cluster can be one operation and maintenance cluster, and the operation and maintenance tools can be deployed in two operation and maintenance clusters. The two operation and maintenance clusters are blue and green to each other, and the blue and green clusters operate each other, so that the operation and maintenance of the operation and maintenance tools does not need to rely on other modules, thereby realizing self-operation and maintenance of the operation and maintenance tools.
[0028] In another possible implementation, there may be multiple second operation and maintenance clusters.
[0029] In another possible implementation, different operation and maintenance clusters included in the operation and maintenance system where the first operation and maintenance cluster is located can be deployed in different AZs to improve disaster recovery capabilities, that is, when a single AZ fails, clusters in other AZs can still provide services.
[0030] According to a third aspect, a computing device is provided, comprising a memory and at least one processor, wherein the memory is used to store a set of computer instructions; when the processor executes the set of computer instructions, the operating steps of the method described in the first aspect or any possible implementation method are performed.
[0031] In a fourth aspect, a computer-readable storage medium is provided, comprising: computer software instructions; when the computer software instructions are executed in a computing device, the computing device executes the operating steps of the method described in the first aspect or any possible implementation method.
[0032] In a fifth aspect, a computer program product, when executed on a computer, enables the computer to execute the operation steps of the method described in the first aspect or any possible implementation manner.
[0033] It should be noted that various possible implementation methods of any of the above aspects can be combined under the premise that the solutions are not contradictory. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 A flowchart of an operation and maintenance method of an operation and maintenance tool;
[0035] Figure 2 A flowchart of an operation and maintenance method of another operation and maintenance tool;
[0036] Figure 3 A flowchart of an operation and maintenance method of another operation and maintenance tool is provided;
[0037] Figure 4 A schematic diagram of a computer architecture provided for an embodiment of the present application;
[0038] Figure 5 A schematic diagram of an initialization scenario provided in an embodiment of the present application;
[0039] Figure 6 A flowchart of an operation and maintenance method provided in an embodiment of the present application;
[0040] Figure 7 A schematic diagram of an operation and maintenance scenario provided in an embodiment of the present application;
[0041] Figure 8 A schematic diagram of another operation and maintenance scenario provided in an embodiment of the present application;
[0042] Fig. 9 A flowchart of another operation and maintenance method provided in an embodiment of the present application;
[0043] Fig.10 A schematic diagram of the structure of an operation and maintenance device provided in an embodiment of the present application;
[0044] Fig.11 A schematic diagram of the structure of a computing device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0045] To facilitate understanding, the terms involved in the embodiments of the present application are first explained.
[0046] CI / CD: A combined practice of continuous integration and continuous delivery or continuous deployment. CI / CD bridges the gap between development and operations teams by implementing automation in the building, testing, and deployment of applications. Continuous integration helps developers merge code changes into a shared branch or "trunk" more frequently. After completing the automated processes of building, unit testing, and integration testing in CI, continuous delivery can automatically publish verified code to the repository (automatically publish production-ready builds to the code repository). The final stage of the CI / CD pipeline is continuous deployment, which, as an extension of continuous delivery, can automatically publish applications to the production environment.
[0047] Load balancing: Used to distribute load among multiple computers (computer clusters), network connections, central processing units (CPUs), disk drives, or other resources to optimize resource usage, maximize throughput, minimize response time, and avoid overload.
[0048] Availability Zone (AZ): A collection of one or more physical data centers with independent power supply. Computing, network, storage and other resources are logically divided into multiple operation and maintenance clusters within the AZ. Multiple AZs in a region are connected by high-speed optical fibers to meet the needs of users to build high-availability systems across AZs.
[0049] A cluster is a group of computers that are configured with multiple instances of the same software code. An operations cluster is managed as a single system. When a client interacts with the cluster, the cluster acts like a separate server.
[0050] Operation and maintenance: A general term for operations such as upgrading, expanding, or reducing the capacity of software, systems, or services.
[0051] Blue-green deployment: is an application release mode that gradually transfers user traffic from the previous version of an application or microservice to a nearly identical new version (both of which remain running in the production environment). The old version can be called the blue environment, and the new version can be called the green environment. Once production traffic is completely transferred from blue to green, blue can remain on standby in the case of rollback or exit from production, or it can be updated to become a template for the next update.
[0052] Producer-Consumer: It is an asynchronous model, also known as the producer-consumer model. In a system, there are two roles, producer and consumer. They communicate through the memory buffer. The producer produces data to the memory buffer, and the consumer reads the message from the memory buffer.
[0053] As mentioned above, although major manufacturers have built powerful operation and maintenance tools (systems or services), there is still a lack of an efficient method for the operation and maintenance tools themselves to support their own daily operation and maintenance, expansion and contraction, and other operation and maintenance operations. Currently, the industry mostly uses the following solutions for the operation and maintenance of operation and maintenance tools:
[0054] One solution is to use a script. Figure 1 The operation and maintenance method flow of the operation and maintenance tool shown in the figure, in this solution, the deployment script of the operation and maintenance tool itself is written, and the deployment and operation of the operation and maintenance tool itself is completed by executing the script. However, the solution using scripts has many defects: severe customization, different scripts need to be provided for different scenarios such as deployment, upgrade, expansion and contraction, and high maintenance cost; there is a large gap with the existing CI / CD capabilities; it is very difficult to provide exception handling, automatic rollback, and end-state-oriented capabilities; the reliability of the operation and maintenance process is low, which easily causes the operation and maintenance tool to be unavailable.
[0055] Another solution is to build a minimal system to support the operation and maintenance of operation and maintenance tools. Figure 2 The process of the operation and maintenance tool operation and maintenance method shown in the figure builds a minimum system, i.e. a lightweight version, based on the current operation and maintenance tools / processes, and completes the daily operation and maintenance of the operation and maintenance tools through the minimum system. The solution of building a minimum system has the following defects: the introduction of the minimum system will inevitably bring about the operation and maintenance of the minimum system itself, which will increase additional maintenance costs; the minimum system is a system that can only provide basic capabilities after simplification and cannot fully provide complete CI / CD capabilities; the introduction of the minimum system will consume additional resources and increase costs.
[0056] Another solution is to build a task scheduling module to complete node operation and maintenance in batches. Figure 3 The operation and maintenance method flow of the operation and maintenance tool shown in the figure is as follows: the nodes in the cluster of the operation and maintenance tool are divided into batches (for example Figure 3Instance 1-1 and Instance 1-2 are one batch of nodes, and Instance 2-1 and Instance 2-2 are another batch of nodes). During the operation and maintenance of the cluster nodes, the task scheduling module is deployed to schedule the operation and maintenance tasks issued by the cluster management software to other non-operated nodes or operated nodes for execution, so as to ensure that the software can be used normally during the operation and maintenance process. It can be seen that this solution relies on the scheduling module to complete batch operation and maintenance, which brings the following defects: the task scheduling module increases the complexity of the system; since the operation and maintenance of the operation and maintenance tools depends on the task scheduling module, the operation and maintenance tools and other services have their own set of operation and maintenance processes, which cannot be completely unified, increasing the operation and maintenance costs. In addition, based on the batch operation and maintenance of a single cluster node, the failure of a single node operation and maintenance may affect the entire operation and maintenance cluster, causing the overall unavailability of the service and low operation and maintenance reliability.
[0057] Based on this, the present application provides an operation and maintenance method, which deploys the operation and maintenance tools in multiple clusters based on the idea of blue-green deployment. The same operation and maintenance tool is run on the first operation and maintenance cluster and the second operation and maintenance cluster. After obtaining the operation and maintenance instructions, the first operation and maintenance cluster responds to the operation and maintenance instructions and performs operation and maintenance operations on the second operation and maintenance cluster, so as to realize mutual operation and maintenance of different clusters of the operation and maintenance tools and realize the bootstrapping of the operation and maintenance tools. This process can reuse the capabilities of existing operation and maintenance tools, provide a unified and standard deployment process for all software in the system, as well as automatic rollback, final state-based and other capabilities, saving operation and maintenance costs. Moreover, during the operation and maintenance process, the clusters do not interfere with each other, and the operation and maintenance reliability is high. Furthermore, the multi-cluster self-operation and maintenance method no longer relies on additional systems or services, further reducing maintenance costs and system complexity.
[0058] The solution provided by the embodiments of the present application is described in detail below in conjunction with the accompanying drawings.
[0059] The solution provided in this application can be applied to Figure 4 Schematic computer architecture. Figure 4 As shown, the computer architecture may include operation and maintenance tools 401 and services 402 .
[0060] Among them, service 402 is Figure 4 The computer architecture is shown as a program that provides external functions to perform specified functions.
[0061] The operation and maintenance tool 401 is used to manage the life cycle of each service 402 and provide continuous deployment and operation and maintenance for the service 402. For example, the operation and maintenance tool 401 can deploy, upgrade, expand the capacity, etc. of the service 402 according to the needs of the customer.
[0062] Figure 4 The illustrated computer architecture may be a computer architecture that provides cloud services, and service 402 may be a cloud service. Figure 4 The illustrated computer architecture may provide public cloud or private cloud services.
[0063] Specifically, the operation and maintenance tool 401 can be deployed in multiple clusters. The cluster where the operation and maintenance tool is deployed is called an operation and maintenance cluster (such as the first operation and maintenance cluster and the second operation and maintenance cluster described in this application), and operation and maintenance are performed through the solution provided in this application.
[0064] On the other hand, an embodiment of the present application provides an operation and maintenance method, which is applied to a first operation and maintenance cluster, and the operation and maintenance system where the first operation and maintenance cluster is located also includes a second operation and maintenance cluster.
[0065] There may be one or more second operation and maintenance clusters.
[0066] Exemplarily, the operation and maintenance tool may be implemented in the form of software code, and the operation and maintenance tool is used to manage the life cycle of the service.
[0067] Specifically, the deployment scenarios of operation and maintenance tools mainly include initialization scenarios, operation and maintenance expansion and contraction scenarios, and failure scenarios.
[0068] The initialization scenario is the initial deployment phase of the operation and maintenance tool. In this phase, the operation and maintenance tool can be deployed in N operation and maintenance clusters respectively, where N is greater than or equal to 2.
[0069] In a possible implementation, N may be equal to 2. The two operation and maintenance clusters where the operation and maintenance tools are deployed are blue-green clusters. The blue-green cluster refers to two clusters that provide the same service to the outside world at the same time. During the operation and maintenance process, the blue-green clusters take turns to provide services to the outside world so as to operate and maintain the cluster that is not providing services to the outside world temporarily.
[0070] In one possible implementation, N operation and maintenance clusters for deploying operation and maintenance tools can be deployed in N different AZs to improve disaster recovery capabilities, that is, when a single AZ fails, clusters in other AZs can still provide services.
[0071] Of course, the N operation and maintenance clusters for deploying operation and maintenance tools can be deployed in the same AZ, which is not limited in this embodiment of the present application.
[0072] like Figure 5 The schematic initialization scenario shows that in the initialization scenario, each operation and maintenance cluster where the operation and maintenance tool is deployed can be initialized by writing a script, and the operation and maintenance tool can be pulled up to provide external services. In this stage, the identification of the operation and maintenance tool can be reported, that is, the operation and maintenance tool is reported so that the operation and maintenance cluster where the operation and maintenance tool is deployed can identify the operation and maintenance tasks for the operation and maintenance tool based on the identification.
[0073] Among them, the identifier of the operation and maintenance tool is used to uniquely identify the operation and maintenance tool. The embodiment of the present application does not limit the content and form of the identifier.
[0074] In the operation and maintenance expansion and contraction scenario of the operation and maintenance tool, the operation and maintenance method provided in the embodiment of the present application is executed to achieve high-reliability and cost-saving operation and maintenance of the operation and maintenance tool. The operation and maintenance method provided in the embodiment of the present application is applied to a first operation and maintenance cluster, and the operation and maintenance system where the first operation and maintenance cluster is located also includes a second operation and maintenance cluster. The first operation and maintenance cluster and the second operation and maintenance cluster are both used to run the same operation and maintenance tool, and are both used to operate and maintain the same service based on the operation and maintenance tool. The operation and maintenance system provides the service of the operation and maintenance tool to the outside.
[0075] Among them, the first operation and maintenance cluster can be any operation and maintenance cluster in the operation and maintenance system. The operation and maintenance system where the first operation and maintenance cluster is located may include two or more operation and maintenance clusters. The operation and maintenance clusters included in the operation and maintenance system are all used to run the same operation and maintenance tool, and are all used to operate and maintain the same service based on the operation and maintenance tool. Any two operation and maintenance clusters in the operation and maintenance system can realize mutual operation and maintenance of the operation and maintenance tools deployed thereon through the operation and maintenance method provided by this application. The following embodiments of this application only take the operation and maintenance of the second operation and maintenance cluster by the first operation and maintenance cluster as an example for explanation, and do not constitute a specific limitation. It should be understood that the first operation and maintenance cluster is any operation and maintenance cluster in the operation and maintenance system, and the second operation and maintenance cluster is any cluster other than the first operation and maintenance cluster in the operation and maintenance system.
[0076] like Figure 6 As shown, the operation and maintenance method provided in the embodiment of the present application may include:
[0077] S601: A first operation and maintenance cluster receives an operation and maintenance instruction.
[0078] The operation and maintenance instruction instructs to perform operation and maintenance on the first operation and maintenance cluster and the second operation and maintenance cluster.
[0079] Exemplarily, the operation and maintenance instructions may be input by the user through an interface provided by the operation and maintenance tool, and the embodiment of the present application does not limit the input method.
[0080] In a possible implementation, the operation and maintenance instruction may include multiple operation and maintenance tasks, and one operation and maintenance task is used to operate and maintain the operation and maintenance tools deployed in its corresponding operation and maintenance cluster. Each operation and maintenance task may carry an identifier of a target object to identify the operation and maintenance object of the operation and maintenance task.
[0081] The identifier of the target object may be the identifier of the operation and maintenance tool, or the identifier of the service. When the operation and maintenance task carries the identifier of the operation and maintenance tool, indicating that the operation and maintenance task is used to operate and maintain the operation and maintenance tool, the solution of this application can be executed by a cluster other than the operation and maintenance cluster corresponding to the operation and maintenance task to execute the operation and maintenance task; when the operation and maintenance task carries the identifier of the service, indicating that the operation and maintenance task is used to operate and maintain the service, any operation and maintenance cluster can execute the operation and maintenance task and operate and maintain the service it manages.
[0082] In another possible implementation, in S601, upon receiving the operation and maintenance instruction, the operation and maintenance system establishes a plurality of operation and maintenance tasks corresponding to the operation and maintenance task.
[0083] In a possible implementation, a load balancing module is deployed in the operation and maintenance system. In S601, the load balancing module may receive the operation and maintenance instruction and obtain a plurality of operation and maintenance tasks included in the operation and maintenance instruction.
[0084] S602: In response to the operation and maintenance instruction, the first operation and maintenance cluster performs an operation and maintenance operation on the second operation and maintenance cluster.
[0085] Specifically, after obtaining the operation and maintenance instruction, the first operation and maintenance cluster performs the operation and maintenance operation on another operation and maintenance cluster (ie, the second operation and maintenance cluster) in the operation and maintenance system. In this way, the operation and maintenance clusters in the operation and maintenance system operate each other, realizing the self-operation and maintenance of the operation and maintenance tools.
[0086] For example, in Figure 7 In the operation and maintenance scenario shown, it is assumed that the operation and maintenance tools are deployed in operation and maintenance cluster A and operation and maintenance cluster B, and operation and maintenance cluster A and operation and maintenance cluster B are blue-green to each other. Operation and maintenance cluster B first performs operation and maintenance operations on operation and maintenance cluster A and operates and maintains the operation and maintenance tools in operation and maintenance cluster A. During this process, operation and maintenance cluster B still provides services to the outside world. In addition, the operation and maintenance of operation and maintenance cluster A can fully reuse the existing CI / CD capabilities. Afterwards, operation and maintenance cluster A performs operation and maintenance operations on operation and maintenance cluster B and operates and maintains the operation and maintenance tools in operation and maintenance cluster B. Since the two operation and maintenance clusters are completely independent, there is no possibility of mutual influence, and the reliability is high.
[0087] In one possible implementation, the operation and maintenance instruction may include multiple operation and maintenance tasks, each operation and maintenance task carries the identifier of the target object. In S602, in response to the operation and maintenance instruction, the operation and maintenance operation is performed on the second operation and maintenance cluster. Specifically, it can be implemented as follows: according to the identifier of the target object, determine at least one operation and maintenance task corresponding to the second operation and maintenance cluster; and execute at least one operation and maintenance task corresponding to the second operation and maintenance cluster.
[0088] In a possible implementation, the operation and maintenance tasks included in the operation and maintenance instructions may be routed separately, and the routing targets are other operation and maintenance clusters other than the operation and maintenance cluster indicated by the identifier of the target object included in the operation and maintenance task.
[0089] Exemplarily, the operation and maintenance tasks may be routed by a load balancing module deployed in the operation and maintenance system.
[0090] Furthermore, when the first operation and maintenance cluster performs the operation and maintenance operation on the second operation and maintenance cluster in S602, the first operation and maintenance cluster should be in a non-operation and maintenance state, that is, a state of providing services externally.
[0091] Exemplarily, multiple operation and maintenance tasks may be routed sequentially. After the operation and maintenance of an operation and maintenance tool in an operation and maintenance cluster corresponding to an operation and maintenance task is completed, the next operation and maintenance task is routed.
[0092] It should be noted that the routing order (which one to route first and which one to route later) and routing targets (which operation and maintenance cluster to route to) of multiple operation and maintenance tasks are not limited in the embodiments of the present application, and the specific routing scheme can be configured according to actual needs.
[0093] In a possible implementation, a message queue may be deployed in the operation and maintenance system, a plurality of operation and maintenance tasks included in the operation and maintenance instruction are stored in the message queue, and the operation and maintenance cluster reads the operation and maintenance tasks from the message queue.
[0094] Exemplarily, S602 can be specifically implemented as follows: the first operation and maintenance cluster reads the operation and maintenance task from the message queue; if the operation and maintenance task read by the first operation and maintenance cluster corresponds to the second operation and maintenance cluster, the read operation and maintenance task is executed. If the operation and maintenance task read by the first operation and maintenance cluster corresponds to the first operation and maintenance cluster, the read operation and maintenance task is returned to the message queue.
[0095] Exemplarily, the operation and maintenance cluster in the operation and maintenance system can read the operation and maintenance tasks from the message queue in sequence according to polling or other mechanisms. The embodiments of the present application do not specifically limit the content of the mechanism for the operation and maintenance cluster to read the operation and maintenance tasks.
[0096] In a possible implementation, S602 may be specifically implemented as follows: determining at least one operation and maintenance task corresponding to the second operation and maintenance cluster according to the operation and maintenance blacklist of the first operation and maintenance cluster, where the operation and maintenance blacklist is used to indicate that at least one operation and maintenance task corresponding to the first operation and maintenance cluster is not to be executed.
[0097] Exemplarily, the operation and maintenance blacklist of the first operation and maintenance cluster includes the first operation and maintenance cluster.
[0098] For example, in the operation and maintenance cluster where the operation and maintenance tools are deployed, an asynchronous mode, i.e., a producer-consumer mode, can be adopted. A single operation and maintenance cluster is further divided into producers and consumers. Among them, the producer accepts the request and sends the operation and maintenance task to the message queue. The consumer exists as an entity that performs the operation and reads the operation and maintenance task from the message queue.
[0099] Among them, the message queue provides asynchronous communication between services.
[0100] For example, common message middleware such as Kafka and RabbitMQ can be used as the message queue.
[0101] For example, in Figure 8In the illustrated operation and maintenance scenario, the operation and maintenance cluster where the operation and maintenance tool is located adopts the producer-consumer asynchronous mode. An operation and maintenance blacklist is configured in each operation and maintenance cluster, that is, a service list to be ignored is configured for the Consumer. The operation and maintenance tool is deployed in two operation and maintenance clusters, the blue cluster and the green cluster. The blue and green operation and maintenance clusters put themselves into the "operation and maintenance blacklist" respectively. When the load balancing module receives the operation and maintenance instruction, it selects the appropriate producer to send the operation and maintenance task, and the producer sends the received operation and maintenance task to the message queue. The consumer reads the operation and maintenance task from the message queue according to the reading mechanism. When the operation and maintenance cluster corresponding to the read operation and maintenance task is a cluster in the operation and maintenance blacklist, the consumer ignores the operation and maintenance task and puts the operation and maintenance task back into the message queue to avoid processing its own request. Only when the cluster corresponding to the read operation and maintenance task is not in the operation and maintenance blacklist, the consumer executes the operation and maintenance task and operates the operation and maintenance tool deployed in the cluster corresponding to the operation and maintenance task. For example, when the blue cluster reads the operation and maintenance task of the blue cluster, it ignores it and puts it back into the message queue. Only when it reads the operation and maintenance task of the green cluster, it executes the operation and maintenance task to operate the green cluster.
[0102] exist Figure 8 In the illustrated operation and maintenance scenario, the blue and green clusters operate each other and achieve self-operation and maintenance within the operation and maintenance tool.
[0103] For example, when operating and maintaining an operation and maintenance tool in a cluster, the operation and maintenance cluster can be deleted from the load list first, and the new version can be run, while other operation and maintenance clusters continue to provide services. After the operation and maintenance is completed, the operation and maintenance cluster is added to the load list, and the traffic is switched to the updated operation and maintenance tool.
[0104] Through the solution provided by this application, the operation and maintenance tools are deployed in multiple clusters. When receiving the operation and maintenance instructions, one operation and maintenance cluster performs operation and maintenance operations on another cluster. Different clusters operate and maintain each other to achieve self-bootstrapping of the operation and maintenance tools. This process can reuse the capabilities of existing operation and maintenance tools, provide a unified and standard deployment process for all software in the system, as well as automatic rollback, final state-based capabilities, etc., saving operation and maintenance costs. Moreover, during the operation and maintenance process, clusters do not interfere with each other, and the operation and maintenance reliability is high. Furthermore, the multi-cluster self-operation and maintenance method no longer relies on additional systems or services, further reducing maintenance costs and system complexity.
[0105] Further, such as Fig. 9 As shown, the operation and maintenance method provided in the embodiment of the present application may also include S603 and S604.
[0106] S603: After the operation and maintenance of the operation and maintenance tool in the second operation and maintenance cluster is completed, the traffic is switched to the second operation and maintenance cluster.
[0107] Exemplarily, switching traffic back to a certain operation and maintenance cluster may be achieved by adding the operation and maintenance cluster to the load list.
[0108] S604: If the operation and maintenance tool running in the second operation and maintenance cluster is abnormal, roll back the operation and maintenance tool in the second operation and maintenance cluster to the previous version.
[0109] After receiving an indication indicating that the operation and maintenance tool deployed in the second operation and maintenance cluster is operating abnormally, it may be determined that the operation and maintenance tool running in the second operation and maintenance cluster is abnormal.
[0110] For example, after the second operation and maintenance cluster completes operation and maintenance, multiple operation and maintenance clusters respectively run the new and old versions. By switching the traffic to the new version run by the second operation and maintenance cluster, if a problem is found in the new version (an abnormal indication is received), it can be rolled back to the previous version immediately.
[0111] Specifically, the rollback process is the same as the aforementioned operation and maintenance process, that is, the operation and maintenance returns to the previous version, and the rollback process will not be described in detail here.
[0112] It should be noted that the above S603 to S604 describe the verification process after the operation and maintenance tool in the operation and maintenance cluster completes the operation and maintenance of the new version. After the operation and maintenance of one operation and maintenance cluster is completed and the verification is completed, the operation and maintenance of the next operation and maintenance cluster can be carried out.
[0113] Furthermore, in the operation and maintenance scenario, there is an extreme scenario where all operation and maintenance clusters may be unavailable. In this case, the operation and maintenance tools can be restored through the constructed escape channel. The escape channel restores the operation and maintenance tools through a one-time script, that is, the last available version is selected for redeployment, and then the identification is reported. The process is the same as the initial deployment mentioned above, and will not be repeated here.
[0114] The above mainly introduces the solution provided by the embodiment of the present invention from the perspective of the operation and maintenance cluster. It can be understood that in order to realize the above functions, the operation and maintenance device deployed with the operation and maintenance tools includes the hardware structure and / or software module corresponding to the execution of each function. It should be easy for those skilled in the art to realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed in this article, the present invention can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.
[0115] The embodiment of the present invention can divide the operation and maintenance devices deployed in the operation and maintenance system into functional modules according to the above method examples. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present invention is schematic and is only a logical functional division. There may be other division methods in actual implementation.
[0116] In the case of dividing each functional module into corresponding functional modules, Fig.10 An operation and maintenance device 100 provided in an embodiment of the present application is illustrated. Fig.10 As shown, the operation and maintenance device 100 may include: a receiving unit 1001 and a processing unit 1002. The receiving unit 1001 is used to execute Figure 6 or Fig. 9 Process S601 in the process; processing unit 1002 is used to execute Figure 6 or Fig. 9 In the process S602. All relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, and will not be repeated here.
[0117] In the case of an integrated unit, such as Fig.11 The figure shows a computing device 110 provided in an embodiment of the present application, which is used to implement the functions of the operation and maintenance tool in the above method. Fig.11 Schematic diagram of the computing device 110 provided in the embodiment of the present application. Fig.11 As shown, the computing device 110 may include a processor 1101 , a memory 1102 , and a transceiver 1103 .
[0118] The memory 1102 may be a volatile memory, such as a random-access memory (RAM); or a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD); or a combination of the above types of memory, for storing application code, configuration files, data information or other content that can implement the method of the present application. In other possible scenarios, the memory 1102 may also be deployed in other devices independent of the computing device 110.
[0119] The transceiver 1103 is used for information exchange between the computing device 110 and other devices.
[0120] The processor 1101 may be a control center of the computing device 110. For example, the processor 1101 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application, such as one or more microprocessors (digital signal processors, DSPs), or one or more field programmable gate arrays (FPGAs).
[0121] As another form of this embodiment, a computer-readable storage medium is provided, on which instructions are stored, and when the instructions are executed, the operation and maintenance method in the above method embodiment is executed.
[0122] As another form of this embodiment, a computer program product containing instructions is provided. When the computer program product is run on a computer, the computer executes the operation and maintenance method in the above method embodiment.
[0123] The embodiment of the present application further provides a chip system, which includes a processor for implementing the technical method of the embodiment of the present application. In one possible design, the chip system also includes a memory for storing the necessary program instructions and / or data of the embodiment of the present application. In one possible design, the chip system also includes a memory for the processor to call the application code stored in the memory. The chip system can be composed of one or more chips, and can also include chips and other discrete devices, which is not specifically limited in the embodiment of the present application.
[0124] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0125] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0126] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0127] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0128] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program code.
[0129] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. An operation and maintenance method, characterized in that: The operation and maintenance method is applied to a first operation and maintenance cluster, the operation and maintenance system where the first operation and maintenance cluster is located also includes a second operation and maintenance cluster, and the method includes: receiving an operation and maintenance instruction, wherein the operation and maintenance instruction instructs to perform operation and maintenance on the first operation and maintenance cluster and the second operation and maintenance cluster, wherein the first operation and maintenance cluster and the second operation and maintenance cluster are both used to run the same operation and maintenance tool, and are both used to perform operation and maintenance on the same service based on the operation and maintenance tool; In response to the operation and maintenance instruction, an operation and maintenance operation is performed on the second operation and maintenance cluster.
2. The method according to claim 1, characterized in that: The operation and maintenance instruction includes a plurality of operation and maintenance tasks, each operation and maintenance task carries an identifier of a target object, and in response to the operation and maintenance instruction, performing an operation and maintenance operation on the second operation and maintenance cluster includes: Determining, according to the identifier of the target object, at least one operation and maintenance task corresponding to the second operation and maintenance cluster; Execute at least one operation and maintenance task corresponding to the second operation and maintenance cluster.
3. The method according to claim 2, characterized in that The multiple operation and maintenance tasks are stored in a message queue; The determining, according to the identifier of the target object, at least one operation and maintenance task corresponding to the second operation and maintenance cluster includes: Reading operation and maintenance tasks from the message queue; If the read operation and maintenance task corresponds to the second operation and maintenance cluster, execute the read operation and maintenance task; If the read operation and maintenance task corresponds to the first operation and maintenance cluster, the read operation and maintenance task is returned to the message queue.
4. The method according to claim 2, characterized in that: The determining, according to the identifier of the target object, at least one operation and maintenance task corresponding to the second operation and maintenance cluster includes: At least one operation and maintenance task corresponding to the second operation and maintenance cluster is determined according to the operation and maintenance blacklist of the first operation and maintenance cluster, where the operation and maintenance blacklist is used to indicate that at least one operation and maintenance task corresponding to the first operation and maintenance cluster is not to be executed.
5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: After the operation and maintenance of the operation and maintenance tool in the second operation and maintenance cluster is completed, switching the traffic of the operation and maintenance tool to the second operation and maintenance cluster; If the operation and maintenance tool running in the second operation and maintenance cluster is abnormal, the operation and maintenance tool in the second operation and maintenance cluster is rolled back to a previous version.
6. The method according to any one of claims 2 to 5, characterized in that: The identifier includes one or more of the following: an identifier of an operation and maintenance tool, and an identifier of a service.
7. An operation and maintenance device, characterized in that: The operation and maintenance device is deployed in a first operation and maintenance cluster, the operation and maintenance system where the first operation and maintenance cluster is located also includes a second operation and maintenance cluster, and the first operation and maintenance cluster and the second operation and maintenance cluster are both used to run the same operation and maintenance tool, and are both used to operate and maintain the same service based on the operation and maintenance tool; The operation and maintenance device comprises: A receiving unit, configured to receive an operation and maintenance instruction, wherein the operation and maintenance instruction instructs to perform operation and maintenance on the first operation and maintenance cluster and the second operation and maintenance cluster; A processing unit is used to perform an operation and maintenance operation on the second operation and maintenance cluster in response to the operation and maintenance instruction.
8. The device according to claim 7, characterized in that The operation and maintenance instruction includes a plurality of operation and maintenance tasks, each of which carries an identifier of a target object, and the processing unit is specifically configured to: Determining, according to the identifier of the target object, at least one operation and maintenance task corresponding to the second operation and maintenance cluster; Execute at least one operation and maintenance task corresponding to the second operation and maintenance cluster.
9. The device according to claim 8, characterized in that The multiple operation and maintenance tasks are stored in a message queue; The processing unit is specifically used for: Reading operation and maintenance tasks from the message queue; If the read operation and maintenance task corresponds to the second operation and maintenance cluster, execute the read operation and maintenance task; If the read operation and maintenance task corresponds to the first operation and maintenance cluster, the read operation and maintenance task is returned to the message queue.
10. The device according to claim 8, characterized in that The processing unit is specifically used for: At least one operation and maintenance task corresponding to the second operation and maintenance cluster is determined according to the operation and maintenance blacklist of the first operation and maintenance cluster, where the operation and maintenance blacklist is used to indicate that at least one operation and maintenance task corresponding to the first operation and maintenance cluster is not to be executed.
11. The device according to any one of claims 7 to 10, characterized in that: The device also includes a control unit, which is used to switch the traffic of the operation and maintenance tool to the second operation and maintenance cluster after the operation and maintenance of the operation and maintenance tool in the second operation and maintenance cluster is completed; The processing unit is further configured to roll back the operation and maintenance tool in the second operation and maintenance cluster to a previous version if the operation and maintenance tool running in the second operation and maintenance cluster is abnormal.
12. The device according to any one of claims 8 to 11, characterized in that The identifier includes one or more of the following: an identifier of an operation and maintenance tool, and an identifier of a service.
13. A computing device, characterized in that: The computing device includes a memory and at least one processor, wherein the memory is used to store a set of computer instructions; when the processor executes the set of computer instructions, the operation steps of the method described in any one of claims 1 to 6 are performed.
14. A computer-readable storage medium, characterized in that: include: Computer software instructions; when the computer software instructions are executed in a computing device, the computing device is caused to execute the operation steps of the method described in any one of claims 1 to 6.
15. A computer program product, characterized in that When the method is executed on a computer, the computer is enabled to execute the operation steps of the method according to any one of claims 1 to 6.
