A containerized service deployment method, device, equipment and readable storage medium

By obtaining and mounting preset sub-configuration files of services to be deployed and nodes, and starting dependent services on cloud platform nodes, the problems of low efficiency of containerized service deployment and difficulty in differentiated configuration in the existing technology are solved, and efficient multi-node deployment and differentiated configuration are achieved.

CN119739466APending Publication Date: 2025-04-01INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202412000409.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-04-01

AI Technical Summary

Technical Problem

The existing technology lacks mature containerized service deployment methods, which leads to inefficient deployment and difficulty in achieving differentiated configuration when deploying the same service on multiple cloud platform nodes.

Method used

By obtaining the preset subconfiguration file corresponding to the node to be deployed, mounting it on the node to be deployed, starting the dependency service in the node, and then configuring the service resource configuration parameters into the service to be deployed, to achieve differentiated configuration.

Benefits of technology

Differentiated configuration of services to be deployed in different nodes is realized, deployment efficiency is improved, and automated deployment on multiple nodes is supported.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119739466A_ABST
    Figure CN119739466A_ABST
Patent Text Reader

Abstract

The present invention discloses a containerized service deployment method, apparatus, device and readable storage medium, which belongs to the field of service deployment. Considering that (1) the service resources of the service to be deployed in each node can be personalized through the preset sub-configuration file corresponding to the node to be deployed of the service to be deployed, and (2) the same service to be deployed can be automatically deployed on multiple nodes to be deployed through the deployment node in the cloud platform, the preset sub-configuration file of the service to be deployed and corresponding to the node to be deployed can be mounted on the node to be deployed, and then the service that the service to be deployed depends on can be started in the node to be deployed, and then the service resource configuration parameters (obtained from the preset sub-configuration file mounted on the node to be deployed) can be configured in the service to be deployed in the node to be deployed, thereby performing differentiated configuration on the services to be deployed in different nodes to be deployed, and having a higher deployment efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of service deployment, and in particular to a containerized service deployment method, device, equipment and readable storage medium. Background Art

[0002] For a cloud platform managed by containerization, there may be a need to deploy the same service to be deployed on multiple nodes (servers) in the cloud platform at the same time. However, the relevant technology lacks a mature method for deploying containerized services, which results in low deployment efficiency and difficulty in differentiated configuration of services to be deployed in different nodes when the same service to be deployed needs to be deployed on multiple nodes in the cloud platform at the same time.

[0003] Therefore, how to provide a solution to the above technical problems is a problem that those skilled in the art need to solve at present. Summary of the invention

[0004] The purpose of the present invention is to provide a method, apparatus, device and readable storage medium for deploying containerized services. In the present invention, a preset sub-configuration file of the service to be deployed corresponding to the node to be deployed can be mounted on the node to be deployed, and then the service on which the service to be deployed depends can be started in the node to be deployed, and then the service resource configuration parameters (obtained from the preset sub-configuration file mounted on the node to be deployed) can be configured in the service to be deployed in the node to be deployed, thereby performing differentiated configuration on the services to be deployed in different nodes to be deployed and having higher deployment efficiency.

[0005] In order to solve the above technical problems, the present invention provides a containerized service deployment method, which is applied to a deployment node in a cloud platform, comprising:

[0006] Obtain a preset sub-configuration file corresponding to the node to be deployed for the service to be deployed;

[0007] Mounting the preset sub-configuration file on the corresponding node to be deployed;

[0008] According to the preset image package, starting the service on which the service to be deployed depends in the node to be deployed, wherein the preset image package installs the service to be deployed and the services on which it depends;

[0009] Obtaining service resource configuration parameters in a preset sub-configuration file mounted on the node to be deployed;

[0010] The service resource configuration parameters obtained from the node to be deployed are configured in the service to be deployed in the node to be deployed, so as to start the service to be deployed according to the preset image package.

[0011] On the other hand, the service resource configuration parameters obtained from the node to be deployed are configured before the service to be deployed in the node to be deployed, and the containerized service deployment method further includes:

[0012] Determine whether the service to be deployed has dependent configuration items, wherein the dependent configuration items are dependent operating system configuration items;

[0013] If so, configuring the dependent configuration item in the node to be deployed according to the operating system configuration parameters of the service to be deployed corresponding to the node to be deployed;

[0014] If not, executing the step of configuring the service resource configuration parameters obtained from the node to be deployed to the service to be deployed in the node to be deployed;

[0015] After configuring the dependent configuration items in the node to be deployed, determining whether the node to be deployed is offline;

[0016] If offline, the service deployment process of the node to be deployed is suspended and the termination steps are recorded;

