Data processing method and device based on cloud platform, equipment and medium
By pre-establishing parameter templates for each component on the cloud platform and automating the installation process, the problem of low component installation efficiency in multi-cloud scenarios is solved, which improves installation efficiency and reduces costs.
Patent Information
- Application Number
- CN202411289153.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-13
- Publication Date
- 2024-12-31
AI Technical Summary
In multi-cloud scenarios, installing cluster components is inefficient, resulting in a lot of labor costs and waste of resources.
Provide a cloud-based data processing method, establish a component-corresponding parameter template for each component in advance, and generate a parameter template containing user cloud pool information based on user component installation requests and component-corresponding parameter templates, and automatically install components. to the user's cluster terminal device.
It improves the efficiency of component installation, reduces the need for manual adaptation parameters, and reduces labor costs and resource consumption.
Smart Images

Figure CN119225905A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of cloud computing technology, and in particular to a data processing method, device, equipment and medium based on a cloud platform. Background Art
[0002] With the popularization of cloud computing technology, Kubernetes products, as the representative of cloud computing, have been integrated with more and more features and functions. In order to avoid the product being too bloated, some capabilities or functional modules (such as monitoring, logging, etc.) in the cluster provided by cloud computing vendors need to be designed to be pluggable and provided to users in the form of components for free installation.
[0003] Multi-cloud scenarios refer to scenarios where a control center manages multiple Kubernetes clusters in multiple cloud pools (including combinations of public clouds, private clouds, and hybrid clouds). In multi-cloud scenarios, cluster components must be pluggable. Currently, the general practice is to use the third-party open source tool Helm to install (uninstall, delete) cluster components directly in the control center. This method consumes a lot of manpower and resources, and the efficiency of installing cluster components is low. Summary of the invention
[0004] The present application provides a cloud platform-based data processing method, apparatus, device and medium to solve the technical problem of low efficiency in installing cluster components.
[0005] In a first aspect, the present application provides a data processing method based on a cloud platform, comprising:
[0006] In response to a component installation request from a user, determining cloud pool information of a cloud pool where the user is located and component information of a component to be installed; wherein a plurality of user clusters are set in the cloud pool, and users in different user clusters are different, the cloud pool information represents a cloud pool attribute of a cloud pool corresponding to the user cluster where the user is located, and the component information includes a component identifier of the component to be installed;
[0007] Obtain a parameter template corresponding to the component identifier; wherein the parameter template represents a file template containing parameters used when installing the component;
[0008] According to the cloud pool information and parameter template of the cloud pool where the user is located, the target file is determined, and the component to be installed is installed in the terminal device corresponding to the user cluster where the user is located according to the target file; wherein the target file represents the parameter template containing the cloud pool information.
[0009] Optionally, as in the above method, obtaining a parameter template corresponding to the component identifier includes:
[0010] According to the association relationship between the preset component identifier and the parameter template, the parameter template corresponding to the component identifier of the component to be installed is determined.
[0011] Optionally, the method as described above further includes:
[0012] In response to the parameter template generation instruction, obtaining a component identifier corresponding to the parameter template to be generated from the parameter template generation instruction;
[0013] According to the preset initial template, determine the parameter template to be generated;
[0014] The parameter template to be generated and the component identifier corresponding to the parameter template to be generated are associated and stored.
[0015] Optionally, as in the above method, the initial template includes parameter annotation information, and the parameter annotation information represents the meaning of the parameter variables in the initial template; determining the parameter template to be generated according to the preset initial template includes:
[0016] According to the parameter annotation information, the parameter variables in the initial template are formatted and the parameter template to be generated is obtained.
[0017] Optionally, as in the above method, determining the target file according to the cloud pool information and parameter template of the cloud pool where the user is located includes:
[0018] Determine the location information of the cloud pool information of the user in the parameter template;
[0019] Replace the parameter variables at the position information in the parameter template to obtain the target file.
[0020] Optionally, as in the above method, installing the component to be installed in the terminal device corresponding to the user cluster to which the user belongs according to the target file includes:
[0021] Obtaining the installation package of the component to be installed according to the component identifier of the component to be installed;
[0022] According to the target file, the installation package of the component to be installed is installed in the terminal device corresponding to the user cluster where the user belongs.
[0023] Optionally, the method as described above further includes:
[0024] If it is determined that the installation of the component to be installed fails, in response to the component reinstallation instruction, the target file is updated to obtain a new target file;
[0025] The component to be installed is installed in the terminal device corresponding to the user cluster where the user belongs according to the new target file.
[0026] Optionally, as in the above method, in response to the component reinstallation instruction, updating the target file to obtain a new target file includes:
[0027] In response to the component reinstallation instruction, determining alarm information of installation failure of the component to be installed; wherein the alarm information indicates the cause of the installation failure;
[0028] According to the alarm information, the target file is updated to obtain a new target file.
[0029] In a second aspect, the present application provides a data processing device based on a cloud platform, comprising:
[0030] A determination module, configured to respond to a user's component installation request and determine the cloud pool information of the cloud pool where the user is located and the component information of the component to be installed; wherein a plurality of user clusters are set in the cloud pool, and the users in different user clusters are different, the cloud pool information represents the cloud pool properties of the cloud pool corresponding to the user cluster where the user is located, and the component information includes the component identifier of the component to be installed;
[0031] An acquisition module is used to acquire a parameter template corresponding to a component identifier; wherein the parameter template represents a file template containing parameters used when installing the component;
[0032] The installation module is used to determine the target file based on the cloud pool information and parameter template of the cloud pool where the user is located, and install the component to be installed in the terminal device corresponding to the user cluster where the user is located according to the target file; wherein the target file represents the parameter template containing the cloud pool information.
[0033] In a third aspect, an embodiment of the present application provides an electronic device, including: a memory, a processor;
[0034] Memory stores computer-executable instructions;
[0035] The processor executes the computer-executable instructions stored in the memory, so that the processor executes the above first aspect and / or various possible implementations of the first aspect.
[0036] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the first aspect above and / or various possible implementations of the first aspect.
[0037] In a fifth aspect, the present application provides a computer program product, comprising: a computer program, which, when executed by a processor, implements the above first aspect and / or various possible implementations of the first aspect.
[0038] The cloud platform-based data processing method, device, equipment and medium provided by the present application establishes and stores the parameter template corresponding to each component in advance. When a user needs to install a component for the user cluster to which the user belongs, the execution subject of the cloud platform-based data processing method of the present application can directly process the parameter template containing the user cloud pool information according to the user's component installation request and the parameter template corresponding to the component, and then install the component to be installed in the terminal device of the user cluster to which the user belongs according to the parameter template containing the user cloud pool information. There is no need to manually adapt the parameters required for the component installation request one by one after the user initiates the component installation request. The method of the present application improves the efficiency of installing components. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0040] Figure 1 Cloudy scene diagram provided for this application;
[0041] Figure 2 A flowchart of a data processing method based on a cloud platform provided in this application;
[0042] Figure 3 A flowchart of another data processing method based on a cloud platform provided in this application;
[0043] Figure 4 A flowchart of another cloud platform-based data processing method provided in this application;
[0044] Figure 5 An architectural diagram of the cloud platform-based data processing method provided in this application;
[0045] Figure 6 A flowchart of another cloud platform-based data processing method provided in this application;
[0046] Figure 7 A schematic diagram of the structure of a cloud platform-based data processing device provided in this application;
[0047] Figure 8 A schematic diagram of the structure of the electronic device provided in this application.
[0048] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0049] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0050] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0051] First, the terms involved in this application are explained:
[0052] Kubernetes (K8S for short) is an open source containerized application for managing multiple hosts in a cloud platform. Kubernetes is used in a multi-cloud scenario, i.e. multiple cloud pools (including a combination of public cloud, private cloud, and hybrid cloud).
[0053] Cloud platform, also known as cloud computing platform, can be understood as a platform on the cloud that provides users with a variety of remote services. Cloud pool is a concept in cloud computing technology, which means cloud computing resource pool. Specifically, cloud pool refers to integrating a large number of computing resources through virtualization technology to form a unified resource pool.
[0054] Helm is a package management tool in the Kubernetes ecosystem. When component resources exist, components can be installed and uninstalled after adapting parameters.
[0055] Figure 1 The multi-cloud scene diagram provided for this application, such as Figure 1 As shown:
[0056] The multi-cloud scenario includes multiple cloud pools, each cloud pool includes multiple user clusters, and a user cluster includes at least one user. For example, cloud pool 1 includes n1 user clusters, cloud pool 2 includes n2 user clusters, and cloud pool 3 includes n3 user clusters.
[0057] In a multi-cloud scenario, there is generally a management node or management device for unified management of multiple cloud pools.
[0058] It can be seen from the multi-cloud scenario diagram that when a user under a user cluster in a cloud pool initiates a component installation request to the management node, since the user clusters and cloud pools of different users are not necessarily the same, the management node needs to manually adapt the parameters (including but not limited to the user cluster identifier and cloud pool address) for each component installation request in order for the component to be successfully installed. This consumes a lot of labor costs and is inefficient. Therefore, there is a problem of low efficiency in installing components.
[0059] To solve the above problems, the present application provides a data processing method based on a cloud platform, which pre-establishes and stores a parameter template corresponding to each component. When a user needs to install a component for the user cluster to which the user belongs, the execution subject of the data processing method based on the cloud platform of the present application can directly process the parameter template containing the user cloud pool information according to the user's component installation request and the parameter template corresponding to the component, and then install the component to be installed in the terminal device of the user cluster to which the user belongs according to the parameter template containing the user cloud pool information. It is not necessary to manually adapt the parameters required for the component installation request one by one after the user initiates the component installation request. The method of the present application improves the efficiency of installing components.
[0060] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0061] Figure 2 This is a flow chart of a data processing method based on a cloud platform provided in this application. The execution subject of this method can be a server, a host or other device, such as Figure 2 As shown, the method may include:
[0062] S201. In response to a component installation request from a user, determine the cloud pool information of the cloud pool where the user is located and the component information of the component to be installed; wherein, a plurality of user clusters are set in the cloud pool, and the users in different user clusters are different. The cloud pool information represents the cloud pool properties of the cloud pool corresponding to the user cluster where the user is located, and the component information includes the component identifier of the component to be installed.
[0063] Among them, a user may refer to a user under a user cluster, multiple users may form a user cluster, and users under the same user cluster may share resources under the user cluster. In this application, a component installation request may be represented as a component installation request issued by a user under a user cluster for installing a component, and the component is a component installed in the cluster.
[0064] A cloud pool can refer to a logical collection of shared resources (such as computing, storage, and network resources) in a cloud computing environment. In actual application scenarios, an enterprise may have multiple departments, and each department can have its own cloud pool to meet their respective computing needs.
[0065] Cloud pool attributes may refer to a set of parameters or configurations that describe the characteristics of a cloud pool. In the present application, cloud pool attributes may include but are not limited to the identifier of a user cluster, the identifier of a cloud pool, the IP address range of a cloud pool, and the like.
[0066] The component information may refer to the component information of the component to be installed. In a possible implementation, the component may be a Kubernetes component. In the present application, the component information may include but is not limited to the component identifier and component version of the component to be installed.
[0067] The component identifier may refer to a unique identifier of the component, which is used to distinguish different components. It may be a string, a number, or an identifier in other forms. In the present application, the component identifier may be a component name.
[0068] For example, if a user initiates a component installation request, the request content can be expressed as installing component A in user cluster 1 where the user is located, the component version is V1.2.1, and the cloud pool where user cluster 1 is located is cloud pool 1. The parameter values of the request can at least include: user cluster 1, component A, V1.2.1, cloud pool 1.
[0069] In an optional implementation, the user's component installation request may include multiple component identifiers. If there are multiple component identifiers, multiple components may be installed for the user cluster.
[0070] S202: Obtain a parameter template corresponding to the component identifier; wherein the parameter template represents a file template containing parameters used when installing the component.
[0071] Exemplarily, the parameter template is a pre-configured file template, which contains multiple parameters. Different component identifiers can correspond to different parameter templates. The positions corresponding to each parameter in the parameter template can be blank, so that specific parameter values can be added to the blank positions later. For example, the parameters that need to be filled in the parameter template may include cloud pool address, cluster address, and component version related parameters.
[0072] In an optional implementation, obtaining a parameter template corresponding to a component identifier may include:
[0073] According to the association relationship between the preset component identifier and the parameter template, the parameter template corresponding to the component identifier of the component to be installed is determined.
[0074] In a possible implementation, the parameter template is stored in a database, and the database may be a MySQL database, for example. The component identifier may be a component name, and each component name corresponds to a parameter template. The component identifier is unique in the database, that is, each component identifier does not have a duplicate. In an actual application scenario, if the component identifier is known, the component identifier can be identified from the database, and then the parameter template corresponding to the component identifier can be obtained.
[0075] The beneficial effect of such a setting is that the preset association relationship can be stored in a configuration file or database. When a component needs to be installed, the system can search and use the corresponding parameter template according to the component identifier, thereby ensuring the consistency and correctness of the installation process.
[0076] In an optional embodiment, the method further includes:
[0077] In response to a parameter template generation instruction, a component identifier corresponding to the parameter template to be generated is obtained from the parameter template generation instruction; the parameter template to be generated is determined according to a preset initial template; and the parameter template to be generated and the component identifier corresponding to the parameter template to be generated are associated and stored.
[0078] In one possible implementation, the parameter template generation instruction may be initiated by a component warehouse, which is used to store component installation packages, which may be chart packages. The component warehouse may be a public warehouse in a multi-cloud scenario.
[0079] Whenever a new component is managed in the component repository, a parameter template generation instruction is initiated, and the parameter template is then generated and saved in the database, so that the executor of the cloud platform-based data processing method of the present application can obtain the parameter template corresponding to the component identifier after responding to the user's component installation request.
[0080] The preset initial template may be a parameter-related configuration file that comes with the component installation package. For example, the preset initial template may be a values.yaml file that comes with the chart package, and the values.yaml file includes multiple parameter values.
[0081] The beneficial effect of such a setting is that different components correspond to different initial templates, and different components may require different configuration parameters. Through the above method, it can be ensured that each component uses the correct parameter template during installation or operation, thereby improving the flexibility and maintainability of the method of this embodiment.
[0082] In this embodiment, the above-mentioned initial template includes parameter annotation information, and the parameter annotation information represents the meaning of the parameter variables in the initial template. According to the preset initial template, the parameter template to be generated is determined, including:
[0083] According to the parameter annotation information, the parameter variables in the initial template are formatted and the parameter template to be generated is obtained.
[0084] The parameter annotation information may refer to a description or comment on a parameter variable in a template, which is used to explain the meaning, type, format, etc. of the parameter variable. The parameter annotation information provides additional information about the parameter variable to help perform correct processing and conversion when generating a template.
[0085] Parameter annotation information generally exists in the form of annotations near the parameter variables in the template, and each parameter variable has corresponding parameter annotation information.
[0086] Format conversion may refer to converting parameter variables in an initial template into a new format.
[0087] In a possible implementation, the parameter variables after format conversion are uniformly named in the scenario of this embodiment, wherein a specification manual or specification specification may be used to standardize the unification of parameter variable names by developers.
[0088] Exemplarily, when there are preset initial templates for two components, and then two parameter templates to be generated need to be determined, the initial template of component a includes "image: []", and the initial template of component b includes "imagename: []", wherein image and imagename are the original parameter variables in the initial template, and the parameter annotation information corresponding to the two parameter variables image and imagename both represent the cloud pool address corresponding to the image resource. Therefore, it is necessary to convert the format of these two parameter variables to obtain the parameter template to be generated.
[0089] After format conversion, the parameter template to be generated corresponding to component a includes "image: {{-region.registry-}}", and the parameter template to be generated corresponding to component b includes "imagename: {{-region.registry-}}", wherein the parameter variable region.registry is used in the parameter templates of all components to indicate the address of the image resource and is included in the specification manual or specification specification.
[0090] Among them, in the programming field, {{--}} is used to place new parameter variable information. Specifically, the new parameter variable information can be a new parameter variable name, and then a known parameter variable name and a parameter variable value can be implemented, and the parameter variable name can be assigned to the parameter variable value.
[0091] The beneficial effect of such a setting is that the parameter variables of different components may have consistent parameter annotation information, but inconsistent parameter variable information. This embodiment performs format conversion according to the parameter annotation information to generate a parameter template that meets the requirements, thereby ensuring the correctness and consistency of the parameter template.
[0092] In a possible implementation, the parameter template to be generated and the component identifier corresponding to the parameter template to be generated are associated and stored in a database, so that when the component identifier is known, the component identifier can be identified from the database and the parameter template corresponding to the component identifier can be obtained.
[0093] S203. Determine a target file according to the cloud pool information and parameter template of the cloud pool where the user is located, and install the component to be installed in the terminal device corresponding to the user cluster where the user is located according to the target file; wherein the target file represents a parameter template containing the cloud pool information.
[0094] Exemplarily, the target file is a file containing cloud pool information and parameter templates, which integrates the cloud pool information and the parameters in the parameter template to form a complete configuration file for guiding the installation process of the component. In other words, the parameter template can be supplemented according to the cloud pool information, and the supplemented parameter template can be used as the target file. Each user cluster corresponds to its own terminal device, obtains the installation package of the component to be installed, and installs the installation package of the component to be installed in the terminal device of the user cluster according to the target file.
[0095] In the disclosed embodiment, by responding to the user's installation request, a parameter template is obtained and generated, and the component is installed according to the template and cloud pool information. This method ensures the consistency, correctness and flexibility of the installation process, is applicable to complex cloud computing environments, does not require manual configuration of parameters one by one, and improves the efficiency of component installation.
[0096] Figure 3 This is a flow chart of another data processing method based on a cloud platform provided in this application. The execution subject of this method can be a server, a host or other device, such as Figure 3 As shown, the method may include:
[0097] S301. In response to a component installation request from a user, determine the cloud pool information of the cloud pool where the user is located and the component information of the component to be installed; wherein, a plurality of user clusters are set in the cloud pool, and the users in different user clusters are different. The cloud pool information represents the cloud pool properties of the cloud pool corresponding to the user cluster where the user is located, and the component information includes the component identifier of the component to be installed.
[0098] Exemplarily, this step may refer to the above-mentioned step S201 and will not be described in detail.
[0099] S302: Obtain a parameter template corresponding to the component identifier; wherein the parameter template represents a file template containing parameters used when installing the component.
[0100] Exemplarily, this step may refer to the above-mentioned step S202 and will not be described in detail.
[0101] S303: Determine the location information of the cloud pool information of the user in the parameter template.
[0102] Exemplarily, the cloud pool information of the cloud pool where the user is located can be expressed as: region.registry:beijing, where region.registry is the parameter variable name representing the cloud pool address, and beijing is the parameter variable value representing the cloud pool address.
[0103] In a possible implementation, the go-template tool is widely used in various scenarios such as generating HTML pages, configuration files, and documents. The go-template tool can be used to locate the location information of the cloud pool information of the user's cloud pool in the parameter template.
[0104] For example, after the format conversion as described above, the parameter template to be generated corresponding to component a includes "image:{{-region.registry-}}". By using the go-template tool, the position of the parameter variable name region.registry corresponding to the cloud pool address in the parameter template can be quickly located.
[0105] It should be noted that the cloud pool information may include multiple combinations of "parameter variable name: parameter variable value". The operation steps of other "parameter variable name: parameter variable value" in this application are consistent with "region.registry:beijing" and will not be repeated here.
[0106] S304: Replace the parameter variables at the position information in the parameter template to obtain the target file.
[0107] Exemplarily, in a possible implementation, the go-template tool can be used to implement the replacement operation. Exemplarily, the parameter template to be generated corresponding to the above-mentioned a component includes "image:{{-region.registry-}}", the location of the parameter variable name region.registry corresponding to the cloud pool address in the parameter template is a specific line of the parameter template, and the region.registry in "image:{{-region.registry-}}" is replaced with beijing. The target file corresponding to the a component can include "image:. / beijing".
[0108] S305: Obtain an installation package of the component to be installed according to the component identifier of the component to be installed.
[0109] Exemplarily, the component identifier can be the name of the component. In one possible implementation, the component repository is used to store the installation package of the component. The installation package can refer to a compressed package or installation program containing the files and resources required by the component, which usually includes executable files, configuration files, dependent libraries, etc. In this application, the installation package can be a chart package, which can refer to a templated file collection containing Kubernetes resource definitions (such as Deployment, Service, etc.). According to the component identifier, the installation package corresponding to the component identifier, that is, the installation package of the component, can be obtained.
[0110] S306: According to the target file, the installation package of the component to be installed is installed in the terminal device corresponding to the user cluster to which the user belongs.
[0111] Exemplarily, the terminal device corresponding to the user cluster may be a server, a host or other devices.
[0112] Exemplarily, the target file corresponding to the above-mentioned a component includes "image:. / beijing", and the installation package of the component to be installed is the chart package of component a. The open source tool Helm can be used to install the component, that is, if the installation resources and target files (parameter template containing cloud pool information) are known, it is possible to access the user cluster where the user is located to install the component.
[0113] The present application provides a data processing method based on a cloud platform, which automatically responds to user requests through a series of steps to install the required components in a cloud computing environment. This includes determining the information of the user's cloud pool and component information, obtaining parameter templates, and then generating target files based on this information and performing installation operations, all of which can be automatically implemented without the need for manual configuration of parameters one by one, thereby improving the efficiency of component installation.
[0114] Figure 4A flowchart of another data processing method based on a cloud platform provided in this application, the execution subject of the method can be a server, a host or other devices, such as Figure 4 As shown, the method may include:
[0115] S401. In response to a component installation request from a user, determine the cloud pool information of the cloud pool where the user is located and the component information of the component to be installed; wherein, a plurality of user clusters are set in the cloud pool, and the users in different user clusters are different. The cloud pool information represents the cloud pool properties of the cloud pool corresponding to the user cluster where the user is located, and the component information includes the component identifier of the component to be installed.
[0116] Exemplarily, this step may refer to the above-mentioned step S201 and will not be described in detail.
[0117] S402: Obtain a parameter template corresponding to the component identifier; wherein the parameter template represents a file template containing parameters used when installing the component.
[0118] Exemplarily, this step may refer to the above-mentioned step S202 and will not be described in detail.
[0119] S403. Determine a target file according to the cloud pool information and parameter template of the cloud pool where the user is located, and install the component to be installed in the terminal device corresponding to the user cluster where the user is located according to the target file; wherein the target file represents a parameter template containing the cloud pool information.
[0120] Exemplarily, this step may refer to the above-mentioned step S203 and will not be described in detail.
[0121] S404: If it is determined that the installation of the component to be installed fails, in response to the component reinstallation instruction, the target file is updated to obtain a new target file.
[0122] Exemplarily, the reinstallation instruction may be manually triggered by a user or automatically generated by the open source tool Helm. The component reinstallation instruction may be initiated by the user who initiated the component installation request, and is used to request the execution subject of the cloud platform-based data processing method of the present application to reinstall the component to be installed.
[0123] In this embodiment, in response to a component reinstallation instruction, the target file is updated to obtain a new target file, including: in response to the component reinstallation instruction, determining an alarm message of installation failure of the component to be installed; wherein the alarm message represents the cause of the installation failure; and according to the alarm message, updating the target file to obtain a new target file.
[0124] Specifically, the component reinstallation instruction includes an alarm message of installation failure of the component to be installed. The alarm message may refer to detailed information generated by Helm when an installation failure is detected. The content of the alarm message may be a lack of certain dependent libraries, insufficient permissions, damaged files, etc.
[0125] Exemplarily, the warning message is that the component version of the component to be installed does not correspond, and is accompanied by the correct component version of the component to be installed.
[0126] For example, if the target file corresponding to the a component includes "image:. / beijing", in addition to "image:. / beijing", the target file corresponding to the a component also includes "version:[]". Generally, if the parameter variable version is not replaced, Helm will default to the original parameter structure for installation.
[0127] When the alarm information warns that the component version of the component to be installed does not correspond, the name of the parameter variable carried is edition, and the parameter variable value carried is 1.2.1. The method for updating the target file is: convert the format of the version parameter variable in the target file to obtain a new target file to be generated; determine the position information of the version parameter value in the parameter template; replace the version parameter variable at the position information in the parameter template to obtain a new target file.
[0128] Specifically, before the format conversion, the target file corresponding to the above component a includes "image:. / beijing;version:[]", and after the format conversion, the new target file to be generated corresponding to the above component a includes "image:. / beijing;version:{{-edition-}}".
[0129] Specifically, the new target file may include: “image:. / beijing; version:1.2.1”.
[0130] The beneficial effect of such a setting is that, according to the alarm information, the steps of format conversion to position determination to variable replacement are performed again, which ensures that in the event of failure, the cause of failure can be found and the component can be reinstalled.
[0131] S405: Install the component to be installed in the terminal device corresponding to the user cluster to which the user belongs according to the new target file.
[0132] Exemplarily, the implementation method of installing the component to be installed in the terminal device corresponding to the user cluster to which the user belongs according to the new target file is consistent with the above-mentioned implementation method of installing the installation package of the component to be installed in the terminal device corresponding to the user cluster to which the user belongs according to the target file, and will not be repeated here.
[0133] In the disclosed embodiment, the situation where the installation of the component to be installed fails is taken into consideration, thereby ensuring the process integrity of the cloud platform-based data processing method.
[0134] In one possible implementation, Figure 5 The architecture diagram of the data processing method based on the cloud platform provided in this application is as follows: Figure 5 As shown, the architecture includes: management nodes, execution nodes, database, component warehouse, multiple cloud pools, and multiple user clusters;
[0135] The management node is used to receive the user's component installation request and send the component installation instruction to the execution node;
[0136] The execution node is used to respond to the component installation instruction of the management node and execute the component installation. In a multi-cloud scenario, there are multiple cloud pools, and each cloud pool has an execution node. The execution node is used to execute the operation of installing components.
[0137] The database is used to store parameter templates corresponding to the components to be installed;
[0138] The component repository is used to store component installation packages;
[0139] Each cloud pool includes at least one user cluster, and a user cluster includes at least one user. For example, cloud pool 1 includes n1 user clusters, cloud pool 2 includes n2 user clusters, and cloud pool 3 includes n3 user clusters. In the same user cluster, users in the cluster can enjoy the same cluster resources.
[0140] The architecture of the cloud platform-based data processing method provided in the present application enables the management node to uniformly receive component installation requests and send component installation instructions to the execution node. The execution node is only responsible for the installation work. By separating the management node from the execution node, resources can be managed in a unified manner, and the work efficiency of the management node and the execution node is effectively improved.
[0141] To better explain Figure 5 Data interaction in Figure 6 A flowchart of another data processing method based on a cloud platform provided in this application is as follows: Figure 6 As shown, the method includes:
[0142] S601. A management node receives a cluster component installation request from a user, wherein the cluster component installation request includes at least one of a cluster identifier of a cluster where the user is located, a cloud pool identifier of a cloud pool where the user is located, cloud pool address information, and a component identifier.
[0143] S602: The management node obtains a parameter template corresponding to the cloud pool identifier from a database according to the cloud pool identifier.
[0144] S603. The management node performs orchestration processing on the parameter template according to the cloud pool address information to obtain an orchestrated parameter template; the orchestration processing includes replacing the cloud pool address variable information in the parameter template with the cloud pool address information.
[0145] S604: The management node determines the target execution node according to the cloud pool identifier.
[0146] S605: The management node sends a cluster component installation instruction to the target execution node, where the cluster component installation instruction includes a cluster identifier and an orchestrated template.
[0147] S606: The target execution node obtains the component chart package from the component repository and uses a third-party tool to complete cluster component installation.
[0148] Another cloud platform-based data processing method provided by the present application divides the management node and the execution node in the form of a distributed architecture, thereby enhancing the reliability and scalability of component installation and realizing an efficient, reliable and easy-to-use cluster component installation process.
[0149] Figure 7 A schematic diagram of the structure of the data processing device based on the cloud platform provided in this application, such as Figure 7 As shown, the cloud platform-based data processing device 70 provided in the present application includes: a determination module 701, an acquisition module 702, and an installation module 703;
[0150] The determination module 701 is used to determine the cloud pool information of the cloud pool where the user is located and the component information of the component to be installed in response to the user's component installation request; wherein a plurality of user clusters are set in the cloud pool, and the users in different user clusters are different, the cloud pool information represents the cloud pool attribute of the cloud pool corresponding to the user cluster where the user is located, and the component information includes the component identifier of the component to be installed;
[0151] The acquisition module 702 is used to acquire a parameter template corresponding to the component identifier; wherein the parameter template represents a file template containing parameters used when installing the component;
[0152] The installation module 703 is used to determine the target file according to the cloud pool information and parameter template of the cloud pool where the user is located, and install the component to be installed in the terminal device corresponding to the user cluster where the user is located according to the target file; wherein the target file represents the parameter template containing the cloud pool information.
[0153] In a possible implementation, the acquisition module 702 is further configured to determine the parameter template corresponding to the component identifier of the component to be installed according to a preset association relationship between the component identifier and the parameter template.
[0154] In a possible implementation, the acquisition module 702 is further configured to, in response to the parameter template generation instruction, acquire a component identifier corresponding to the parameter template to be generated from the parameter template generation instruction;
[0155] According to the preset initial template, determine the parameter template to be generated;
[0156] The parameter template to be generated and the component identifier corresponding to the parameter template to be generated are associated and stored.
[0157] In a possible implementation, the acquisition module 702 is further configured to perform format conversion on parameter variables in the initial template according to the parameter annotation information to obtain a parameter template to be generated.
[0158] In a possible implementation, the installation module 703 is further used to determine the location information of the cloud pool information of the cloud pool where the user is located in the parameter template;
[0159] Replace the parameter variables at the position information in the parameter template to obtain the target file.
[0160] In a possible implementation, the installation module 703 is further configured to obtain an installation package of the component to be installed according to the component identifier of the component to be installed;
[0161] According to the target file, the installation package of the component to be installed is installed in the terminal device corresponding to the user cluster where the user belongs.
[0162] In a possible implementation, the installation module 703 is further configured to update the target file in response to the component reinstallation instruction to obtain a new target file if it is determined that the installation of the component to be installed fails;
[0163] The component to be installed is installed in the terminal device corresponding to the user cluster where the user belongs according to the new target file.
[0164] In a possible implementation, the installation module 703 is further configured to update the target file in response to the component reinstallation instruction to obtain a new target file, including:
[0165] In response to the component reinstallation instruction, determining alarm information of installation failure of the component to be installed; wherein the alarm information indicates the cause of the installation failure;
[0166] According to the alarm information, the target file is updated to obtain a new target file.
[0167] Figure 8 A schematic diagram of the structure of the electronic device provided in this application, such as Figure 8As shown, the electronic device 80 provided in the embodiment of the present application includes: at least one processor 801 and a memory 802. Optionally, the device 80 also includes a communication component 803. The processor 801, the memory 802 and the communication component 803 are connected via a bus 804.
[0168] In a specific implementation process, at least one processor 801 executes the computer-executable instructions stored in the memory 802, so that at least one processor 801 executes the above method.
[0169] The specific implementation process of the processor 801 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.
[0170] In the above embodiments, it should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the invention may be directly implemented as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.
[0171] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (Non-volatile Memory, NVM), such as at least one disk memory.
[0172] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.
[0173] The present application also provides a computer program product, including a computer program, which implements the above method when executed by a processor.
[0174] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the above method is implemented.
[0175] The above-mentioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special-purpose computer.
[0176] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present application.
[0177] It should be further noted that, although the various steps in the flowchart are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowchart may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
[0178] It should be understood that the above-mentioned device embodiments are only illustrative, and the device of the present application can also be implemented in other ways. For example, the division of units / modules in the above-mentioned embodiments is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units, modules or components can be combined, or can be integrated into another system, or some features can be ignored or not executed.
[0179] In addition, unless otherwise specified, each functional unit / module in each embodiment of the present application may be integrated into one unit / module, each unit / module may exist physically separately, or two or more units / modules may be integrated together. The above-mentioned integrated unit / module may be implemented in the form of hardware or in the form of a software program module.
[0180] If the integrated unit / module is implemented in the form of hardware, the hardware may be a digital circuit, an analog circuit, etc. The physical implementation of the hardware structure includes but is not limited to transistors, memristors, etc. If not specifically stated, the processor may be any appropriate hardware processor, such as a CPU, a GPU, an FPGA, a DSP, an ASIC, etc. If not specifically stated, the storage unit may be any appropriate magnetic storage medium or magneto-optical storage medium, such as a resistive random access memory RRAM (Resistive Random Access Memory), a dynamic random access memory DRAM (Dynamic Random Access Memory), a static random access memory SRAM (Static Random-Access Memory), an enhanced dynamic random access memory EDRAM (Enhanced Dynamic Random Access Memory), a high-bandwidth memory HBM (High-Bandwidth Memory), a hybrid memory cube HMC (Hybrid Memory Cube), etc.
[0181] If the integrated unit / module is implemented in the form of a software program module and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or all or part of the technical solution, can be embodied in the form of a software product, which is stored in a memory and includes several instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.
[0182] In the above embodiments, the description of each embodiment has its own emphasis. For the part not described in detail in a certain embodiment, please refer to the relevant description of other embodiments. The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0183] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0184] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A data processing method based on a cloud platform, characterized in that: The method comprises: In response to a component installation request from a user, determining cloud pool information of a cloud pool where the user is located and component information of a component to be installed; wherein the cloud pool is provided with multiple user clusters, and the users in different user clusters are different, the cloud pool information represents a cloud pool attribute of a cloud pool corresponding to the user cluster where the user is located, and the component information includes a component identifier of the component to be installed; Acquire a parameter template corresponding to the component identifier; wherein the parameter template represents a file template containing parameters used when installing the component; According to the cloud pool information of the cloud pool where the user is located and the parameter template, a target file is determined, and the component to be installed is installed in the terminal device corresponding to the user cluster where the user is located according to the target file; wherein the target file represents a parameter template containing cloud pool information.
2. The method according to claim 1, characterized in that Obtain a parameter template corresponding to the component identifier, including: According to the preset association relationship between the component identifier and the parameter template, a parameter template corresponding to the component identifier of the component to be installed is determined.
3. The method according to claim 2, characterized in that Also includes: In response to the parameter template generation instruction, obtaining a component identifier corresponding to the parameter template to be generated from the parameter template generation instruction; Determine the parameter template to be generated according to the preset initial template; The parameter template to be generated and the component identifier corresponding to the parameter template to be generated are associated and stored.
4. The method according to claim 3, characterized in that The initial template includes parameter annotation information, and the parameter annotation information represents the meaning of the parameter variables in the initial template; Determining the parameter template to be generated according to the preset initial template includes: According to the parameter annotation information, the parameter variables in the initial template are format converted to obtain the parameter template to be generated.
5. The method according to claim 1, characterized in that Determining a target file according to the cloud pool information of the cloud pool where the user is located and the parameter template includes: Determine the location information of the cloud pool information of the user in the parameter template; The parameter variable at the position information in the parameter template is replaced to obtain the target file.
6. The method according to claim 1, characterized in that Installing the component to be installed in a terminal device corresponding to the user cluster to which the user belongs according to the target file includes: Obtaining an installation package of the component to be installed according to the component identifier of the component to be installed; According to the target file, the installation package of the component to be installed is installed in the terminal device corresponding to the user cluster to which the user belongs.
7. The method according to claim 1, characterized in that Also includes: If it is determined that the installation of the component to be installed fails, in response to the component reinstallation instruction, the target file is updated to obtain a new target file; The component to be installed is installed in the terminal device corresponding to the user cluster to which the user belongs according to the new target file.
8. The method according to claim 7, characterized in that In response to the component reinstallation instruction, the target file is updated to obtain a new target file, including: In response to the component reinstallation instruction, determining alarm information of installation failure of the component to be installed; wherein the alarm information indicates the cause of the installation failure; According to the alarm information, the target file is updated to obtain the new target file.
9. A data processing device based on a cloud platform, characterized in that: include: A determination module, configured to determine, in response to a component installation request from a user, cloud pool information of a cloud pool where the user is located and component information of a component to be installed; wherein the cloud pool is provided with a plurality of user clusters, and the users in different user clusters are different, the cloud pool information represents a cloud pool attribute of a cloud pool corresponding to the user cluster where the user is located, and the component information includes a component identifier of the component to be installed; An acquisition module, used to acquire a parameter template corresponding to the component identifier; wherein the parameter template represents a file template containing parameters used when installing the component; The installation module is used to determine the target file based on the cloud pool information of the cloud pool where the user is located and the parameter template, and install the component to be installed in the terminal device corresponding to the user cluster where the user is located according to the target file; wherein the target file represents the parameter template containing the cloud pool information.
10. An electronic device, characterized in that: include: Memory, processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor performs the method according to any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 8 when executed by a processor.
Citation Information
Cited By
Multi-level cross-cluster system for SOC operation platform
CN120582961A
A multi-tiered cross-cluster system for a SOC operations platform
CN120582961B