Tenant deployment method and device, electronic equipment and computer program product

By deploying correspondingly in the K8s cluster according to the tenant type, the problem of unreasonable and inefficient deployment of service resources in a multi-tenant environment is solved, and dynamic optimization of resource configuration and intelligent tenant management are realized.

CN119718632APending Publication Date: 2025-03-28INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411729401.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-28
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

In a multi-tenant environment, it is difficult for the existing technology to achieve reasonable isolation of service resources, resulting in unreasonable deployment and inefficient deployment.

Method used

By responding to the tenant creation request of the tenant to be deployed, the tenant type is determined based on the tenant creation request, divided into the first type and the second type, and corresponding deployment is carried out in the K8s cluster according to the tenant type. The first type of tenant is deployed to the virtual cluster, and the second type of tenant is deployed to the work business node of the entity cluster.

Benefits of technology

It realizes dynamic optimized allocation of resources and intelligent management of tenants in a multi-tenant environment, improves resource utilization and management flexibility, and solves the problems of unreasonable deployment and low efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119718632A_ABST
    Figure CN119718632A_ABST
Patent Text Reader

Abstract

The invention discloses a tenant deployment method and device, electronic equipment and a computer program product. The method relates to the field of financial science and technology, and comprises the steps that a tenant creation request of a tenant to be deployed is responded, the tenant type is determined according to the tenant creation request, the tenant type comprises a first type and a second type, and the level of the first type is lower than that of the second type; under the condition that the tenant type of the to-be-deployed tenant is a first type, if the target virtual cluster does not exist in the entity cluster, creating the target virtual cluster, and if the target virtual cluster exists in the entity cluster, deploying the to-be-deployed tenant to the target virtual cluster; and when the tenant type of the to-be-deployed tenant is the second type, deploying the to-be-deployed tenant to a working service node of the entity cluster. According to the method and the device, the problems of unreasonable deployment and low deployment efficiency during isolated deployment of service resources for multiple tenants in the prior art are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of financial technology, and in particular, to a tenant deployment method, device, electronic device, and computer program product. Background Art

[0002] In the cloud-native computing framework, Kubernetes (also known as K8s) clusters are widely used as container orchestration and management tools for resource management and application deployment in multi-tenant environments. In related technologies, in order to improve resource utilization and simplify management, multiple tenants are arranged in the same physical machine or the same K8s cluster, and logical isolation is achieved by creating different namespaces. Namespaces are a resource organization and quota management mechanism provided by the cluster, which can limit the use and access scope of resources.

[0003] However, relying solely on the logical isolation of namespaces cannot fully meet the needs of multi-tenant scenarios. Specifically, tenants are limited by the resources within the namespace and cannot directly access and manage cluster-level resources, such as working nodes, storage nodes, and network resources, which leads to resource access restrictions and reduces tenants' self-management capabilities and flexibility. In the same physical cluster, the loads of different tenants may affect each other, especially when resources are tight. High-load tenants will occupy the resources of other tenants and affect their service quality. At the same time, the architecture of shared clusters may also lead to security vulnerabilities, such as data leakage or abuse of permissions between namespaces. Tenants cannot independently upgrade or adjust the K8s cluster environment. All changes need to be made by cluster administrators, which increases the complexity of management and response time. Under namespace isolation, the operation and maintenance of multi-tenant environments is still relatively complex, especially when monitoring resources and troubleshooting problems. It is necessary to determine the resource usage of multiple namespaces from a global perspective, resulting in high requirements for operation and maintenance technology.

[0004] There are problems of unreasonable deployment and low deployment efficiency when isolating service resources for multiple tenants in related technologies, and no effective solution has been proposed yet. Summary of the invention

[0005] The main purpose of this application is to provide a tenant deployment method, device, electronic device and computer program product to solve the problems of unreasonable deployment and low deployment efficiency when isolating service resources for multiple tenants in related technologies.

[0006] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a method for deploying a tenant is provided. The method comprises: responding to a tenant creation request of a tenant to be deployed, determining a tenant type according to the tenant creation request, wherein the tenant type comprises a first type and a second type, and the level of the first type is lower than the level of the second type; when the tenant type of the tenant to be deployed is the first type, if the target virtual cluster does not exist in the physical cluster, then creating the target virtual cluster, and if the target virtual cluster exists in the physical cluster, deploying the tenant to be deployed to the target virtual cluster; when the tenant type of the tenant to be deployed is the second type, deploying the tenant to be deployed to the working service node of the physical cluster.

[0007] Further, determining the tenant type according to the tenant creation request includes: extracting a tenant name identifier and running memory data from the tenant creation request; when the tenant name identifier is a first identifier, determining the tenant type of the tenant to be deployed as the second type, wherein the first identifier is used to characterize the tenant level of the tenant to be deployed; when the tenant name identifier is not the first identifier, judging whether the running memory data is greater than a container specification threshold; when the running memory data is greater than the container specification threshold, determining the tenant type of the tenant to be deployed as the second type; when the running memory data is less than or equal to the container specification threshold, determining the tenant type of the tenant to be deployed as the first type.

[0008] Furthermore, in the case that the tenant type of the tenant to be deployed is the second type, deploying the tenant to be deployed to the working business node of the entity cluster includes: obtaining M working business nodes of the entity cluster, where M is a positive integer; obtaining a scheduling logic strategy, and selecting a first target working business node from the M working business nodes according to the scheduling logic strategy, wherein the scheduling logic strategy refers to a scheduling strategy for deploying tenants on different working business nodes; and deploying the tenant to be deployed to the first target working business node.

[0009] Furthermore, after the tenant type of the tenant to be deployed is the first type, the method also includes: obtaining a name keyword of the tenant to be deployed; obtaining N virtual clusters of the physical cluster, and obtaining a virtual cluster name of each virtual cluster, where N is a positive integer; if the name keyword exists in the N virtual cluster names, determining that the target virtual cluster exists in the physical cluster; if the name keyword does not exist in the N virtual cluster names, determining that the target virtual cluster does not exist in the physical cluster.

[0010] Furthermore, before deploying the tenant to be deployed to the target virtual cluster, the method also includes: calling a preset interface of the target virtual cluster through a communication protocol, and writing query data to a storage node of the target virtual cluster based on the preset interface, wherein the storage node of the target virtual cluster is used to store source data of the target virtual cluster; querying whether the query data exists in the target virtual cluster, and if the query data exists in the target virtual cluster, determining that the target virtual cluster is available, and executing the step of deploying the tenant to be deployed to the target virtual cluster.

[0011] Furthermore, after querying whether the query data exists in the target virtual cluster, the method also includes: if the query data does not exist in the target virtual cluster, determining that the target virtual cluster is unavailable; obtaining configuration information of the target virtual cluster, creating a virtual cluster according to the configuration information, and obtaining a newly added virtual cluster; obtaining Y working business nodes of the newly added virtual cluster, wherein Y is a positive integer; selecting a second target working business node from the Y working business nodes according to a scheduling logic strategy, wherein the scheduling logic strategy refers to a scheduling strategy for deploying tenants on different working business nodes; and deploying the tenant to be deployed to the second target working business node.

