A container cluster deployment platform
Obtaining information and configuring the mirror version through the container cluster deployment platform solves the problem of poor compatibility of virtualization technology and achieving efficient and compatible application deployment.
Patent Information
- Application Number
- CN202111244592.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-26
- Publication Date
- 2025-08-05
- Estimated Expiration
- 2041-10-26
AI Technical Summary
Existing virtualization technologies cannot achieve compatibility in the operating environment, causing application problems to affect the entire environment and increase deployment time and labor costs.
Through the container cluster deployment platform, obtain container cluster information, determine the target image, and perform advanced configuration based on the image version and running network, and add application instances for deployment.
Reduces deployment time and labor costs, improves compatibility of the operation environment, and facilitates continuous integration.
Smart Images

Figure CN114138402B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a container cluster deployment platform. Background Art
[0002] Currently, virtualization technology is widely known and is a widely recognized way of sharing server resources. It can achieve dynamic allocation of IT resources and thus improve the resource utilization of IT resources.
[0003] However, virtualization technology cannot achieve compatibility with the operating environment. When a problem occurs in an application during operation, the entire operating environment will be affected, causing great inconvenience and wasting a lot of manpower. Therefore, in order to be compatible with the operating environment and reduce the time and manpower costs of deployment, the present invention provides a container cluster deployment platform. Summary of the Invention
[0004] The present invention provides a container cluster deployment platform, which is used to determine the target image by reading the container cluster information, thereby implementing advanced configuration according to the image version of the target image and the running network, and then adding application instances for deployment. This method not only reduces the time and labor costs of deployment, but also has stronger compatibility, which is more conducive to continuous integration.
[0005] The present invention provides a container cluster deployment platform, comprising:
[0006] An information acquisition module is used to obtain container cluster information and determine the target image based on the container cluster information;
[0007] A configuration module is used to obtain the image version of the target image and the operating network of the application container, and perform advanced configuration on the application container to determine the operating environment;
[0008] The deployment module is used to determine the number of application instances to be added in the operating environment, configure the application based on the number of application instances to be added, and complete the container cluster deployment based on the configuration result.
[0009] Preferably, in a container cluster deployment platform, the configuration module further includes:
[0010] The advanced configuration includes: setting environment variables, service ports and service status;
[0011] Wherein, before adding the service status, it includes: creating a storage volume.
[0012] Preferably, a container cluster deployment platform creates a storage volume, comprising: determining a mount path according to a first selection box, and creating a storage volume according to the mount path based on a second selection box.
[0013] Preferably, in a container cluster deployment platform, the information acquisition module includes:
[0014] A container cluster acquisition unit, configured to acquire a container cluster in a target project and read container information of N containers in the container cluster;
[0015] an information processing unit, configured to process the container information of the N containers respectively to determine N container characteristic values of the N containers;
[0016] An evaluation unit is configured to evaluate the N containers one by one based on the N container characteristic values, obtain N evaluation results, and upload the N evaluation results to a cloud platform for display.
[0017] Preferably, in a container cluster deployment platform, the information acquisition module further includes:
[0018] a reading unit, configured to read cluster information of the container cluster, determine an information identifier of the container cluster based on the cluster information, and generate an information matching instruction based on the information identifier;
[0019] An instruction reading unit, configured to read the information matching instruction, determine the instruction type of the information matching instruction and the instruction operation logic of the information matching instruction;
[0020] The protocol generation unit is used to obtain permission information of the image repository;
[0021] The protocol generation unit is further configured to determine a protocol generation format based on an instruction type of the information matching instruction, and determine protocol content based on permission information of the image repository and the instruction operation logic;
[0022] The protocol generation unit is further configured to generate an interactive protocol based on the protocol generation format and the protocol content;
[0023] A target image acquisition unit is configured to establish an interactive link between the container cluster and the image repository based on the interactive protocol, match the container cluster with images in the image repository based on the interactive link and in accordance with the information matching instruction, and determine a target image based on the matching result.
[0024] Preferably, in a container cluster deployment platform, the target image acquisition unit further includes:
[0025] An image file information acquisition unit, configured to acquire a file ciphertext of the target image and determine an image private key of the target image based on the file ciphertext;
[0026] A verification information acquisition unit, configured to decrypt the file ciphertext based on the image private key and determine a verification code for verifying the target image;
[0027] A verification unit, configured to perform security verification on the target image based on the verification code;
[0028] When the file ciphertext corresponds to the verification code, the target image passes the security verification, and the target image is received;
[0029] When the file ciphertext does not correspond to the verification code, the target image fails the security verification and is rejected.
[0030] Preferably, in a container cluster deployment platform, the configuration module includes:
[0031] a container information acquiring unit, configured to read basic information of the application container, wherein the basic information includes a service type and a service function of the application container;
[0032] The container information acquisition unit is further configured to determine a characteristic value in the basic information of the application container according to the reading result, and determine a target extraction factor based on the characteristic value;
[0033] a matching unit, configured to match a target image version number corresponding to the target extraction factor in a preset number database, and simultaneously select an available target operating network name from a preset available network candidate list, wherein the service type and service function correspond to the image version;
[0034] A configuration window unit, configured to select the image version and available operating network corresponding to the target image version number and the target operating network name in the target location area based on a preset configuration window;
[0035] A configuration window unit is configured to obtain network attributes of the running network and determine environment variables of the application container during service operation based on the network attributes, wherein the environment variables include a corresponding environment name to be modified and a corresponding value;
[0036] The configuration window unit is further used to perform corresponding addition, modification or deletion operations on the corresponding environment name and the corresponding value based on the environment variable to complete the setting of the environment variable, and trigger the port configuration unit after completing the setting of the environment variable;
[0037] a port configuration unit, configured to determine, based on the result of setting the environment variable, an available service port and a service status in the application container, and determine, based on the service status, whether the currently available service port is compatible with the application container service operation, wherein the available service port is at least one;
[0038] If the currently available service port is compatible with the application container service operation, completing the configuration of the available service port;
[0039] Otherwise, based on the basic information of the application container, select a target protocol corresponding to the available port, and complete the configuration of the available service port based on the target protocol;
[0040] An advanced configuration unit is used to verify the configured image version, environment variables, and port configuration based on a preset verification method to determine whether the application container can operate normally;
[0041] If the application container can run normally, determine that the advanced configuration of the application container is completed, and obtain the operating environment of the application container;
[0042] Otherwise, it is determined that a vulnerability occurs in the advanced configuration of the application container, and the advanced configuration of the application container is reconfigured until the application container can run normally.
[0043] Preferably, a container cluster deployment platform, an advanced configuration unit, includes:
[0044] A verification unit, configured to perform a trial run on the application container based on the configured image version, environment variables, and port, and obtain running data of the application container during the trial run;
[0045] The verification unit is configured to compare the operation data with preset standard operation data to determine whether the operation of the application container is normal;
[0046] If normal, the configuration is sent to the management terminal and normal operation can be carried out;
[0047] Otherwise, determining the difference between the operating data and the preset standard operating data;
[0048] a fault finding unit, configured to obtain attribute information of the difference data, and determine a fault configuration item corresponding to the difference data based on the attribute information, wherein the fault configuration item is at least one of an image version, an environment variable, and a port configuration;
[0049] A troubleshooting unit is configured to determine a fault type of the fault configuration item based on the difference data, match a target troubleshooting solution from preset troubleshooting solutions based on the fault type, and reconfigure the fault configuration item based on the target troubleshooting solution until it is determined that the application container is operating normally.
[0050] Preferably, a container cluster deployment platform, the deployment module includes:
[0051] a space reading unit, configured to read the number of application instances to be added, estimate a first space memory of the application instances to be added based on the number of application instances to be added, and simultaneously read a second space memory available for storage in the current application container;
[0052] a comparing unit, configured to compare the first space memory with the second space memory to determine whether the application container can accommodate all application instances to be added;
[0053] When the first space memory is less than or equal to the second space memory, it is determined that the application container can accommodate all application instances to be added;
[0054] Otherwise, it is determined that the application container cannot accommodate all the application instances to be added;
[0055] an expansion unit, configured to determine a target space memory that needs to be expanded for the application container based on the first space memory and the second space memory when the application container cannot accommodate the application instance to be added;
[0056] The expansion unit is configured to obtain identification information of the application container and generate an expansion request for the application container based on the identification information of the application container and the target space memory;
[0057] The expansion unit is further configured to create an expansion interface for the application container based on the expansion request, define the expansion interface, and call target parameters based on the expansion request using the defined expansion interface, wherein the target parameters include identification information of the application container and the target memory space;
[0058] The expansion unit is further configured to expand the application container based on the expansion interface and the target parameter to obtain a target application container;
[0059] An instance deployment unit is used to configure the application instance in the target application container and obtain the instance memory of the configured application instance. At the same time, a deployment layer is established according to the instance memory, and the application instance is stored in the target application container based on the deployment layer to complete the container cluster deployment.
[0060] Preferably, in a container cluster deployment platform, the deployment module further includes:
[0061] An operation unit, configured to conduct a trial operation on the platform after the container cluster is deployed and determine platform operation parameters;
[0062] An analysis unit, configured to analyze the platform operating parameters and generate analysis results, and verify the analysis results in a verification model to determine whether the container cluster deployment meets the standards;
[0063] When the verification result is output as y, it is determined that the container cluster deployment meets the standard;
[0064] When the verification result output is n, it is determined that the container cluster deployment does not meet the standard, and at the same time, the application instance is redeployed.
[0065] Other features and advantages of the present invention will be described in the following description, and in part will become apparent from the description, or will be understood by practicing the present invention. The purposes and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description, claims, and drawings.
[0066] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0068] Figure 1 This is a structural diagram of a container cluster deployment platform according to an embodiment of the present invention;
[0069] Figure 2 This is a structural diagram of an information acquisition module in a container cluster deployment platform according to an embodiment of the present invention;
[0070] Figure 3 This is a structural diagram of a configuration module in a container cluster deployment platform according to an embodiment of the present invention. DETAILED DESCRIPTION
[0071] The preferred embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.
[0072] Example 1:
[0073] This embodiment provides a container cluster deployment platform, such as Figure 1 Shown, including:
[0074] An information acquisition module is used to obtain container cluster information and determine the target image based on the container cluster information;
[0075] A configuration module is used to obtain the image version of the target image and the operating network of the application container, and perform advanced configuration on the application container to determine the operating environment;
[0076] The deployment module is used to determine the number of application instances to be added in the operating environment, configure the application based on the number of application instances to be added, and complete the container cluster deployment based on the configuration result.
[0077] In this embodiment, the container cluster can be a technology that abstracts multiple physical machines into a logically single scheduling entity, providing resource scheduling, service discovery, elastic scaling, load balancing and other functions for containerized applications, while monitoring and managing the entire server cluster to provide high-quality, uninterrupted application services.
[0078] In this embodiment, the target image may be a file or installation package suitable for deploying an application when the container cluster is deployed.
[0079] In this embodiment, the image may generally be an operating system file, an application's own files, and software packages and library files that the application depends on.
[0080] In this embodiment, the advanced configuration includes: setting environment variables, service ports and service status, wherein before adding the service status, it includes: creating a storage volume;
[0081] In this embodiment, creating a storage volume includes: determining a mount path according to a first selection box, and creating a storage volume according to the mount path based on a second selection box, wherein the first selection box and the second selection box are in a setting window that pops up when configuring the application container.
[0082] In this embodiment, the mount path may be a file path used by the operating system to make computer files and directories on a storage device accessible to users through the computer's file system.
[0083] The beneficial effect of the above technical solution is: by reading the container cluster information to determine the target image, and then implement advanced configuration according to the image version of the target image and the running network, and then add application instances for deployment. This method not only reduces the time and labor costs of deployment, but also has stronger compatibility, which is more conducive to continuous integration.
[0084] Example 2:
[0085] Based on the above embodiment 1, this embodiment provides a container cluster deployment platform, such as Figure 2 As shown, the information acquisition module includes:
[0086] A container cluster acquisition unit, configured to acquire a container cluster in a target project and read container information of N containers in the container cluster;
[0087] an information processing unit, configured to process the container information of the N containers respectively to determine N container characteristic values of the N containers;
[0088] An evaluation unit is configured to evaluate the N containers one by one based on the N container characteristic values, obtain N evaluation results, and upload the N evaluation results to a cloud platform for display.
[0089] In this embodiment, the target project refers to the event corresponding to the application container, and a project contains multiple application containers.
[0090] In this embodiment, the container information may be the name of the container, the type of the container, etc.
[0091] In this embodiment, the information processing may include operations such as cleaning and screening the container information.
[0092] In this embodiment, the container characteristic value refers to a key data segment that can represent the attributes of the application container.
[0093] The beneficial effect of the above technical solution is: by obtaining the container information of the container and performing corresponding processing and evaluation on the container information, it is convenient to accurately obtain the image file corresponding to the application container based on the evaluation results, thereby facilitating the implementation of advanced configuration of the application container.
[0094] Example 3:
[0095] Based on the above embodiment 1, this embodiment provides a container cluster deployment platform, wherein the information acquisition module further includes:
[0096] a reading unit, configured to read cluster information of the container cluster, determine an information identifier of the container cluster based on the cluster information, and generate an information matching instruction based on the information identifier;
[0097] An instruction reading unit, configured to read the information matching instruction, determine the instruction type of the information matching instruction and the instruction operation logic of the information matching instruction;
[0098] The protocol generation unit is used to obtain permission information of the image repository;
[0099] The protocol generation unit is further configured to determine a protocol generation format based on an instruction type of the information matching instruction, and determine protocol content based on permission information of the image repository and the instruction operation logic;
[0100] The protocol generation unit is further configured to generate an interactive protocol based on the protocol generation format and the protocol content;
[0101] A target image acquisition unit is configured to establish an interactive link between the container cluster and the image repository based on the interactive protocol, match the container cluster with images in the image repository based on the interactive link and in accordance with the information matching instruction, and determine a target image based on the matching result.
[0102] In this embodiment, the information identifier may be a label used to mark the container information, and the information type or category of the current container information may be determined quickly and accurately through the label.
[0103] In this embodiment, the instruction operation logic may be the execution order of the matching involved in the instruction, etc.
[0104] In this embodiment, the permission information is used to determine the user's access rights.
[0105] In this embodiment, the interaction protocol may be a bridge used to connect the container cluster and the image repository, and the interaction link between the container cluster and the image repository may be established through the interaction protocol.
[0106] In this embodiment, the target image may be one or more of an operating system file that matches the application container information, a file of the application itself, a software package and a library file that the application depends on.
[0107] The beneficial effect of the above technical solution is: by connecting the container cluster with the image repository, it is convenient to accurately obtain the required image files based on the basic information of the container, and accurately obtain the images required for container configuration, thereby improving the accuracy and efficiency of application container configuration, reducing the time and labor costs of deployment, and having stronger compatibility, which is more conducive to continuous integration.
[0108] Example 4:
[0109] Based on the above embodiment 3, this embodiment provides a container cluster deployment platform, wherein the target image acquisition unit further includes:
[0110] An image file information acquisition unit, configured to acquire a file ciphertext of the target image and determine an image private key of the target image based on the file ciphertext;
[0111] A verification information acquisition unit, configured to decrypt the file ciphertext based on the image private key and determine a verification code for verifying the target image;
[0112] A verification unit, configured to perform security verification on the target image based on the verification code;
[0113] When the file ciphertext corresponds to the verification code, the target image passes the security verification, and the target image is received;
[0114] When the file ciphertext does not correspond to the verification code, the target image fails the security verification and is rejected.
[0115] In this embodiment, the file ciphertext may be an encrypted file obtained by encrypting the image file with a key.
[0116] In this embodiment, the mirrored private key may be an encryption or decryption rule corresponding to encrypting or decrypting a file.
[0117] The beneficial effect of the above technical solution is: by performing security verification on the obtained target image, it is further determined that the corresponding image file is obtained safely and accurately, thereby facilitating the advanced configuration of the application container and facilitating the deployment of the container, saving a lot of manpower and material resources.
[0118] Example 5:
[0119] Based on the above embodiment 1, this embodiment provides a container cluster deployment platform, such as Figure 3 As shown, the configuration module includes:
[0120] a container information acquiring unit, configured to read basic information of the application container, wherein the basic information includes a service type and a service function of the application container;
[0121] The container information acquisition unit is further configured to determine a characteristic value in the basic information of the application container according to the reading result, and determine a target extraction factor based on the characteristic value;
[0122] a matching unit, configured to match a target image version number corresponding to the target extraction factor in a preset number database, and simultaneously select an available target operating network name from a preset available network candidate list, wherein the service type and service function correspond to the image version;
[0123] A configuration window unit, configured to select the image version and available operating network corresponding to the target image version number and the target operating network name in the target location area based on a preset configuration window;
[0124] A configuration window unit is configured to obtain network attributes of the running network and determine environment variables of the application container during service operation based on the network attributes, wherein the environment variables include a corresponding environment name to be modified and a corresponding value;
[0125] The configuration window unit is further used to perform corresponding addition, modification or deletion operations on the corresponding environment name and the corresponding value based on the environment variable to complete the setting of the environment variable, and trigger the port configuration unit after completing the setting of the environment variable;
[0126] a port configuration unit, configured to determine, based on the result of setting the environment variable, an available service port and a service status in the application container, and determine, based on the service status, whether the currently available service port is compatible with the application container service operation, wherein the available service port is at least one;
[0127] If the currently available service port is compatible with the application container service operation, completing the configuration of the available service port;
[0128] Otherwise, based on the basic information of the application container, select a target protocol corresponding to the available port, and complete the configuration of the available service port based on the target protocol;
[0129] An advanced configuration unit is used to verify the configured image version, environment variables, and port configuration based on a preset verification method to determine whether the application container can operate normally;
[0130] If the application container can run normally, determine that the advanced configuration of the application container is completed, and obtain the operating environment of the application container;
[0131] Otherwise, it is determined that a vulnerability occurs in the advanced configuration of the application container, and the advanced configuration of the application container is reconfigured until the application container can run normally.
[0132] In this embodiment, the basic information of the application container may include the type, name, size of the application container, the service type corresponding to the container, the implemented functions, and the like.
[0133] In this embodiment, the characteristic value in the basic information may be a specific value corresponding to the key data segment in the application container information, for example, an average value, an extreme value, etc.
[0134] In this embodiment, the target extraction factor may be a reference for measuring the use of the mirror version.
[0135] In this embodiment, the preset number database is set in advance and has multiple mirror versions stored therein.
[0136] In this embodiment, the target image version number may be a number assigned to each image, and the version information of the current image can be accurately determined by the number.
[0137] In this embodiment, the preset available network candidate list is set in advance and stores multiple available network names internally.
[0138] In this embodiment, the target running network name refers to a network name that is suitable for the current application container and is one of the preset available network candidate lists.
[0139] In this embodiment, the preset configuration window is set in advance.
[0140] In this embodiment, the target location area refers to the selection box set for the image version and the network name in the preset configuration window.
[0141] In this embodiment, the network attributes may be the operating speed of the network and the setting parameters that need to be met for the network to operate.
[0142] The beneficial effects of the above technical solution are: by determining the image version, environment variables and port service status required by the application container during the configuration process, accurate configuration of the three is achieved, ensuring that when the container cluster is deployed, the application container meets the conditions required for deployment, and providing a guarantee for ensuring the smooth completion of the deployment of the container cluster. At the same time, during the scheduling process, the configuration results are verified to ensure the rigor of the configuration, reduce the time and labor costs of deployment, and have stronger compatibility, which is more conducive to continuous integration.
[0143] Example 6:
[0144] Based on the above embodiment 5, this embodiment provides a container cluster deployment platform, and an advanced configuration unit includes:
[0145] A verification unit, configured to perform a trial run on the application container based on the configured image version, environment variables, and port, and obtain running data of the application container during the trial run;
[0146] The verification unit is configured to compare the operation data with preset standard operation data to determine whether the operation of the application container is normal;
[0147] If normal, the configuration is sent to the management terminal and normal operation can be carried out;
[0148] Otherwise, determining the difference between the operating data and the preset standard operating data;
[0149] a fault finding unit, configured to obtain attribute information of the difference data, and determine a fault configuration item corresponding to the difference data based on the attribute information, wherein the fault configuration item is at least one of an image version, an environment variable, and a port configuration;
[0150] A troubleshooting unit is configured to determine a fault type of the fault configuration item based on the difference data, match a target troubleshooting solution from preset troubleshooting solutions based on the fault type, and reconfigure the fault configuration item based on the target troubleshooting solution until it is determined that the application container is operating normally.
[0151] In this embodiment, the trial run may be a simulated run of the configured application container, the purpose of which is to verify whether the configured application container can operate normally.
[0152] In this embodiment, the preset standard operating data is set in advance and is used to compare with the operating data of the application container, so as to determine whether the application container can operate normally.
[0153] In this embodiment, the difference data may be the difference between the operating data and the preset standard operating data.
[0154] In this embodiment, the fault configuration item may be one or more of an image version, an environment variable, and a port.
[0155] In this embodiment, the preset troubleshooting solution is set in advance.
[0156] In this embodiment, the target troubleshooting solution may be a troubleshooting solution suitable for solving the current fault type.
[0157] The beneficial effects of the above technical solution are: by verifying the configuration results of the application container, it is ensured that the configuration of the application container is sufficiently accurate. At the same time, when problems occur in the configuration, the fault is found and solved in time, which not only reduces the time and labor costs of deployment, but also has stronger compatibility, which is more conducive to continuous integration.
[0158] Example 7:
[0159] Based on Example 1, this embodiment provides a container cluster deployment platform, wherein the deployment module includes:
[0160] a space reading unit, configured to read the number of application instances to be added, estimate a first space memory of the application instances to be added based on the number of application instances to be added, and simultaneously read a second space memory available for storage in the current application container;
[0161] a comparing unit, configured to compare the first space memory with the second space memory to determine whether the application container can accommodate all application instances to be added;
[0162] When the first space memory is less than or equal to the second space memory, it is determined that the application container can accommodate all application instances to be added;
[0163] Otherwise, it is determined that the application container cannot accommodate all the application instances to be added;
[0164] an expansion unit, configured to determine a target space memory that needs to be expanded for the application container based on the first space memory and the second space memory when the application container cannot accommodate the application instance to be added;
[0165] The expansion unit is configured to obtain identification information of the application container and generate an expansion request for the application container based on the identification information of the application container and the target space memory;
[0166] The expansion unit is further configured to create an expansion interface for the application container based on the expansion request, define the expansion interface, and call target parameters based on the expansion request using the defined expansion interface, wherein the target parameters include identification information of the application container and the target memory space;
[0167] The expansion unit is further configured to expand the application container based on the expansion interface and the target parameter to obtain a target application container;
[0168] An instance deployment unit is used to configure the application instance in the target application container and obtain the instance memory of the configured application instance. At the same time, a deployment layer is established according to the instance memory, and the application instance is stored in the target application container based on the deployment layer to complete the container cluster deployment.
[0169] In this embodiment, the first space memory may be the memory occupied by the application instance to be added.
[0170] In this embodiment, the second space memory may be the remaining storable memory of the application container.
[0171] In this embodiment, the target space memory may be the memory that the application memory needs to expand when the first space memory is larger than the second space memory, wherein the target space memory = the first space memory - the second space memory.
[0172] In this embodiment, the capacity expansion request may be a request for expanding the capacity of the application container, and the request content includes identification information of the application container and target space memory.
[0173] In this embodiment, the identification information of the application container may be information for identifying the application container and used to distinguish different application containers.
[0174] In this embodiment, a deployment layer is established according to the instance memory, and the application instance is stored in the target application container based on the deployment layer; for example,
[0175] The instance memory of application instance 1 is 10 kB, the instance memory of application instance 2 is 15 kB, the instance memory of application instance 3 is 23 kB, the instance memory of application instance 4 is 28 kB, and the instance memory of application instance 5 is 35 kB.
[0176] The first deployment tier uses an instance memory range of 1-20kB, the second deployment tier uses an instance memory range of 21-30kB, and the third deployment tier uses an instance memory range of 31-40kB.
[0177] Application instance 1 and application instance 2 are placed in the first deployment layer, application instance 3 and application instance 4 are placed in the second deployment layer, and application instance 5 is placed in the third deployment layer.
[0178] The beneficial effects of the above technical solution are: by determining the number of application instances to be added, the first space memory occupied by the application instances to be added is determined; by comparing the first space memory with the second space memory, it is helpful to determine whether the application container needs to be expanded; and when expansion is required, the application container is accurately expanded through the expansion request to realize the storage of application instances, thereby improving the storage efficiency of the application container; by building a deployment layer to store application instances, the orderliness of application instance deployment is improved, thereby greatly improving the efficiency of container cluster application deployment.
[0179] Example 8:
[0180] Based on Example 1, this embodiment provides a container cluster deployment platform, wherein the deployment module further includes:
[0181] An operation unit, configured to conduct a trial operation on the platform after the container cluster is deployed and determine platform operation parameters;
[0182] An analysis unit, configured to analyze the platform operating parameters and generate analysis results, and verify the analysis results in a verification model to determine whether the container cluster deployment meets the standards;
[0183] When the verification result is output as y, it is determined that the container cluster deployment meets the standard;
[0184] When the verification result output is n, it is determined that the container cluster deployment does not meet the standard, and at the same time, the application instance is redeployed.
[0185] In this embodiment, the platform operating parameters may be parameters such as the platform's operating time and operating speed after the container cluster is deployed.
[0186] In this embodiment, analyzing the platform operation parameters may be analyzing the operation time, operation speed, etc. of the platform operation parameters to determine the comprehensive performance of the platform operation.
[0187] In this embodiment, the verification model can be used to verify the analysis results to determine whether the container cluster deployment meets the standards.
[0188] In this embodiment, the output result of the verification model includes y and n.
[0189] The beneficial effect of the above technical solution is: by trial running the platform for container cluster deployment, it is helpful to determine the platform operating parameters, which is conducive to judging whether the container cluster deployment meets the standards. This method realizes the standardization detection of container cluster deployment, thereby improving the effectiveness of container cluster deployment.
[0190] Example 9:
[0191] Based on Example 8, the analysis unit further includes:
[0192] An operating parameter reading unit, configured to read the operating parameters and determine the operating speed of the platform and the number of users accessing the operating platform;
[0193] a first calculation unit, configured to calculate the operation efficiency of the platform based on the operation speed V and the number of users accessing the operation platform;
[0194]
[0195] Wherein, η represents the operating efficiency of the operating platform; T represents the benchmark access time specified by the application container; m represents the total number of users accessing the operating platform; S i Indicates the amount of resources accessed by the i-th user; represents the total number of visits to the operating platform; ξ represents the data access factor, which is generally set to 0.2*10 -3 ;
[0196] an efficiency comparison unit, configured to compare the operating efficiency of the platform with a benchmark operating efficiency to determine whether the operating efficiency of the platform is qualified;
[0197] When the operating efficiency of the platform is equal to or greater than the benchmark operating efficiency, the operating efficiency of the platform is determined to be qualified;
[0198] Otherwise, the operating efficiency of the platform is determined to be unqualified;
[0199] a second calculation unit, configured to calculate a correction coefficient for the platform according to the operating efficiency of the platform and the benchmark operating efficiency when the operating efficiency of the platform is unqualified;
[0200]
[0201] Wherein, λ represents the correction coefficient for the operating platform; μ represents the correction factor, and its value range is (0.01, 0.03); η1 represents the benchmark operating efficiency; R1 represents the weight of the image in the operation of the platform; s1 represents the adaptability of the image to the application container when the application container is running; R2 represents the weight of the environment variable in the operation of the platform; s2 represents the adaptability of the environment variable to the application container when the application container is running; R3 represents the weight of the port in the operation of the platform; s3 represents the adaptability of the port to the application container when the application container is running;
[0202] Based on the correction coefficient of the platform, the image, environment variables and the port in the application container are corrected, and the operating efficiency of the platform is improved based on the correction result.
[0203] In this embodiment, the access factor may be a factor that affects the operating efficiency of the platform when a user accesses the platform.
[0204] In this embodiment, the benchmark operating efficiency may be set in advance and used to detect whether the platform operating efficiency is qualified.
[0205] In this embodiment, the correction factor may be an influencing factor when correcting an image, an environment variable, or a port.
[0206] The beneficial effects of the above technical solution are: by accurately calculating the operating efficiency of the platform and comparing the operating efficiency with the benchmark operating efficiency, it is determined whether the platform operating efficiency is qualified. At the same time, when it is unqualified, the correction coefficient is accurately calculated to correct the image, environment variables and ports in the application container, thereby indirectly improving the operating efficiency of the platform. This method greatly improves the detection of the platform operating efficiency after the container cluster is deployed, improves the rationality of the container cluster deployment, and saves time costs.
[0207] Obviously, those skilled in the art may make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if such changes and modifications fall within the scope of the claims and their equivalents, the present invention is intended to include such changes and modifications.
Claims
1. A container cluster deployment platform, characterized in that: include: An information acquisition module is used to obtain container cluster information and determine the target image based on the container cluster information; A configuration module is used to obtain the image version of the target image and the operating network of the application container, and perform advanced configuration on the application container to determine the operating environment; A deployment module, configured to determine the number of application instances to be added in the operating environment, configure the application based on the number of application instances to be added, and complete container cluster deployment based on the configuration result; The deployment module further includes: An operation unit, configured to conduct a trial operation on the platform after the container cluster is deployed and determine platform operation parameters; An analysis unit, configured to analyze the platform operating parameters and generate analysis results, and verify the analysis results in a verification model to determine whether the container cluster deployment meets the standards; When the verification result is output as y, it is determined that the container cluster deployment meets the standard; When the verification result output is n, it is determined that the container cluster deployment does not meet the standard, and the application instance is redeployed; The analysis unit further includes: An operating parameter reading unit, configured to read the operating parameters and determine the operating speed of the platform and the number of users accessing the operating platform; a first calculation unit, configured to calculate the operation efficiency of the platform based on the operation speed V and the number of users accessing the operation platform; Wherein, η represents the operating efficiency of the operating platform; T represents the benchmark access time specified by the application container; m represents the total number of users accessing the operating platform; S i Indicates the amount of resources accessed by the i-th user; represents the total number of visits to the operating platform; ξ represents the data access factor, which is 0.2*10 -3 ; an efficiency comparison unit, configured to compare the operating efficiency of the platform with a benchmark operating efficiency to determine whether the operating efficiency of the platform is qualified; When the operating efficiency of the platform is equal to or greater than the benchmark operating efficiency, the operating efficiency of the platform is determined to be qualified; Otherwise, the operating efficiency of the platform is determined to be unqualified; a second calculation unit, configured to calculate a correction coefficient for the platform according to the operating efficiency of the platform and the benchmark operating efficiency when the operating efficiency of the platform is unqualified; Wherein, λ represents the correction coefficient for the operating platform; μ represents the correction factor, and its value range is (0.01, 0.03); η1 represents the benchmark operating efficiency; R1 represents the weight of the image in the operation of the platform; s1 represents the adaptability of the image to the application container when the application container is running; R2 represents the weight of the environment variable in the operation of the platform; s2 represents the adaptability of the environment variable to the application container when the application container is running; R3 represents the weight of the port in the operation of the platform; s3 represents the adaptability of the port to the application container when the application container is running; Based on the correction coefficient of the platform, the image, environment variables and the port in the application container are corrected, and the operating efficiency of the platform is improved based on the correction result.
2. A container cluster deployment platform according to claim 1, characterized in that: The configuration module further includes: The advanced configuration includes: setting environment variables, service ports and service status; Wherein, before adding the service status, it includes: creating a storage volume.
3. A container cluster deployment platform according to claim 2, characterized in that: Creating a storage volume includes: determining a mount path according to a first selection box, and creating a storage volume according to the mount path based on a second selection box.
4. A container cluster deployment platform according to claim 1, characterized in that: The information acquisition module includes: A container cluster acquisition unit, configured to acquire a container cluster in a target project and read container information of N containers in the container cluster; an information processing unit, configured to process the container information of the N containers respectively to determine N container characteristic values of the N containers; An evaluation unit is configured to evaluate the N containers one by one based on the N container characteristic values, obtain N evaluation results, and upload the N evaluation results to a cloud platform for display.
5. A container cluster deployment platform according to claim 1, characterized in that: The information acquisition module further includes: a reading unit, configured to read cluster information of the container cluster, determine an information identifier of the container cluster based on the cluster information, and generate an information matching instruction based on the information identifier; An instruction reading unit, configured to read the information matching instruction, determine the instruction type of the information matching instruction and the instruction operation logic of the information matching instruction; The protocol generation unit is used to obtain permission information of the image repository; The protocol generation unit is further configured to determine a protocol generation format based on an instruction type of the information matching instruction, and determine protocol content based on permission information of the image repository and the instruction operation logic; The protocol generation unit is further configured to generate an interactive protocol based on the protocol generation format and the protocol content; A target image acquisition unit is configured to establish an interactive link between the container cluster and the image repository based on the interactive protocol, match the container cluster with images in the image repository based on the interactive link and in accordance with the information matching instruction, and determine a target image based on the matching result.
6. A container cluster deployment platform according to claim 5, characterized in that: The target image acquisition unit further includes: An image file information acquisition unit, configured to acquire a file ciphertext of the target image and determine an image private key of the target image based on the file ciphertext; A verification information acquisition unit, configured to decrypt the file ciphertext based on the image private key and determine a verification code for verifying the target image; A verification unit, configured to perform security verification on the target image based on the verification code; When the file ciphertext corresponds to the verification code, the target image passes the security verification, and the target image is received; When the file ciphertext does not correspond to the verification code, the target image fails the security verification and is rejected.
7. A container cluster deployment platform according to claim 1, characterized in that: The configuration module includes: a container information acquiring unit, configured to read basic information of the application container, wherein the basic information includes a service type and a service function of the application container; The container information acquisition unit is further configured to determine a characteristic value in the basic information of the application container according to the reading result, and determine a target extraction factor based on the characteristic value; a matching unit, configured to match a target image version number corresponding to the target extraction factor in a preset number database, and simultaneously select an available target operating network name from a preset available network candidate list, wherein the service type and service function correspond to the image version; A configuration window unit, configured to select the image version and available operating network corresponding to the target image version number and the target operating network name in the target location area based on a preset configuration window; A configuration window unit is configured to obtain network attributes of the running network and determine environment variables of the application container during service operation based on the network attributes, wherein the environment variables include a corresponding environment name to be modified and a corresponding value; The configuration window unit is further used to perform corresponding addition, modification or deletion operations on the corresponding environment name and the corresponding value based on the environment variable to complete the setting of the environment variable, and trigger the port configuration unit after completing the setting of the environment variable; a port configuration unit, configured to determine, based on the result of setting the environment variable, an available service port and a service status in the application container, and determine, based on the service status, whether the currently available service port is compatible with the application container service operation, wherein the available service port is at least one; If the currently available service port is compatible with the application container service operation, completing the configuration of the available service port; Otherwise, based on the basic information of the application container, select a target protocol corresponding to the available service port, and complete the configuration of the available service port based on the target protocol; An advanced configuration unit is used to verify the configured image version, environment variables, and port configuration based on a preset verification method to determine whether the application container can operate normally; If the application container can run normally, determine that the advanced configuration of the application container is completed, and obtain the operating environment of the application container; Otherwise, it is determined that a vulnerability occurs in the advanced configuration of the application container, and the advanced configuration of the application container is reconfigured until the application container can run normally.
8. A container cluster deployment platform according to claim 7, characterized in that: Advanced configuration units, including: A verification unit, configured to perform a trial run on the application container based on the configured image version, environment variables, and port, and obtain running data of the application container during the trial run; The verification unit is configured to compare the operation data with preset standard operation data to determine whether the operation of the application container is normal; If normal, the configuration is sent to the management terminal and normal operation can be carried out; Otherwise, determining the difference between the operating data and the preset standard operating data; a fault finding unit, configured to obtain attribute information of the difference data, and determine a fault configuration item corresponding to the difference data based on the attribute information, wherein the fault configuration item is at least one of an image version, an environment variable, and a port configuration; A troubleshooting unit is configured to determine a fault type of the fault configuration item based on the difference data, match a target troubleshooting solution from preset troubleshooting solutions based on the fault type, and reconfigure the fault configuration item based on the target troubleshooting solution until it is determined that the application container is operating normally.
9. A container cluster deployment platform according to claim 1, characterized in that: The deployment module includes: a space reading unit, configured to read the number of application instances to be added, estimate a first space memory of the application instances to be added based on the number of application instances to be added, and simultaneously read a second space memory available for storage in the current application container; a comparing unit, configured to compare the first space memory with the second space memory to determine whether the application container can accommodate all application instances to be added; When the first space memory is less than or equal to the second space memory, it is determined that the application container can accommodate all application instances to be added; Otherwise, it is determined that the application container cannot accommodate all the application instances to be added; an expansion unit, configured to determine a target space memory that needs to be expanded for the application container based on the first space memory and the second space memory when the application container cannot accommodate the application instance to be added; The expansion unit is configured to obtain identification information of the application container and generate an expansion request for the application container based on the identification information of the application container and the target space memory; The expansion unit is further configured to create an expansion interface for the application container based on the expansion request, define the expansion interface, and call target parameters based on the expansion request using the defined expansion interface, wherein the target parameters include identification information of the application container and the target space memory; The expansion unit is further configured to expand the application container based on the expansion interface and the target parameter to obtain a target application container; An instance deployment unit is used to configure the application instance in the target application container and obtain the instance memory of the configured application instance. At the same time, a deployment layer is established according to the instance memory, and the application instance is stored in the target application container based on the deployment layer to complete the container cluster deployment.
Citation Information
Patent Citations
A method and device for deploying a database cluster
CN109814881A