Deployment Method, Device, Equipment and Medium of Network Controller without Service Architecture

Through the deployment method of the serviceless architecture and lightweight container orchestration platform k3s, the single point of failure and unreliability of traditional network controllers is solved, and high-reliability and scalability network controller deployment is achieved, suitable for large-scale data centers.

CN116095150BActive Publication Date: 2025-06-27YUNHE ZHIWANG (SHANGHAI) TECHNOLOGY CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310112067.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-31
Publication Date
2025-06-27
Estimated Expiration
2043-01-31

AI Technical Summary

Technical Problem

Traditional data center network controllers have single point of failure, cumbersome deployment steps, and lack of scalability and observability, which makes the network controller unreliable.

Method used

Adopting a serviceless architecture, by building a highly available k3s cluster and initializing a Dapr environment, deploying boundary API gateway, consul component and cluster version of the Redis component, using the yaml format to write the deployment files of the network controller's microservice module, and completing the deployment and joint commissioning of the microservice module.

Benefits of technology

It improves the reliability and scalability of network controllers, reduces operation and maintenance costs, and is suitable for large-scale data center network management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116095150B_ABST
    Figure CN116095150B_ABST
Patent Text Reader

Abstract

An embodiment of the present invention provides a deployment method, device, equipment and medium for a network controller with a service-free architecture. The method includes: S101, building a highly available k3s cluster and initializing the Dapr environment; S102, installing the helm binary program; S103, deploying a boundary API gateway as a unified client entry according to the helm binary program; S104, deploying a consul component as a registration center and service discovery center for the network controller according to the helm binary program; S105, deploying a cluster version of the redis component as a state management center and message queue center for Dapr according to the helm binary program; S106, writing deployment files for each microservice module of the network controller in yaml format; S107, completing the deployment of all microservice modules of the network controller according to the deployment files and performing joint debugging on all microservice modules. The present invention effectively improves the reliability and scalability of the network controller in the network data center, thereby significantly improving productivity and reducing operation and maintenance costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and more particularly, to a deployment method, device, equipment, and medium for a network controller with a serverless architecture. Background Art

[0002] In the wave of vigorously developing new infrastructure, the construction of data centers has become a top priority. With the large-scale deployment of data centers, large data center clusters are planned to accommodate even more than 1 million servers. To manage large data center networks, network controller management software has been introduced, greatly enhancing the bearing and service capabilities of data center networks. As the "brain" of the entire data center network, it is very important to deploy network controllers in a more flexible manner for the safe and stable operation of data center networks.

[0003] Traditional data center network controllers mostly use single-machine deployment, which has problems of single-point failure, cumbersome deployment steps, lack of scalability and observability metrics, and inability to self-recover based on observed metrics, resulting in unreliable network controllers. Summary of the Invention

[0004] In view of this, the purpose of the present invention is to provide a deployment method, device, equipment, and medium for a network controller with a serverless architecture to improve the above problems.

[0005] An embodiment of the present invention provides a deployment method for a network controller with a serverless architecture, which includes:

[0006] S101, building a highly available k3s cluster and initializing the Dapr environment;

[0007] S102, installing the helm binary program;

[0008] S103, deploying a boundary API gateway as a unified client entry according to the helm binary program;

[0009] S104, deploying a consul component as a registration center and service discovery center for the network controller according to the helm binary program;

[0010] S105, deploying a cluster version of the redis component as a state management center and message queue center for Dapr according to the helm binary program;

[0011] S106, writing deployment files for each microservice module of the network controller in yaml format;

[0012] S107, completing the deployment of all microservice modules of the network controller according to the deployment files and performing joint debugging on all microservice modules.

[0013] Preferably, step S101 specifically includes:

[0014] Install and verify the k3s binary program;

[0015] Initialize the master node and control plane of the k3s cluster through the sub-command k3s server;

