Component, configuration method of private cloud component, related device and storage medium

Through the component configuration method, the Nacos open source architecture does not support multi-availability zone deployment, and realizes the stable deployment and access of components in multi-availability zones.

CN114915547BActive Publication Date: 2024-12-17TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202110175599.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-02-07
Publication Date
2024-12-17
Estimated Expiration
2041-02-07

AI Technical Summary

Technical Problem

The existing Nacos open source architecture does not support the nearby access policy in multi-region multi-authority zone scenarios, resulting in components that must be deployed in the same region and the same Availability Zone. It is impossible to apply to private cloud environments deployed in multi-region multi-authority zones.

Method used

A component configuration method is proposed. By receiving the configuration declaration definition of the target component, it generates service configuration information at the network level, and uses the dependent service identification to find the configuration information of the dependent service in the service configuration information stored in the configuration center, and supports nearby access, Specify network-level and list access policies to ensure components are deployed in multiple regions and multiple Availability Zones.

Benefits of technology

It realizes the possibility of components deploying in multiple regions and multiple Availability Zones, supports mutual access and calls between multiple regions and multiple Availability Zones, enriches service discovery policies, and is suitable for complex private cloud scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114915547B_ABST
    Figure CN114915547B_ABST
Patent Text Reader

Abstract

The present application discloses a configuration method for a component, a private cloud component, a related device, and a storage medium. The configuration method for the component includes: receiving a configuration declaration definition of a target component, and generating configuration information of the target component's service at the network level. Since the service level in the configuration declaration definition of the target component is used to describe the location range where the target component needs to be deployed to provide services, when generating the configuration information of the target component's service at the network level, the service level of the target component's service specifies the scope of the target component's service configuration information at the network level. In this way, the target component can be deployed within the scope of the target component's service configuration information at the network level, and is not limited to being deployed in the same region and the same availability zone. It can be deployed in multiple regions and multiple availability zones to achieve service scheduling between multiple regions and multiple availability zones under a private cloud network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of cloud platform technology, and in particular to a component, a configuration method of a private cloud component, related devices, and a storage medium. Background Art

[0002] In the prior art, Nacos open source architecture is usually used as a configuration management platform for microservices, which has the functions of discovering, configuring and managing microservices. Specifically, Nacos open source architecture can generate configuration files for components. By starting and running configuration files, components can have functions such as calling services of other components and providing services for other components.

[0003] However, the Nacos open source architecture itself does not support the local access strategy in multi-region and multi-availability zone scenarios. Therefore, all components that use it to generate configuration files must be deployed in the same region and the same availability zone. This is not applicable to private clouds that need to deploy components in multiple regions and multiple availability zones. Summary of the invention

[0004] Based on the above-mentioned deficiencies of the prior art, the present application proposes a component, a configuration method of a private cloud component, a related device and a storage medium to realize the deployment of components in multiple regions and multiple availability zones.

[0005] A first aspect of the present invention discloses a component configuration method, which is applied to a configuration center. The component configuration method includes:

[0006] Receive a configuration declaration definition of a target component; wherein the configuration declaration definition of the target component is used to describe the configuration requirements of the target component; the configuration declaration definition of the target component includes: basic information of the target component and service information of services provided; the service information of services provided includes: the service name and service level of the service provided; the service level is used to describe the location range required for the deployment of the service provided;

[0007] Generate configuration information of the target component's service at the network level; wherein the configuration information includes: the access address of the target component's service at the network level, the service name of the target component's service at the network level is the service name of the service provided; the scope of the configuration information is specified by the service level of the service provided.

[0008] Optionally, in the above component configuration method, the configuration declaration definition of the target component further includes: an identifier of a dependent service of the target component; wherein: after receiving the configuration declaration definition of the target component, the method further includes:

[0009] Using the identifier of the dependent service, the configuration information of the dependent service is searched in the configuration information of the service at the network level stored in the configuration center, and the configuration information of the dependent service is searched in a manner that meets the requirements of the service discovery strategy of the dependent service;

[0010] Generate a configuration file of the target component; wherein the configuration file of the target component includes: configuration information of the dependent service.

[0011] Optionally, in the configuration method of the above component, the service information of the service provided further includes: the service type of the service provided; wherein: generating the configuration information of the service of the target component at the network level includes:

[0012] Generate configuration information of the service of the target component at the target network level; the target network level is determined by the service type provided by the target component.

[0013] Optionally, in the configuration method of the above-mentioned component, the service discovery strategy of the dependent service includes: a nearby access strategy, a specified network layer strategy and a list access strategy; wherein, the service discovery strategy of the dependent service is the specified network layer strategy, and the configuration declaration definition of the target component also includes: accessing the specified information of the network layer where the dependent service is located; the service discovery strategy of the dependent service is the list access strategy, and the configuration declaration definition of the target component also includes: accessing the specified area of ​​the dependent service.

[0014] Optionally, in the configuration method of the above component, the service discovery strategy of the dependent service is a proximity access strategy, and the use of the identifier of the dependent service to find the configuration information of the dependent service in the configuration information of the service at the network level of the component stored in the configuration center includes:

[0015] In the configuration information of the service of the component at the network level stored in the configuration center, find the configuration information of the service whose identifier is the identifier of the dependent service and which is deployed at the same location as the target component;

[0016] The service discovery strategy of the dependent service is a strategy for specifying a network layer, and the use of the identifier of the dependent service to find the configuration information of the dependent service in the configuration information of the service at the network layer stored in the component of the configuration center includes:

[0017] Finding, in the configuration information of the service of the component at the network level stored in the configuration center, the configuration information of the service at the network level that is identified as the identifier of the dependent service and is indicated by the designated information for accessing the network level where the dependent service is located;

[0018] The service discovery strategy of the dependent service is a list access strategy, and the use of the identifier of the dependent service to find the configuration information of the dependent service in the configuration information of the service at the network level stored in the configuration center includes:

[0019] In the configuration information of the service of the component at the network level stored in the configuration center, the configuration information of the service identified as the identifier of the dependent service and belonging to the designated area for accessing the dependent service is found.

[0020] Optionally, in the configuration method of the above-mentioned component, the generating of configuration information of the service of the target component at the target network level; the target network level is determined by using the service type of the service provided by the target component, including:

[0021] If the service type of the target component is a containerized service, then generate configuration information of the overlay service of the target component at the container network level, configuration information of the underlay service at the basic network level, and configuration information of the overlay service at the private network VPC network level;

[0022] If the service type of the service provided by the target component is a non-containerized service, then the configuration information of the underlay service of the target component at the basic network level and the configuration information of the overlay service at the private network VPC network level are generated.

[0023] The second aspect of the present application discloses a configuration method of a private cloud component, which is applied to a configuration center. The configuration method of the private cloud component includes:

[0024] Receive a calculation request for a configuration package of a target private cloud; wherein the calculation request is used to request a configuration package composed of configuration files of components of the target private cloud;

[0025] Using the component configuration method described in any one of the first aspects above, configure the components of the target private cloud;

[0026] When the configuration files of the components of the target private cloud are obtained, the configuration files of all the components of the target private cloud are packaged to obtain a configuration package of the target private cloud;

[0027] The configuration package of the target private cloud is stored in object storage, and a download link for the configuration package of the private cloud is generated.

[0028] In a third aspect, the present application discloses a component configuration device, which is applied to a configuration center. The component configuration device includes:

[0029] A receiving unit is used to receive a configuration declaration definition of a target component; wherein the configuration declaration definition of the target component is used to describe the configuration requirements of the target component; the configuration declaration definition of the target component includes: basic information of the target component and service information of the service provided; the service information of the service provided includes: the service name and service level of the service provided; the service level is used to describe the location range required for the deployment of the service;