[0017] After the node to be deployed goes offline, determining whether the node to be deployed is back online;

[0018] If the node is back online, the service deployment process of the node to be deployed is continued from the recorded suspension step of the node to be deployed.

[0019] On the other hand, after the node to be deployed goes offline, determining whether the node to be deployed is back online includes:

[0020] After the node to be deployed is offline, determining whether the node to be deployed can be back online within a preset time after being offline;

[0021] If the user fails to get back online within the preset time after being offline, the alarm will be controlled to sound an alarm.

[0022] If the node is back online, the service deployment process of the node to be deployed is continued from the recorded suspension step of the node to be deployed, including:

[0023] If the node can be put back online within the preset time after being offline, the service deployment process of the node to be deployed will be continued from the recorded suspension step of the node to be deployed.

[0024] On the other hand, mounting the preset sub-configuration file on the corresponding node to be deployed includes:

[0025] Mount the preset sub-configuration file on the target container group in the corresponding node to be deployed, where the target container group is the container group where the service to be deployed is located;

[0026] Obtaining the service resource configuration parameters in the preset sub-configuration file mounted on the node to be deployed includes:

[0027] Obtain service resource configuration parameters in a preset sub-configuration file mounted on a target container group in the node to be deployed.

[0028] On the other hand, obtaining the service resource configuration parameters in the preset sub-configuration file mounted on the target container group in the node to be deployed includes:

[0029] The preset sub-configuration file mounted on the target container group in the node to be deployed is parsed according to the preset parsing algorithm in the preset image package to obtain the service resource configuration parameters.

[0030] On the other hand, the service to be deployed includes a data plane development kit, and the service on which the service to be deployed depends includes an open virtual switch service.

[0031] On the other hand, the service resource configuration parameters obtained from the node to be deployed are configured before the service to be deployed in the node to be deployed, and the containerized service deployment method further includes:

[0032] Determine whether the service to be deployed needs to take over hardware devices when running;

[0033] If necessary, determine whether there is a target device that has been taken over by the service to be deployed in the node to be deployed, wherein the target device is: a hardware device that the service to be deployed needs to take over;

[0034] If so, the target device in the node to be deployed that has been taken over by the service to be deployed is released from the service to be deployed, so as to configure the service resource configuration parameters of the released service to be deployed.

[0035] In order to solve the above technical problems, the present invention further provides a containerized service deployment device, which is applied to a deployment node in a cloud platform, comprising:

[0036] A pre-acquisition module, used to acquire a preset sub-configuration file corresponding to the node to be deployed for the service to be deployed;

[0037] A first mounting module, used for mounting the preset sub-configuration file on the corresponding node to be deployed;

[0038] A first startup module, used to start the service on which the service to be deployed depends in the node to be deployed according to a preset image package, wherein the preset image package installs the service to be deployed and the services on which it depends;

[0039] A first acquisition module, used to acquire service resource configuration parameters in a preset sub-configuration file mounted on the node to be deployed;

[0040] The first configuration module is used to configure the service resource configuration parameters obtained from the node to be deployed to the service to be deployed in the node to be deployed, so as to start the service to be deployed according to a preset image package.

[0041] In order to solve the above technical problems, the present invention further provides a containerized service deployment device, including:

[0042] Memory for storing computer programs;

[0043] A processor is used to implement the steps of the above-mentioned method for deploying containerized services when executing the computer program.

[0044] In order to solve the above technical problem, the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the deployment method of the containerized service as described above are implemented.

[0045] Beneficial effects: The present invention provides a method for deploying containerized services, taking into account that (1) the service resources of the service to be deployed in each node can be personalized through the preset sub-configuration file (including service resource configuration parameters) corresponding to the node to be deployed of the service to be deployed, and (2) the same service to be deployed can be automatically deployed on multiple nodes to be deployed through the deployment node in the cloud platform. Therefore, in the present invention, the preset sub-configuration file of the service to be deployed corresponding to the node to be deployed can be mounted on the node to be deployed, and then the service on which the service to be deployed depends can be started in the node to be deployed, and then the service resource configuration parameters (obtained from the preset sub-configuration file mounted on the node to be deployed) can be configured in the service to be deployed in the node to be deployed, thereby performing differentiated configuration of the services to be deployed in different nodes to be deployed and having higher deployment efficiency.

[0046] The present invention also provides a containerized service deployment device, equipment and computer-readable storage medium, which have the same beneficial effects as the above containerized service deployment method. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the relevant technologies and the drawings required for use in the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0048] Figure 1A schematic diagram of a process for deploying a containerized service provided by the present invention;

[0049] Figure 2 A schematic diagram of a process flow of another containerized service deployment method provided by the present invention;