[0016] Use containerd as the container runtime, execute the sub-command k3s agent on each slave node, specify the k3s apiserver address and the token to be authenticated to join the k3s cluster; then initialize the flannel network plugin, and it is in vxlan mode, providing the ability for container network intercommunication between nodes;

[0017] Install and verify the Dapr tool, and execute Dapr init-k in the k3s cluster to complete the initialization, and verify whether all services in the dapr-system namespace of the cluster are running normally.

[0018] Preferably, when deploying the boundary API gateway in the deployment method of helm, Dapr manages the boundary API gateway.

[0019] Preferably, step S104 includes:

[0020] Deploy the highly available consul component to the k3s cluster in the way of helm;

[0021] The Dapr component of each microservice module registers the microservice module to the consul component;

[0022] Configure the dns service of the boundary API gateway to the address of the consul component, so as to correctly route the requests from the client to the backend microservice module.

[0023] Preferably, the deployment file includes k3s Service and Deployment objects. The Service type is Cluster IP type, which supports direct access between internal services through the service name, and the number of replicas of the microservice module is specified in the Deployment object.

[0024] Preferably, in step S107, use the kubectl binary program to execute the sub-command kubectl apply to complete the k3s Service and Deployment objects.

[0025] The embodiment of the present invention also provides a deployment device for a network controller of a serverless architecture, which includes:

[0026] A setup unit for setting up a highly available k3s cluster and initializing the Dapr environment;

[0027] A helm installation unit for installing the helm binary program;

[0028] A gateway deployment unit for deploying a boundary API gateway as a unified client entry according to the helm binary program;

[0029] A consul component deployment unit for deploying the consul component as a registration center and service discovery center for the network controller according to the helm binary program;

[0030] A redis component deployment unit for deploying the clustered redis component as the state management center and message queue center of Dapr according to the helm binary program;

[0031] A deployment file generation unit for writing deployment files for each microservice module of the network controller in yaml format;

[0032] A microservice module deployment unit for completing the deployment of all microservice modules of the network controller according to the deployment file and performing joint debugging on all microservice modules.

[0033] Preferably, the setup unit is specifically used for:

[0034] Install and verify the k3s binary program;

[0035] Initialize the master node and control plane of the k3s cluster through the subcommand k3s server;

[0036] Use containerd as the container runtime, execute the subcommand k3s agent on each slave node, specify the k3s apiserver address and the token to be authenticated to join the k3s cluster; then initialize the flannel network plugin, and it is in vxlan mode, providing container network intercommunication capabilities between nodes;

[0037] Install and verify the Dapr tool, and execute Dapr init-k in the k3s cluster to complete the initialization, and verify whether all services in the dapr-system namespace of the cluster are running normally.

[0038] An embodiment of the present invention also provides a deployment device for a network controller with a serverless architecture, which includes a memory and a processor, and a computer program is stored in the memory, and the computer program can be executed by the processor to implement the deployment method of the network controller with a serverless architecture as described above.

[0039] An embodiment of the present invention also provides a computer-readable storage medium storing a computer program that can be executed by a processor of a device where the computer-readable storage medium is located to implement the deployment method of the network controller with a serverless architecture as described above.

[0040] In summary, based on the characteristics of the serverless architecture of the network controller, this embodiment uses the lightweight container orchestration platform k3s for deployment, improving the efficiency of microservice module development and deployment. While reducing the overhead generated by the k3s cluster for service management, it effectively enhances the reliability and scalability of the network controller in the network data center, thus significantly improving productivity and reducing operation and maintenance costs.

[0041] At the same time, k3s is a lightweight container orchestration engine with half the memory footprint of native Kubernetes, generally reducing the occupation of system resources and being more suitable for the scenario of the network controller system managing data center switches. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] To more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required in the embodiments. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.

[0043] Figure 1 is a schematic flowchart of the deployment method of the network controller with a serverless architecture provided by the first embodiment of the present invention.

[0044] Figure 2 is a specific flowchart of step S101.

[0045] Figure 3 is a specific flowchart of step S103.