[0012] Furthermore, deploying the tenant to be deployed to the target virtual cluster includes: obtaining blank working nodes and storage nodes in the physical cluster, wherein the storage nodes of the physical cluster are used to store source data of the physical cluster; after deleting the configuration file associated with the blank working node in the storage node, managing the blank working node to the target virtual cluster; and deploying the tenant to be deployed to the blank working node.

[0013] In order to achieve the above-mentioned purpose, according to another aspect of the present application, a tenant deployment device is provided. The device includes: a response unit, which is used to respond to a tenant creation request of a tenant to be deployed, and determine the tenant type according to the tenant creation request, wherein the tenant type includes a first type and a second type, and the level of the first type is lower than the level of the second type; a creation unit, which is used to create the target virtual cluster if the target virtual cluster does not exist in the physical cluster when the tenant type of the tenant to be deployed is the first type, and to deploy the tenant to be deployed to the target virtual cluster if the target virtual cluster exists in the physical cluster; a first deployment unit, which is used to deploy the tenant to be deployed to the working business node of the physical cluster when the tenant type of the tenant to be deployed is the second type.

[0014] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is further provided, wherein the computer-readable storage medium includes a stored executable program, wherein when the executable program is running, the device where the computer-readable storage medium is located is controlled to execute any of the above-mentioned tenant deployment methods.

[0015] According to another aspect of an embodiment of the present invention, there is also provided an electronic device, comprising one or more processors and a memory, wherein the memory stores an executable program, and the processor is used to run the program, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement any one of the above-mentioned tenant deployment methods.

[0016] According to another aspect of an embodiment of the present invention, a computer program product is further provided. The computer program product includes a computer program, wherein when the computer program is executed by a processor, any one of the above-mentioned tenant deployment methods is implemented.

[0017] In an embodiment of the present application, a tenant deployment method is adopted, by extracting the tenant name identifier and the running memory data from the tenant creation request; when the tenant name identifier is the first identifier, the tenant type of the tenant to be deployed is determined to be the second type, wherein the first identifier is used to characterize the tenant level of the tenant to be deployed; when the tenant name identifier is not the first identifier, it is determined whether the running memory data is greater than the container specification threshold; when the running memory data is greater than the container specification threshold, the tenant type of the tenant to be deployed is determined to be the second type; when the running memory data is less than or equal to the container specification threshold, the tenant type of the tenant to be deployed is determined to be the first type, thereby achieving the purpose of dynamic optimization configuration of resources and intelligent management of tenants, thereby realizing the technical effect of reasonably isolating service resources for multiple tenants, and further solving the problems of unreasonable deployment and low deployment efficiency when isolated deployment of service resources for multiple tenants. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0019] Figure 1 A hardware structure block diagram of a computer terminal (or mobile device) for implementing a tenant deployment method;

[0020] Figure 2 is a flowchart of a tenant deployment method provided according to an embodiment of the present application;

[0021] Figure 3is a flowchart of an optional tenant deployment method provided according to an embodiment of the present application;

[0022] Figure 4 It is a schematic diagram of the deployment principle of a virtual cluster provided according to an embodiment of the present application;

[0023] Figure 5 is a schematic diagram of a tenant deployment device provided according to an embodiment of the present application;

[0024] Figure 6 It is a structural block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0025] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0026] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0027] It should be noted that the relevant information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for display, data for analysis, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. For example, an interface is set up between this system and the relevant user or organization. Before obtaining relevant information, it is necessary to send an acquisition request to the aforementioned user or organization through the interface, and obtain relevant information after receiving the consent information fed back by the aforementioned user or organization.

[0028] It should be noted that the collected information used in this application is information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with the relevant laws, regulations and standards of the relevant regions, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse to use it.

[0029] Example 1

[0030] According to an embodiment of the present application, a method embodiment of tenant deployment is also provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0031] The method embodiment provided in the first embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 It is a hardware structure diagram of a computer terminal (or mobile device) for implementing a tenant deployment method, such as Figure 1 As shown, the computer terminal 10 (or mobile device) may include one or more ( Figure 1 102a, 102b, ..., 102n are used to illustrate) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU (Microcontroller Unit) or a programmable logic device FPGA (Field-Programmable Gate Array)), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of a BUS (Binary Unit System) bus), a network interface, a keyboard, a cursor control device, a power supply and / or a camera. A person skilled in the art can understand that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.

[0032] It should be noted that the one or more processors 102 and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 10 (or mobile device). As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).

[0033] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the tenant deployment method in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, the above-mentioned tenant deployment method is realized. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0034] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC) and a network interface, which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0035] The display may be, for example, a touch screen liquid crystal display that enables a user to interact with a user interface of the computer terminal 10 (or mobile device).

[0036] Under the above operating environment, this application provides Figure 2 The deployment method for the tenant shown. Figure 2 is a flowchart of a tenant deployment method provided according to an embodiment of the present application, such as Figure 2 As shown, the method comprises the following steps:

[0037] Step S201, responding to a tenant creation request of a tenant to be deployed, and determining a tenant type according to the tenant creation request, wherein the tenant type includes a first type and a second type, and the level of the first type is lower than the level of the second type.

[0038] Specifically, in order to achieve resource optimization allocation and security assurance for K8s clusters in a multi-tenant environment, when multiple tenants to be deployed need to be divided, each tenant to be deployed can generate a tenant creation request based on the name of the tenant, the specification requirements of the tenant container (i.e., resource requirements), and other information. After receiving a tenant creation request of a tenant to be deployed, the relevant information of the above tenant can be extracted from the request, and then the tenant type of the tenant can be determined based on this information. For example, when the tenant to be deployed is a second-type tenant, the tenant can be a key business application, a high-traffic service, or a tenant with strict requirements for security and performance. Their containers require more computing resources (such as memory and network bandwidth), faster network connections, and more stable work node support; when the tenant to be deployed is a first-type tenant, the tenant has relatively low requirements for performance and availability, and can be a tenant that is adapted to low sensitivity, low resource requirements, or testing and development services. Then, the tenant can be deployed on a work node with more flexible resources. In this way, while meeting the needs of tenants at different levels, efficient resource utilization and security management can be achieved, providing a more refined and intelligent resource allocation and management method for K8s clusters in a multi-tenant environment.

[0039] Step S202: when the tenant type of the tenant to be deployed is the first type, if the target virtual cluster does not exist in the physical cluster, create a target virtual cluster; if the target virtual cluster exists in the physical cluster, deploy the tenant to be deployed to the target virtual cluster.