[0050] Figure 3 A schematic diagram of a process flow of image package preparation provided by the present invention;

[0051] Figure 4 A schematic diagram of the structure of a containerized service deployment device provided by the present invention;

[0052] Figure 5 A schematic diagram of the structure of a deployment device for a containerized service provided by the present invention;

[0053] Figure 6 A schematic diagram of the structure of a computer-readable storage medium provided by the present invention. DETAILED DESCRIPTION

[0054] The core of the present invention is to provide a method, apparatus, device and readable storage medium for deploying containerized services. In the present invention, a preset sub-configuration file of the service to be deployed corresponding to the node to be deployed can be mounted on the node to be deployed, and then the service on which the service to be deployed depends can be started in the node to be deployed, and then the service resource configuration parameters (obtained from the preset sub-configuration file mounted on the node to be deployed) can be configured in the service to be deployed in the node to be deployed, thereby performing differentiated configuration on the services to be deployed in different nodes to be deployed and having higher deployment efficiency.

[0055] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0056] Please refer to Figure 1 , Figure 1 A schematic diagram of a process flow of a containerized service deployment method provided by the present invention, wherein the containerized service deployment method is applied to a deployment node in a cloud platform, including:

[0057] S101: Obtaining a preset sub-configuration file corresponding to the node to be deployed and the service to be deployed;

[0058] Specifically, considering the technical problems in the above background technology, and considering that (1) the service resources of the service to be deployed in each node can be personalized by using the preset sub-configuration file (including service resource configuration parameters) corresponding to the node to be deployed of the service to be deployed, and (2) the same service to be deployed can be automatically deployed on multiple nodes to be deployed by the deployment node in the cloud platform, the embodiment of the present invention intends to use the deployment node in the cloud platform and the preset sub-configuration file corresponding to each node to be deployed of the service to be deployed to complete the differentiated configuration of the service to be deployed in each node to be deployed. In order to facilitate the determination of the "personalized configuration of the service to be deployed" required for each node to be deployed, the embodiment of the present invention pre-sets the "preset sub-configuration file of the service to be deployed corresponding to the node to be deployed", and this step can obtain the preset sub-configuration file of the service to be deployed corresponding to the node to be deployed and use it as the data basis for subsequent steps.

[0059] S102: Mount the preset sub-configuration file on the corresponding node to be deployed;

[0060] Specifically, after obtaining the preset sub-configuration file, the preset sub-configuration file corresponding to the node to be deployed and the service to be deployed can be mounted on the node to be deployed, so as to serve as the data basis for subsequent steps.

[0061] Specifically, in the embodiment of the present invention, the preset sub-configuration file may be mounted by means of hostpath (host path).

[0062] In addition, it is worth mentioning that you can also set a switch for the service to be deployed in the cloud platform. Users can decide whether to allow the deployment of the service to be deployed in the cloud platform by configuring the status of the switch. For example, when the switch status is on, it means that the deployment of the service to be deployed in the cloud platform is allowed. When the switch status is off, the deployment of the service to be deployed in the cloud platform is not allowed. That is, before the service deployment starts, it is necessary to determine whether the switch of the service to be deployed in the cloud platform is turned on. If it is turned on, the deployment process can be executed. The switch of the service to be deployed can be an option in the global control file of the cloud platform, which is easy to identify.

[0063] In addition, the nodes to be deployed in the cloud platform can be set through relevant configuration files (such as inventory files).

[0064] S103: starting the service on which the service to be deployed depends in the node to be deployed according to the preset image package, wherein the preset image package installs the service to be deployed and the services on which it depends;

[0065] Specifically, considering that many services to be deployed have services on which they depend, that is, the service to be deployed can only run after the dependent services (the dependent services) are running, in order to enable the service to be deployed on the node to be deployed to run normally, the services on which the service to be deployed depends can be started in the node to be deployed according to the preset image package, wherein the preset image package installs the service to be deployed and the services on which it depends.

[0066] Among them, there are differences in the services that different services to be deployed depend on. For example, for a DPDK (Data Plane Development Kit) service, the services it depends on may include an OVS (Open vSwitch) service, which is not limited in this embodiment of the present invention.

[0067] Specifically, the preset image package can be pre-stored in the image warehouse of the cloud platform for subsequent use. The basic image of the preset image package can be of various types, such as centos8.2, etc., which is not limited in the embodiment of the present invention.

[0068] S104: Obtain service resource configuration parameters in a preset sub-configuration file mounted on the node to be deployed;