[0046] Figure 4 is a specific flowchart of step S104.

[0047] Figure 5 is a specific flowchart of step S105.

[0048] Figure 6 is a schematic structural diagram of the deployment device of the network controller with a serverless architecture provided by the second embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0049] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0050] To better understand the technical solutions of the present invention, the embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings.

[0051] It should be clear that the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0052] The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. The singular forms of "a", "the" and "said" used in the embodiments of the present invention and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.

[0053] The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments:

[0054] Please refer to Figure 1 , the first embodiment of the present invention provides a deployment method for a network controller with a service-free architecture, which includes:

[0055] S101, build a highly available k3s cluster and initialize the Dapr environment.

[0056] Specifically, as Figure 2 , first download the k3s binary program and verify the installation, and then execute the sub-command k3s server to initialize the cluster master node and the control plane. Then, in order to reduce resource occupancy, containerd is used as the container runtime, and the sub-command k3s agent is executed on each slave node to specify the k3s apiserver address and the token to be authenticated to join the k3s cluster; subsequently, k3s initializes the flannel network plugin, and it is in the vxlan mode to provide container network intercommunication capabilities between nodes; finally, install and verify the Dapr tool, and execute Dapr init-k in the k3s cluster to complete the initialization, and verify whether all services in the dapr-system namespace of the cluster are running normally.

[0057] S102, install the helm binary program.

[0058] In this embodiment, helm is used as the package manager of the k3s cluster to install and deploy the boundary API gateway, the Consul component, and the Redis component.

[0059] S103. Deploy the boundary API gateway as the unified client entry according to the helm binary program.

[0060] Among them, as Figure 3 shown, in this embodiment, the boundary API gateway is deployed in the helm manner and needs to be managed by Dapr. Before deployment, first write the Apisix custom helm chart values configuration file, and the helm chart values configuration file specifies the address of the Consul server.

[0061] Then install Apisix through helm. Since the registration of the services and routes of the network controller adopts the Dapr method, only the Apisix gateway and dashboard components need to be installed during helm installation; at this time, according to the url nodeid parameter sent by the client, the corresponding switch device's rest server can be selected to read or write the switch configuration information.

[0062] S104. Deploy the Consul component as the registration center and service discovery center of the network controller according to the helm binary program.

[0063] Specifically, as Figure 4 shown, first write the Consul custom helm chart values configuration file, and then install Consul through helm, so as to deploy the highly available Consul component to the k3s cluster through helm. Finally, verify whether the Consul DNS is valid through the dig tool.

[0064] Among them, the Dapr component of each microservice module registers the microservice module to the Consul component, and configures the dns service of the boundary API gateway as the address of the server of the Consul component, so as to correctly route the requests from the client to the backend microservice module.

[0065] S105. Deploy the cluster version of the Redis component as the state management center and message queue center of Dapr according to the helm binary program.

[0066] Specifically, as Figure 5As shown in the figure, deploy the redis component of the cluster version using helm, then obtain the service name of the redis component in the k3s cluster, and create the state management component and pubsub component of Dapr according to the service name, thereby providing the state management function and the message queue function of the subscription and publishing mode for the Dapr components of each microservice module. Adopting the design pattern of Dapr increases the flexibility and elasticity of microservices, which is conducive to the automated management and orchestration of all microservices by the k3s cluster.

[0067] S106. Write the deployment files for each microservice module of the network controller in yaml format.

[0068] Specifically, in this embodiment, the deployment file includes k3s Service and Deployment objects. The Service type is Cluster IP type, which supports direct access between internal services through the service name. The number of replicas of the microservice module can be specified in the Deployment object, improving the reliability of the service.

[0069] S107. Complete the deployment of all microservice modules of the network controller according to the deployment file, and conduct joint debugging on all microservice modules.

[0070] Specifically, use the kubectl binary program to execute the subcommand kubectl apply to complete the creation and update operations of the service and deployment objects.