[0040] Specifically, the physical cluster can be a physical K8s cluster, and the target virtual cluster can be a virtual cluster that can deploy the tenants to be deployed. Since each virtual cluster in the physical cluster is associated with different keywords, each keyword corresponds to a different tenant. Therefore, in order to provide the above-mentioned tenants to be deployed with an operating environment that is isolated from the physical cluster, has sufficient resources, and is safe and controllable, it is first determined whether there is a virtual cluster in the physical cluster that can accommodate the tenants to be deployed. When the target virtual cluster does not exist in the physical cluster, the network of the physical cluster can be re-planned to ensure that the target virtual cluster has an independent network plane to avoid network conflicts with other tenants or physical clusters. At this time, the network isolation and deployment of the target virtual cluster can be achieved by setting network policies, creating network namespaces, or using software-defined network technology.

[0041] When the target virtual cluster exists in the physical cluster, you first need to check the current resource usage of the target virtual cluster to ensure that there are enough resources to meet the needs of the new tenants, for example, check the computing resources, network bandwidth and storage space of the target virtual cluster to maintain the high performance and stability of the cluster. Then deploy the container instances of the tenants to be deployed to the working nodes of the target virtual cluster to achieve complete resource isolation between tenants and improve service security and performance assurance.

[0042] Step S203: When the tenant type of the tenant to be deployed is the second type, the tenant to be deployed is deployed to a working service node of the entity cluster.

[0043] Specifically, in order to ensure the rationality and fairness of resource allocation, for the second type of tenants to be deployed, the container instance of the tenant to be deployed can be directly deployed in the physical cluster, using the high performance and high reliability of the physical cluster to ensure the normal operation of key businesses.

[0044] When selecting the working business node of the entity cluster and deploying tenants, a dedicated namespace can be created for the tenant on the selected working business node to achieve logical isolation of resources, ensure the independence and controllability of tenant services, and instantiate containers in the namespace. According to the tenant's resource requirements and configuration information, the container's operating parameters are automatically adjusted, such as CPU (Central Processing Unit) restrictions, memory quotas, network access rules, etc., and then the container instance is registered with the core service discovery mechanism of the entity cluster, so that other services can discover and call the tenant's services through the internal DNS (Domain Name System: Domain Name System) of the entity cluster or the service grid, thereby achieving resource optimization configuration and efficient management in a multi-tenant environment.

[0045] The tenant deployment method provided in the embodiment of the present application responds to the tenant creation request of the tenant to be deployed, and determines the tenant type according to the tenant creation request, wherein the tenant type includes a first type and a second type, and the level of the first type is lower than the level of the second type; when the tenant type of the tenant to be deployed is the first type, if the target virtual cluster does not exist in the physical cluster, the target virtual cluster is created, and if the target virtual cluster exists in the physical cluster, the tenant to be deployed is deployed to the target virtual cluster; when the tenant type of the tenant to be deployed is the second type, the tenant to be deployed is deployed to the working business node of the physical cluster, which solves the problem of unreasonable deployment and low deployment efficiency when isolating service resources for multiple tenants in the related art, and determines the tenant type according to the tenant creation request of the tenant, and then determines the running cluster according to the tenant type. When the tenant type is the first type, the tenant to be deployed is run to the virtual cluster, and when the tenant type is the second type, the tenant to be deployed is run to the working business node of the physical cluster, thereby achieving the effect of reasonably isolating service resources for multiple tenants.

[0046] Optionally, in the tenant deployment method provided in the embodiment of the present application, determining the tenant type according to the tenant creation request includes: extracting the tenant name identifier and the running memory data from the tenant creation request; when the tenant name identifier is the first identifier, determining the tenant type of the tenant to be deployed as the second type, wherein the first identifier is used to characterize the tenant level of the tenant to be deployed; when the tenant name identifier is not the first identifier, judging whether the running memory data is greater than the container specification threshold; when the running memory data is greater than the container specification threshold, determining the tenant type of the tenant to be deployed as the second type; when the running memory data is less than or equal to the container specification threshold, determining the tenant type of the tenant to be deployed as the first type.

[0047] Specifically, before managing the tenant to be deployed, it is necessary to determine the tenant type of the tenant to be deployed. The tenant name identifier is usually named in a specific format. At this time, the tenant name identifier representing the tenant level of the tenant to be deployed can be parsed according to the tenant creation request. The first identifier can indicate that the tenant level is "important level". When the tenant name identifier is the first identifier, it indicates that the tenant to be deployed is a key business application, a high-traffic service, or a tenant with strict requirements on security and performance, which means that the tenant type of the tenant to be deployed is the second type. For example, the first identifier representing the "important level" is represented as "A", that is, when the tenant name of a tenant to be deployed is XXX-A-01, the tenant name identifier is "A", and the tenant type of the tenant is the second type. At this time, due to the nature of the business, data sensitivity or service requirements, tenants of this type are given priority to be deployed on the physical cluster to enjoy a higher level of resource guarantee and performance stability, ensuring the stability and high availability of key businesses.

[0048] Furthermore, when the tenant name identifier is not the first identifier, that is, the tenant is a non-important tenant, it is necessary to further determine whether the tenant's running memory data exceeds the preset container specification threshold. For example, the container specification threshold is 8C16G, that is, 8 CPU cores and 16GB of memory. This threshold can distinguish tenants that require higher resource configuration. When the tenant name identifier of the tenant to be deployed is not the first identifier, but the tenant's running memory data is greater than the container specification threshold, it indicates that the container instance of the tenant to be deployed needs to consume a large amount of memory resources, which may cause performance pressure on other services of the entity cluster. At this time, it can be determined as an important tenant that needs to be deployed in the entity cluster based on resource requirements to ensure the performance and stability of its services, that is, the tenant type of the above tenant is determined as "second type".

[0049] When the running memory data of the tenant to be deployed is less than or equal to the container specification threshold, it indicates that the tenant can be deployed on the virtual cluster, and isolation from other tenants is achieved through the virtual cluster, providing the required high-performance memory resources for the container instance while avoiding affecting the overall stability of the physical cluster. This embodiment accurately determines the type of tenant to be deployed based on the tenant name identifier and running memory data, provides corresponding resource allocation and management strategies for different tenants, realizes the personalization and efficiency of tenant services, and also ensures the stable operation and optimal resource utilization of the physical cluster and the target virtual cluster.

[0050] Optionally, in the tenant deployment method provided in an embodiment of the present application, when the tenant type of the tenant to be deployed is the second type, deploying the tenant to be deployed to the working business node of the entity cluster includes: obtaining M working business nodes of the entity cluster, where M is a positive integer; obtaining a scheduling logic strategy, and selecting a first target working business node from the M working business nodes according to the scheduling logic strategy, where the scheduling logic strategy refers to a scheduling strategy for deploying tenants on different working business nodes; and deploying the tenant to be deployed to the first target working business node.