[0069] Specifically, for different nodes to be deployed, the differentiated configuration of the services to be deployed on the nodes to be deployed can be considered as configuring the "service resource configuration parameters in the preset sub-configuration file corresponding to the node" to the services to be deployed in the node, and the corresponding preset sub-configuration file has been mounted on each node to be deployed in the previous step. Therefore, in this step, the service resource configuration parameters in the preset sub-configuration file mounted on the node to be deployed can be obtained, so as to use it as the data basis for subsequent steps.

[0070] The service resource configuration parameters include configuration parameters of node resources required for the service to be deployed, such as configuration parameters of CPU resources and memory resources, etc., which are not limited in the embodiment of the present invention.

[0071] S105: The service resource configuration parameters obtained from the node to be deployed are configured in the service to be deployed in the node to be deployed, so as to start the service to be deployed according to the preset image package.

[0072] Specifically, after obtaining the service resource configuration parameters of the service to be deployed in the node to be deployed, the service resource configuration parameters obtained from the node to be deployed can be configured in the service to be deployed in the node to be deployed, so as to start the service to be deployed according to the preset image package.

[0073] It is worth mentioning that “for any node to be deployed” in the embodiment of the present invention means that the same action is performed for any node to be deployed.

[0074] Specifically, when starting the service to be deployed, it can also be started according to the preset image package, which is not limited in the embodiment of the present invention.

[0075] The present invention provides a method for deploying containerized services. Considering that (1) the service resources of the service to be deployed in each node can be personalized by using a preset sub-configuration file (including service resource configuration parameters) of the service to be deployed corresponding to the node to be deployed, and (2) the same service to be deployed can be automatically deployed on multiple nodes to be deployed by using a deployment node in a cloud platform, the preset sub-configuration file of the service to be deployed corresponding to the node to be deployed can be mounted on the node to be deployed, and then the service on which the service to be deployed depends can be started in the node to be deployed, and then the service resource configuration parameters (obtained from the preset sub-configuration file mounted on the node to be deployed) can be configured in the service to be deployed in the node to be deployed, thereby performing differentiated configuration on the services to be deployed in different nodes to be deployed and having a higher deployment efficiency.

[0076] Based on the above embodiments:

[0077] As an optional embodiment, before configuring the service resource configuration parameters obtained from the node to be deployed in the node to be deployed, the method for deploying the containerized service further includes:

[0078] S201: Determine whether the service to be deployed has dependent configuration items, where the dependent configuration items are dependent operating system configuration items;

[0079] S202: If yes, configure the dependent configuration items in the node to be deployed according to the operating system configuration parameters of the service to be deployed corresponding to the node to be deployed;

[0080] If it does not exist, execute the step of obtaining the service resource configuration parameters from the node to be deployed and configuring the service to be deployed in the node to be deployed;

[0081] S203: After configuring the dependent configuration items in the node to be deployed, determine whether the node to be deployed is offline;

[0082] S204: If offline, suspend the service deployment process of the node to be deployed and record the termination steps;

[0083] S205: After the node to be deployed goes offline, determine whether the node to be deployed is back online;

[0084] S206: If the node is back online, the service deployment process of the node to be deployed is continued from the recorded suspension step of the node to be deployed.

[0085] Specifically, in order to better illustrate the embodiments of the present invention, please refer to Figure 2 , Figure 2 A schematic diagram of a process flow of another containerized service deployment method provided by the present invention.

[0086] Specifically, considering that when some services to be deployed are running on the nodes to be deployed, it is necessary to pre-configure the dependent configuration items of the services to be deployed in the operating system of the nodes to be deployed (dependent operating system configuration items). Therefore, in order to support differentiated configuration of more types of services to be deployed, in an embodiment of the present invention, when there are dependent configuration items for the services to be deployed, the dependent configuration items in the nodes to be deployed can be configured according to the operating system configuration parameters of the services to be deployed corresponding to the nodes to be deployed.

[0087] Among them, the dependent configuration items can be of various types, such as CPU-related configuration items and memory-related configuration items, etc. For example, for DPDK services, its dependent configuration items may include CPU-bound core large page memory, etc., which is not limited in the embodiments of the present invention.

[0088] Specifically, when the service to be deployed is a DPDK service, since the DPDK service needs to take over the network card of the node, and the network card needs to be connected to the bridge, the service resource configuration parameters of the DPDK service may also include port information required for the network card to connect to the bridge.

[0089] Specifically, and considering that after completing the configuration of the dependent configuration items, the operating system needs to be restarted to make the dependent configuration items take effect, and the restart of the operating system will cause the deployment process of the service to be deployed to be terminated, therefore, in order to ensure the smooth execution of the deployment process of the service to be deployed, in the embodiment of the present invention, after configuring the dependent configuration items in the node to be deployed, it can also be determined whether the node to be deployed is offline. If it is offline, the service deployment process of the node to be deployed is suspended and the termination step is recorded. After the node to be deployed is offline, it is determined whether the node to be deployed is back online. If it is back online, the service deployment process of the node to be deployed is continued from the recorded termination step of the node to be deployed, so that when the operating system is restarted, the service deployment process of the service to be deployed can still be smoothly executed without human intervention.