[0030] The first generation unit is used to generate configuration information of the service of the target component at the network level; wherein the configuration information includes: the access address of the service of the target component at the network level, the service name of the service of the target component at the network level is the service name of the service provided; the scope of the configuration information is specified by the service level of the service provided.

[0031] Optionally, in the above-mentioned component configuration device, the configuration declaration definition of the target component further includes: an identifier of a dependent service of the target component; wherein: the component configuration device further includes:

[0032] A search unit, configured to use the identifier of the dependent service to search for the configuration information of the dependent service in the configuration information of the service at the network level of the component stored in the configuration center, wherein the configuration information of the dependent service is searched in a manner that meets the requirements of the service discovery strategy of the dependent service;

[0033] The second generating unit is used to generate a configuration file of the target component; wherein the configuration file of the target component includes: configuration information of the dependent service.

[0034] Optionally, in the configuration device of the above-mentioned component, the service information of the service provided further includes: the service type of the service provided; wherein: the first generating unit includes:

[0035] The first generating subunit is used to generate configuration information of the service of the target component at the target network level; the target network level is determined by the service type provided by the target component.

[0036] Optionally, in the configuration device of the above-mentioned component, the service discovery strategy of the dependent service includes: a nearby access strategy, a specified network layer strategy and a list access strategy; wherein, the service discovery strategy of the dependent service is the specified network layer strategy, and the configuration declaration definition of the target component also includes: accessing the specified information of the network layer where the dependent service is located; the service discovery strategy of the dependent service is the list access strategy, and the configuration declaration definition of the target component also includes: accessing the specified area of ​​the dependent service.

[0037] Optionally, in the configuration device of the above-mentioned component, the service discovery strategy of the dependent service is a proximity access strategy, and the search unit includes:

[0038] A first search subunit is used to search for configuration information of a service whose identifier is the identifier of the dependent service and whose deployment location is the same as that of the target component in the configuration information of the service of the component at the network level stored in the configuration center;

[0039] Optionally, in the configuration device of the above-mentioned component, the service discovery strategy of the dependent service is a strategy of specifying a network layer, and the search unit includes:

[0040] A second search subunit is used to search for the configuration information of the service at the network level of the component stored in the configuration center, which is identified as the identifier of the dependent service and the configuration information of the service at the network level indicated by the designated information for accessing the network level where the dependent service is located;

[0041] Optionally, in the configuration device of the above component, the service discovery strategy of the dependent service is a list access strategy, and the search unit includes:

[0042] The third search subunit is used to search for the configuration information of the service that is identified as the identifier of the dependent service and belongs to the specified area for accessing the dependent service in the configuration information of the service of the component at the network level stored in the configuration center.

[0043] Optionally, in the configuration device of the above component, the first generating subunit includes:

[0044] The second generating subunit is used to generate the configuration information of the overlay service of the target component at the container network level, the configuration information of the underlay service at the basic network level, and the configuration information of the overlay service at the private network VPC network level if the service type provided by the target component is a containerized service;

[0045] The third generating subunit is used to generate the configuration information of the underlay service of the target component at the basic network level and the configuration information of the overlay service at the private network VPC network level if the service type provided by the target component is a non-containerized service.

[0046] A fourth aspect of the present application discloses a configuration center, including:

[0047] An interaction module, configured to receive a calculation request for a configuration package of a target private cloud; wherein the calculation request is used to request a configuration package consisting of configuration files of components of the target private cloud;

[0048] A configuration package calculation module is used to configure the components of the target private cloud using the component configuration method described in any one of the first aspects above; when obtaining the configuration files of the components of the target private cloud, all the components of the target private cloud are packaged with the configuration files to obtain the configuration package of the target private cloud, the configuration package of the target private cloud is stored in the object storage, and a download link for the configuration package of the private cloud is generated.

[0049] In a fifth aspect, the present application discloses a computer storage medium for storing a computer program. When the computer program is executed, it is used to implement the configuration method of the component as described in any one of the first aspects above, or the configuration method of the private cloud component as described in the second aspect above.

[0050] It can be seen from the above technical scheme that in the component configuration method proposed in the present application, when the configuration declaration definition of the target component is received, since the service level in the configuration declaration definition of the target component is used to describe the location range where the target component needs to be deployed to provide services, when generating the configuration information of the target component's service at the network level, the service level of the service provided by the target component specifies the scope of the configuration information of the target component's service at the network level. In this way, the target component can be deployed within the scope of the configuration information of the target component's service at the network level, and is not limited to being deployed in the same region and the same availability zone, but can be deployed in multiple regions and multiple availability zones. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0052] Figure 1 A flowchart of a method for configuring a private cloud component proposed in an embodiment of the present application;

[0053] Figure 2 A flowchart of another method for configuring a private cloud component proposed in an embodiment of the present application;

[0054] Figure 3 A code diagram of input parameters of a configuration calculation interface of a configuration center proposed in an embodiment of the present application;

[0055] Figure 4 A code diagram of return parameters of a configuration calculation interface of a configuration center proposed in an embodiment of the present application;

[0056] Figure 5 A schematic diagram of a flow chart of a configuration method of a component proposed in an embodiment of the present application;

[0057] Figure 6 A code diagram of service information for providing services in a configuration declaration definition is proposed for an embodiment of the present application;

[0058] Figure 7 A code diagram of a dependent service part in a configuration declaration definition proposed in an embodiment of the present application;

[0059] Figure 8 A code diagram of a resource requirement part in a configuration declaration definition proposed in an embodiment of the present application;

[0060] Fig. 9 A code diagram of the dependency basic information part in a configuration declaration definition proposed in an embodiment of the present application;

[0061] Fig.10 A code diagram of a private variable part in a configuration declaration definition proposed in an embodiment of the present application;

[0062] Fig.11 A code diagram of an overlay service at the container network level proposed in an embodiment of the present application;

[0063] Fig.12 A code diagram of an underlay service at a basic network level proposed in an embodiment of the present application;

[0064] Fig.13 A code diagram of an overlay service at the VPC network level proposed in an embodiment of the present application;

[0065] Fig.14 A schematic diagram of a flow chart of a configuration method of a component proposed in an embodiment of the present application;

[0066] Fig.15 A schematic diagram of the structure of a configuration device of a component proposed in an embodiment of the present application;

[0067] Fig.16 A schematic diagram of the structure of a configuration center proposed in an embodiment of the present application. DETAILED DESCRIPTION

[0068] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only 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.

[0069] See also Figure 1 A configuration method for a private cloud component proposed in an embodiment of the present application is applied to a configuration center and specifically includes the following steps:

[0070] S101: Receive a calculation request for a configuration package of a target private cloud.

[0071] A private cloud is a cloud infrastructure with software and hardware resources created within a firewall so that departments within an organization or enterprise can share resources within the data center. In addition to hardware resources, private clouds generally also require cloud device software.

[0072] Private cloud computing includes three levels: cloud hardware, cloud platform, and cloud service. Cloud hardware refers to the user's own personal computer or server, not the cloud computing vendor's data center. The purpose of cloud computing vendors to build data centers is to provide public cloud services to millions of users, so they need to have tens of millions of servers. Private cloud computing only serves friends and relatives for individuals, and only serves employees, customers, and suppliers for enterprises. Therefore, the personal computers or servers of individuals or enterprises are sufficient to provide cloud services.

[0073] The calculation request of the configuration package of the target private cloud is used to request a configuration package composed of configuration files of the components of the target private cloud. The target private cloud is a private cloud that requires the configuration center to configure the components of the target private cloud. Configuring the components refers to configuring the environment-related variable information of the components of the target private cloud. The environment-related variable information includes the basic information of the target component, the service information provided, the identifier of the dependent service of the target component, etc.