[0051] Specifically, when a tenant to be deployed, which is represented as an important tenant, needs to be deployed in a physical cluster, multiple working business nodes existing in the physical cluster can be identified first, where these working business nodes are used to run containers with high reliability and performance requirements, namely, important tenant containers. Then, the above working business nodes are selected according to the preset scheduling logic strategy. For example, the scheduling logic strategy can be to select working business nodes with low resource memory usage, select idle working business nodes, select working business nodes with low network latency, select working business nodes without faults or about to crash, etc., and then based on different strategies, it can be ensured that each tenant container can be deployed in the best computing environment, thereby providing the best service experience.

[0052] When using the scheduling logic strategy to select the working business node, different working business nodes can be scored according to the strategy, and then the working business node with a high score is selected as the first target working business node, and finally the tenant to be deployed is deployed on the above first target working business node. It should be noted that the deployment process includes but is not limited to: creating container instances, configuring the network and storage resources required for the container, setting the operating parameters of the container, monitoring the startup and running status of the container, etc. Through this process, important tenants can obtain the best operating environment provided by the physical cluster to ensure the high performance and high reliability of their services.

[0053] In addition, the scheduling logic strategy of the entity cluster also has the ability to adjust dynamically, that is, when the resource status or health status of the first target working business node changes, it can reselect the working business node based on the latest scheduling logic strategy, or automatically migrate important tenant containers to other more suitable nodes when necessary to cope with emergencies and ensure service continuity. This embodiment can ensure that important tenants obtain a stable, efficient, and secure operating environment by selecting working business nodes using scheduling logic strategies, while also improving the resource utilization efficiency and management flexibility of the entity cluster.

[0054] In order to determine whether there is a virtual cluster in the physical cluster that can accommodate the tenant, optionally, in the tenant deployment method provided in the embodiment of the present application, after the tenant type of the tenant to be deployed is the first type, the method also includes: obtaining a name keyword of the tenant to be deployed; obtaining N virtual clusters of the physical cluster, and obtaining a virtual cluster name of each virtual cluster, where N is a positive integer; if the name keyword exists in the N virtual cluster names, determining that a target virtual cluster exists in the physical cluster; if the name keyword does not exist in the N virtual cluster names, determining that the target virtual cluster does not exist in the physical cluster.

[0055] Specifically, when the tenant to be deployed is a tenant of a non-important level, the name keyword of the tenant can be first extracted according to the tenant creation request. For example, if the tenant name is "ExampleCorp-B-001", the "ExampleCorp" in the name can be used as a name keyword, and then the virtual cluster related to the tenant can be located based on the name keyword.

[0056] Furthermore, after obtaining the virtual cluster names of all virtual clusters in the physical cluster, the name keyword is matched and compared with the virtual cluster name. At this time, it can be based on string search or regular expression matching to adapt to name keywords of different types and formats. When there is a virtual cluster name that is consistent with the name keyword, it indicates that the target virtual cluster exists in the physical cluster, and the container of the tenant to be deployed can be directly deployed in the target virtual cluster without repeatedly creating the cluster, saving resources and time; on the contrary, if the name keyword does not exist in the virtual cluster name, it is determined that the target virtual cluster does not exist in the physical cluster. At this time, it is necessary to create a new virtual cluster based on the resource requirements and configuration parameters of the tenant to be deployed, to ensure that the tenant container can run in an environment that is isolated from the physical cluster and has limited resources, while meeting the complete isolation requirements of data between tenants. This embodiment can achieve efficient management and resource allocation of virtual clusters by selecting virtual clusters using name keywords, and ensure service quality and data isolation in a multi-tenant environment.

[0057] In order to ensure that the target virtual cluster can safely and stably carry the containers of the tenants to be deployed, optionally, in the tenant deployment method provided in the embodiment of the present application, before deploying the tenants to be deployed to the target virtual cluster, the method also includes: calling a preset interface of the target virtual cluster through a communication protocol, and writing query data to the storage nodes of the target virtual cluster based on the preset interface, wherein the storage nodes of the target virtual cluster are used to store source data of the target virtual cluster; querying whether there is query data in the target virtual cluster, and if there is query data in the target virtual cluster, determining that the target virtual cluster is available, and executing the step of deploying the tenants to be deployed to the target virtual cluster.

[0058] Specifically, after determining the target virtual cluster, it is also necessary to verify the availability of the virtual cluster. First, the preset interface of the target virtual cluster can be called through a standard communication protocol (such as HTTP (Hypertext Transfer Protocol) protocol, HTTPS (HyperText Transfer Protocol Secure) protocol, etc.), wherein the preset interface can be the kube-apiserver interface of the cluster, which can receive and process API requests from the client, including operations such as creating, reading, updating, and deleting resources, wherein an API request refers to a request sent to the server by calling an API (Application Programming Interface). Then, based on the interface, query data is sent to the storage node of the target virtual cluster to evaluate the real-time status and responsiveness of the cluster, that is, to test whether the storage node of the target virtual cluster can receive and store data normally, and also provide benchmark data for subsequent query tests, wherein the storage node can be an ETCD (Etcd Distributed Reliable Key-Value Store) node, which can store all resource data of the cluster.

[0059] Further, according to the query operation, check whether there is previously written query data in the storage node of the target virtual cluster. It should be noted that this process can also be completed by calling the preset interface (kube-apiserver interface), that is, sending a query request to read the previously written test data. If the storage node successfully returns the previously written data, it indicates that the data writing and reading functions are normal, the storage node of the target virtual cluster is in a healthy state, and the storage, network, and computing resources of the target virtual cluster are in normal working state, which can meet the operating requirements of the tenant container to be deployed. At this time, the step of deploying the tenant to be deployed to the virtual cluster can be executed.

[0060] It should be noted that the deployment process for tenants includes creating container instances, configuring container network policies, setting container operating parameters, starting the container operating environment, etc. According to the specific needs of the tenants to be deployed and the current resource situation of the target virtual cluster, the most suitable working node can be selected for container deployment, and the startup and running status of the container can be monitored to ensure its normal operation. This embodiment ensures the health status and resource availability of the virtual cluster by using query data to detect the target virtual cluster, which can improve the efficiency and security of container deployment and provide non-critical tenants with the same level of service quality as the physical cluster.

[0061] Optionally, in the tenant deployment method provided in an embodiment of the present application, after querying whether there is query data in the target virtual cluster, the method also includes: if there is no query data in the target virtual cluster, determining that the target virtual cluster is unavailable; obtaining configuration information of the target virtual cluster, creating a virtual cluster according to the configuration information, and obtaining a newly added virtual cluster; obtaining Y working business nodes of the newly added virtual cluster, where Y is a positive integer; selecting a second target working business node from the Y working business nodes according to a scheduling logic strategy, where the scheduling logic strategy refers to a scheduling strategy for deploying tenants on different working business nodes; and deploying the tenant to be deployed to the second target working business node.