[0071] In summary, based on the characteristics of the serverless architecture of the network controller, this embodiment uses the lightweight container orchestration platform k3s for deployment, improving the efficiency of microservice module development and deployment. While reducing the overhead generated by the k3s cluster for service management, it effectively improves the reliability and scalability of the network controller in the network data center, thereby significantly improving productivity and reducing operation and maintenance costs.

[0072] At the same time, k3s is a lightweight container orchestration engine, and its memory occupancy is half that of native kubernetes, generally reducing the occupancy of system resources and being more suitable for the scenario of the network controller system managing data center switches.

[0073] Please refer to Figure 6 , the second embodiment of the present invention also provides a deployment device for a serverless architecture network controller, which includes:

[0074] A building unit 210, used to build a highly available k3s cluster and initialize the Dapr environment;

[0075] A helm installation unit 220, used to install the helm binary program;

[0076] A gateway deployment unit 230, configured to deploy a boundary API gateway as a unified client entry according to a helm binary program;

[0077] A consul component deployment unit 240, configured to deploy a consul component as a registration center and a service discovery center of a network controller according to a helm binary program;

[0078] A redis component deployment unit 250, configured to deploy a clustered version of a redis component as a state management center and a message queue center of Dapr according to a helm binary program;

[0079] A deployment file generation unit 260, configured to write deployment files for each microservice module of a network controller in yaml format;

[0080] A microservice module deployment unit 270, configured to complete the deployment of all microservice modules of a network controller according to the deployment files and perform joint debugging on all microservice modules.

[0081] Preferably, the setup unit 210 is specifically configured to:

[0082] Install and verify the k3s binary program;

[0083] Initialize the master node and the control plane of the k3s cluster through the subcommand k3s server;

[0084] Use containerd as a container runtime, execute the subcommand k3s agent on each slave node, specify the k3s apiserver address and the token to be authenticated to join the k3s cluster; subsequently initialize the flannel network plugin, and in the vxlan mode, provide the ability for container network intercommunication between nodes;

[0085] Install and verify the Dapr tool, and execute Dapr init-k in the k3s cluster to complete the initialization, and verify whether all services in the dapr-system namespace of the cluster are running properly.

[0086] An embodiment of the present invention further provides a deployment device for a network controller with a serverless architecture, which includes a memory and a processor, and a computer program is stored in the memory, and the computer program can be executed by the processor to implement the deployment method of the network controller with a serverless architecture as described above.

[0087] An embodiment of the present invention also provides a computer-readable storage medium storing a computer program, which can be executed by a processor of a device where the computer-readable storage medium is located to implement the deployment method of the network controller of the service-free architecture as described above.

[0088] In several embodiments provided by the embodiments of the present invention, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device and method embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architectures, functions, and operations of devices, methods, and computer program products according to multiple embodiments of the present invention. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code, and the module, program segment, or part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the accompanying drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.

[0089] In addition, each functional module in various embodiments of the present invention may be integrated together to form an independent part, or each module may exist alone, or two or more modules may be integrated to form an independent part.

[0090] When the above-mentioned functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or a part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, an electronic device, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs that can store program codes. It should be noted that in this article, the terms "including", "comprising", or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device including a series of elements not only includes those elements but also includes other elements not explicitly listed, or further includes elements inherent to such a process, method, article, or device. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of another identical element in the process, method, article, or device including the said element.

[0091] The foregoing are only the preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.

Claims