[0074] Optionally, in a specific embodiment of the present application, the calculation request of the configuration package of the target private cloud can be triggered and generated through the configuration center page. Specifically, the user can choose to trigger the calculation request of the configuration package of a certain target private cloud on the configuration center page of the configuration center, so that the configuration center receives the calculation request of the configuration package of the target private cloud. Among them, the calculation request of the configuration package of the target private cloud can carry the identification information of the target private cloud, such as the identification number of the target private cloud, the name of the target private cloud, etc.

[0075] Optionally, in a specific embodiment of the present application, a calculation request for the configuration package of the target private cloud can be triggered by the target private cloud. After the target private cloud accesses the configuration center, it sends a calculation request for the configuration package of the target private cloud to the configuration center, requesting a configuration package consisting of configuration files of the components of the target private cloud, wherein the calculation request can carry the configuration declaration definition of the components of the target private cloud and the identification information of the target private cloud.

[0076] S102: Utilize the component configuration method to configure the components of the target private cloud.

[0077] The component configuration method is adopted to configure the target private cloud component, complete the service registration of the target private cloud component, and generate the configuration file of the target private cloud component. The configuration file of the target private cloud component can enable the target private cloud component to have the function of calling dependent services.

[0078] Specifically, the process of configuring the components of the target private cloud using the component configuration method is as follows: receiving the configuration declaration definition of the target component, generating the configuration information of the target component's service at the network level, using the identifier of the dependent service, searching for the configuration information of the dependent service in the configuration information of the component's service at the network level stored in the configuration center, the method of searching for the configuration information of the dependent service meets the requirements of the service discovery strategy of the dependent service, and generating the configuration file of the target component.

[0079] The target component is Figure 1 The illustrated embodiment specifically refers to components of the target private cloud.

[0080] Among them, the configuration file of the target component includes: configuration information of dependent services. The configuration declaration definition of the target component is used to describe the configuration requirements of the target component. The configuration declaration definition of the target component includes: basic information of the target component and service information of the services provided. The service information of the services provided includes: the service name and service level of the services provided, and the service level is used to describe the location range required for deployment to provide the service. The configuration information includes: the access address of the service of the target component at the network level, the service name of the service of the target component at the network level is the service name of the service provided, and the scope of the configuration information is specified by the service level of the service provided.

[0081] The configuration declaration definition of the target component can be passed in through the interface of the configuration center. For example, the target private cloud can access the configuration center and pass in the configuration declaration definition of the target component through the interface of the configuration center. Among them. The configuration declaration definition of the target component passed in by the target private cloud can be the configuration declaration definition of all target components in the target private cloud, or the configuration declaration definition of some target components. For example, in the initial configuration scenario of the target private cloud, the target private cloud will pass in the configuration declaration definitions of all target components to the configuration center. When some target components need to modify the original configuration declaration definitions, the modified configuration declaration definitions of some target components will be passed in to the configuration center.

[0082] The configuration declaration definition of the target component can be broken down into various configuration items of the target component and stored locally in the configuration center. When executing step S102, the various configuration items of the target component are spliced ​​into the configuration declaration definition of the target component. The configuration information of the target component's service at the network level is calculated and generated through the configuration declaration definition, and the configuration information of the dependent service is found in the configuration information of the component's service at the network level stored in the configuration center through the identifier of the dependent service in the configuration declaration definition. The method of searching the configuration information of the dependent service meets the requirements of the service discovery strategy of the dependent service, and the configuration file of the target component is generated.

[0083] After the configuration information of the target component's service at the network level is calculated and generated through the configuration declaration definition, the service provided by the target component completes the service registration. That is, by calling the configuration information of the target component's service at the network level, the service provided by the target component can be accessed. When other target components depend on the service, the configuration information of the target component's service at the network level can be written into the configuration files of other target components, so that other target components can call the target component's service at the network level through the configuration information of the target component's service at the network level. The configuration declaration definition includes service information for providing services. The service information for providing services includes: the service name and service level of the service provided. Since the service level in the configuration declaration definition of the target component is used to describe the location range where the target component's service provision needs to be deployed, when generating the configuration information of the target component's service at the network level, the service level of the target component's service provision specifies the scope of the target component's service configuration information at the network level. In this way, the target component can be deployed within the scope of the target component's service configuration information at the network level, not limited to deployment in the same region and the same availability zone, but can be deployed in multiple regions and multiple availability zones.

[0084] The configuration information of the dependent service is found in the configuration information of the component at the network level stored in the configuration center through the identifier of the dependent service in the configuration declaration definition. The configuration information of the dependent service includes: the access address of the dependent service at the network level. The method of searching the configuration information of the dependent service meets the requirements of the service discovery strategy of the dependent service. Since the configuration file of the generated target component includes: the configuration information of the dependent service, the target component can use the configuration file of the target component to implement the function of calling and accessing the dependent service.

[0085] Optionally, in a specific embodiment of the present application, the configuration center calls the configuration calculation interface protocol, and uses the configuration declaration definition to generate the content in the configuration file of the target component. If the configuration calculation interface is calculated successfully, the content in the configuration file of the target component will be returned. If the calculation fails, the missing content and the configuration file of the target component that needs to be recalculated will be recorded. Optionally, when the target component is a strongly dependent component of multiple other target components in the target private cloud, that is, many other target components need to rely on the target component, if the content of the configuration file of the target component returns failure, it is necessary to use the component configuration method again to configure the target component.

[0086] S103. When the configuration files of the components of the target private cloud are obtained, the configuration files of all the components of the target private cloud are packaged to obtain a configuration package of the target private cloud.

[0087] When the configuration files of the components of the target private cloud are obtained, the configuration files of all the components of the target private cloud are packaged, and specifically, they can be compressed and packaged to obtain the configuration package of the target private cloud. The target private cloud can configure itself through the configuration package of the target private cloud.

[0088] Optionally, in a specific embodiment of the present application, after obtaining the configuration file of the component, the difference between the content of the configuration file of the component previously output and the content currently output is calculated, so that the target private cloud can judge whether the configuration of the component has changed according to the calculated difference, and then decide whether to restart the component. Optionally, the calculated difference in the configuration file of the component and the status information in the process of generating the configuration package of the target private cloud can be recorded, and the recorded content can be displayed on the delivery center, so that the target private cloud can view the details of the process of generating the configuration package of the target private cloud through the delivery center. The status information recorded in the process of generating the configuration package of the target private cloud may include which private cloud components have successfully generated configuration files, which private cloud components have failed to generate configuration files, the task progress in the process of generating the configuration package (for example, which component configuration file is currently generated, and which component configuration files are left to be generated), the difference between the configuration file of the currently generated component and the configuration file of the component generated last time, the download link of the configuration package of the target private cloud, etc.

[0089] S104: Store the configuration package of the target private cloud in the object storage, and generate a download link for the configuration package of the private cloud.

[0090] The configuration package of the target private cloud is stored in the object storage, and a download link for the configuration package is generated. The target private cloud downloads the configuration package of the target private cloud through the download link, and deploys the configuration package of the target private cloud to the target private cloud. Since the service level in the configuration declaration definition of the component is used to describe the location range where the target component needs to be deployed to provide services, when generating the configuration information of the component's services at the network level, the service level of the component's services specifies the scope of the component's service configuration information at the network level. In this way, the component's configuration file supports deployment within the scope of the component's service configuration information at the network level, and is not limited to deployment in the same region and the same availability zone, but can be deployed in multiple regions and multiple availability zones.

