Cluster mirror image construction method and cluster mirror image deployment method
By receiving target resource files and configurable parameters, using preset template engines and cluster development tools to build cluster images, and using cluster image packaging tool storage, the complexity and inefficiency of cluster image construction and management in the existing technology are solved, and automated cluster image full-link construction and efficient delivery are achieved.
Patent Information
- Application Number
- CN202311555788.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-21
- Publication Date
- 2025-05-23
AI Technical Summary
The prior art faces complexity and inefficiency problems when building and managing cluster images, especially in the configuration and dependency management of distributed software, especially in the case of offline delivery.
Provide a cluster image construction method, by receiving target resource files and configurable parameters sent by the user, using the preset template engine to generate cluster image configuration files, and calling the cluster development tool to build cluster image, and finally using the cluster image packaging tool to store it in the storage unit.
The automated cluster mirroring full-link construction is realized, which improves the efficiency and user experience of overall cluster delivery, so that users can automatically and efficiently deliver resources by simply defining configurable parameters.
Smart Images

Figure CN120029660A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present specification relate to the field of computer technology, and in particular to a cluster mirroring method. Background Art
[0002] With the development of computer technology, in the field of cloud delivery, the construction and management of cluster images are the key to realizing the automated deployment and expansion of applications. Cluster images regard the entire cluster as a server and the K8S (Kubernetes) cluster as a cloud operating system, realize the image packaging and delivery of the entire cluster, and provide an "out-of-the-box" application packaging technology for enterprise-level software.
[0003] Currently, a distributed software often has a lot of configurations, as well as many application images and dependencies. In some cases, it even needs to be delivered offline, which makes the delivery process face great challenges. Therefore, an efficient cluster image construction solution is urgently needed. Summary of the invention
[0004] In view of this, an embodiment of this specification provides a cluster image construction method. One or more embodiments of this specification also involve a cluster image deployment method, a cluster image construction device, a cluster image deployment device, a computing device, a computer-readable storage medium and a computer program to solve the technical defects existing in the prior art.
[0005] According to a first aspect of an embodiment of this specification, a cluster image building method is provided, including:
[0006] Receiving a target resource file and configurable parameters corresponding to the target resource file sent by a first user;
[0007] When the format check of the configurable parameters passes, the preset template engine is called to generate a cluster image configuration file based on the configurable parameters and the target resource file;
[0008] Call the cluster development tool to build a cluster image based on the cluster image configuration file;
[0009] Call the cluster image packaging tool to store the cluster image in the storage unit.
[0010] According to a second aspect of an embodiment of this specification, a cluster image deployment method is provided, including:
[0011] Obtaining configuration parameters sent by the second user for the target resource file;
[0012] Call the preset template engine to generate cluster image deployment files based on configuration parameters;
[0013] Call a cluster image packaging tool, and deploy the cluster image to the user cluster of the second user based on the cluster image deployment file, wherein the cluster image is constructed by the cluster development tool based on the cluster image configuration file, and the cluster image configuration file is obtained by the preset template engine based on the configurable parameters and target resource files sent by the first user when the format verification of the configurable parameters passes.
[0014] According to a third aspect of an embodiment of this specification, a cluster image building device is provided, including:
[0015] A receiving module, configured to receive a target resource file and configurable parameters corresponding to the target resource file sent by a first user;
[0016] The first generation module is configured to call a preset template engine to generate a cluster image configuration file based on the configurable parameters and the target resource file when the format check of the configurable parameters passes;
[0017] The building module is configured to call the cluster development tool to build the cluster image based on the cluster image configuration file;
[0018] The storage module is configured to call the cluster image packaging tool to store the cluster image in the storage unit.
[0019] According to a fourth aspect of an embodiment of this specification, a cluster mirroring deployment device is provided, including:
[0020] An acquisition module, configured to acquire configuration parameters sent by the second user for the target resource file;
[0021] The second generation module is configured to call a preset template engine and generate a cluster image deployment file based on configuration parameters;
[0022] The deployment module is configured to call the cluster image packaging tool and deploy the cluster image to the user cluster of the second user based on the cluster image deployment file, wherein the cluster image is constructed by the cluster development tool based on the cluster image configuration file, and the cluster image configuration file is obtained by the preset template engine based on the configurable parameters and target resource files sent by the first user when the format verification of the configurable parameters passes.
[0023] According to a fifth aspect of an embodiment of this specification, a computing device is provided, including:
[0024] Memory and processor;
[0025] The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the method provided in the first aspect or the second aspect are implemented.
[0026] According to a sixth aspect of the embodiments of this specification, a computer-readable storage medium is provided, which stores computer-executable instructions, and when the instructions are executed by a processor, the steps of the method provided in the first aspect or the second aspect are implemented.
[0027] According to a seventh aspect of the embodiments of this specification, a computer program is provided, wherein when the computer program is executed in a computer, the computer is caused to execute the steps of the method provided in the first aspect or the second aspect above.
[0028] The cluster image construction method provided in one embodiment of the present specification receives a target resource file sent by a first user and configurable parameters corresponding to the target resource file; when the format check of the configurable parameters is passed, calls a preset template engine to generate a cluster image configuration file based on the configurable parameters and the target resource file; calls a cluster development tool to build a cluster image based on the cluster image configuration file; calls a cluster image packaging tool to store the cluster image in a storage unit. By completing the construction of the cluster image in one stop based on the target resource file and configurable parameters sent by the first user, the first user can automatically and efficiently deliver resources to other users by only defining configurable parameters, realizing the automated full-link construction of the cluster image and improving the efficiency of the overall cluster delivery and user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 This is an architecture diagram of a cluster image building system provided by an embodiment of this specification;
[0030] Figure 2 It is a flow chart of a cluster image building method provided by an embodiment of this specification;
[0031] Figure 3 It is a flow chart of a cluster image deployment method provided by an embodiment of this specification;
[0032] Figure 4 It is a process flow chart of a cluster image building method provided by an embodiment of this specification;
[0033] Figure 5 It is a structural diagram of a cluster image building device provided by an embodiment of this specification;
[0034] Figure 6 It is a structural diagram of a cluster mirror deployment device provided by an embodiment of this specification;
[0035] Figure 7 It is a structural block diagram of a computing device provided by an embodiment of this specification. DETAILED DESCRIPTION
[0036] Many specific details are described in the following description to facilitate a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of this specification, so this specification is not limited to the specific implementation disclosed below.
[0037] The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "a", "said" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.
[0038] It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of this specification, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0039] In addition, 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 one or more embodiments of this specification 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 the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0040] First, the terms involved in one or more embodiments of this specification are explained.
[0041] Helm: Helm is a K8S application installation management tool used to package complex K8S cluster applications into simple, easy-to-manage deployment units, thereby simplifying the deployment and management of applications on K8S clusters.
[0042] Helm chart: A Helm chart is a collection of files that describes a set of related K8S resources and packages them into a reusable application installer. A Helm chart contains all the necessary files required to install and configure an application, such as a container image file (Dockerfile).
[0043] YAML: YAML (Yet Another Markup Language) is a data serialization language used to write concise and clear data structure documents. A YAML deployment file is a special type of YAML file that defines a set of K8S objects. YAML deployment files can help developers quickly deploy and manage applications and components in a K8S cluster.
[0044] HTML: HTML (HyperText Markup Language) is a hypertext markup language used to create web pages. HTML uses a series of tags to define the content and layout of a web page. It is used to tell the browser how to display the content of the web page, for example, how to handle elements such as text and pictures.
[0045] XML: XML (Extensible Markup Language) is an extensible markup language used to define its own tags and data structures to describe data content and structure for data exchange and persistence.
[0046] JSON: JSON (JavaScript Object Notation) is a lightweight data exchange format used to represent simple data structures and arrays. Since JSON data can be read and parsed directly, it is very suitable for transmitting data in web applications.
[0047] Sealer: Sealer is a cluster image packaging tool used to build, deliver, and run distributed software images.
[0048] Cluster image: A cluster image is a resource package that contains the files of the entire cluster in a certain format. Cluster images are used to quickly build and deploy distributed applications, greatly improving development efficiency and system stability.
[0049] In a cloud computing environment, the construction and management of cluster images are the key to achieving automated deployment and expansion of applications. Container (Docker) images solve the packaging problem of single applications well, but do not solve the image problem of distributed applications. Orchestration tools (such as the Helm orchestration tool) solve the orchestration problem but not the packaging problem. At present, there is no packaging standard for clusters, and it is also relatively complicated to build a custom K8S cluster. The entire cluster and distributed application deployment are also process-oriented, resulting in the explosion of delivery problems that cannot be solved cleanly and repeatedly, and the overall delivery consistency of the cluster is poor. Especially in the field of proprietary cloud delivery, a distributed software often has a lot of configurations, as well as many application images and dependencies. In some cases, it even needs to be delivered offline, and the delivery process faces very great challenges.
[0050] In view of the above situation, the embodiments of this specification propose an automated cluster image full-link construction solution, thereby providing an automated, efficient and convenient "out-of-the-box" cluster image construction method for enterprise-level software. Specifically, the target resource file sent by the first user and the configurable parameters corresponding to the target resource file are received; when the format check of the configurable parameters passes, the preset template engine is called to generate a cluster image configuration file based on the configurable parameters and the target resource file; the cluster development tool is called to build a cluster image based on the cluster image configuration file; the cluster image packaging tool is called to store the cluster image in a storage unit. By completing the construction of the cluster image in one stop based on the target resource file and configurable parameters sent by the first user, the first user can automatically and efficiently deliver resources to other users only by defining configurable parameters, thereby realizing automated cluster image full-link construction and improving the efficiency of the overall cluster delivery and user experience.
[0051] In this specification, a cluster image building method is provided. This specification also involves a cluster image deployment method, a cluster image building device, a cluster image deployment device, a computing device, and a computer-readable storage medium, which are described in detail one by one in the following embodiments.
[0052] See also Figure 1 , Figure 1 An architecture diagram of a cluster image building system provided by an embodiment of the present specification is shown. The cluster image building system may include a client 100 and a server 200;
[0053] The client 100 is used to send the target resource file of the first user and the configurable parameters corresponding to the target resource file to the server 200;
[0054] The server 200 is used to call the preset template engine to generate a cluster image configuration file based on the configurable parameters and the target resource file when the format verification of the configurable parameters passes; call the cluster development tool to build the cluster image based on the cluster image configuration file; call the cluster image packaging tool to store the cluster image in the storage unit.
[0055] By applying the solution of the embodiments of this specification, the cluster image is built in one stop based on the target resource file and configurable parameters sent by the first user, so that the first user can automatically and efficiently deliver resources to other users only by defining configurable parameters, thereby realizing automated full-link construction of the cluster image and improving the overall delivery efficiency of the cluster and user experience.
[0056] In actual applications, the client 100 may include a terminal device, and the server 200 may include a cloud device. Multiple clients 100 may establish a communication connection through the server 200. In a cluster image building scenario, the server 200 is used to provide a cluster image building service between multiple clients 100.
[0057] The user can interact with the server 200 through the client 100 to receive data sent by other clients 100, or send data to other clients 100, etc. In the cluster image construction scenario, the user can publish a data stream to the server 200 through the client 100, and the server 200 generates a cluster image according to the data stream and deploys the cluster image to other clients that establish communication.
[0058] The client 100 and the server 200 are connected via a network. The network provides a medium for a communication link between the client 100 and the server 200. The network may include various connection types, such as wired or wireless communication links or optical fiber cables, etc. The data transmitted by the client 100 may need to be encoded, transcoded, compressed, etc. before being released to the server 200.
[0059] The client 100 can be a browser, an APP (Application), or a web application such as an H5 (HyperText Markup Language 5, Hypertext Markup Language Version 5) application, or a light application (also known as a mini-program, a lightweight application) or a cloud application, etc. The client 100 can be based on the software development kit (SDK, Software Development Kit) of the corresponding service provided by the server 200, such as based on the real-time communication (RTC, Real Time Communication) SDK development and acquisition. The client 100 can be deployed in an electronic device, and needs to rely on the device to run or some APPs in the device to run. For example, the electronic device can have a display screen and support information browsing, such as a personal mobile terminal such as a mobile phone, a tablet computer, a personal computer, etc. Various other types of applications can also be configured in the electronic device, such as human-computer dialogue applications, model training applications, text processing applications, web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0060] The server 200 may include servers that provide various services, such as servers that provide communication services to multiple clients, and servers that process data sent by clients. It should be noted that the server 200 can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. The server can also be a server of a distributed system, or a server combined with a blockchain. The server can also be a cloud server for basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content distribution networks (CDN, Content Delivery Network), and big data and artificial intelligence platforms, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology.
[0061] It is worth noting that the cluster image building method provided in the embodiments of this specification is generally executed by the server, but in other embodiments of this specification, the client may also have similar functions to the server, thereby executing the cluster image building method provided in the embodiments of this specification. In other embodiments, the cluster image building method provided in the embodiments of this specification may also be jointly executed by the client and the server.
[0062] See also Figure 2 , Figure 2 A flow chart of a cluster image building method provided by an embodiment of this specification is shown, which specifically includes the following steps:
[0063] Step 202: Receive a target resource file and configurable parameters corresponding to the target resource file sent by a first user.
[0064] In one or more embodiments of the present specification, a target resource file and configurable parameters corresponding to the target resource file sent by a first user may be received, so as to construct a cluster image based on the target resource file and the configurable parameters.
[0065] Specifically, the first user refers to the provider of the target resource file, such as a service provider or software provider (ISV, Independent Software Vendor). The target resource file refers to the resource file of the target application provided by the first user. The target application can be a single application or a distributed application. The target resource file can be a Helm chart file or a YAML deployment file. The specific selection is based on the actual situation. The embodiments of this specification do not impose any restrictions on this. Configurable parameters can also be called exposable parameters. Configurable parameters refer to parameters provided by the first user to the second user and can be specified by the second user, that is, configurable parameters can be provided to the second user for custom configuration. For example, the first user uses a YAML deployment file to deploy the target application, and the configurable parameter can be the number of replicas (Replica Count).
[0066] Step 204: When the format check of the configurable parameters passes, the preset template engine is called to generate a cluster image configuration file based on the configurable parameters and the target resource file.
[0067] In one or more embodiments of the present specification, after receiving the target resource file sent by the first user and the configurable parameters corresponding to the target resource file, further, if the format check of the configurable parameters passes, the preset template engine is called to generate a cluster image configuration file based on the configurable parameters and the target resource file.
[0068] Specifically, the preset template engine may be a Freemaker template engine, which is a template engine written in Java and can be used to generate dynamic content output in various text formats on the server side, including but not limited to HTML, XML, JSON, email, etc. The cluster image configuration file (kubefile.yaml) is used to build a cluster image.
[0069] It should be noted that, if the format of the configurable parameters sent by the first user is incorrect, it may cause errors in cluster image deployment and the construction of the cluster image is meaningless. Therefore, before the cluster image is built, the format of the configurable parameters can be checked to ensure that the format of the configurable parameters is correct before building the cluster image.
[0070] In practical applications, there are many ways to verify the format of configurable parameters, which can be selected based on actual conditions, and the embodiments of this specification do not impose any limitation on this.
[0071] In a possible implementation of the present specification, the correct format of the configurable parameters can be defined in a conditional statement, and the conditional statement is further used to verify the configurable parameters. If the configurable parameters meet the conditional statement, the format verification passes; otherwise, the format verification fails.
[0072] In another possible implementation of the present specification, the preset parameter format and the configurable parameter format may be compared to determine whether they are the same, so as to determine whether the format of the configurable parameter is verified. That is, when the format of the configurable parameter is verified, before calling the preset template engine to generate the cluster image configuration file based on the configurable parameter and the target resource file, the following steps may also be included:
[0073] Get the preset parameter format;
[0074] When the parameter format of the configurable parameter is the same as the preset parameter format, it is determined that the format check of the configurable parameter passes.
[0075] It should be noted that the preset parameter format is a correct parameter format, such as the YAML format. There are many ways to obtain the preset parameter format, which are selected according to the actual situation. The embodiments of this specification do not limit this. In one possible implementation of this specification, the preset parameter format sent by the configuration party can be received. In another possible implementation of this specification, the preset parameter format can be read from other data acquisition devices or databases.
[0076] In actual applications, after obtaining the preset parameter format, it can be determined whether the parameter format of the configurable parameter is the same as the preset parameter format. When the parameter format of the configurable parameter is the same as the preset parameter format, it is determined that the format check of the configurable parameter passes; when the parameter format of the configurable parameter is different from the preset parameter format, it is determined that the format check of the configurable parameter fails.
[0077] Exemplarily, taking the preset parameter format as the YAML format as an example, when judging whether the parameter format of the configurable parameters is the same as the preset parameter format, in the first possible implementation method, the YAML parser can be called to parse the configurable parameters. If the parsing is successful, the parameter format is in the YAML format and the verification passes; otherwise, the parameter format is not in the YAML format and the verification fails. In the second possible implementation method, a regular expression that matches the YAML text can be written, and then the regular expression is used to match the configurable parameters. If the match is successful, the parameter format is in the YAML format and the verification passes; otherwise, the parameter format is not in the YAML format and the verification fails. In the third possible implementation method, since many programming languages have third-party libraries that support YAML, the third-party library can be used to directly check whether the parameter format of the configurable parameters is in the YAML format. Among them, the third-party library includes but is not limited to the PyYAML (Python Yet Another Mark-up Language) library.
[0078] By applying the solution of the embodiment of this specification, the preset parameter format is obtained; when the parameter format of the configurable parameter is the same as the preset parameter format, it is determined that the format verification of the configurable parameter passes. By verifying the format of the configurable parameter, the successful deployment of the cluster image is guaranteed, and the success rate of the overall cluster delivery and the user experience are improved.
[0079] In an optional embodiment of the present specification, when generating a cluster image configuration file, in order to ensure the accuracy of the cluster image configuration file, a preset template engine may be called to generate the cluster image configuration file based on the template running file, the configurable parameters and the target resource file. That is, when the format check of the configurable parameters passes, the preset template engine is called to generate the cluster image configuration file based on the configurable parameters and the target resource file, which may include the following steps:
[0080] When the format check of the configurable parameters passes, a pre-configured template running file is obtained, wherein the template running file is used to guide a preset template engine to generate a cluster image configuration file;
[0081] Call the preset template engine to generate a cluster image configuration file based on the template run file, configurable parameters and target resource file.
[0082] It should be noted that the template running file includes but is not limited to the basic structure of the cluster mirror configuration file and the template placeholder. There are many ways to obtain a pre-configured template running file, which can be selected based on the actual situation. The embodiments of this specification do not impose any restrictions on this. In one possible implementation of this specification, a template running configuration file sent by a configuration party may be received. In another possible implementation of this specification, a pre-configured template running file may be read from other data acquisition devices or databases.
[0083] In actual applications, when calling the preset template engine and generating a cluster image configuration file based on the template run file, configurable parameters, and target resource files, the template data model is first set to associate the configurable parameters, target resource files, and template placeholders. Then, the preset template engine is called to replace the template placeholders in the template run file with the configurable parameters and target resource files to obtain the cluster image configuration file.
[0084] By applying the solution of the embodiment of this specification, when the format check of the configurable parameters is passed, a pre-configured template running file is obtained, wherein the template running file is used to guide the preset template engine to generate a cluster image configuration file; the preset template engine is called to generate a cluster image configuration file based on the template running file, the configurable parameters and the target resource file. By introducing the template running file, the accuracy of the cluster image configuration file is guaranteed.
[0085] In the embodiments of the present specification, the first user may also send cluster version information and / or cluster image construction type, so as to flexibly generate a cluster image that meets user requirements.
[0086] In an optional embodiment of the present specification, the target resource file carries cluster version information; when the format check of the configurable parameters passes, calling the preset template engine to generate a cluster image configuration file based on the configurable parameters and the target resource file may include the following steps:
[0087] When the format check of the configurable parameters passes, the preset template engine is called to generate a cluster image configuration file based on the configurable parameters, the target resource file and the cluster version information.
[0088] Specifically, cluster version information refers to the version of the K8S cluster. Cluster version information is usually expressed in the form of x, y, z, where X represents the major version number, Y represents the minor version number, and Z represents the patch level. Currently, there are many types of cluster version information, including but not limited to 1.14.x, 1.15.x, 1.16.x, etc.
[0089] It should be noted that since different versions of clusters may have different file structures and syntaxes, may support different functions, and may have performance differences, the file structure, syntax, and performance of the cluster image configuration files generated under different versions of clusters may be different. Therefore, the first user can select the corresponding cluster version information based on his own user needs, so as to flexibly generate the cluster image configuration file.
[0090] In actual applications, the implementation method of "calling a preset template engine to generate a cluster image configuration file based on configurable parameters, target resource files and cluster version information" is the same as the above-mentioned "calling a preset template engine to generate a cluster image configuration file based on configurable parameters and target resource files", and will not be repeated in this specification embodiment.
[0091] By applying the solution of the embodiment of this specification, when the format check of the configurable parameters passes, the preset template engine is called to generate a cluster image configuration file based on the configurable parameters, the target resource file and the cluster version information, thereby improving the flexibility of cluster image configuration file generation.
[0092] In another optional embodiment of the present specification, the target resource file carries a cluster image building type; when the format check of the configurable parameters passes, calling a preset template engine to generate a cluster image configuration file based on the configurable parameters and the target resource file may include the following steps:
[0093] When the format check of the configurable parameters passes, the preset template engine is called to generate a cluster image configuration file based on the configurable parameters, the target resource file, and the cluster image build type.
[0094] Specifically, the cluster image construction type includes but is not limited to a cluster image containing only underlying services, a cluster image containing underlying services and target applications, and a cluster image containing only target applications. The selection is made according to actual conditions, and the embodiments of this specification do not impose any limitations on this.
[0095] In actual applications, the implementation method of "calling a preset template engine to generate a cluster image configuration file based on configurable parameters, target resource files and cluster image build type" is the same as the above-mentioned "calling a preset template engine to generate a cluster image configuration file based on configurable parameters and target resource files", and will not be repeated in this specification embodiment.
[0096] By applying the solution of the embodiment of this specification, when the format check of the configurable parameters passes, the preset template engine is called to generate a cluster image configuration file based on the configurable parameters, the target resource file and the cluster image building type, thereby improving the flexibility of cluster image configuration file generation.
[0097] Step 206: Call the cluster development tool to build a cluster image based on the cluster image configuration file.
[0098] In one or more embodiments of the present specification, a target resource file sent by a first user and configurable parameters corresponding to the target resource file are received; when the format check of the configurable parameters passes, a preset template engine is called to generate a cluster image configuration file based on the configurable parameters and the target resource file, and further, a cluster development tool can be called to build a cluster image based on the cluster image configuration file.
[0099] Specifically, the cluster development tool (K8SSDK, Kubernetes Software Development Kit) is used to provide a task creation interface for interacting with the K8S cluster and performing programming operations. The cluster development tool can provide a series of functions, including creating and deleting objects, viewing cluster status, obtaining logs, etc.
[0100] It should be noted that there are multiple ways to call the cluster development tool and build a cluster image based on the cluster image configuration file, which can be selected according to actual conditions, and the embodiments of this specification do not limit this. In one possible implementation of this specification, the cluster image configuration file can be directly passed to the cluster development tool, the cluster development tool can be called, and the cluster image building task can be created and run based on the cluster image configuration file.
[0101] In another possible implementation of the present specification, after generating the cluster image configuration file, the cluster image configuration file can be uploaded to the storage unit. When building the cluster image, the cluster development tool can be called to obtain the cluster image configuration file from the storage unit, and the cluster image building task can be further created and run based on the cluster image configuration file. That is, when the format check of the configurable parameters passes, the preset template engine is called, and after the cluster image configuration file is generated based on the configurable parameters and the target resource file, the following steps can also be included:
[0102] Upload the cluster image configuration file to the storage unit;
[0103] Calling the cluster development tool to build a cluster image based on the cluster image configuration file can include the following steps:
[0104] The cluster development tool is called to create and run a cluster image building task in the cluster based on the address parameter of the storage unit to obtain the cluster image, wherein the address parameter is used to obtain the cluster image configuration file.
[0105] Specifically, the storage unit includes but is not limited to a file storage unit and an object storage service (OSS), wherein the object storage service is used to provide large-scale, highly reliable, and highly available cloud object storage capabilities. The cluster development tool can obtain a cluster image configuration file from the storage unit based on the address parameters of the storage unit. In addition to the address parameters of the storage unit, a cluster image build task can also be created based on information such as the container image address and application name.
[0106] It should be noted that the image used for the cluster image building task is pre-built, and the image includes the cluster image building to be executed and the overall logic script content uploaded. The following is an explanation of the script content: First, download the cluster image packaging tool (Sealer) and the Helm installation package and install them. Secondly, download the Helmchart uploaded by the first user and save it to the current directory. Then, get the cluster image configuration file from the storage unit, and execute the linux instructions of the cluster image packaging tool build (Sealer build). Finally, after obtaining the cluster image, use the cluster image packaging tool to package the cluster image and upload it to the storage unit. Furthermore, during the cluster image building process, if the build fails, an exception is returned, and if the build is successful, a normal return is made.
[0107] By applying the solution of the embodiment of this specification, the cluster image configuration file is uploaded to the storage unit; the cluster development tool is called to create and run the cluster image building task in the cluster based on the address parameter of the storage unit to obtain the cluster image, wherein the address parameter is used to obtain the cluster image configuration file. By uploading the cluster image configuration file to the storage unit, a configuration file download link can be provided to the user, so that the first user and the second user can download the cluster image configuration file more conveniently.
[0108] In an optional embodiment of the present specification, the calling of the cluster development tool to build the cluster image based on the cluster image configuration file may include the following steps:
[0109] Get cluster image building status information;
[0110] When the cluster image building status information is normal and incomplete, the cluster development tool is called to build the cluster image based on the cluster image configuration file.
[0111] It should be noted that the cluster image building status information includes but is not limited to normal, abnormal, completed, and unfinished. There are many ways to obtain the cluster image building status information, which are selected according to the actual situation. The embodiments of this specification do not impose any restrictions on this. In one possible implementation of this specification, the cluster image building status information can be obtained through a status acquisition interface (API, Application Programming Interface). In another possible implementation of this specification, the cluster status view instruction can be used to obtain the cluster image building status information.
[0112] In actual applications, if the cluster image building status information is normal and not completed, it means that the cluster image is being built and no abnormality occurs. At this time, you can continue to build the cluster image.
[0113] By applying the solution of the embodiment of this specification, the cluster image building status information is obtained; when the cluster image building status information is normal and not completed, the cluster development tool is called to build the cluster image based on the cluster image configuration file. By obtaining the cluster image building status information in real time, the building status of the cluster image can be monitored, ensuring that the cluster image building process is transparent and controllable.
[0114] Furthermore, after obtaining the cluster image building status information, the following steps may also be included:
[0115] When the cluster image building status information is abnormal, the abnormal log is displayed;
[0116] When the cluster image building status information is normal and completed, the deployment file package corresponding to the cluster image is displayed.
[0117] It should be noted that if the cluster image building status information is abnormal, the exception log can be displayed at this time, which includes but is not limited to the time point when the exception occurred and the cause of the exception. When displaying the exception log, you can display the exception log directly, and you can also call the printing device to print the exception log. If the cluster image building status information is normal and completed, it means that the cluster image is built successfully, and the deployment file package corresponding to the cluster image can be displayed in the "Package Management" position, where the deployment file package includes but is not limited to full packages, incremental packages, etc. A full package refers to a package that includes both the K8S cluster and the target application, and an incremental package refers to a package that upgrades K8S or the target application.
[0118] By applying the solution of the embodiment of this specification, when the cluster image building status information is abnormal, the abnormal log is displayed; when the cluster image building status information is normal and completed, the deployment file package corresponding to the cluster image is displayed. By displaying the abnormal log or deployment file package, the cluster image building process is guaranteed to be transparent and controllable.
[0119] Step 208: Call the cluster image packaging tool to store the cluster image in the storage unit.
[0120] In one or more embodiments of the present specification, a target resource file and configurable parameters corresponding to the target resource file sent by a first user are received; when the format check of the configurable parameters passes, a preset template engine is called to generate a cluster image configuration file based on the configurable parameters and the target resource file; after calling a cluster development tool to build a cluster image based on the cluster image configuration file, a cluster image packaging tool can be further called to store the cluster image in a storage unit.
[0121] By applying the solution of the embodiments of this specification, the cluster image is built in one stop based on the target resource file and configurable parameters sent by the first user, so that the first user can automatically and efficiently deliver resources to other users only by defining configurable parameters, thereby realizing automated full-link construction of the cluster image and improving the overall delivery efficiency of the cluster and user experience.
[0122] In actual applications, there are many ways to call the cluster image packaging tool to store the cluster image in the storage unit, which are selected according to the actual situation, and the embodiments of this specification do not limit this. In one possible implementation of this specification, the cluster image packaging tool can be directly called to package the cluster image, and based on the address parameters of the storage unit, the packaged cluster image is stored in the storage unit.
[0123] In another possible implementation of the present specification, when storing the cluster image, the installation package of the cluster image packaging tool may also be stored at the same time, that is, the above-mentioned calling of the cluster image packaging tool to store the cluster image in the storage unit may include the following steps:
[0124] Obtain the installation package of the cluster image packaging tool;
[0125] Call the cluster image packaging tool to package the cluster image and installation package to obtain the cluster image storage file;
[0126] Store the cluster image storage file in the storage unit.
[0127] It should be noted that in order to facilitate the first user or the second user to deploy the cluster image, the installation package of the cluster image packaging tool and the cluster image can be packaged together to generate a cluster image storage file, and the cluster image storage file can be further uploaded to the storage unit, and a storage file download link can be provided. The first user or the second user can copy the cluster image storage file to the cluster based on the storage file download link to perform installation.
[0128] In actual applications, there are many ways to obtain the installation package of the cluster image packaging tool, which can be selected according to actual conditions, and the embodiments of this specification do not limit this. In one possible implementation of this specification, the installation package can be downloaded based on the installation package download link of the cluster image packaging tool. In another possible implementation of this specification, the installation package of the cluster image packaging tool can be obtained from a third-party software warehouse.
[0129] By applying the solution of the embodiment of this specification, the installation package of the cluster image packaging tool is obtained; the cluster image packaging tool is called to package the cluster image and the installation package to obtain a cluster image storage file; the cluster image storage file is stored in a storage unit, and users can download the cluster image and the installation package at one time, thereby improving the efficiency of cluster image deployment.
[0130] See also Figure 3 , Figure 3 A flow chart of a cluster image deployment method provided by an embodiment of this specification is shown, which specifically includes the following steps:
[0131] Step 302: Obtain configuration parameters sent by the second user for the target resource file.
[0132] Step 304: Call the preset template engine to generate a cluster image deployment file based on the configuration parameters.
[0133] Step 306: Call the cluster image packaging tool to deploy the cluster image to the user cluster of the second user based on the cluster image deployment file, wherein the cluster image is constructed by the cluster development tool based on the cluster image configuration file, and the cluster image configuration file is obtained by the preset template engine based on the configurable parameters and target resource files sent by the first user when the format verification of the configurable parameters passes.
[0134] Specifically, the second user refers to a user who needs to use the target application. The second user can be the same as the first user or different. Configuration parameters refer to custom parameters of the cluster and application. The cluster image deployment file (Clusterfile.yaml) is a file defined by the cluster image packaging tool, which is used to provide custom cluster configuration and software application configuration when using cluster images to build a K8S cluster.
[0135] It should be noted that when calling the preset template engine to generate a cluster image deployment file based on configuration parameters, a pre-configured template running file can be obtained, wherein the template running file is also used to guide the preset template engine to generate a cluster image deployment file; calling the preset template engine to generate a cluster image deployment file based on the template running file and configuration parameters.
[0136] By applying the solution of the embodiments of this specification, since the cluster image is constructed in one stop based on the target resource file and configurable parameters sent by the first user, the first user can automatically and efficiently deliver resources to the second user only by defining the configurable parameters, and the second user only needs to define the configuration parameters to deploy the cluster image to the user cluster, thereby realizing automated full-link construction of the cluster image and improving the efficiency of the overall cluster delivery and user experience. In addition, the second user can copy the cluster image and the cluster image configuration file to the local computer to realize offline deployment, making the cluster image deployment more flexible and convenient.
[0137] In an optional embodiment of the present specification, the second user may also send a cluster image deployment type based on his own needs, thereby realizing personalized cluster image deployment. That is, after obtaining the configuration parameters sent by the second user for the target resource file, the following steps may also be included:
[0138] Receiving the cluster image deployment type sent by the second user;
[0139] Call the preset template engine to generate cluster image deployment files based on configuration parameters, including:
[0140] Call the preset template engine to generate a cluster image deployment file based on the configuration parameters and cluster image deployment type.
[0141] Specifically, the cluster image deployment type refers to the type of cluster image deployment. The cluster image deployment type includes but is not limited to only deploying a cluster image containing underlying services, deploying a cluster image containing underlying services and target applications, and deploying a cluster image containing only target applications. The selection is made according to the actual situation, and the embodiments of this specification do not make any restrictions on this.
[0142] In actual applications, the implementation method of "calling the preset template engine to generate a cluster image deployment file based on configuration parameters and cluster image deployment type" is the same as the above-mentioned "calling the preset template engine to generate a cluster image deployment file based on configuration parameters", and the embodiments of this specification will not be repeated here.
[0143] By applying the solution of the embodiment of this specification, a cluster image deployment type sent by a second user is received; a preset template engine is called to generate a cluster image deployment file based on configuration parameters and the cluster image deployment type, thereby realizing personalized cluster image deployment and improving the flexibility of cluster image deployment.
[0144] The cluster image construction method provided in the embodiments of this specification can be applied to the cloud platform. The cloud platform can be oriented to different first users, so that the first users can better integrate products, services and cloud platforms, and use cloud-native capabilities to improve the efficiency and user experience of software applications in delivery, deployment and subsequent management. The second user can manage the various software services it subscribes to through the cloud platform. Therefore, the cloud platform can provide a cloud-native service delivery platform and connector for the first user and the second user, providing more efficient, convenient and secure software services and usage experience.
[0145] See also Figure 4 , Figure 4 A process flow chart of a cluster image building method provided by an embodiment of this specification is shown. The cluster image building method specifically includes a first user creation service and a second user deployment service. The overall processes of the two are introduced below:
[0146] The first user creates a service: After the cluster image construction starts, the cluster image is built according to the target resource file of the target application provided by the first user. Specifically, when the first user creates a service, he can choose to build it through Helm chart or YAML. The former requires uploading a Helm chart file, and the latter requires providing a YAML deployment file. While receiving the target resource file sent by the first user, the configurable parameters sent by the first user can also be received. Then, the parameter format of the configurable parameters is verified, and when the format verification of the configurable parameters passes, the workflow is started in parallel. It should be noted that this workflow is the key to realizing the automated construction of cluster images. It is mainly responsible for the automated generation and uploading of cluster image configuration files (Generate And Upload Kubefile Activity), the construction and packaging storage of cluster images (Generate And Upload Kubefile Activity), and the monitoring of cluster image status information (Wait PackageFinish Activity):
[0147] Automatic generation and upload of cluster image configuration files: Call the preset template engine to generate cluster image configuration files based on configurable parameters and target resource files, and upload the cluster image configuration files to the storage unit;
[0148] Cluster image construction and packaging storage: call the cluster development tool to build the cluster image based on the cluster image configuration file; call the cluster image packaging tool to store the cluster image in the storage unit;
[0149] Cluster image status information monitoring: obtain cluster image building status information; determine whether the cluster image building status information is normal. If so, continue to build the cluster image and end the building when the cluster image building is completed; if not, display the exception log, return the error information, and end the building.
[0150] Second user deployment service: obtain the configuration parameters and cluster image deployment type sent by the second user for the target resource file; call the preset template engine to generate a cluster image deployment file based on the configuration parameters and cluster image deployment type; call the cluster image packaging tool to deploy the cluster image to the user cluster of the second user based on the cluster image deployment file. It should be noted that after the cluster image deployment file is generated, the second user can also use the cluster image packaging tool based on the cluster image deployment file to deploy the cluster image to the user cluster based on the deployment guide.
[0151] The solution of the embodiments of this specification provides an automated, efficient and convenient "out-of-the-box" cluster image construction solution. The first user can automatically and efficiently deliver his software application to the second user, and the second user only needs to configure the parameters and then complete the one-click deployment of the software in one stop according to the deployment instructions, which greatly improves the overall cluster delivery experience. In addition, the second user can also copy the cluster image and cluster image configuration file to the local to achieve offline deployment.
[0152] Corresponding to the above-mentioned cluster image construction method embodiment, this specification also provides a cluster image construction device embodiment, Figure 5 FIG. 1 shows a schematic diagram of a cluster mirroring device provided by an embodiment of the present specification. Figure 5 As shown, the device comprises:
[0153] A receiving module 502 is configured to receive a target resource file and configurable parameters corresponding to the target resource file sent by a first user;
[0154] The first generating module 504 is configured to call a preset template engine to generate a cluster image configuration file based on the configurable parameters and the target resource file when the format check of the configurable parameters passes;
[0155] A construction module 506 is configured to call a cluster development tool to construct a cluster image based on a cluster image configuration file;
[0156] The storage module 508 is configured to call a cluster image packaging tool to store the cluster image in a storage unit.
[0157] Optionally, the target resource file carries cluster version information; the first generation module 504 is further configured to call a preset template engine to generate a cluster image configuration file based on the configurable parameters, the target resource file and the cluster version information when the format check of the configurable parameters passes.
[0158] Optionally, the target resource file carries the cluster image building type; the first generation module 504 is further configured to call the preset template engine to generate a cluster image configuration file based on the configurable parameters, the target resource file and the cluster image building type when the format check of the configurable parameters passes.
[0159] Optionally, the device further includes: a determination module configured to obtain a preset parameter format; and when the parameter format of the configurable parameter is the same as the preset parameter format, determine that the format check of the configurable parameter passes.
[0160] Optionally, the first generation module 504 is further configured to obtain a pre-configured template running file when the format check of the configurable parameters passes, wherein the template running file is used to guide the preset template engine to generate a cluster image configuration file; call the preset template engine to generate a cluster image configuration file based on the template running file, configurable parameters and target resource file.
[0161] Optionally, the device also includes: an upload module, configured to upload the cluster image configuration file to the storage unit; a construction module 506, further configured to call the cluster development tool, create and run a cluster image construction task in the cluster based on the address parameters of the storage unit, and obtain a cluster image, wherein the address parameters are used to obtain the cluster image configuration file.
[0162] Optionally, the construction module 506 is further configured to obtain cluster image construction status information; when the cluster image construction status information is normal and incomplete, call the cluster development tool to build the cluster image based on the cluster image configuration file.
[0163] Optionally, the device further includes: a display module configured to display an abnormal log when the cluster image building status information is abnormal; and to display a deployment file package corresponding to the cluster image when the cluster image building status information is normal and completed.
[0164] Optionally, the storage module 508 is further configured to obtain an installation package of a cluster image packaging tool; call the cluster image packaging tool to package the cluster image and the installation package to obtain a cluster image storage file; and store the cluster image storage file in a storage unit.
[0165] By applying the solution of the embodiments of this specification, the cluster image is built in one stop based on the target resource file and configurable parameters sent by the first user, so that the first user can automatically and efficiently deliver resources to other users only by defining configurable parameters, thereby realizing automated full-link construction of the cluster image and improving the overall delivery efficiency of the cluster and user experience.
[0166] The above is a schematic scheme of a cluster image building device of this embodiment. It should be noted that the technical scheme of the cluster image building device and the technical scheme of the above cluster image building method belong to the same concept, and the details not described in detail in the technical scheme of the cluster image building device can be referred to the description of the technical scheme of the above cluster image building method.
[0167] Corresponding to the above-mentioned cluster image deployment method embodiment, this specification also provides a cluster image deployment device embodiment, Figure 6 FIG. 1 shows a schematic diagram of a cluster mirror deployment device provided by an embodiment of the present specification. Figure 6 As shown, the device comprises:
[0168] The acquisition module 602 is configured to acquire the configuration parameters sent by the second user for the target resource file;
[0169] The second generation module 604 is configured to call a preset template engine and generate a cluster image deployment file based on configuration parameters;
[0170] The deployment module 606 is configured to call the cluster image packaging tool and deploy the cluster image to the user cluster of the second user based on the cluster image deployment file, wherein the cluster image is constructed by the cluster development tool based on the cluster image configuration file, and the cluster image configuration file is obtained by the preset template engine based on the configurable parameters and target resource files sent by the first user when the format verification of the configurable parameters is passed.
[0171] Optionally, the device also includes: a type receiving module configured to receive the cluster image deployment type sent by the second user; a second generating module 604, further configured to call a preset template engine to generate a cluster image deployment file based on configuration parameters and the cluster image deployment type.
[0172] By applying the solution of the embodiments of this specification, since the cluster image is constructed in one stop based on the target resource file and configurable parameters sent by the first user, the first user can automatically and efficiently deliver resources to the second user only by defining the configurable parameters, and the second user only needs to define the configuration parameters to deploy the cluster image to the user cluster, thereby realizing automated full-link construction of the cluster image and improving the efficiency of the overall cluster delivery and user experience. In addition, the second user can copy the cluster image and the cluster image configuration file to the local computer to realize offline deployment, making the cluster image deployment more flexible and convenient.
[0173] The above is a schematic scheme of a cluster image deployment device of this embodiment. It should be noted that the technical scheme of the cluster image deployment device and the technical scheme of the cluster image deployment method described above are of the same concept, and the details not described in detail in the technical scheme of the cluster image deployment device can be found in the description of the technical scheme of the cluster image deployment method described above.
[0174] Figure 7 The block diagram of a computing device provided by an embodiment of the present specification is shown. The components of the computing device 700 include but are not limited to a memory 710 and a processor 720. The processor 720 is connected to the memory 710 via a bus 730, and the database 750 is used to store data.
[0175] The computing device 700 also includes an access device 740 that enables the computing device 700 to communicate via one or more networks 760. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 740 may include one or more of any type of network interface (e.g., a network interface card (NIC)) of wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a world interoperability for microwave access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, and the like.
[0176] In one embodiment of the present specification, the above components of the computing device 700 and Figure 7 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Figure 7 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.
[0177] The computing device 700 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or a personal computer (PC). The computing device 700 may also be a mobile or stationary server.
[0178] The processor 720 is used to execute the following computer executable instructions, which, when executed by the processor, implement the steps of the above-mentioned cluster image building method or cluster image deployment method.
[0179] The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the above-mentioned cluster image construction method and cluster image deployment method belong to the same concept, and the details not described in detail in the technical scheme of the computing device can be referred to the description of the technical scheme of the above-mentioned cluster image construction method or cluster image deployment method.
[0180] An embodiment of the present specification further provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the steps of the above-mentioned cluster image building method or cluster image deployment method.
[0181] The above is a schematic scheme of a computer-readable storage medium of this embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the cluster image construction method and the cluster image deployment method belong to the same concept, and the details not described in detail in the technical scheme of the storage medium can be referred to the description of the technical scheme of the cluster image construction method or the cluster image deployment method.
[0182] An embodiment of the present specification further provides a computer program, wherein when the computer program is executed in a computer, the computer is caused to execute the steps of the above-mentioned cluster image building method or cluster image deployment method.
[0183] The above is a schematic scheme of a computer program of this embodiment. It should be noted that the technical scheme of the computer program and the technical scheme of the above-mentioned cluster image construction method and cluster image deployment method belong to the same concept, and the details not described in detail in the technical scheme of the computer program can be referred to the description of the technical scheme of the above-mentioned cluster image construction method or cluster image deployment method.
[0184] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0185] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0186] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of this specification are not limited by the order of the actions described, because according to the embodiments of this specification, some 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 preferred embodiments, and the actions and modules involved are not necessarily required by the embodiments of this specification.
[0187] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0188] The preferred embodiments of this specification disclosed above are only used to help explain this specification. The optional embodiments do not describe all the details in detail, nor do they limit the invention to only the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the embodiments of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the embodiments of this specification, so that technicians in the relevant technical field can well understand and use this specification. This specification is only limited by the claims and their full scope and equivalents.
Claims
1. A cluster image building method, include: Receiving a target resource file and configurable parameters corresponding to the target resource file sent by a first user; In the case where the format check of the configurable parameters passes, calling a preset template engine to generate a cluster image configuration file based on the configurable parameters and the target resource file; Invoke a cluster development tool to build a cluster image based on the cluster image configuration file; A cluster image packaging tool is called to store the cluster image in a storage unit.
2. According to the method of claim 1, the target resource file carries cluster version information; In the case where the format check of the configurable parameters passes, calling a preset template engine to generate a cluster image configuration file based on the configurable parameters and the target resource file, include: When the format check of the configurable parameters passes, a preset template engine is called to generate a cluster image configuration file based on the configurable parameters, the target resource file and the cluster version information.
3. According to the method of claim 1, the target resource file carries a cluster image building type; In the case where the format check of the configurable parameters passes, calling a preset template engine to generate a cluster image configuration file based on the configurable parameters and the target resource file, include: When the format check of the configurable parameters passes, a preset template engine is called to generate a cluster image configuration file based on the configurable parameters, the target resource file and the cluster image building type.
4. The method according to claim 1, wherein before calling a preset template engine to generate a cluster image configuration file based on the configurable parameters and the target resource file when the format check of the configurable parameters passes, include: Get the preset parameter format; In a case where the parameter format of the configurable parameter is the same as the preset parameter format, it is determined that the format check of the configurable parameter passes.
5. The method according to claim 1, wherein when the format check of the configurable parameters passes, calling a preset template engine, and generating a cluster image configuration file based on the configurable parameters and the target resource file, include: When the format check of the configurable parameters passes, obtaining a pre-configured template running file, wherein the template running file is used to guide the preset template engine to generate a cluster image configuration file; The preset template engine is called to generate a cluster image configuration file based on the template operation file, the configurable parameters and the target resource file.
6. The method according to claim 1, in the case where the format check of the configurable parameters passes, calling a preset template engine, generating a cluster image configuration file based on the configurable parameters and the target resource file, and further include: Uploading the cluster mirroring configuration file to a storage unit; The calling of the cluster development tool to build a cluster image based on the cluster image configuration file includes: A cluster development tool is called to create and run a cluster image building task in the cluster based on the address parameter of the storage unit to obtain a cluster image, wherein the address parameter is used to obtain the cluster image configuration file.
7. The method according to claim 1, wherein the cluster development tool is called to build a cluster image based on the cluster image configuration file. include: Get cluster image building status information; When the cluster image building status information is normal and incomplete, a cluster development tool is called to build a cluster image based on the cluster image configuration file.
8. The method according to claim 7, after obtaining the cluster image building status information, further include: When the cluster image building status information is abnormal, display the abnormal log; When the cluster image building status information is normal and completed, the deployment file package corresponding to the cluster image is displayed.
9. The method according to claim 1, wherein the cluster image packaging tool is called to store the cluster image in a storage unit. include: Obtain the installation package of the cluster image packaging tool; Calling the cluster image packaging tool to package the cluster image and the installation package to obtain a cluster image storage file; The cluster image storage file is stored in a storage unit.
10. A cluster image deployment method, include: Obtaining configuration parameters sent by the second user for the target resource file; Calling a preset template engine to generate a cluster image deployment file based on the configuration parameters; Call a cluster image packaging tool, and deploy the cluster image to the user cluster of the second user based on the cluster image deployment file, wherein the cluster image is constructed by the cluster development tool based on the cluster image configuration file, and the cluster image configuration file is obtained by a preset template engine based on the configurable parameters sent by the first user and the target resource file when the format verification of the configurable parameters passes.
11. The method according to claim 10, after obtaining the configuration parameters sent by the second user for the target resource file, further include: Receiving the cluster image deployment type sent by the second user; The calling of the preset template engine to generate a cluster image deployment file based on the configuration parameters includes: A preset template engine is called to generate a cluster image deployment file based on the configuration parameters and the cluster image deployment type.
12. A computing device, include: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the method described in any one of claims 1 to 9 or any one of claims 10 to 11 are implemented.
13. A computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the steps of the method described in any one of claims 1 to 9 or any one of claims 10 to 11.