1. A deployment method for a network controller with a service-free architecture, characterized in that, Including: S101, set up a highly available k3s cluster and initialize the Dapr environment; specifically including: install and verify the k3s binary program; initialize the master node and control plane of the k3s cluster through the sub-command k3s server; use containerd as the container runtime, and execute the sub-command k3s agent on each slave node, specifying the k3s apiserver address and the token to be authenticated to join the k3s cluster; then initialize the flannel network plugin, and it is in vxlan mode to provide container network intercommunication ability between nodes; install and verify the Dapr tool, and execute Dapr init-k in the k3s cluster to complete the initialization, and verify whether all services in the dapr-system namespace of the cluster are running normally; S102, install the helm binary program; S103, deploy the boundary API gateway as the unified client entry according to the helm binary program; S104, deploy the consul component as the registration center and service discovery center of the network controller according to the helm binary program; S105, deploy the cluster version of the redis component as the state management center and message queue center of Dapr according to the helm binary program; specifically: deploy the cluster version of the redis component with helm, then obtain the service name of the redis component in the k3s cluster, and create the state management component and pubsub component of Dapr according to the service name, so as to provide the state management function and the message queue function of the subscription and publishing mode for the Dapr components of each microservice module; S106, write the deployment files of each microservice module of the network controller in yaml format; S107, complete the deployment of all microservice modules of the network controller according to the deployment files, and conduct joint debugging on all microservice modules.

2. The deployment method of the network controller of the service-free architecture according to claim 1, characterized in that, In step S103, when deploying the boundary API gateway in the deployment method of helm, Dapr manages the boundary API gateway.

3. The deployment method of the network controller of the service-free architecture according to claim 1, characterized in that Step S104 includes: Deploy a highly available consul component to the k3s cluster through the helm method; Each Dapr of the microservice module registers the microservice module to the consul component; Configure the dns service of the boundary API gateway as the address of the consul component, so as to correctly route the requests from the client to the backend microservice module.

4. The deployment method of the network controller of the service-free architecture according to claim 1, wherein The deployment file contains k3s Service and Deployment objects. The Service type is Cluster IP type, which supports direct access between internal services through the Service name. The number of replicas of the microservice module is specified in the Deployment object.

5. The deployment method of the network controller of the service-free architecture according to claim 4, wherein In step S107, execute the sub-command kubectl apply with the kubectl binary program to complete the k3s Service and Deployment objects.

6. A deployment device for a network controller with a service-less architecture, characterized in that, Including: Provisioning Unit, used to provision a highly available k3s cluster and initialize the Dapr environment; specifically including: installing and verifying the k3s binary program; initializing the master node and control plane of the k3s cluster through the sub-command k3s server; using containerd as the container runtime, executing the sub-command k3s agent on each slave node, specifying the k3s apiserver address and the token to be authenticated to join the k3s cluster; subsequently initializing the flannel network plugin, and in the vxlan mode, providing the ability for container network intercommunication between nodes; installing and verifying the Dapr tool, and executing Dapr init-k in the k3s cluster to complete the initialization, and verifying whether all services in the dapr-system namespace of the cluster are running normally; Helm Installation Unit, used to install the helm binary program; Gateway Deployment Unit, used to deploy the boundary API gateway as the unified entry for clients according to the helm binary program; Consul Component Deployment Unit, used to deploy the Consul component as the registration center and service discovery center of the network controller according to the helm binary program; Redis Component Deployment Unit, used to deploy the cluster version of the Redis component as the state management center and message queue center of Dapr according to the helm binary program; specifically: deploying the cluster version of the Redis component with helm, then obtaining the service name of the Redis component in the k3s cluster, and creating the state management component and pubsub component of Dapr according to the service name, so as to provide the state management function and the message queue function in the publish-subscribe mode for the Dapr components of each microservice module; Deployment File Generation Unit, used to write the deployment files of each microservice module of the network controller in yaml format; Microservice Module Deployment Unit, used to complete the deployment of all microservice modules of the network controller according to the deployment file, and conduct joint debugging on all microservice modules.

7. A deployment device for a network controller with a service-free architecture, characterized in that, Including a memory and a processor, the memory stores a computer program, and the computer program can be executed by the processor to implement the deployment method of the serverless architecture network controller according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, Stores a computer program, and the computer program can be executed by the processor of the device where the computer-readable storage medium is located to implement the deployment method of the serverless architecture network controller according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Method for constructing distributed micro-service network controller architecture

    CN114816440A