[0091] For an example, see Figure 2 ,implement Figure 1 The process of the configuration method of the private cloud component shown may be to establish a calculation request for the configuration package of the target private cloud through the configuration center page, initiate the calculation task of the configuration package of the target private cloud, and after receiving the calculation request, the configuration center background may specifically generate a task for the configuration file of each target private cloud component, and then queue the generated configuration file tasks of each target private cloud component to create a task message queue (Message Queue, MQ) for the configuration package. At the same time, the configuration center background also creates a record of the configuration package output, continuously polls the task progress of the configuration center background through the configuration center page, records the current configuration package generation process, and displays the recorded content on the delivery center. The configuration center background calculates the configuration files of each target private cloud component according to the task message queue, and configures each target private cloud component. Specifically, the configuration center can be as follows: Figure 3 The configuration declaration definition of the target private cloud component is input into the configuration calculation interface. The data input into the interface also carries the cloud unique code (Identity Document, ID) of the target private cloud, the region ID, availability zone ID and cluster ID of the component. After the configuration calculation interface performs configuration calculation, it returns Figure 4The content of the configuration file of the component shown. The content of the component configuration file may include component resource configuration, component scheduling configuration, information required in the actual configuration file of the component, component private variables, basic environment information required by the component, a list of services provided by the component (i.e., service information providing services), service information that the component depends on (i.e., service information that the component depends on, including configuration information of the component's dependent services), and dynamic dependencies (i.e., metadata of services that the component actually obtains through various service discovery strategies). During the background calculation process of the configuration center, the status of the configuration package's package record will be continuously updated to the delivery center. When the background of the configuration center obtains the configuration file of the component of the target private cloud, it packages the configuration files of all components of the target private cloud to obtain the configuration package of the target private cloud, uploads the configuration package to the object storage, and generates a download link for the configuration package.

[0092] Optionally, in a specific embodiment of the present application, after the configuration center generates a download link for the configuration package, the target private cloud will download the configuration package to the local target private cloud, then start the components of the target private cloud, and use the configuration template to render the configuration files of each component in the configuration package to obtain the final configuration files of each component.

[0093] After using the configuration template to render the configuration files of each component in the configuration package, you can change the configuration files of each component to the format of the configuration template to obtain the final configuration file used when the component is actually running.

[0094] The configuration method of the private cloud component proposed in the embodiment of the present application is applied to the configuration center. The method receives a calculation request for the configuration package of the target private cloud, wherein the calculation request is used to request to obtain a configuration package consisting of the configuration files of the components of the target private cloud. Then, through the configuration method of the component, after receiving the configuration declaration definition of the component of the private cloud, the configuration information of the service of the component at the network level is generated, and the configuration information of the dependent service is found in the configuration information of the service of the component at the network level stored in the configuration center by using the identifier of the dependent service, and the configuration file of the component including the configuration information of the dependent service is generated. When the configuration file of the component of the target private cloud is obtained, the configuration files of all components of the target private cloud are packaged to obtain the configuration package of the target private cloud, the configuration package of the target private cloud is stored in the object storage, and a download link of the configuration package of the private cloud is generated. Since the service level in the component's configuration declaration definition is used to describe the range of locations where the component needs to be deployed to provide services, when generating the component's service configuration information at the network level, the service level of the component's service specifies the scope of the component's service configuration information at the network level. In this way, the generated configuration package can enable the component to be deployed within the scope of the network-level service configuration information. It is not limited to deployment in the same region and the same availability zone, but can be deployed in multiple regions and multiple availability zones.

[0095] Based on the configuration method of the private cloud components proposed in the above-mentioned embodiments of the present application, the configuration method of the components is described below through several embodiments.

[0096] For details, see Figure 5 The present application embodiment discloses a component configuration method, which is applied to a configuration center. The method specifically includes the following steps:

[0097] S501. Receive a configuration declaration definition of a target component, wherein the configuration declaration definition of the target component includes: basic information of the target component and service information of services provided, wherein the service information includes: service name and service level of the services provided, and the service level is used to describe the location range required for deployment of the services provided.

[0098] The target component's configuration declaration is used to describe the configuration requirements of the target component. The service level is used to describe the range of locations where the service needs to be deployed. The target component can be Figure 1 The target private cloud components in the illustrated embodiment may also be components on other platforms. In step S501, configuration declaration definitions of multiple target components may be received, or configuration declaration definitions of only a single target component may be received.

[0099] The basic information of the target component may include the target component's label, the target component's type, the target component's feature version, the target component's description information, and other basic attribute information of the target component.

[0100] The service information of the target component is information used to describe the services that the target component can provide. The target component can provide one or more services. The service information of the service provided includes: the service name and service level of the service provided.

[0101] The service level can describe the range of locations where services need to be deployed. Service levels can include: global level, regional level, availability zone level, or cluster level. Global-level services are deployed in the primary availability zone of the primary region, and the primary availability zone of the primary region can be specified arbitrarily, that is, global-level services can be deployed in any specified location. Regional-level services must be deployed in every region. Availability zone-level services must be deployed in every availability zone in the region where the target component is located. Cluster-level services must be deployed in every cluster in the availability zone where the target component is located. The service level specifies not only the range of locations where services need to be deployed, but also the scope of the services provided. Global-level services have a global scope, that is, components in any region can access the services provided by the target component. Regional-level services have a regional scope, that is, only components in the region where the target component is located can access the services provided by the target component. Availability zone-level services have a availability zone scope, that is, components in the availability zone where the target component is located can access the services provided by the target component. Cluster-level services have a cluster scope, that is, components in the cluster where the target component is located can access the services provided by the target component.

[0102] For an example, see Figure 6 The service information provided in the configuration declaration definition of a target component defines a service named "tcloud-cvm-vstation". The level of the service provided is the region level, the protocol of the service provided is the Hypertext Transfer Protocol (HTTP), the backend port is 80, and the access address (Uniform Resource Locator, URL) path of the service provided is " / vstation / cgi".

[0103] Optionally, in a specific embodiment of the present application, the configuration declaration definition of the target component also includes: the identifier of the target component's dependent service. The identifier of the target component's dependent service is used to indicate which service the target component depends on. The target component may have one or more dependent services, and the identifier of the target component's dependent service may be the service name of the target component, or the service level of the dependent service, etc. The configuration information of the dependent service may be found through the identifier of the dependent service. The configuration information of the dependent service is used for the target component to access the dependent service.

[0104] For an example, see Figure 7In the configuration declaration definition of a target component, the target component's dependent service part declares that the target component depends on the "tcloud-vpc-oss" service, and gives the service an alias of "tcloud.vpc.oss". This alias is applicable to the platform where the target component is located. When the service name of the dependent service is changed, the configuration template used locally by the target component does not need to be modified.

[0105] Optionally, the configuration declaration definition of the target component may also include specifying the dependency level of the dependent service. The dependency level of the dependent service can be divided into strong dependency and weak dependency. Strong dependency means that the target component is not allowed to start when the dependent service does not exist. Weak dependency means that the target component can be started even if the dependent service does not exist.

[0106] Optionally, the configuration declaration definition of the target component may also include: resource requirements of the target component, basic dependency information of the target component, and private variables of the target component.

[0107] The resource requirements of a target component describe the processor and memory requirements of the target component. For examples, see Figure 8 The resource requirement part of a target component in the configuration declaration definition of a target component indicates that the target component's memory limit is 75000, the processor requirement is 500, the memory requirement is 500, and the memory limit is 6000.

[0108] The target component's dependency basic information is used to describe the basic information required by the target component. For an example, see Fig. 9 The configuration declaration definition of a target component states that the target component's dependency basic information is as follows: the target component depends on the global basic information and the basic information of each region (all regions).

[0109] The private variables of the target component are used to declare some functional features used by the target component itself and do not need to be perceived by other components. For example, see Fig.10 , the configuration declaration definition of the target component declares that the component uses the billing "bmp", and the billing variable is only visible to itself and is not perceived by other components.

[0110] S502. Generate configuration information of the target component's service at the network level, wherein the configuration information includes: an access address of the target component's service at the network level, a service name of the target component's service at the network level is a service name provided, and a scope of the configuration information is specified by a service level provided.

[0111] The target component's service at the network level can be accessed through the target component's service access address at the network level. The scope of the configuration information refers to the scope of the target component's service at the network level, which is specified by the service level. For example, if the service level is regional, then the scope is the region where the target component is located. The configuration center generates the configuration information of the target component's service at the network level based on the service level provided. For example, if the service is provided at the regional level, there will be placeholders for the regional domain name and the primary regional domain name in the access address. The value of the placeholder will be automatically rendered according to the basic information of the actual environment. Since the configuration information is generated using the service level and service name, there will be no collision of domain names for services with the same service name in different locations. In the prior art, since the Nacos open source architecture does not generate the configuration information of the target component's service at the network level according to the service level, if the service with the same service name is deployed in different locations, there will be a collision of domain names. In this application, the access address in the configuration information generated by the service level and service name does not have the defect of collision of domain names.

[0112] Optionally, the configuration information may also include an access interface of the target component's service at the network level and an Internet protocol version of the target component's service at the network level.

[0113] Optionally, in a specific embodiment of the present application, the service information of the service provided further includes: the service type of the service provided, and an implementation mode of executing step S502 includes:

[0114] Generate the configuration information of the target component's service at the target network level. The target network level is determined by the service type of the target component. The target network level is the network level that needs to be exposed to provide services for the target component. There can be multiple target network levels, and the configuration information of the target component's service at multiple target network levels can be generated. The service type provided is a containerized service or a non-containerized service. By using the service type provided, it is possible to determine which target network levels need to be exposed to provide services.

[0115] Specifically, in a specific embodiment of the present application, configuration information of a service of a target component at a target network level is generated, and the target network level determines the service type provided by the target component, including:

[0116] If the service type provided by the target component is a containerized service, the configuration information of the overlay service of the target component at the container network level and the configuration information of the underlay service at the basic network level are generated. If the service type provided by the target component is a non-containerized service, the configuration information of the underlay service of the target component at the basic network level is generated.

[0117] When the service type of the target component is a containerized service, the service needs to be exposed at the container network level and the basic network level. Therefore, it is necessary to generate the configuration information of the target component's overlay service at the container network level and the underlay service at the basic network level. The target component's overlay service configuration information at the container network level can be used to access the target component's services at the container network level. The target component's underlay service configuration information at the basic network level can be used to access the target component's services at the basic network level. If the target component's service type is a non-containerized service, the service only needs to be exposed at the basic network level. Therefore, it is only necessary to generate the target component's underlay service configuration information at the basic network level.

[0118] After the target component's service configuration information at the target network level is generated, it is equivalent to completing the registration of the target component's service at the target network level. If other components need to rely on the target component's service at the target network level, the target component's service configuration information at the target network level can be provided to other components so that other components can access the service.

[0119] In the prior art, the service configuration information of the target component generated by the Nacos open source architecture at the network level is only the configuration information of the underlay service at the basic network level, and does not support the configuration information of services at other network levels, so that the component cannot be accessed at multiple network levels and is not suitable for complex scenarios such as private clouds that have multiple network levels at the same time.

[0120] In the embodiment of the present application, multiple target network levels are determined by configuring the service type provided in the declaration definition, and multiple target network level services are registered for the services provided by the target component. The configuration information of the services of the target component at multiple network levels is obtained, thereby supporting the target component to be accessible at multiple target network levels, which is suitable for complex scenarios such as private clouds that have multiple network levels at the same time.

[0121] Optionally, in a specific embodiment of the present application, the configuration declaration definition of the target component also includes: specifying that the target network layer also includes a private network (Virtual Private Cloud, VPC). That is, the services provided by the target component must also be exposed at the VPC network layer.

[0122] At this time, if the service type provided by the target component is a containerized service, the configuration information of the overlay service of the target component at the container network level, the configuration information of the underlay service at the basic network level, and the configuration information of the overlay service at the private network VPC network level are generated. If the service type provided by the target component is a non-containerized service, the configuration information of the underlay service of the target component at the basic network level and the configuration information of the overlay service at the private network VPC network level are generated.

[0123] Optionally, after generating the configuration information of the service at the target network level, multiple services at multiple target network levels with the same service name are connected through network rules. The overlay service at the VPC network level reaches the underlay service at the basic network level through the preset first network rule, and the underlay service at the basic network level reaches the overlay service at the container network level through the preset second network rule. After being connected through network rules, components at different network levels can access and call each other.

[0124] For an example, see Fig.11 Since the target component provides container services, the configuration center provides services for the target component named "tcloud-cvm-vstation" and generates an overlay service for the target component at the container network level. The configuration information of the overlay service of the target component at the container network level specifically includes: the access address URL of the overlay service of the target component at the container network level, the access port is 80, and the Internet Protocol version 4 (IPv4) is used. See also Fig.12 , and also provides a service named "tcloud-cvm-vstation" for the target component, generating an underlay service at the basic network level. The configuration information of the underlay service of the target component at the basic network level specifically includes: the access address URL of the underlay service of the target component at the basic network level, the access port is 80, and the Internet Protocol version 4 (IPv4) is used. See also Fig.13It also provides a service named "tcloud-cvm-vstation" for the target component and generates an overlay service at the VPC network level. The configuration information of the overlay service of the target component at the VPC network level specifically includes: the access address URL of the overlay service of the target component at the VPC network level, the access port is 80, and the Internet Protocol version 4 (IPv4) is used.

[0125] In the component configuration method proposed in the present application, when the configuration declaration definition of the target component is received, since the service level in the configuration declaration definition of the target component is used to describe the location range where the target component needs to be deployed to provide services, when generating the configuration information of the target component's services at the network level, the service level of the services provided by the target component specifies the scope of the configuration information of the target component's services at the network level. In this way, the target component can be deployed within the scope of the configuration information of the target component's services at the network level, and is not limited to being deployed in the same region and the same availability zone, but can be deployed in multiple regions and multiple availability zones.

[0126] See also Fig.14 , the embodiment of the present application proposes another component configuration method, which is applied to the configuration center and specifically includes the following steps:

[0127] S1401. Receive a configuration declaration definition of a target component.

[0128] The execution process and principle of step S1401 are the same as Figure 5 The step S501 shown is the same as that shown in FIG. 5 , and can be referred to, and will not be described again here.

[0129] S1402. Generate configuration information of the target component's service at the network level.

[0130] The execution process and principle of step S1402 are similar to Figure 5 The step S502 shown is the same as that shown in FIG. 5 , and can be referred to, and will not be described again here.

[0131] S1403. Using the identifier of the dependent service, the configuration information of the dependent service is searched in the configuration information of the service at the network level of the component stored in the configuration center. The method of searching the configuration information of the dependent service meets the requirements of the service discovery strategy of the dependent service.

[0132] Specifically, since the configuration center will execute step S1402 for each received configuration declaration definition of the target component, it will then obtain the configuration information of the service of each target component at the network level, and store the corresponding service identifier of the configuration information of the service of each target component at the network level. Therefore, after the identifier of the dependent service of the target component is declared in the configuration declaration definition of a certain target component, the identifier of the dependent service can be used to find the configuration information of the dependent service from the configuration information of the component service at the network level stored in the configuration center. Among them, the configuration information of the dependent service includes: the access address of the dependent service at the network level.

[0133] It should be noted that the method for generating the configuration information of the dependent service is the same as the method for generating the configuration information of the service of the target component at the network level in the embodiment of the present application. The configuration information of the dependent service is also generated based on the configuration declaration definition of the component providing the dependent service, which will not be repeated here.

[0134] The method for finding the configuration information of the dependent service meets the requirements of the service discovery strategy of the dependent service. The service discovery strategy of the dependent service can be determined based on the information about the dependent service in the configuration declaration definition.

[0135] Optionally, when the configuration declaration definition only includes the identifier of the dependent service, the service discovery strategy of the dependent service is the nearest access strategy. The nearest access strategy requires that the configuration information of the dependent service that is closest to the deployment location of the target component and the target component can fall within the scope of the configuration information of the dependent service be found.

[0136] Optionally, the service discovery strategy of the dependent service is a proximity access strategy, and an implementation method of using the identifier of the dependent service to find the configuration information of the dependent service in the configuration information of the service at the network level of the component stored in the configuration center includes:

[0137] In the configuration information of the service of the component at the network level stored in the configuration center, the configuration information of the service identified as the dependent service and having the same deployment location as the target component is found.

[0138] Specifically, in the configuration information of the component service at the network level stored in the configuration center, search whether there is a service configuration information with the same cluster location as the target component, which is marked as the identifier of the dependent service. If so, it is considered that the found configuration information of the dependent service is the configuration information that satisfies the service discovery strategy of the dependent service. If not found, the identifier of the dependent service is used to search for the configuration information of the dependent service of the target component within the scope of the configuration information of the dependent service. The identifier of the dependent service can be the service name of the dependent service.

[0139] The service level of the dependent service can be determined by using the identification of the dependent service. The configuration declaration definition of the component that provides the dependent service is stored locally in the configuration center, so the configuration center has the service information of the dependent service. Then, the service level of the dependent service can be determined by the identification of the dependent service. The service level specifies the scope of the configuration information of the dependent service. For example, if the dependent service is global, the scope of the configuration information of the dependent service is global. If the dependent service is regional, the scope of the configuration information of the dependent service is regional. If the dependent service is available zone, the scope of the configuration information of the dependent service is available zone. If the dependent service is cluster, the scope of the configuration information of the dependent service is cluster. Therefore, the process of searching for the configuration information of the dependent service within the scope of the configuration information of the dependent service of the target component by using the identification of the dependent service is that after determining the service level of the dependent service by using the identification of the dependent service, it is searched whether there is a target component within the scope of the configuration information of the dependent service. If it can be found, it is considered that the configuration information of the dependent service found is the configuration information that meets the service discovery strategy of the dependent service. For example, if the dependent service is at the regional level, then a search is performed to determine whether there is configuration information of the dependent service whose scope is the region where the target component is located. If found, the configuration information of the dependent service is determined as configuration information that satisfies the service discovery strategy.

[0140] Optionally, when the configuration declaration definition of the target component also includes: when accessing specified information of the network layer where the dependent service is located, the service discovery policy of the dependent service is the policy of the specified network layer.

[0141] The configuration information of the dependent service to be found by the policy requirement of the specified network layer must be the configuration information of the service at the network layer specified by the specified information of the network layer where the dependent service is accessed in the configuration declaration definition. For example, if the specified information of the network layer where the dependent service is accessed is the configuration information of the basic network layer where the dependent service is accessed, then when searching for the configuration information of the dependent service, it is necessary to search for the configuration information of the dependent service that is identified as the identifier of the dependent service and is at the basic network layer.

[0142] Specifically, the service discovery strategy of the dependent service is a strategy that specifies the network layer, and uses the identifier of the dependent service to find the configuration information of the dependent service in the configuration information of the network layer service stored in the component in the configuration center. An implementation method includes:

[0143] In the configuration information of the service of the component at the network level stored in the configuration center, the configuration information of the service at the network level identified as the identifier of the dependent service and indicated by the designated information of the network level where the dependent service is accessed is found.

[0144] If the configuration statement definition includes the specified information for accessing the network layer where the dependent service is located, then it can be clearly determined that when searching for the configuration information of the dependent service, the configuration information of the dependent service must be on the network layer specified by the specified information for accessing the network layer where the dependent service is located. From the above description of the configuration information of the dependent service, it can be seen that the configuration information of the dependent service may include the configuration information of the overlay service at the container network layer, the configuration information of the underlay service at the basic network layer, and the configuration information of the overlay service at the private network VPC network layer. In the case where the configuration statement definition specifies the network layer, the configuration information that satisfies the policy of the specified network layer is only the configuration information of the service at the network layer specified by the specified information for accessing the network layer where the dependent service is located.

[0145] For example, if the network layer indicated by the specified information of the network layer where the dependent service is located in the configuration declaration definition is the basic network layer, then in the configuration information of the service at the network layer of the component stored in the configuration center, the configuration information of the service that is identified as the dependent service and is the basic network layer will be found.

[0146] In some application scenarios, the service information obtained by the target component after accessing the dependent service is not used by itself, but is sent to other components for use. If other components cannot access the service information at the container network level, the target component needs to write the specified information of the basic network level where the dependent service is located in the configuration declaration definition, and then the configuration center can rely on the specified network level policy to find the configuration information of the dependent service that meets the specified network level policy. After the target component accesses the dependent service through the configuration information, it can be used by other components when it is sent to other components.

[0147] Optionally, when the configuration declaration definition of the target component further includes: when accessing a specified area of ​​a dependent service, the service discovery strategy of the dependent service is a list access strategy.

[0148] When the configuration declaration definition also includes a specified area for accessing dependent services, it means that all services in the specified area are dependent services. When using a list access policy, the configuration information of all services in the specified area is found. Optionally, in addition to including the specified area for accessing dependent services, the configuration declaration definition also includes the service level of the dependent service. In this case, using a list access policy, the configuration information of services in the specified area whose service level is the service level of the dependent service is found.

[0149] Specifically, the service discovery strategy of the dependent service is a list access strategy. By using the identifier of the dependent service, the configuration information of the dependent service is found in the configuration information of the service at the network level stored in the configuration center, including:

[0150] In the configuration information of the service of the component at the network level stored in the configuration center, the configuration information of the service that is identified as the dependent service and belongs to the specified area for accessing the dependent service is found.

[0151] For example, if the configuration declaration definition requires access to a certain region-level service in all regions, the configuration information of a certain region-level service in all regions is found in the configuration information of the component's network-level service stored in the configuration center. In addition, there are many ways to specify regions in the configuration declaration definition, such as a certain availability zone-level service in all availability zones in the region where the target component is located, a certain cluster-level service in all physical clusters in the availability zone where the target component is located, a certain availability zone-level service in all availability zones in all regions, a certain cluster-level service in all physical clusters in all availability zones in the region where the target component is located, or a certain cluster-level service in all physical clusters in all availability zones in all regions.

[0152] The configuration center may find multiple identifiers of dependent services and configuration information of services belonging to the specified area for accessing the dependent services. Therefore, the configuration information of all dependent services found may be displayed in a list.

[0153] In the prior art, the configuration file of the target component generated by the Nacos open source architecture can only support the target component to access the basic network layer services, and it is impossible to use the specified network layer strategy in the embodiment of the present application. In addition, the existing Nacos open source architecture only supports a single region and a single availability zone, and it is impossible to use the list access strategy in the embodiment of the present application and the nearby access strategy applicable to multiple regions and multiple availability zones.

[0154] The configuration of the target component by the configuration center in the embodiment of the present application can support service access at multiple network levels and a multi-region and multi-availability zone architecture, and thus can provide richer service discovery strategies. According to the needs of the target component, it can provide local access strategies, specified network level strategies and list access strategies to meet the access needs of multiple regions, multiple availability zones and multiple network levels.

[0155] S1404. Generate a configuration file of the target component, wherein the configuration file of the target component includes: configuration information of dependent services.

[0156] Since the configuration file of the target component includes the configuration information of the dependent service, the configuration file of the target component can enable the target component to have the function of accessing and calling the dependent service. In the embodiment of the present application, the scope of the configuration information of the dependent service is specified by the service level of the dependent service, so the component providing the dependent service can be deployed within the scope, not limited to deployment in the same region and the same availability zone, to achieve multi-region and multi-availability zone deployment, and support mutual access and calling between multi-region and multi-availability zones.

[0157] Optionally, in addition to the configuration information of dependent services, the configuration file of the target component may also include the configuration information of the target component's services at the network level, as well as some information written in the configuration declaration definition.

[0158] In the component configuration method proposed in the present application, when the configuration declaration definition of the target component is received, since the service level in the configuration declaration definition of the target component is used to describe the location range where the target component needs to be deployed to provide services, when generating the configuration information of the target component's services at the network level, the service level of the services provided by the target component specifies the scope of the configuration information of the target component's services at the network level. In this way, the target component can be deployed within the scope of the configuration information of the target component's services at the network level, and is not limited to being deployed in the same region and the same availability zone, but can be deployed in multiple regions and multiple availability zones.

[0159] It should be noted that the configuration methods of the components and private cloud components provided in this application can also be applied to blockchain systems.

[0160] Blockchain is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.

[0161] The underlying blockchain platform can include functional modules such as user management, basic services, smart contracts, and operation monitoring. Among them, the user management module is responsible for the identity information management of all blockchain participants, including maintaining the generation of public and private keys (account management), key management, and the maintenance of the correspondence between the user's real identity and the blockchain address (authority management), etc., and, under authorization, supervises and audits the transactions of certain real identities and provides risk control rule configuration (risk control audit); the basic service module is deployed on all blockchain node devices to verify the validity of business requests, and records valid requests to storage after consensus is reached. For a new business request, the basic service first adapts the interface for parsing and authentication (interface adaptation), and then encrypts the business information through the consensus algorithm (consensus management). The smart contract module is responsible for the registration and issuance of contracts, as well as contract triggering and contract execution. Developers can define the contract logic in a programming language and publish it to the blockchain (contract registration). According to the logic of the contract terms, the key or other events are called to trigger the execution and complete the contract logic. It also provides the function of contract upgrade and cancellation. The operation monitoring module is mainly responsible for the deployment, configuration modification, contract setting, cloud adaptation and real-time status visualization output of the product during the product release process, such as alarm, network monitoring, node equipment health monitoring, etc.

[0162] The platform product service layer provides the basic capabilities and implementation framework of typical applications. Developers can superimpose business features based on these basic capabilities to complete the blockchain implementation of business logic. The application service layer provides application services based on blockchain solutions for business participants to use.

[0163] See also Fig.15 Based on the component configuration method proposed in the above-mentioned embodiment of the present application, the embodiment of the present application correspondingly discloses a component configuration device, which is applied to the configuration center. The component configuration device includes: a receiving unit 1501 and a first generating unit 1502.

[0164] The receiving unit 1501 is used to receive the configuration declaration definition of the target component. The configuration declaration definition of the target component is used to describe the configuration requirements of the target component. The configuration declaration definition of the target component includes: basic information of the target component and service information of the service provided. The service information of the service provided includes: the service name and service level of the service provided. The service level is used to describe the location range required for the deployment of the service.

[0165] The first generating unit 1502 is used to generate configuration information of the target component's service at the network level, wherein the configuration information includes: the access address of the target component's service at the network level, the service name of the target component's service at the network level is the service name provided, and the scope of the configuration information is specified by the service level provided.

[0166] Optionally, the configuration declaration definition of the target component also includes: an identifier of a dependent service of the target component. Wherein: the configuration device of the component also includes: a search unit and a second generation unit.

[0167] The search unit is used to use the identifier of the dependent service to search for the configuration information of the dependent service in the configuration information of the service at the network level stored in the configuration center. The method of searching the configuration information of the dependent service meets the requirements of the service discovery strategy of the dependent service.

[0168] Optionally, the service discovery strategy of the dependent service is a proximity access strategy, and the search unit includes:

[0169] A first search subunit is used to search for configuration information of a service whose identifier is the identifier of the dependent service and whose deployment location is the same as that of the target component in the configuration information of the service of the component at the network level stored in the configuration center;

[0170] Optionally, the service discovery strategy of the dependent service is a strategy for specifying a network layer, a search unit, including:

[0171] The second search subunit is used to find the network-level service configuration information identified as the dependent service in the network-level service configuration information of the component stored in the configuration center, and access the network-level service configuration information indicated by the specified information of the network level where the dependent service is located.

[0172] Optionally, the service discovery strategy of the dependent service is a list access strategy, and the search unit includes:

[0173] The third search subunit is used to search for the configuration information of the service that is identified as the dependent service and belongs to the specified area for accessing the dependent service in the configuration information of the service of the component at the network level stored in the configuration center.

[0174] The second generating unit is used to generate a configuration file of the target component, wherein the configuration file of the target component includes: configuration information of the dependent service.

[0175] Optionally, the service information provided also includes: the service type provided. Wherein: the first generating unit includes:

[0176] The first generating subunit is used to generate configuration information of the service of the target component at the target network level, and the target network level is determined by the service type provided by the target component.

[0177] Optionally, the first generating subunit includes: a second generating subunit and a third generating subunit.

[0178] The second generation subunit is used to generate configuration information of the overlay service of the target component at the container network level, configuration information of the underlay service at the basic network level, and configuration information of the overlay service at the private network VPC network level if the service type provided by the target component is a containerized service.

[0179] The third generating subunit is used to generate the configuration information of the underlay service of the target component at the basic network level and the configuration information of the overlay service at the private network VPC network level if the service type provided by the target component is a non-containerized service.

[0180] Optionally, the service discovery strategy of the dependent service includes: a nearby access strategy, a strategy at a specified network level, and a list access strategy. Among them, the service discovery strategy of the dependent service is a strategy at a specified network level, and the configuration declaration definition of the target component also includes: accessing the specified information at the network level where the dependent service is located, the service discovery strategy of the dependent service is a list access strategy, and the configuration declaration definition of the target component also includes: accessing the specified area of ​​the dependent service.

[0181] The specific principles and execution processes in the configuration device of the components disclosed in the above-mentioned embodiments of the present application are the same as the configuration method of the components disclosed in the above-mentioned embodiments of the present application. Please refer to the corresponding parts of the configuration method of the components disclosed in the above-mentioned embodiments of the present application, and will not be repeated here.

[0182] In the configuration device of the component proposed in the present application, the receiving unit 1501 receives the configuration declaration definition of the target component. Since the service level in the configuration declaration definition of the target component is used to describe the location range where the target component needs to be deployed to provide services, when the first generating unit 1502 generates the configuration information of the service of the target component at the network layer, the service level of the service provided by the target component specifies the scope of the configuration information of the service of the target component at the network layer. In this way, the target component can be deployed within the scope of the configuration information of the service of the target component at the network layer, and is not limited to being deployed in the same region and the same availability zone, but can be deployed in multiple regions and multiple availability zones.

[0183] See also Fig.16Based on the configuration method of the private cloud component proposed in the above-mentioned embodiment of the present application, the embodiment of the present application correspondingly discloses a configuration center, including: an interaction module 1601 and a configuration package calculation module 1602.

[0184] The interaction module 1601 is used to receive a calculation request for a configuration package of a target private cloud, wherein the calculation request is used to request to obtain a configuration package composed of configuration files of components of the target private cloud.

[0185] The configuration package calculation module 1602 is used to configure the components of the target private cloud using any one of the component configuration methods proposed in the above-mentioned embodiments of the present application. When the configuration files of the components of the target private cloud are obtained, the configuration files of all the components of the target private cloud are packaged to obtain the configuration package of the target private cloud, the configuration package of the target private cloud is stored in the object storage, and a download link of the configuration package of the private cloud is generated.

[0186] The configuration center proposed in the embodiment of the present application receives a calculation request for the configuration package of the target private cloud through the interaction module 1601, wherein the calculation request is used to request a configuration package composed of configuration files of the components of the target private cloud. Then, the configuration package calculation module 1602 generates the configuration information of the component's service at the network level through any of the configuration methods of the components proposed in the above embodiments of the present application, after receiving the configuration declaration definition of the components of the private cloud, and uses the identifier of the dependent service to find the configuration information of the dependent service in the configuration information of the components at the network level stored in the configuration center, and generates a configuration file of the component including the configuration information of the dependent service. When the configuration file of the component of the target private cloud is obtained, the configuration files of all components of the target private cloud are packaged to obtain the configuration package of the target private cloud, the configuration package of the target private cloud is stored in the object storage, and a download link of the configuration package of the private cloud is generated. Since the service level in the component's configuration declaration definition is used to describe the location range where the component needs to be deployed to provide services, when generating the component's service configuration information at the network level, the service level of the component's service specifies the scope of the component's service configuration information at the network level. In this way, the configuration package generated by the configuration package calculation module 1602 can enable the component to be deployed within the scope of the component's service configuration information at the network level. It is not limited to deployment in the same region and the same availability zone, but can be deployed in multiple regions and multiple availability zones.

[0187] The embodiments of the present application also propose a computer storage medium for storing a computer program. When the computer program is executed, it is used to implement any component configuration method proposed in the above embodiments, or any private cloud component configuration method proposed in the above embodiments.

[0188] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0189] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0190] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0191] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0192] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0193] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0194] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0195] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used, and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. The scope of the invention involved in the present application is not limited to the technical solution formed by a specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned inventive concept. For example, a technical solution formed by replacing the above-mentioned features with the technical features with similar functions disclosed in this application (but not limited to).