[0090] Among them, the identification of the offline and online status of the nodes to be deployed can be carried out through relevant monitoring services.

[0091] As an optional embodiment, after the node to be deployed goes offline, determining whether the node to be deployed is back online includes:

[0092] After the node to be deployed is offline, determine whether the node to be deployed can be back online within a preset time after being offline;

[0093] If the user fails to get back online within the preset time after being offline, the alarm will be controlled to sound an alarm.

[0094] If the service is back online, the service deployment process of the node to be deployed will be continued from the recorded aborted steps of the node to be deployed, including:

[0095] If the node can be put back online within the preset time after being offline, the service deployment process of the node to be deployed will be continued from the recorded suspension step of the node to be deployed.

[0096] Specifically, considering that for the node to be deployed, the operating system may fail to restart due to the operating system itself or the dependent configuration items of the service to be deployed, that is, it cannot start normally after being shut down, in order to discover this situation in time, in the embodiment of the present invention, after the node to be deployed goes offline, it can also be judged whether the node to be deployed can go online again within a preset time after being disconnected. By limiting the preset time, if the node to be deployed still fails to start and go online within the preset time, it can be determined that the restart has failed, and the alarm can be controlled to sound an alarm so that the staff can intervene in time.

[0097] The alarm may be of various types, such as a buzzer or a voice announcer, etc., which is not limited in the embodiment of the present invention.

[0098] The preset duration may be set independently, for example, 1 minute, etc., and the embodiment of the present invention does not limit this.

[0099] As an optional embodiment, mounting the preset sub-configuration file on the corresponding node to be deployed includes:

[0100] Mount the preset sub-configuration file to the target container group in the corresponding node to be deployed, where the target container group is the container group where the service to be deployed is located;

[0101] Obtaining the service resource configuration parameters in the preset sub-configuration file mounted on the node to be deployed includes:

[0102] Get the service resource configuration parameters in the preset sub-configuration file mounted on the target container group in the node to be deployed.

[0103] Specifically, considering that the preset sub-configuration file itself can be directly mounted on the target container group in the node to be deployed, and mounting it on the target container group makes it easier to obtain and use the preset sub-configuration file, in an embodiment of the present invention, the preset sub-configuration file corresponding to the node to be deployed and the service to be deployed can be mounted on the target container group in the node to be deployed, so as to subsequently obtain the preset sub-configuration file mounted on the target container group and obtain the service resource configuration parameters therefrom.

[0104] Of course, in addition to the target container group, the preset sub-configuration file may also have multiple other mounting locations in the node to be deployed, which is not limited in the embodiment of the present invention.

[0105] As an optional embodiment, obtaining the service resource configuration parameters in a preset sub-configuration file mounted on a target container group in a node to be deployed includes:

[0106] The preset sub-configuration file mounted on the target container group in the node to be deployed is parsed according to the preset parsing algorithm in the preset image package to obtain the service resource configuration parameters.

[0107] Specifically, considering that if the preset sub-configuration file can be preprocessed so that the service resource configuration parameters therein can be obtained after it is parsed by the preset parsing algorithm, it can have the effect of improving security and the like, therefore, the preset sub-configuration file in the embodiment of the present invention can be preprocessed, then the preset sub-configuration file mounted on the target container group in the node to be deployed can be parsed according to the preset parsing algorithm in the preset image package to obtain the service resource configuration parameters, thereby facilitating the improvement of the security and other characteristics of the service resource configuration parameters.

[0108] In addition, as an optional embodiment, the preset parsing algorithm includes a preset decryption algorithm and a preset decoding algorithm;

[0109] The preset sub-configuration file mounted on the target container group in the node to be deployed is parsed according to the preset parsing algorithm in the preset image package to obtain the service resource configuration parameters including:

[0110] Decrypt the preset sub-configuration file mounted on the target container group in the node to be deployed according to the preset decryption algorithm in the preset image package to obtain the service resource configuration parameters to be decoded;

[0111] According to a preset decoding algorithm in a preset image package, the service resource configuration parameters to be decoded of the node to be deployed are decoded to obtain the decoded service resource configuration parameters.