[0062] Specifically, when querying whether there is written query data in the storage node of the target virtual cluster, and the storage node does not return the previously written data, it indicates that there is an abnormality in the target virtual cluster, and the target virtual cluster is unavailable and cannot meet the normal operation requirements of the tenant container to be deployed, so a new virtual cluster needs to be created. At this time, the configuration information of the unavailable target virtual cluster can be obtained, and a new cluster consistent with the original cluster configuration can be built according to the configuration information, wherein the configuration information can include basic parameters such as resource restrictions, network policies, storage types, and advanced configurations such as security policies, identity authentication mechanisms, monitoring and log settings.

[0063] It should be noted that when building a new virtual cluster, you can first select and configure the cluster's management node, work business node, and storage node, and then reasonably allocate computing, storage, and network resources based on the resource restrictions in the configuration information to ensure the stable operation of the new cluster. Then, apply necessary security measures, such as access control and data encryption, to protect the security of tenant data. Finally, register the information of the new virtual cluster to the management node of the physical cluster for subsequent monitoring and management.

[0064] After the newly added virtual cluster is constructed, multiple working service nodes in the virtual cluster can be obtained, and a suitable working service node is selected from the working service nodes of the newly added virtual cluster as the second target working service node according to the scheduling logic policy, and then the tenant to be deployed is deployed in the working service node. This embodiment can maintain the overall stability and data security in a multi-tenant environment by constructing a newly added virtual cluster to deploy the tenant to be deployed.

[0065] Optionally, in the tenant deployment method provided in an embodiment of the present application, deploying the tenant to be deployed to the target virtual cluster includes: obtaining blank working nodes and storage nodes in the entity cluster, wherein the storage nodes of the entity cluster are used to store source data of the entity cluster; after deleting the configuration file associated with the blank working node in the storage node, managing the blank working node to the target virtual cluster; and deploying the tenant to be deployed to the blank working node.

[0066] Specifically, the blank working node can be used as an expandable resource pool in the physical cluster and as a working business node in the virtual cluster. After determining the available target virtual cluster, the blank working node and storage node in the physical cluster can be obtained first. The storage node stores source data such as container status, configuration information, and resource allocation records.

[0067] In order to unbind the blank working node from the physical cluster and manage it to the target virtual cluster, it is necessary to delete the configuration file of the blank working node stored in the storage node of the physical cluster. For example, the configuration file may include the process and the configuration file for communicating with the physical cluster. You can also delete the necessary parameters for communicating with the physical cluster, such as server address, certificate information, authentication data, etc. Then cut off the connection between the blank working node and the physical cluster to avoid data confusion or security risks. Then manage the unbound blank working node to the target virtual machine cluster as the host of the non-important tenant container, and use it separately for the tenant to be deployed to ensure complete isolation of data between tenants. The management step may include reconfiguring the network parameters of the blank working node so that it can communicate with the management node of the target virtual cluster.

[0068] It should be noted that when deploying the tenant to be deployed on a blank working node, it is possible to ensure that it can run the corresponding service according to the tenant's needs and can run normally and respond to requests from the tenant by setting the operating parameters of the container to be deployed, starting the container on the blank working node, presetting the necessary operating environment for the container, and monitoring the startup status of the container. This embodiment manages the tenant to be deployed by using the blank working node, which can improve the overall resource utilization while maintaining data isolation, and enhance the dynamic resource management and operation and maintenance capabilities in a multi-tenant environment.

[0069] It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although Figure 2 A logical order is shown in the drawings, but in some cases, the steps shown or described may be performed in an order different from that shown or described herein.

[0070] The present application also provides a tenant deployment method. Figure 3 is a flowchart of an optional tenant deployment method provided according to an embodiment of the present application, such as Figure 3 As shown, this method can be run in a physical cluster and a virtual cluster of a physical cluster. Figure 4 is a schematic diagram of the deployment of a virtual cluster provided in an embodiment of the present application, such as Figure 4As shown, the physical cluster can include management nodes, storage nodes (ETCD nodes) and working nodes. Working nodes can be divided into working nodes (business), working nodes (blank) and working nodes. The above working nodes are used to carry important tenant containers, serve as resource pools waiting to be managed to virtual clusters, and run key components of virtual clusters. By setting up a virtual cluster, multiple tenants can exclusively use cluster resources, including namespace-level and cluster-level resources, to achieve true multi-tenant isolation.

[0071] When a tenant creation request is received from a tenant to be deployed, the relevant information of the tenant is first extracted from the request, and then it can be determined whether the tenant is an important tenant based on this information. When the tenant to be deployed is an important tenant, the container instance of the tenant to be deployed can be directly deployed in the entity cluster, that is, multiple working business nodes existing in the entity cluster are identified, and then the tenant to be deployed is deployed on the working node (business) determined by the scheduling logic strategy, and the container in the tenant is run.

[0072] When the tenant to be deployed is not an important tenant, it is necessary to extract the name keyword of the tenant to be deployed, and then determine whether there is a virtual cluster matching the keyword in the physical cluster based on the name keyword. If it exists, it is necessary to further verify the availability of the virtual cluster. If not, it is necessary to create a virtual cluster and determine the availability of the virtual cluster.

[0073] When determining the availability of a virtual cluster, you can first write query data to the storage nodes in the cluster to ensure that the cluster can handle data storage and retrieval normally. When the virtual cluster is available, you can obtain the working nodes (blank) in the physical cluster, then delete the working nodes (blank) from the physical cluster and manage them to the virtual cluster to run the containers of the tenants to be deployed.

[0074] This embodiment determines the tenant type according to the tenant creation request of the tenant, and then determines the running cluster according to the tenant type. When the tenant type is the first type, the tenant to be deployed is run to the virtual cluster. When the tenant type is the second type, the tenant to be deployed is run to the working business node of the physical cluster, thereby achieving the effect of reasonably isolating service resources for multiple tenants.

[0075] Example 2

[0076] The embodiment of the present application also provides a tenant deployment device. It should be noted that the tenant deployment device of the embodiment of the present application can be used to execute the tenant deployment method provided in the embodiment of the present application. The tenant deployment device provided in the embodiment of the present application is introduced below.

[0077] According to an embodiment of the present application, a device for implementing the above tenant deployment method is also provided. Figure 5 is a schematic diagram of a tenant deployment device provided according to an embodiment of the present application, such as Figure 5 As shown, the device includes: a responding unit 50, a creating unit 51, and a first deploying unit 52.

[0078] A responding unit 50 is used to respond to a tenant creation request of a tenant to be deployed, and determine a tenant type according to the tenant creation request, wherein the tenant type includes a first type and a second type, and the level of the first type is lower than the level of the second type;

[0079] A creating unit 51, configured to, when the tenant type of the tenant to be deployed is the first type, create a target virtual cluster if the target virtual cluster does not exist in the physical cluster, and deploy the tenant to be deployed to the target virtual cluster if the target virtual cluster exists in the physical cluster;