Claims

1. A method for configuring a component, characterized in that: Applied to the configuration center, the configuration method of the component includes: Receive a configuration declaration definition of a target component; wherein the configuration declaration definition of the target component is used to describe the configuration requirements of the target component; the configuration declaration definition of the target component includes: basic information of the target component and service information of services provided; the service information of services provided includes: the service name and service level of the service provided; the service level is used to describe the location range required for the deployment of the service provided; Generate configuration information of the target component's service at the network level; wherein the configuration information includes: the access address of the target component's service at the network level, the service name of the target component's service at the network level is the service name of the service provided; the scope of the configuration information is specified by the service level of the service provided.

2. The method according to claim 1, characterized in that The configuration declaration definition of the target component also includes: an identifier of a dependent service of the target component; wherein: after receiving the configuration declaration definition of the target component, the method further includes: Using the identifier of the dependent service, the configuration information of the dependent service is searched in the configuration information of the service at the network level stored in the configuration center, and the configuration information of the dependent service is searched in a manner that meets the requirements of the service discovery strategy of the dependent service; Generate a configuration file of the target component; wherein the configuration file of the target component includes: configuration information of the dependent service.

3. The method according to claim 1, characterized in that: The service information of the service provided also includes: the service type of the service provided; wherein: generating the configuration information of the service of the target component at the network level includes: Generate configuration information of the service of the target component at the target network level; the target network level is determined by the service type provided by the target component.