[0112] Specifically, considering that encoding of service resource configuration parameters can save storage space and other benefits, and encryption through encryption algorithms can improve the security of service resource configuration parameters, the service resource configuration parameters can be pre-encoded and encrypted in an embodiment of the present invention. Then, during parsing, the preset sub-configuration file mounted on the target container group in the node to be deployed can be first decrypted according to the preset decryption algorithm in the preset image package to obtain the service resource configuration parameters to be decoded, and then the service resource configuration parameters to be decoded of the node to be deployed can be decoded according to the preset decoding algorithm in the preset image package to obtain the decoded service resource configuration parameters, thereby reducing storage space occupancy and improving data security at the same time.

[0113] Among them, the encoding method used for encoding corresponds to the preset decoding algorithm, and the encryption algorithm used for encryption corresponds to the preset decryption algorithm. Both can have various different combinations, such as base64 encoding and decoding algorithms, and symmetric encryption and decryption algorithms, etc. The embodiments of the present invention are not limited here.

[0114] To better illustrate the embodiments of the present invention, please refer to Figure 3 , Figure 3 A flow chart of the image package preparation work provided by the present invention includes selecting a base image, then installing the software packages of the services to be deployed and their dependent services in the base image, then installing a preset parsing algorithm, and finally pushing it to the image repository of the cloud platform for standby use.

[0115] As an optional embodiment, the service to be deployed includes a data plane development kit, and the service on which the service to be deployed depends includes an open virtual switch service.

[0116] Specifically, the data plane development kit is the aforementioned DPDK service. The DPDK service focuses on high-performance processing of data packets in network applications. DPDK has the following main features: High performance: DPDK uses zero-copy technology and memory-based data structures to minimize CPU overhead and latency during packet processing. Scalability: DPDK supports multi-core processors and makes full use of CPU cores by using polling mode. Flexibility: DPDK provides a complete development tool chain, including libraries, sample code, and test suites, enabling users to flexibly customize their data plane solutions. Openness: DPDK is an open source project that can be freely downloaded, used, and modified.

[0117] Among them, the DPDK service not only has dependent configuration items, but also needs to take over the hardware device (network card) during runtime.

[0118] Of course, in addition to the DPDK service, the service to be deployed may also be of other types, which is not limited in the embodiment of the present invention.

[0119] As an optional embodiment, before configuring the service resource configuration parameters obtained from the node to be deployed in the node to be deployed, the method for deploying the containerized service further includes:

[0120] Determine whether the service to be deployed needs to take over hardware devices during operation;

[0121] If necessary, determine whether there is a target device that has been taken over by the service to be deployed in the node to be deployed, where the target device is: a hardware device that needs to be taken over by the service to be deployed;

[0122] If so, the target device in the node to be deployed that has been taken over by the service to be deployed is released from the service to be deployed, so as to configure the service resource configuration parameters of the released service to be deployed.

[0123] Specifically, considering that some services need to take over the hardware devices of the node where they are located during operation, and the deployment of the service to be deployed may have been carried out before this deployment action, if the previous service to be deployed is still taking over the hardware devices and running, the configuration of the service resource configuration parameters cannot be successfully performed this time. Therefore, in order to successfully perform the configuration of the service resource configuration parameters this time, in the embodiment of the present invention, it is first possible to determine whether the service to be deployed needs to take over the hardware devices during operation. If necessary, it is possible to determine whether there is a target device in the node to be deployed that has been taken over by the service to be deployed. If so, the target device in the node to be deployed that has been taken over by the service to be deployed can be released from the service to be deployed, so as to configure the service resource configuration parameters of the released service to be deployed, which can improve the deployment efficiency and success rate of such services to be deployed.

[0124] If there is no target device that has been taken over by the service to be deployed in the node to be deployed, the service resource configuration parameters of the service to be deployed can be directly configured.

[0125] Specifically, determining whether there is a target device in the node to be deployed that has been taken over by the service to be deployed includes: communicating with the target device according to communication information of the target device (eg communication bus information of the network card) to determine whether the target device has been taken over by the service to be deployed.

[0126] Please refer to Figure 4 , Figure 4 A schematic diagram of a containerized service deployment device provided by the present invention, wherein the containerized service deployment device is applied to a deployment node in a cloud platform, including:

[0127] A pre-acquisition module, 41, is used to acquire a preset sub-configuration file corresponding to the node to be deployed and the service to be deployed;

[0128] A first mounting module 42, used to mount a preset sub-configuration file on a corresponding node to be deployed;

[0129] A first startup module 43, used to start the service on which the service to be deployed depends in the node to be deployed according to a preset image package, wherein the preset image package installs the service to be deployed and the services on which it depends;

[0130] A first acquisition module 44 is used to acquire service resource configuration parameters in a preset sub-configuration file mounted on the node to be deployed;