[0080] The first deployment unit 52 is configured to deploy the tenant to be deployed to a working service node of the entity cluster when the tenant type of the tenant to be deployed is the second type.

[0081] The tenant deployment device provided in the embodiment of the present application responds to the tenant creation request of the tenant to be deployed through the response unit 50, and determines the tenant type according to the tenant creation request, wherein the tenant type includes a first type and a second type, and the level of the first type is lower than the level of the second type; the creation unit 51 creates a target virtual cluster if the target virtual cluster does not exist in the physical cluster when the tenant type of the tenant to be deployed is the first type, and deploys the tenant to be deployed to the target virtual cluster if the target virtual cluster exists in the physical cluster; the first deployment unit 52 deploys the tenant to be deployed to the working business node of the physical cluster when the tenant type of the tenant to be deployed is the second type, thereby solving the problem of unreasonable deployment and low deployment efficiency when isolating service resources for multiple tenants in the related art, by determining the tenant type according to the tenant creation request of the tenant, and then determining the running cluster according to the tenant type, when the tenant type is the first type, the tenant to be deployed is run to the virtual cluster, and when the tenant type is the second type, the tenant to be deployed is run to the working business node of the physical cluster, thereby achieving the effect of reasonably isolating service resources for multiple tenants.

[0082] Optionally, in the tenant deployment device provided in the embodiment of the present application, the response unit 50 includes: an extraction module, used to extract the tenant name identifier and the running memory data from the tenant creation request; a first determination module, used to determine the tenant type of the tenant to be deployed as the second type when the tenant name identifier is the first identifier, wherein the first identifier is used to characterize the tenant level of the tenant to be deployed; a judgment module, used to judge whether the running memory data is greater than the container specification threshold when the tenant name identifier is not the first identifier; a second determination module, used to determine the tenant type of the tenant to be deployed as the second type when the running memory data is greater than the container specification threshold; a third determination module, used to determine the tenant type of the tenant to be deployed as the first type when the running memory data is less than or equal to the container specification threshold.

[0083] Optionally, in the tenant deployment device provided in the embodiment of the present application, the first deployment unit 52 includes: a first acquisition module, used to acquire M working business nodes of the entity cluster, where M is a positive integer; a second acquisition module, used to acquire a scheduling logic strategy, and select a first target working business node from the M working business nodes according to the scheduling logic strategy, where the scheduling logic strategy refers to a scheduling strategy for deploying tenants on different working business nodes; the first deployment module, used to deploy the tenant to be deployed to the first target working business node.

[0084] Optionally, in the tenant deployment device provided in the embodiment of the present application, the device also includes: a first acquisition unit, used to obtain a name keyword of the tenant to be deployed after the tenant type of the tenant to be deployed is the first type; a second acquisition unit, used to obtain N virtual clusters of the physical cluster, and obtain the virtual cluster name of each virtual cluster, where N is a positive integer; a first determination unit, used to determine that a target virtual cluster exists in the physical cluster when a name keyword exists in the N virtual cluster names; and a second determination unit, used to determine that a target virtual cluster does not exist in the physical cluster when a name keyword does not exist in the N virtual cluster names.

[0085] Optionally, in the tenant deployment device provided in the embodiment of the present application, the device also includes: a calling unit, used to call a preset interface of the target virtual cluster through a communication protocol before deploying the tenant to be deployed to the target virtual cluster, and write query data to the storage node of the target virtual cluster based on the preset interface, wherein the storage node of the target virtual cluster is used to store source data of the target virtual cluster; a query unit, used to query whether the query data exists in the target virtual cluster, and if the query data exists in the target virtual cluster, determine that the target virtual cluster is available, and execute the step of deploying the tenant to be deployed to the target virtual cluster.

[0086] Optionally, in the tenant deployment device provided in the embodiment of the present application, the device also includes: a third determination unit, used to determine that the target virtual cluster is unavailable if the query data does not exist in the target virtual cluster after querying whether the query data exists in the target virtual cluster; a third acquisition unit, used to obtain configuration information of the target virtual cluster, create a virtual cluster according to the configuration information, and obtain a newly added virtual cluster; a fourth acquisition unit, used to obtain Y working business nodes of the newly added virtual cluster, where Y is a positive integer; a selection unit, used to select a second target working business node from the Y working business nodes according to a scheduling logic strategy, where the scheduling logic strategy refers to a scheduling strategy for deploying tenants on different working business nodes; a second deployment unit, used to deploy the tenant to be deployed to the second target working business node.

[0087] Optionally, in the tenant deployment device provided in the embodiment of the present application, the creation unit 51 includes: a third acquisition module, used to acquire blank working nodes and storage nodes in the entity cluster, wherein the storage nodes of the entity cluster are used to store source data of the entity cluster; a management module, used to manage the blank working nodes to the target virtual cluster after deleting the configuration files associated with the blank working nodes in the storage nodes; and a second deployment module, used to deploy the tenants to be deployed to the blank working nodes.

[0088] It should be noted that the above-mentioned response unit 50, creation unit 51, and first deployment unit 52 correspond to steps S201 to S203 in Example 1, and the two modules and the corresponding steps implement the same examples and application scenarios, but are not limited to the contents disclosed in the above-mentioned Example 1. It should be noted that the above-mentioned modules or units can be hardware components or software components stored in a memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n), and the above-mentioned units can also be part of the device and can be run in the computer terminal 10 provided in Example 1.

[0089] Example 3

[0090] The embodiment of the present application may provide a computer terminal, which may be any computer terminal device in a computer terminal group. Optionally, in this embodiment, the computer terminal may also be replaced by a terminal device such as a mobile terminal or an electronic device.

[0091] Optionally, in this embodiment, the computer terminal may be located in at least one network device among a plurality of network devices of the computer network.

[0092] In this embodiment, the above-mentioned computer terminal can execute the program code of the following steps in the tenant deployment method: responding to a tenant creation request of the tenant to be deployed, determining the tenant type according to the tenant creation request, wherein the tenant type includes a first type and a second type, and the level of the first type is lower than the level of the second type; when the tenant type of the tenant to be deployed is the first type, if the target virtual cluster does not exist in the physical cluster, create a target virtual cluster, and if the target virtual cluster exists in the physical cluster, deploy the tenant to be deployed to the target virtual cluster; when the tenant type of the tenant to be deployed is the second type, deploy the tenant to be deployed to the working business node of the physical cluster.

[0093] Optionally, the above-mentioned computer terminal can execute the program code of the following steps in the tenant deployment method: extracting the tenant name identifier and the running memory data from the tenant creation request; when the tenant name identifier is the first identifier, determining the tenant type of the tenant to be deployed as the second type, wherein the first identifier is used to characterize the tenant level of the tenant to be deployed; when the tenant name identifier is not the first identifier, judging whether the running memory data is greater than the container specification threshold; when the running memory data is greater than the container specification threshold, determining the tenant type of the tenant to be deployed as the second type; when the running memory data is less than or equal to the container specification threshold, determining the tenant type of the tenant to be deployed as the first type.