4. The method according to claim 2, characterized in that: The service discovery strategy of the dependent service includes: a nearby access strategy, a specified network level strategy and a list access strategy; wherein, the service discovery strategy of the dependent service is the specified network level strategy, and the configuration declaration definition of the target component also includes: accessing the specified information of the network level where the dependent service is located; the service discovery strategy of the dependent service is the list access strategy, and the configuration declaration definition of the target component also includes: accessing the specified area of ​​the dependent service.

5. The method according to claim 4, characterized in that The service discovery strategy of the dependent service is a proximity access strategy, and the use of the identifier of the dependent service to find the configuration information of the dependent service in the configuration information of the service at the network level stored in the configuration center includes: In the configuration information of the service of the component at the network level stored in the configuration center, find the configuration information of the service whose identifier is the identifier of the dependent service and which is deployed at the same location as the target component; The service discovery strategy of the dependent service is a strategy for specifying a network layer, and the use of the identifier of the dependent service to find the configuration information of the dependent service in the configuration information of the service at the network layer stored in the component of the configuration center includes: Finding, in the configuration information of the service of the component at the network level stored in the configuration center, the configuration information of the service at the network level that is identified as the identifier of the dependent service and is indicated by the designated information for accessing the network level where the dependent service is located; The service discovery strategy of the dependent service is a list access strategy, and the use of the identifier of the dependent service to find the configuration information of the dependent service in the configuration information of the service at the network level stored in the configuration center includes: In the configuration information of the service of the component at the network level stored in the configuration center, the configuration information of the service identified as the identifier of the dependent service and belonging to the designated area for accessing the dependent service is found.