[0131] The first configuration module 45 is used to configure the service resource configuration parameters obtained from the node to be deployed to the service to be deployed in the node to be deployed, so as to start the service to be deployed according to the preset image package.

[0132] Based on the above embodiments:

[0133] As an optional embodiment, the containerized service deployment device further includes:

[0134] A first judgment module is used to judge whether the service to be deployed has dependent configuration items, wherein the dependent configuration items are dependent operating system configuration items. If so, the second configuration module is triggered; if not, the first configuration module 45 is triggered;

[0135] A second configuration module is used to configure dependent configuration items in the node to be deployed according to the operating system configuration parameters of the service to be deployed corresponding to the node to be deployed;

[0136] A second judgment module is used to judge whether the node to be deployed is offline after configuring the dependent configuration items in the node to be deployed, and if offline, trigger the first suspension module;

[0137] A first pause module, used to pause the service deployment process of the node to be deployed and record the suspension steps;

[0138] A third judgment module is used to judge whether the node to be deployed is back online after the node to be deployed is offline, and if it is back online, trigger the first continuation module;

[0139] The first continuing module is used to continue the service deployment process of the node to be deployed from the recorded suspension step of the node to be deployed.

[0140] As an optional embodiment, the third judgment module includes:

[0141] A first judgment submodule is used to judge whether the node to be deployed can be back online within a preset time after the node to be deployed is offline, and if the node to be deployed cannot be back online within the preset time after the node is offline, the first alarm module is triggered; if the node to be deployed can be back online within the preset time after the node is offline, the first continuation module is triggered;

[0142] The first alarm module is used to control the alarm to sound.

[0143] As an optional embodiment, the first mounting module 42 includes:

[0144] A first mounting submodule is used to mount a preset sub-configuration file of the service to be deployed corresponding to the node to be deployed on a target container group in the node to be deployed, wherein the target container group is the container group where the service to be deployed is located;

[0145] The first acquisition module 44 is specifically used for:

[0146] Get the service resource configuration parameters in the preset sub-configuration file mounted on the target container group in the node to be deployed.

[0147] As an optional embodiment, the first acquisition module 44 is specifically used for:

[0148] The preset sub-configuration file mounted on the target container group in the node to be deployed is parsed according to the preset parsing algorithm in the preset image package to obtain the service resource configuration parameters.

[0149] As an optional embodiment, the containerized service deployment device further includes:

[0150] The fourth judgment module is used to judge whether the service to be deployed needs to take over the hardware device when running, and if so, trigger the fifth judgment module;

[0151] The fifth judgment module is used to judge whether there is a target device that has been taken over by the service to be deployed in the node to be deployed, and if so, trigger the first release module, wherein the target device is: a hardware device that needs to be taken over by the service to be deployed;

[0152] The first releasing module is used to release the target device in the node to be deployed that has been taken over by the service to be deployed from the service to be deployed, so as to configure the service resource configuration parameters of the released service to be deployed.

[0153] For an introduction to the containerized service deployment device provided in an embodiment of the present invention, please refer to the aforementioned embodiment of the containerized service deployment method, and the embodiment of the present invention will not be described in detail here.

[0154] Please refer to Figure 5 , Figure 5A schematic diagram of a containerized service deployment device provided by the present invention, wherein the containerized service deployment device includes:

[0155] A memory 51, used for storing computer programs;

[0156] The processor 52 is used to implement the steps of the containerized service deployment method in the aforementioned embodiment when executing the computer program.

[0157] For an introduction to the deployment device for the containerized service provided in the embodiment of the present invention, please refer to the embodiment of the deployment method for the containerized service described above, and the embodiment of the present invention will not be described in detail here.

[0158] Please refer to Figure 6 , Figure 6 This is a schematic diagram of the structure of a computer-readable storage medium provided by the present invention. A computer program 62 is stored on the computer-readable storage medium 61. When the computer program 62 is executed by the processor, the steps of the containerized service deployment method in the aforementioned embodiment are implemented.

[0159] For an introduction to the computer-readable storage medium provided in an embodiment of the present invention, please refer to the embodiment of the aforementioned containerized service deployment method, and the embodiment of the present invention will not be described in detail here.

[0160] An embodiment of the present invention further provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the method for deploying containerized services in the aforementioned embodiment.

[0161] For an introduction to the computer program product provided by an embodiment of the present invention, please refer to the embodiment of the aforementioned containerized service deployment method, and the embodiment of the present invention will not be described in detail here.

[0162] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same and similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description. It should also be noted that in this specification, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the term "include", "comprise" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or equipment including a series of elements includes not only those elements, but also includes other elements that are not explicitly listed, or also includes elements inherent to such process, method, article or equipment. In the absence of more restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the process, method, article or equipment including the element.