[0094] Optionally, the above-mentioned computer terminal can execute the program code of the following steps in the tenant deployment method: obtain M working business nodes of the entity cluster, where M is a positive integer; obtain the scheduling logic strategy, and select the first target working business node from the M working business nodes according to the scheduling logic strategy, wherein the scheduling logic strategy refers to the scheduling strategy for deploying tenants on different working business nodes; deploy the tenant to be deployed to the first target working business node.

[0095] Optionally, the above-mentioned computer terminal can execute the program code of the following steps in the tenant deployment method: obtain the name keyword of the tenant to be deployed; obtain N virtual clusters of the physical cluster, and obtain the virtual cluster name of each virtual cluster, where N is a positive integer; when the name keyword exists in the N virtual cluster names, determine that the target virtual cluster exists in the physical cluster; when the name keyword does not exist in the N virtual cluster names, determine that the target virtual cluster does not exist in the physical cluster.

[0096] Optionally, the above-mentioned computer terminal can execute the program code of the following steps in the tenant deployment method: calling the preset interface of the target virtual cluster through the communication protocol, and writing query data to the storage node of the target virtual cluster based on the preset interface, wherein the storage node of the target virtual cluster is used to store the source data of the target virtual cluster; querying whether the query data exists in the target virtual cluster, and if the query data exists in the target virtual cluster, determining that the target virtual cluster is available, and executing the step of deploying the tenant to be deployed to the target virtual cluster.

[0097] Optionally, the above-mentioned computer terminal can execute the program code of the following steps in the tenant deployment method: when there is no query data in the target virtual cluster, determine that the target virtual cluster is unavailable; obtain the configuration information of the target virtual cluster, create a virtual cluster according to the configuration information, and obtain a newly added virtual cluster; obtain Y working business nodes of the newly added virtual cluster, where Y is a positive integer; select a second target working business node from the Y working business nodes according to a scheduling logic strategy, where the scheduling logic strategy refers to a scheduling strategy for deploying tenants on different working business nodes; and deploy the tenant to be deployed to the second target working business node.

[0098] Optionally, the above-mentioned computer terminal can execute the program code of the following steps in the tenant deployment method: obtaining blank working nodes and storage nodes in the physical cluster, wherein the storage nodes of the physical cluster are used to store source data of the physical cluster; after deleting the configuration file associated with the blank working node in the storage node, managing the blank working node to the target virtual cluster; deploying the tenant to be deployed to the blank working node.

[0099] Optionally, Figure 6 is a structural block diagram of an electronic device according to an embodiment of the present application. Figure 6 As shown, the electronic device may include: one or more ( Figure 6 (only one is shown) processor 602, memory 604, storage controller, and peripheral interface, wherein the peripheral interface is connected to the radio frequency module, audio module and display.

[0100] Among them, the memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the tenant's deployment method and device in the embodiment of the present application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, realizing the above-mentioned tenant deployment method. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories can be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0101] The processor can call the information and application programs stored in the memory through the transmission device to execute the above steps in the above tenant deployment method.

[0102] By adopting the embodiment of the present application, a solution for the deployment of tenants is provided. By extracting the tenant name identifier and the running memory data from the tenant creation request; when the tenant name identifier is the first identifier, the tenant type of the tenant to be deployed is determined to be the second type, wherein the first identifier is used to characterize the tenant level of the tenant to be deployed; when the tenant name identifier is not the first identifier, it is determined whether the running memory data is greater than the container specification threshold; when the running memory data is greater than the container specification threshold, the tenant type of the tenant to be deployed is determined to be the second type; when the running memory data is less than or equal to the container specification threshold, the tenant type of the tenant to be deployed is determined to be the first type, thereby achieving the purpose of dynamic optimization configuration of resources and intelligent management of tenants, thereby achieving the technical effect of isolating multiple tenants for reasonable service resources, and then solving the problem of unreasonable deployment and low deployment efficiency when isolating service resources for multiple tenants.

[0103] It can be understood by those skilled in the art that Figure 6 The structure shown is for illustration only, and the electronic device may also be a smart phone, a tablet computer, a PDA, a mobile Internet device (MID), a PAD or other terminal device. Figure 6 The structure of the electronic device is not limited. Figure 6 More or fewer components (such as network interfaces, display devices, etc.) shown in, or having Figure 6 Different configurations are shown.

[0104] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0105] Example 4

[0106] The embodiment of the present application further provides a storage medium. Optionally, in this embodiment, the storage medium can be used to store the program code executed by the tenant deployment method provided in the first embodiment.

[0107] Optionally, in this embodiment, the above storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.

[0108] Optionally, in this embodiment, the storage medium is configured to store program codes for performing the following steps: responding to a tenant creation request of the tenant to be deployed, determining the tenant type according to the tenant creation request, wherein the tenant type includes a first type and a second type, and the level of the first type is lower than the level of the second type; in a case where the tenant type of the tenant to be deployed is the first type, if the target virtual cluster does not exist in the physical cluster, creating a target virtual cluster, and if the target virtual cluster exists in the physical cluster, deploying the tenant to be deployed to the target virtual cluster; in a case where the tenant type of the tenant to be deployed is the second type, deploying the tenant to be deployed to a working business node of the physical cluster.

[0109] Optionally, the storage medium is also configured to store program code for executing the following steps: extracting a tenant name identifier and running memory data from a tenant creation request; when the tenant name identifier is a first identifier, determining the tenant type of the tenant to be deployed as a second type, wherein the first identifier is used to characterize the tenant level of the tenant to be deployed; when the tenant name identifier is not the first identifier, determining whether the running memory data is greater than a container specification threshold; when the running memory data is greater than the container specification threshold, determining the tenant type of the tenant to be deployed as the second type; when the running memory data is less than or equal to the container specification threshold, determining the tenant type of the tenant to be deployed as the first type.

[0110] Optionally, the storage medium is also configured to store program code for executing the following steps: obtaining M working business nodes of the entity cluster, where M is a positive integer; obtaining a scheduling logic strategy, and selecting a first target working business node from the M working business nodes according to the scheduling logic strategy, wherein the scheduling logic strategy refers to a scheduling strategy for deploying tenants on different working business nodes; and deploying the tenant to be deployed to the first target working business node.

[0111] Optionally, the storage medium is also configured to store program code for executing the following steps: obtaining a name keyword of the tenant to be deployed; obtaining N virtual clusters of the physical cluster and obtaining a virtual cluster name of each virtual cluster, where N is a positive integer; if the name keyword exists in the N virtual cluster names, determining that a target virtual cluster exists in the physical cluster; if the name keyword does not exist in the N virtual cluster names, determining that the target virtual cluster does not exist in the physical cluster.