6. The method according to claim 3, characterized in that The generating of configuration information of the service of the target component at the target network level; The target network layer is determined by using the service type of the service provided by the target component, including: If the service type of the target component is a containerized service, then generate configuration information of the overlay service of the target component at the container network level, configuration information of the underlay service at the basic network level, and configuration information of the overlay service at the private network VPC network level; If the service type of the service provided by the target component is a non-containerized service, then the configuration information of the underlay service of the target component at the basic network level and the configuration information of the overlay service at the private network VPC network level are generated.

7. A method for configuring a private cloud component, characterized in that: Applied to the configuration center, the configuration method of the private cloud component includes: Receive a calculation request for a configuration package of a target private cloud; wherein the calculation request is used to request a configuration package composed of configuration files of components of the target private cloud; Using the component configuration method described in any one of claims 1 to 6, configuring the components of the target private cloud; When the configuration files of the components of the target private cloud are obtained, the configuration files of all the components of the target private cloud are packaged to obtain a configuration package of the target private cloud; The configuration package of the target private cloud is stored in object storage, and a download link for the configuration package of the private cloud is generated.

8. A component configuration device, characterized in that: Applied to the configuration center, the configuration device of the component includes: A receiving unit is used to receive a configuration declaration definition of a target component; wherein the configuration declaration definition of the target component is used to describe the configuration requirements of the target component; the configuration declaration definition of the target component includes: basic information of the target component and service information of the service provided; the service information of the service provided includes: the service name and service level of the service provided; the service level is used to describe the location range required for the deployment of the service; The first generation unit is used to generate configuration information of the service of the target component at the network level; wherein the configuration information includes: the access address of the service of the target component at the network level, the service name of the service of the target component at the network level is the service name of the service provided; the scope of the configuration information is specified by the service level of the service provided.

9. A configuration center, characterized in that: include: An interaction module, configured to receive a calculation request for a configuration package of a target private cloud; wherein the calculation request is used to request a configuration package consisting of configuration files of components of the target private cloud; A configuration package calculation module, used to configure the components of the target private cloud using the component configuration method described in any one of claims 1 to 6; when obtaining the configuration files of the components of the target private cloud, all components of the target private cloud are packaged with the configuration files to obtain the configuration package of the target private cloud, the configuration package of the target private cloud is stored in the object storage, and a download link for the configuration package of the private cloud is generated.

10. A computer storage medium, characterized in that: Used to store a computer program, which, when executed, is used to implement the configuration method of the component as described in any one of claims 1 to 6, or the configuration method of the private cloud component as described in claim 7.

Citation Information

Patent Citations

  • Flow limiting method and system for private cloud service cluster supporting weight

    CN110971470A

  • Security service deployment method in private cloud environment

    CN111556047A

  • Load balancing method and device

    CN111683139A

  • Extending infrastructure security to services in a cloud computing environment

    WO2014169381A1