[0163] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for deploying a containerized service, characterized in that: Applied to deployment nodes in the cloud platform, including: Obtain a preset sub-configuration file corresponding to the node to be deployed for the service to be deployed; Mounting the preset sub-configuration file on the corresponding node to be deployed; According to the preset image package, starting the service on which the service to be deployed depends in the node to be deployed, wherein the preset image package installs the service to be deployed and the services on which it depends; Obtaining service resource configuration parameters in a preset sub-configuration file mounted on the node to be deployed; The service resource configuration parameters obtained from the node to be deployed are configured in the service to be deployed in the node to be deployed, so as to start the service to be deployed according to the preset image package.

2. The method for deploying containerized services according to claim 1, characterized in that: The service resource configuration parameters obtained from the node to be deployed are configured before the service to be deployed in the node to be deployed, and the method for deploying the containerized service further includes: Determine whether the service to be deployed has dependent configuration items, wherein the dependent configuration items are dependent operating system configuration items; If so, configuring the dependent configuration item in the node to be deployed according to the operating system configuration parameters of the service to be deployed corresponding to the node to be deployed; If not, executing the step of configuring the service resource configuration parameters obtained from the node to be deployed to the service to be deployed in the node to be deployed; After configuring the dependent configuration items in the node to be deployed, determining whether the node to be deployed is offline; If offline, the service deployment process of the node to be deployed is suspended and the termination steps are recorded; After the node to be deployed goes offline, determining whether the node to be deployed is back online; If the node is back online, the service deployment process of the node to be deployed is continued from the recorded suspension step of the node to be deployed.

3. The method for deploying containerized services according to claim 2, characterized in that: After the node to be deployed goes offline, determining whether the node to be deployed is back online includes: After the node to be deployed is offline, determining whether the node to be deployed can be back online within a preset time after being offline; If the user fails to get back online within the preset time after being offline, the alarm will be controlled to sound an alarm. If the node is back online, the service deployment process of the node to be deployed is continued from the recorded suspension step of the node to be deployed, including: If the node can be put back online within the preset time after being offline, the service deployment process of the node to be deployed will be continued from the recorded suspension step of the node to be deployed.

4. The method for deploying containerized services according to claim 1, characterized in that: Mounting the preset sub-configuration file on the corresponding node to be deployed includes: Mount the preset sub-configuration file on the target container group in the corresponding node to be deployed, where the target container group is the container group where the service to be deployed is located; Obtaining the service resource configuration parameters in the preset sub-configuration file mounted on the node to be deployed includes: Obtain service resource configuration parameters in a preset sub-configuration file mounted on a target container group in the node to be deployed.

5. The method for deploying containerized services according to claim 4, characterized in that: Obtaining the service resource configuration parameters in the preset sub-configuration file mounted on the target container group in the node to be deployed includes: The preset sub-configuration file mounted on the target container group in the node to be deployed is parsed according to the preset parsing algorithm in the preset image package to obtain the service resource configuration parameters.

6. The method for deploying containerized services according to claim 1, characterized in that: The service to be deployed includes a data plane development kit, and the service on which the service to be deployed depends includes an open virtual switch service.

7. The method for deploying containerized services according to any one of claims 1 to 6, characterized in that: The service resource configuration parameters obtained from the node to be deployed are configured before the service to be deployed in the node to be deployed, and the method for deploying the containerized service further includes: Determine whether the service to be deployed needs to take over hardware devices when running; If necessary, determine whether there is a target device that has been taken over by the service to be deployed in the node to be deployed, wherein the target device is: a hardware device that the service to be deployed needs to take over; If so, the target device in the node to be deployed that has been taken over by the service to be deployed is released from the service to be deployed, so as to configure the service resource configuration parameters of the released service to be deployed.

8. A containerized service deployment device, characterized in that: Applied to deployment nodes in the cloud platform, including: A pre-acquisition module, used to acquire a preset sub-configuration file corresponding to the node to be deployed and the service to be deployed; A first mounting module, used for mounting the preset sub-configuration file on the corresponding node to be deployed; A first startup module, used to start the service on which the service to be deployed depends in the node to be deployed according to a preset image package, wherein the preset image package installs the service to be deployed and the services on which it depends; A first acquisition module, used to acquire service resource configuration parameters in a preset sub-configuration file mounted on the node to be deployed; The first configuration module is used to configure the service resource configuration parameters obtained from the node to be deployed to the service to be deployed in the node to be deployed, so as to start the service to be deployed according to a preset image package.

9. A containerized service deployment device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the method for deploying a containerized service as claimed in any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the method for deploying a containerized service according to any one of claims 1 to 7.