[0112] Optionally, the storage medium is also configured to store program code for executing the following steps: calling a preset interface of the target virtual cluster through a communication protocol, and writing query data to a storage node of the target virtual cluster based on the preset interface, wherein the storage node of the target virtual cluster is used to store source data of the target virtual cluster; querying whether the query data exists in the target virtual cluster, and if the query data exists in the target virtual cluster, determining that the target virtual cluster is available, and executing the step of deploying the tenant to be deployed to the target virtual cluster.

[0113] Optionally, the storage medium is also configured to store program code for executing the following steps: if there is no query data in the target virtual cluster, determine that the target virtual cluster is unavailable; obtain configuration information of the target virtual cluster, create a virtual cluster according to the configuration information, and obtain a newly added virtual cluster; obtain Y working business nodes of the newly added virtual cluster, where Y is a positive integer; select a second target working business node from the Y working business nodes according to a scheduling logic strategy, where the scheduling logic strategy refers to a scheduling strategy for deploying tenants on different working business nodes; and deploy the tenant to be deployed to the second target working business node.

[0114] Optionally, the storage medium is also configured to store program codes for executing the following steps: obtaining blank working nodes and storage nodes in the physical cluster, wherein the storage nodes of the physical cluster are used to store source data of the physical cluster; after deleting the configuration file associated with the blank working node in the storage node, managing the blank working node to the target virtual cluster; and deploying the tenant to be deployed to the blank working node.

[0115] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing the program of the tenant deployment method steps.

[0116] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0117] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0118] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0119] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0120] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0121] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or all or part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of each embodiment method of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk, etc. Various media that can store program codes.

[0122] The above are only preferred implementations of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A tenant deployment method, characterized in that: include: In response to a tenant creation request of a tenant to be deployed, determining a tenant type according to the tenant creation request, wherein the tenant type includes a first type and a second type, and a level of the first type is lower than a level of the second type; In the case where the tenant type of the tenant to be deployed is the first type, if the target virtual cluster does not exist in the physical cluster, creating the target virtual cluster; if the target virtual cluster exists in the physical cluster, deploying the tenant to be deployed to the target virtual cluster; When the tenant type of the tenant to be deployed is the second type, the tenant to be deployed is deployed to the working service node of the entity cluster.

2. The method according to claim 1, characterized in that Determining the tenant type according to the tenant creation request includes: Extracting the tenant name identifier and running memory data from the tenant creation request; In a case where the tenant name identifier is a first identifier, determining the tenant type of the tenant to be deployed as the second type, wherein the first identifier is used to characterize the tenant level of the tenant to be deployed; When the tenant name identifier is not the first identifier, determining whether the running memory data is greater than a container specification threshold; When the running memory data is greater than the container specification threshold, determining the tenant type of the tenant to be deployed as the second type; When the running memory data is less than or equal to the container specification threshold, the tenant type of the tenant to be deployed is determined to be the first type.

3. The method according to claim 1, characterized in that When the tenant type of the to-be-deployed tenant is the second type, deploying the to-be-deployed tenant to the working service node of the entity cluster includes: Obtain M working service nodes of the entity cluster, where M is a positive integer; Acquire a scheduling logic strategy, and select a first target working service node from the M working service nodes according to the scheduling logic strategy, wherein the scheduling logic strategy refers to a scheduling strategy for deploying tenants on different working service nodes; Deploy the tenant to be deployed to the first target working service node.

4. The method according to claim 1, characterized in that: After the tenant type of the tenant to be deployed is the first type, the method further includes: Obtain the name keyword of the tenant to be deployed; Obtain N virtual clusters of the physical cluster, and obtain a virtual cluster name of each virtual cluster, where N is a positive integer; In the case where the name keyword exists in the N virtual cluster names, determining that the target virtual cluster exists in the physical cluster; When the name keyword does not exist in the N virtual cluster names, it is determined that the target virtual cluster does not exist in the physical cluster.

5. The method according to claim 1, characterized in that Before deploying the tenant to be deployed to the target virtual cluster, the method further includes: Calling a preset interface of the target virtual cluster through a communication protocol, and writing query data to a storage node of the target virtual cluster based on the preset interface, wherein the storage node of the target virtual cluster is used to store source data of the target virtual cluster; The target virtual cluster is queried whether the query data exists. If the query data exists in the target virtual cluster, it is determined that the target virtual cluster is available, and the step of deploying the tenant to be deployed to the target virtual cluster is performed.

6. The method according to claim 5, characterized in that After querying whether the query data exists in the target virtual cluster, the method further includes: In a case where the query data does not exist in the target virtual cluster, determining that the target virtual cluster is unavailable; Acquire configuration information of the target virtual cluster, create a virtual cluster according to the configuration information, and obtain a newly added virtual cluster; Obtain Y working service nodes of the newly added virtual cluster, where Y is a positive integer; Selecting a second target working service node from the Y working service nodes according to a scheduling logic strategy, wherein the scheduling logic strategy refers to a scheduling strategy for deploying tenants on different working service nodes; Deploy the tenant to be deployed to the second target working service node.

7. The method according to claim 1, characterized in that Deploying the tenant to be deployed to the target virtual cluster includes: Obtaining blank working nodes and storage nodes in the entity cluster, wherein the storage nodes of the entity cluster are used to store source data of the entity cluster; After deleting the configuration file associated with the blank working node in the storage node, managing the blank working node into the target virtual cluster; Deploy the tenant to be deployed to the blank working node.

8. A tenant deployment device, characterized in that: include: a responding unit, configured to respond to a tenant creation request of a tenant to be deployed, and determine a tenant type according to the tenant creation request, wherein the tenant type includes a first type and a second type, and a level of the first type is lower than a level of the second type; a creating unit, configured to, when the tenant type of the tenant to be deployed is the first type, create the target virtual cluster if the target virtual cluster does not exist in the physical cluster, and deploy the tenant to be deployed to the target virtual cluster if the target virtual cluster exists in the physical cluster; The first deployment unit is configured to deploy the tenant to be deployed to a working service node of the entity cluster when the tenant type of the tenant to be deployed is the second type.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored executable program, wherein when the executable program is run, the device where the computer-readable storage medium is located is controlled to execute the tenant deployment method described in any one of claims 1 to 7.

10. An electronic device, characterized in that: include: A memory storing an executable program; A processor, configured to run the program, wherein the program, when running, executes the tenant deployment method described in any one of claims 1 to 7.

11. A computer program product comprising computer instructions, characterized in that: When the computer instructions are executed by a processor, the steps of the tenant deployment method described in any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Request processing method and device, equipment and storage medium

    CN121037454A

  • Serverless Kubernetes-oriented multi-tenant isolation method, device, equipment and product

    CN122053256A