Application deployment method, application access method, device, equipment and storage medium
By obtaining the association between the application and the target node pool and the available deployment resources, it ensures that the K8S application is deployed in the same node pool in a multi-node pool environment, solving the problem of communication failure caused by node pool isolation and realizing the normal operation of the application.
Patent Information
- Application Number
- CN202410865555.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2044-06-28
AI Technical Summary
In K8S multi-node pool mode, due to the network isolation between node pools, Pods cannot communicate with each other, causing the business to fail to run normally.
By obtaining the association between the application and the target node pool, and obtaining the available deployment resources of each node in the target node pool, the target running node is determined, ensuring that the application is deployed in the same node pool, and avoiding cross-node pool communication.
Without modifying the application, ensure that the running units of the application are all deployed in the same node pool, avoiding the problem of cross-node pool communication failure during business processing, and improving the normal operation rate of the business.
Smart Images

Figure CN118394357B
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to an application deployment method, an application access method, a device, a equipment, and a storage medium. Background Art
[0002] K8S (Kubernetes) is an open source container orchestration system that provides resource management and application orchestration capabilities, supports managing containerized applications in a flexible and highly scalable manner, and makes it easier to deploy, manage, and scale applications in large-scale cluster environments. K8S places containers in Pods running on nodes to execute specific workloads. Multi-node pool mode is one of the management modes of K8S. In multi-node pool mode, the networks between different node pools are isolated, so Pods between different node pools cannot communicate with each other. Based on the native scheduling strategy of K8S, when deploying an application corresponding to a certain business, multiple Pods for executing workloads included in the application may be deployed to different node pools. This will cause communication failures between Pods due to network isolation between different node pools, and ultimately cause the business to fail to operate normally. Summary of the invention
[0003] In view of this, the present disclosure provides an application deployment method, an application access method, an apparatus, a device and a storage medium to solve the problem that the business cannot run normally due to network isolation between node pools.
[0004] In a first aspect, the present disclosure provides an application deployment method, which is applied to a management node of a resource deployment system, and the method includes:
[0005] Obtaining a first association relationship between a first application and a target node pool, where the first association relationship is determined based on initial deployment information of the first application and node pool description information corresponding to the first application, where the initial deployment information is used to represent native information required to deploy the first application in the resource deployment system;
[0006] Obtaining a first available deployment resource for each running node in the target node pool;
[0007] Based on the first available deployment resources of each running node, determine the target running node corresponding to the first application to obtain target deployment information corresponding to the first application; the target deployment information includes the target node pool and the target running node;
[0008] Based on the target deployment information, an operation unit is created in the target operation node of the target node pool to deploy the first application.
[0009] In the application deployment method provided by the present disclosure, by obtaining the first association relationship between the first application and the target node pool, and obtaining the first available deployment resource of each node in the target node pool; based on each first available deployment resource, determining the target running node corresponding to the first application, so as to obtain the target deployment information corresponding to the first application; and creating a running unit in the target running node of the target node pool based on the target deployment information, so as to deploy the first application. Among them, the first association relationship is determined based on the initial deployment information of the first application and the node pool description information corresponding to the first application, and the initial deployment information is used to characterize the native information required for deploying the application in the resource deployment system. Therefore, based on the native information required for deploying the first application, supplemented by the node pool description information corresponding to the first application, the first association relationship between the first application and the target node pool is obtained, so as to determine the target running node corresponding to the first application in the target node pool, and deploy the first application in the target running node. It is possible to ensure that each running unit of the first application is deployed in the same node pool without making any changes to the first application, thereby avoiding the failure of business processing caused by the need for cross-node pool communication between different running units when performing business processing based on the first application.
[0010] In an optional implementation, determining a target running node corresponding to the first application based on the first available deployment resource of each running node includes:
[0011] Determining, according to the initial deployment information, first deployment resources required for deploying the first application;
[0012] Determine a target first available deployment resource that matches the first deployment resource among the first available deployment resources;
[0013] The running node corresponding to the target first available deployment resource is determined as the target running node corresponding to the first application.
[0014] In the application deployment method provided in this embodiment, by determining the first deployment resource required for deploying the first application, a target first available deployment resource matching the first deployment resource is determined among the first available deployment resources; and the running node corresponding to the target first available deployment resource is determined as the target running node corresponding to the first application, and the first application is deployed in the target running node. The available deployment resources of the target running node are guaranteed to meet the resource requirements for deploying the first application, providing a guarantee for the successful deployment of the first application.
[0015] In an optional implementation, obtaining a first association relationship between the first application and the target node pool includes:
[0016] Obtaining an application deployment request of a first application and identifiers of at least two target node pools, wherein the application deployment request carries initial deployment information;
[0017] If the copies of the first application deployed in at least two target node pools are exactly the same, generating first node pool description information based on the first deployment rule and the initial deployment information; the identifiers of the at least two target node pools are represented by the node pool list field in the first deployment rule;
[0018] A first association relationship between the first application and at least two target node pools is generated based on the first node pool description information.
[0019] In the application deployment method provided by this embodiment, when the copies of the first application deployed in at least two target node pools are exactly the same, first node pool description information is generated based on the first deployment rule, and a first association relationship is generated based on the first node pool description information, thereby realizing the deployment of the same application copies in multiple node pools.
[0020] In an optional implementation, after obtaining the target deployment information corresponding to the first application, the method further includes:
[0021] Establishing a second association relationship between the first application and the copy of the first application;
[0022] If a deletion request of the first application is received, determining a copy associated with the first application according to the second association relationship;
[0023] The first application and the replica associated with the first application are deleted.
[0024] In the application deployment method provided in this embodiment, when multiple copies of the first application are completely identical, the user can delete each copy by sending a deletion request once, thereby improving deletion efficiency.
[0025] In an optional implementation, obtaining the first association relationship between the first application and the target node pool further includes:
[0026] If there are differences between the copies of the first application deployed in at least two target node pools, second node pool description information is generated based on the second deployment rule and the initial deployment information, and the identifiers of the at least two target node pools are represented by a request rewrite field in the second deployment rule, and the request rewrite field is used to rewrite the application deployment request into a deployment request for deploying a copy of the first application in each target node pool respectively;
[0027] A first association relationship between the first application and at least two target node pools is generated based on the second node pool description information.
[0028] In the application deployment method provided by this embodiment, when the copies of the first application deployed in at least two target node pools are different, second node pool description information is generated based on the second deployment rule, and a first association relationship is generated based on the second node pool description information, thereby realizing the deployment of different application copies in multiple node pools.
[0029] In an optional implementation, after obtaining the application deployment request of the first application, the method further includes:
[0030] If the label carried in the application deployment request is the same as the preset label, the identifiers of at least two target node pools are obtained.
[0031] In the application deployment method provided in this embodiment, by matching tags, it is ensured that the deployment mode of the first application can match the needs of the user.
[0032] In a second aspect, the present disclosure provides an application access method, which is applied to a running node of a resource deployment system, and the method includes:
[0033] Receiving an access request for a target service of a second application; the second application is deployed in an operation unit of an operation node in at least one first node pool according to the application deployment method provided in the first aspect;
[0034] Determining, according to the access request, an operating unit associated with the second application;
[0035] Filter out a target running unit in the first node pool where the current running node is located from the associated running units;
[0036] Determine the data to be forwarded according to the access request, and forward the data to be forwarded to the target operation unit.
[0037] The application access method provided in this embodiment determines the operation unit associated with the second application upon receiving an access request for the target service of the second application; and screens out the target operation unit in the first node pool where the current operation node is located from the associated operation units; determines the data to be forwarded according to the access request, and forwards the data to be forwarded to the target operation unit. Thus, by screening the operation units associated with the second application, the target operation unit in the first node pool where the current operation node is located is obtained, and the data to be forwarded is forwarded to the target operation unit, which ensures that the data to be forwarded is forwarded within the first node pool where the current operation node is located, and is not forwarded across node pools, thereby ensuring effective access to the target application.
[0038] In an optional implementation, determining the running unit associated with the second application according to the access request includes:
[0039] Determine a target address corresponding to the target service based on the access request;
[0040] A corresponding running unit list is determined based on the target address to obtain the running unit associated with the second application.
[0041] In the application access method provided in this embodiment, the running unit associated with the second application is determined based on the target address corresponding to the target service, thereby ensuring the accuracy of the determined running unit.
[0042] In an optional implementation, filtering out a target running unit in the first node pool where the current running node is located from the associated running units includes:
[0043] Based on the associated operation unit, determine the operation node information corresponding to the associated operation unit;
[0044] Get the node pool identifier in the running node information corresponding to the associated running unit;
[0045] From the node pool identifiers in the running node information, filter out a target node pool identifier that matches the identifier of the first node pool where the current running node is located;
[0046] A target operating unit corresponding to the target node pool identifier is determined among the associated operating units.
[0047] In the application access method provided in this embodiment, the target operating unit is determined by determining the operating node information corresponding to the associated operating unit; and filtering out the target node pool identifier that matches the identifier of the first node pool where the current operating node is located from the node pool identifier included in the operating node information. This ensures that the determined target operating unit is located in the first node pool where the current operating unit is located, avoids cross-node data forwarding, and improves the forwarding success rate of the data to be forwarded.
[0048] In a third aspect, the present disclosure provides an application deployment device, which is applied to a management node of a resource deployment system, and the device includes:
[0049] A first acquisition module, used to acquire a first association relationship between the first application and the target node pool, where the first association relationship is determined based on initial deployment information of the first application and node pool description information corresponding to the first application, where the initial deployment information is used to represent native information required to deploy the first application in the resource deployment system;
[0050] A second acquisition module is used to acquire the first available deployment resource of each running node in the target node pool;
[0051] A first determination module is used to determine a target running node corresponding to the first application based on the first available deployment resources of each running node, so as to obtain target deployment information corresponding to the first application, where the target deployment information includes a target node pool and a target running node;
[0052] A creation module is used to create an operation unit in a target operation node in a target node pool based on target deployment information to deploy the first application.
[0053] In a fourth aspect, the present disclosure provides an application access device, which is applied to a running node of a resource deployment system, and the device includes:
[0054] A receiving module, configured to receive an access request for a target service of a second application; the second application is deployed in an operating unit of an operating node in at least one first node pool according to the application deployment method provided in the first aspect;
[0055] A determination module, configured to determine, according to the access request, an operating unit associated with the second application;
[0056] A screening module is used to screen out a target running unit in the node pool where the current running node is located from the associated running units;
[0057] The forwarding module is used to determine the data to be forwarded according to the access request, and forward the data to be forwarded to the target operation unit.
[0058] In a fifth aspect, the present disclosure provides a computer device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, computer instructions are stored in the memory, and the processor executes the application deployment method of the above-mentioned first aspect or any corresponding embodiment thereof, or executes the application access method of the above-mentioned second aspect or any corresponding embodiment thereof by executing the computer instructions.
[0059] In a sixth aspect, the present disclosure provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the application deployment method of the first aspect or any corresponding embodiment thereof, or to execute the application access method of the second aspect or any corresponding embodiment thereof.
[0060] In a seventh aspect, the present disclosure provides a computer program product, comprising computer instructions, wherein the computer instructions are used to enable a computer to execute the application deployment method of the above-mentioned first aspect or any corresponding embodiment thereof, or to execute the application access method of the above-mentioned second aspect or any corresponding embodiment thereof.
[0061] In the present disclosure, based on the native information required for deploying the first application, supplemented by the node pool description information corresponding to the first application, the first association relationship between the first application and the target node pool is obtained, thereby determining the target running node corresponding to the first application in the target node pool, and deploying the first application in the target running node. It is possible to ensure that all running units of the first application are deployed in the same node pool without making any changes to the first application, thereby avoiding business processing failures caused by the need for cross-node pool communication between different running units when performing business processing based on the first application. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the related technologies, the drawings required for use in the specific embodiments or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0063] Figure 1 is a flowchart of an application deployment method according to an embodiment of the present disclosure;
[0064] Figure 2 is a flowchart of another application deployment method according to an embodiment of the present disclosure;
[0065] Figure 3 is a flowchart of another application deployment method according to an embodiment of the present disclosure;
[0066] Figure 4 is a flowchart of yet another application deployment method according to an embodiment of the present disclosure;
[0067] Figure 5 is a schematic diagram of a scenario of an application deployment method according to an embodiment of the present disclosure;
[0068] Figure 6 is a flowchart of an application access method according to an embodiment of the present disclosure;
[0069] Figure 7 is a flowchart of another application access method according to an embodiment of the present disclosure;
[0070] Figure 8 is a structural block diagram of an application deployment device according to an embodiment of the present disclosure;
[0071] Fig. 9 is a structural block diagram of an application access device according to an embodiment of the present disclosure;
[0072] Fig.10 It is a schematic diagram of the hardware structure of the computer device of the embodiment of the present disclosure. DETAILED DESCRIPTION
[0073] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.
[0074] The multi-node pool mode is one of the management modes of K8S. In the multi-node pool mode, the networks between different node pools are isolated. Therefore, the Pods between different node pools cannot communicate with each other. Based on the native scheduling strategy of K8S, when deploying an application corresponding to a certain business, multiple Pods for executing workloads included in the application may be deployed to different node pools. For example, Pod1 corresponding to business 1 is deployed in node pool 1, and Pod2 corresponding to business 1 is deployed in node pool 2. This will cause the communication between Pod1 and Pod2 to fail due to the network isolation between different node pools, and ultimately cause business 1 to fail to operate normally. In order to solve this technical problem, one approach in the relevant technology is to transform the deployment strategy in the original single node pool mode and explicitly constrain the associated workload to a single node pool. However, this will lead to differences between the deployment in the single node pool mode and the multi-node pool mode, and require the business deployment personnel to perceive the distribution of the underlying Node resources, which has high requirements for business deployment. And if the business system uses open source components, and since the open source components are developed based on the single node pool mode, they cannot be adapted to the multi-node pool mode. On the other hand, if you want to deploy the same business to multiple node pools, all components of the business must be run in each node pool, that is, you need to ensure that all components are deployed in the same node pool. In this way, cross-node pool access will not occur when the business is accessed. Another approach is to provide a new load definition through the extended function of K8S, split the business unit according to the node pool in the new workload, and build the business architecture according to the new workload. This approach will also cause an intrusion into the conventional single-node pool application architecture, and the business system needs to actively make targeted modifications to this new workload. At the same time, if open source components are used, it will be difficult to reuse directly, and the original system must be modified. Based on this, the present disclosure provides an application deployment method, by obtaining a first association relationship between a first application and a target node pool, and obtaining the first available deployment resource of each node in the target node pool; based on each first available deployment resource, determining the target running node corresponding to the first application to obtain the target deployment information corresponding to the first application; and creating an operating unit in the target running node of the target node pool based on the target deployment information to deploy the first application. The first association relationship is determined based on the initial deployment information of the first application and the node pool description information corresponding to the first application, and the initial deployment information is used to represent the native information required for deploying the application in the resource deployment system. Therefore, based on the native information required for deploying the first application, supplemented by the node pool description information corresponding to the first application, the first association relationship between the first application and the target node pool is obtained, thereby determining the target running node corresponding to the first application in the target node pool, and deploying the first application in the target running node.It can ensure that all running units of the first application are deployed in the same node pool without making any changes to the first application, thereby avoiding business processing failure caused by the need for cross-node pool communication between different running units when performing business processing based on the first application.
[0075] According to an embodiment of the present disclosure, an application deployment method and an application access method embodiment are 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.
[0076] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0077] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.
[0078] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0079] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0080] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.
[0081] According to an embodiment of the present disclosure, an application deployment method embodiment and an application access method embodiment are 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.
[0082] In this embodiment, an application deployment method is provided, which can be used in a management node of a resource deployment system. In some implementations, a distribution component may be provided in the management node. Accordingly, the application deployment method provided in this embodiment can be specifically applied to the distribution component. Figure 1 is a flowchart of an application deployment method according to an embodiment of the present disclosure. Figure 1 As shown, the process includes the following steps:
[0083] Step S101, obtaining a first association relationship between a first application and a target node pool; the first association relationship is determined based on initial deployment information of the first application and node pool description information corresponding to the first application, and the initial deployment information is used to represent native information required to deploy the first application in a resource deployment system.
[0084] The resource deployment system in the present disclosure may include at least one management node and multiple node pools, each node pool including at least one running node. In some embodiments, the management node may include a human-computer interaction interface. When a first user wants to deploy a first application in the resource deployment system, the first user may operate the human-computer interaction interface, edit the initial deployment information of the first application and the identifier of the target node pool corresponding to the first application, and operate the submit control after the editing is completed to send an application deployment request to the management node. Accordingly, the management node obtains the application deployment request in response to the submission operation of the first user, obtains the initial deployment information of the first application and the identifier of the target node pool from the application deployment request, generates the node pool description information corresponding to the first application according to the identifier of the target node pool; and determines the first association relationship between the first application and the target node pool based on the initial deployment information and the node pool description information.
[0085] In some other embodiments, the management node may include a human-computer interaction interface. When the first user wants to deploy the first application in the resource deployment system, the first user may operate the human-computer interaction interface to edit the initial deployment information of the first application, and operate the submit control after the editing is completed to send an application deployment request to the management node. Accordingly, the management node obtains the application deployment request in response to the submission operation of the first user, obtains the initial deployment information of the first application from the application deployment request; and determines the first association relationship between the first application and the target node pool according to the initial deployment information and the preset node pool description information corresponding to the first application. The node pool description information is the user demand of the first user obtained in advance and is pre-generated based on the user demand.
[0086] In some other embodiments, the management node may include a human-computer interaction interface. When the first user wants to deploy the first application in the resource deployment system, the first user may operate the human-computer interaction interface to edit the initial deployment information of the first application, and operate the submit control after the editing is completed to send an application deployment request to the management node. Accordingly, the management node obtains the application deployment request in response to the submission operation of the first user, and displays the node pool configuration template. If the identifier of the node pool submitted by the first user based on the node pool configuration template is obtained, the node pool description information corresponding to the first application is generated according to the identifier of the node pool; and the first association relationship between the first application and the target node pool is determined based on the initial deployment information and the node pool description information in the application deployment request.
[0087] In some other embodiments, the management node may be in communication connection with the requesting device, and the requesting device may include a human-computer interaction interface. When the first user wants to deploy the first application in the resource deployment system, the human-computer interaction interface in the requesting device may be operated, and the application deployment request may be sent to the management node through the requesting device. When the management node receives the application deployment request sent by the requesting device, the first association relationship between the first application and the target node pool is determined in the aforementioned manner.
[0088] Step S102, obtaining the first available deployment resource of each running node in the target node pool;
[0089] Considering that different applications often require different deployment resources, based on this, in order to ensure that the first application can be effectively deployed, in this embodiment, the first available deployment resources of each running node in the target node pool are obtained. The first available deployment resources include available storage resources, available network resources, available ports, etc.
[0090] In some implementations, a resource configuration file of each operating node in the target node pool may be obtained, and the first available deployment resource may be obtained from the resource configuration file. Alternatively, a resource acquisition request may be sent to each operating node in the target node pool, and the first available deployment resource sent by each operating node in the target node pool may be received. The method for obtaining the first available deployment resource is not specifically limited in this disclosure.
[0091] Step S103, based on the first available deployment resources of each running node, determine the target running node corresponding to the first application to obtain target deployment information corresponding to the first application; the target deployment information includes a target node pool and a target running node.
[0092] In some embodiments, based on the first available deployment resource of each node, the target running node corresponding to the first application is determined, and the target deployment information of the first application is generated according to the initial deployment information, the node information of the target running node, the node pool information of the target node pool, etc.
[0093] Step S104: creating an operation unit in a target operation node in a target node pool based on the target deployment information to deploy the first application.
[0094] The first application may include multiple components, and each created running unit may correspond one-to-one to the multiple components.
[0095] In the application deployment method provided in this embodiment, by obtaining the first association relationship between the first application and the target node pool, and obtaining the first available deployment resource of each node in the target node pool; based on each first available deployment resource, determining the target running node corresponding to the first application, so as to obtain the target deployment information corresponding to the first application; and creating a running unit in the target running node of the target node pool based on the target deployment information, so as to deploy the first application. Among them, the first association relationship is determined based on the initial deployment information of the first application and the node pool description information corresponding to the first application, and the initial deployment information is used to characterize the native information required for deploying the application in the resource deployment system. Therefore, based on the native information required for deploying the first application, supplemented by the node pool description information corresponding to the first application, the first association relationship between the first application and the target node pool is obtained, so as to determine the target running node corresponding to the first application in the target node pool, and deploy the first application in the target running node. It is possible to ensure that each running unit of the first application is deployed in the same node pool without making any changes to the first application, thereby avoiding the failure of business processing caused by the need for cross-node pool communication between different running units when performing business processing based on the first application.
[0096] In this embodiment, an application deployment method is provided, which can be used in a management node of a resource deployment system. In some implementations, a distribution component may be provided in the management node. Accordingly, the application deployment method provided in this embodiment can be specifically applied to the distribution component. Figure 2 is a flowchart of an application deployment method according to an embodiment of the present disclosure. Figure 2 As shown, the process includes the following steps:
[0097] Step S201, obtaining a first association relationship between a first application and a target node pool; the first association relationship is determined based on initial deployment information of the first application and node pool description information corresponding to the first application, and the initial deployment information is used to represent native information required to deploy the first application in a resource deployment system.
[0098] Step S202: Obtain the first available deployment resource of each running node in the target node pool.
[0099] The specific implementation of step S201 and step S202 can refer to the relevant description above, and the repeated parts will not be repeated here.
[0100] Step S203, based on the first available deployment resources of each running node, determine the target running node corresponding to the first application to obtain target deployment information corresponding to the first application; the target deployment information includes a target node pool and a target running node.
[0101] In some implementations, step S203 may include the following steps S2031 to S2033:
[0102] Step S2031: Determine, according to the initial deployment information, a first deployment resource required for deploying the first application.
[0103] Specifically, a first deployment resource required for deploying the first user is acquired from the initial deployment information.
[0104] Step S2032: Determine, among the first available deployment resources, a target first available deployment resource that matches the first deployment resource.
[0105] Specifically, for the first available deployment resource of each running node, it is determined whether the first available deployment resource includes the first deployment resource, and if so, the corresponding first available deployment resource is determined as the target first available deployment resource that matches the first deployment resource. As an example, the initial deployment information includes that the storage space required for deploying the first application is 2MB, and the available storage space in the first available deployment resource is 1GB, then the first available deployment resource is determined to be the target first available deployment resource.
[0106] Step S2033: determine the running node corresponding to the target first available deployment resource as the target running node corresponding to the first application.
[0107] Step S204: Create an operation unit in the target operation node of the target node pool based on the target deployment information to deploy the first application.
[0108] In the application deployment method provided in this embodiment, by determining the first deployment resource required for deploying the first application, a target first available deployment resource matching the first deployment resource is determined among the first available deployment resources; and the running node corresponding to the target first available deployment resource is determined as the target running node corresponding to the first application, and the first application is deployed in the target running node. The available deployment resources of the target running node are guaranteed to meet the resource requirements for deploying the first application, providing a guarantee for the successful deployment of the first application.
[0109] In this embodiment, an application deployment method is provided, which can be used in a management node of a resource deployment system. In some implementations, a distribution component may be provided in the management node. Accordingly, the application deployment method provided in this embodiment can be specifically applied to the distribution component. Figure 3is a flowchart of an application deployment method according to an embodiment of the present disclosure. Figure 3 As shown, the process includes the following steps:
[0110] Step S301, determine whether the node pool description information corresponding to the first application includes the target node pool; if so, obtain the target node pool from the node pool description information to obtain a first association relationship between the first application and the target node pool; if not, determine the target node pool among the multiple node pools included in the resource deployment system according to the initial deployment information and load balancing rules of the first application to obtain a first association relationship between the first application and the target node pool.
[0111] Specifically, when the management node obtains an application deployment request, it obtains the node pool description information corresponding to the first application, and determines whether the node pool description information corresponding to the first application includes the target node pool. If the node pool description information includes the target node pool, the target node pool is obtained from the node pool description information, and a first association relationship between the first application and the target node pool is generated. If the node pool description information does not include the target node pool, the candidate node pool among the multiple node pools included in the resource deployment system can be first determined based on the load balancing principle; and the second available deployment resource of each candidate node pool is obtained, and the target second available deployment resource that matches the first deployment resource is determined in the second available deployment resource; the candidate node pool corresponding to the target second available deployment resource is determined as the target node pool corresponding to the first application.
[0112] The node pool description information may be obtained by generating the node pool description information based on the identifier of the target node pool specified by the first user in the application deployment request, or may be generated in advance according to user requirements. The specific process can be found in the above description, which will not be repeated here.
[0113] Step S302, obtaining the first available deployment resource of each running node in the target node pool;
[0114] Step S303, based on the first available deployment resources of each running node, determine the target running node corresponding to the first application to obtain target deployment information corresponding to the first application; the target deployment information includes the target node pool and the target running node;
[0115] Step S304: Create an operation unit in the target operation node of the target node pool based on the target deployment information to deploy the first application.
[0116] The specific implementation of steps S302 to S304 can refer to the relevant description above, and the repeated parts will not be repeated here.
[0117] In the application deployment method provided in this embodiment, the user can specify the target node pool corresponding to the first application according to actual needs, thereby meeting the user's personalized configuration needs for the first application. When the user does not specify the target node pool, the target node pool is determined based on the load balancing principle and the initial deployment information, which ensures the accuracy of the determined target node pool while avoiding load imbalance, thereby providing a guarantee for the effective deployment of the first application.
[0118] In this embodiment, an application deployment method is provided, which can be used in a management node of a resource deployment system. In some implementations, a distribution component may be provided in the management node. Accordingly, the application deployment method provided in this embodiment can be specifically applied to the distribution component. Figure 4 is a flowchart of an application deployment method according to an embodiment of the present disclosure. Figure 4 As shown, the process includes the following steps:
[0119] Step S401: Obtain an application deployment request of a first application and identifiers of at least two target node pools, wherein the application deployment request carries initial deployment information of the first application.
[0120] Considering that in actual applications, some users may want to deploy applications according to the native deployment method of the resource deployment system, and some users may want to deploy according to the application deployment method disclosed in this disclosure. In order to meet different user needs, in some embodiments, the application deployment request can also carry a label, and the deployment method is determined based on the label. That is, after obtaining the application deployment request of the first application in step S401, it can also include: if it is determined that the label carried in the application deployment request is the same as the preset label, then obtaining the identifiers of at least two target node pools.
[0121] In some implementations, the application deployment request of the first application may carry identifiers of at least two target node pools. Accordingly, obtaining the identifiers of at least two target node pools in step S401 may include: obtaining the identifiers of at least two target node pools in the application deployment request.
[0122] In other implementations, when the management node obtains the application deployment request from the first user, it can display the node pool configuration template and obtain the identifiers of at least two target node pools submitted by the first user based on the node pool configuration template.
[0123] The first application in the present disclosure may be developed in a single node pool mode.
[0124] Step S402, if the copies of the first application deployed in at least two target node pools are exactly the same, generate first node pool description information based on the first deployment rule and the initial deployment information; the identifiers of at least two target node pools are represented by the node pool list field in the first deployment rule.
[0125] It is understandable that when there are multiple target node pools, the characterization requires that a copy of the first application be deployed in the target node pool. Considering that in actual applications, some users hope that the copies of the first application deployed in each target node pool are exactly the same; some users hope that the copies of the first application deployed in different target node pools are different. Based on this, in some embodiments, the identifier of the target node pool can be represented by different fields to distinguish whether the copies of the first application are exactly the same. That is, in step S402, if it is determined that the identifiers of at least two target node pools are represented by the node pool list field in the first deployment rule, it is determined that the copies of the first application deployed in at least two target node pools are exactly the same, and based on the first deployment rule and the initial deployment information, the first node pool description information is generated. Among them, the first node pool description information may include the identifiers of each target node pool. In some embodiments, the node pool list field may be poolList.
[0126] Step S403: Generate a first association relationship between the first application and at least two target node pools based on the first node pool description information, and execute step S406.
[0127] Step S404: If there are differences in the copies of the first application deployed in at least two target node pools, second node pool description information is generated based on the second deployment rule and the initial deployment information. The identifiers of at least two target node pools are represented by the request rewrite field in the second deployment rule. The request rewrite field is used to rewrite the application deployment request into a deployment request for deploying a copy of the first application in each target node pool.
[0128] Specifically, if it is determined that the identifiers of at least two target node pools are represented by the request override field in the second deployment rule, it is determined that there are differences in the copies of the first application deployed in the at least two target node pools, and based on the second deployment rule and the initial deployment information, the second node pool description information is generated. In some embodiments, the request override field can be override.
[0129] Step S405: Generate a first association relationship between the first application and at least two target node pools based on the second node pool description information.
[0130] Step S406, obtaining the first available deployment resource of each running node in the target node pool.
[0131] Step S407, based on the first available deployment resources of each running node, determine the target running node corresponding to the first application to obtain target deployment information corresponding to the first application; the target deployment information includes a target node pool and a target running node.
[0132] Step S408: Create an operation unit in the target operation node of the target node pool based on the target deployment information to deploy the first application.
[0133] For the specific implementation process of step S406 to step S408, please refer to the relevant description above, and the repeated parts will not be repeated here.
[0134] Further, when the copies of the first application deployed in at least two target node pools are exactly the same, after obtaining the target deployment information corresponding to the first application in step S407, the method may further include:
[0135] Establishing a second association relationship between the first application and the copy of the first application;
[0136] If a deletion request of the first application is received, determining a copy of the first application according to the second association relationship;
[0137] The first application and the copy of the first application are deleted.
[0138] Therefore, when the copies of the first application deployed in at least two target node pools are exactly the same, the user can delete the first application and its copies by sending a deletion request once, which reduces user operations and improves deletion efficiency.
[0139] In the application deployment method provided in this embodiment, when the user wants to deploy a copy of the first application in multiple node pools, the identifier of the target node pool can be set through different fields according to the deployment status of the copy of the first application in different target node pools. Thus, without making any changes to the first application, by sending an application deployment request once, the copy of the first application can be deployed to multiple node pools without the user having to send application deployment requests multiple times. Therefore, without the user having to pay attention to the network interconnection between the underlying resources, the application developed in the single node pool mode can be directly deployed in the multi-node pool, thereby improving the efficiency of application deployment.
[0140] As one or more specific application embodiments of the present disclosure, Figure 5As shown in the figure, the resource deployment system can be a K8S system, the management node can be a Master node, and the Master node is provided with a distribution component and a service component; the running node can be a Node node; and the running unit can be a Pod. After receiving the application deployment request, the distribution component in the management node can obtain the target deployment information based on the directed acyclic graph (DAG). In DAG, each DAG node describes a set of execution strategies. Figure 5 In the example, DAG includes three DAG nodes. The K8S system can include at least one management node ( Figure 5 Only one is shown) and multiple node pools, each node pool includes multiple running nodes. Specifically, when the distribution component in the management node obtains the application deployment request from the first user, it performs corresponding processing based on the execution strategy described by each node in the DAG, and finally generates the target deployment information; the distribution component sends the target deployment information to the service component in the management node, and the service component performs deployment processing according to the target deployment information to create a running unit Pod in the target running node of the target node pool to deploy the first application. For example, the target node pools are node pool 1 and node pool 2, the target running node in node pool 1 is running node 2, and the target running node in node pool 2 is running node 1; then, a running unit Pod is created in running node 2 in node pool 1 to deploy the first application; and a running unit Pod is created in running node 1 in node pool 2 to deploy a copy of the first application. It should be pointed out that Figure 5 This is for illustration only and not limitation. The node pool may include more nodes, and each node pool may also include more running nodes.
[0141] It can be seen that without making any changes to the first application, each operating unit of the first application is deployed in the same node pool. Therefore, when performing business processing based on the first application, business processing failure caused by the need for cross-node pool communication between different operating units is avoided.
[0142] In this embodiment, an application access method is provided, which can be used in a running node of a resource deployment system. In some implementations, a discovery component may be provided in the running node. Accordingly, the application access method provided in this embodiment can be specifically applied to the discovery component. Figure 6 is a flowchart of an application access method according to an embodiment of the present disclosure, such as Figure 6 As shown, the process includes the following steps:
[0143] Step S601: receiving an access request for a target service of a second application.
[0144] The second application is deployed in the running unit of the running node in at least one first node pool according to the application deployment method provided in any of the aforementioned embodiments. Specifically, after the second application is deployed in the resource deployment system according to the aforementioned application deployment method, when the second user wants to access the target service among the multiple services provided by the second application, an access request for the target service of the second application can be sent to the running node. The access request can include the target address of the target service. The target service can correspond to at least one running unit.
[0145] Step S602: Determine the running unit associated with the second application according to the access request.
[0146] Since the second application may be deployed in multiple node pools in the resource deployment system, in order to accurately determine the target operation unit in the node pool where the current operation node is located, in some embodiments of the present disclosure, firstly, the operation units associated with the second application in the resource deployment system are determined according to the access request. The current operation node is the operation node that receives the access request.
[0147] Step S603: Filter out a target running unit in the first node pool where the current running node is located from the associated running units.
[0148] In order to avoid access failure caused by cross-node pool access, the current running node filters out the target running unit in the node pool where the current running node is located from the running units associated with the second application.
[0149] Step S604: determine the data to be forwarded according to the access request, and forward the data to be forwarded to the target operation unit.
[0150] The data to be forwarded may include five-tuple data, and the five-tuple data may include a source IP address, a source port, a destination address, a destination port, and a protocol.
[0151] In the application access method provided by this embodiment, when receiving an access request for the target service of the second application, the operation unit associated with the second application is determined; and the target operation unit in the first node pool where the current operation node is located is screened out from the associated operation units; the data to be forwarded is determined according to the access request, and the data to be forwarded is forwarded to the target operation unit. Thus, by screening the operation units associated with the second application, the target operation unit in the first node pool where the current operation node is located is obtained, and the data to be forwarded is forwarded to the target operation unit, which ensures that the data to be forwarded is forwarded within the first node pool where the current operation node is located, and will not be forwarded across node pools, thereby ensuring effective access to the target application.
[0152] In this embodiment, an application access method is provided, which can be used in a running node of a resource deployment system. In some implementations, a discovery component may be provided in the running node. Accordingly, the application access method provided in this embodiment can be specifically applied to the discovery component. Figure 7 is a flowchart of an application access method according to an embodiment of the present disclosure, such as Figure 7 As shown, the process includes the following steps:
[0153] Step S701, receiving an access request for a target service of a second application;
[0154] The implementation method of step S701 is the same as the implementation method of the aforementioned step S601, and reference may be made to the relevant description above.
[0155] Step S702, determining the running unit associated with the second application according to the access request;
[0156] In some implementations, step S702 may include the following steps S7021 and S7022:
[0157] Step S7021, determining a target address corresponding to the target service based on the access request;
[0158] Specifically, a target address corresponding to the target service of the second application is obtained from the access request.
[0159] Step S7022: determine a corresponding running unit list based on the target address, and obtain the running unit associated with the second application.
[0160] In some implementations, a third association relationship between the address of each service and the list of running units may be pre-established. Accordingly, the current running node obtains the associated running unit list in the third association relationship according to the target address, and obtains the running unit information from the running unit list to obtain the running unit associated with the second application.
[0161] Step S703, filtering out a target operating unit in the first node pool where the current operating node is located from the associated operating units;
[0162] In some implementations, step S703 may include the following steps S7031 to S7034:
[0163] Step S7031, based on the associated operating unit, determining the operating node information corresponding to the associated operating unit;
[0164] In order to facilitate the determination of the relationship between the running unit and the running node, in some embodiments, after the running unit is created, a fourth association relationship between the running unit information and the running node information can be established. Accordingly, in step S7031, according to the running unit information of the running unit associated with the second application, the associated running node information is obtained in the fourth association relationship, and the obtained running node information is determined as the running node information corresponding to the running unit associated with the second application. Among them, the running node information may include the node pool information of the node pool where the running node is located.
[0165] Step S7032, obtaining the node pool identifier in the running node information corresponding to the associated running unit;
[0166] Specifically, the node pool identifier is extracted from the running node information corresponding to the running unit associated with the second application.
[0167] Step S7033, filtering out a target node pool identifier that matches the identifier of the first node pool where the current running node is located from the node pool identifiers in the running node information;
[0168] Since the extracted node pool identifier may include the node pool identifier of the first node pool where the current running node is not located, the current running node can obtain the node pool identifier of the first node pool where it is located from the specified location, and compare the obtained node pool identifier with the node pool identifier in the running node information to obtain a consistent target node pool identifier.
[0169] Step S7034: determine the target operating unit corresponding to the target node pool identifier in the associated operating units.
[0170] Specifically, the operating unit corresponding to the target node pool identifier is determined as the target operating unit.
[0171] Step S704: determine the data to be forwarded according to the access request, and forward the data to be forwarded to the target operation unit.
[0172] Furthermore, considering that in actual applications, applications can also be deployed according to the native deployment method of the resource deployment system, in order to achieve effective access to the target service, in some embodiments, when the management node receives an access request, it can also include obtaining the target address corresponding to the target service from the received access request, and determining whether the target address is associated with a preset service; if so, determining that the second application corresponding to the access request is deployed according to the application deployment method provided in the aforementioned embodiment; if not, determining that the second application corresponding to the access request is deployed according to the native deployment method.
[0173] In the application access method provided in this embodiment, the target address corresponding to the target service is determined based on the access request, and the operating unit associated with the second application is determined based on the target address, and the operating node information corresponding to the associated operating unit is determined; and the target node pool identifier that matches the identifier of the first node pool where the current operating node is located is screened out from the node pool identifier included in the operating node information, thereby determining the target operating unit. This ensures that the determined target operating unit is located in the first node pool where the current operating unit is located, avoids cross-node data forwarding, and improves the forwarding success rate of the data to be forwarded.
[0174] In this embodiment, an application deployment device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0175] This embodiment provides an application deployment device, such as Figure 8 As shown, including:
[0176] A first acquisition module 801 is used to acquire a first association relationship between a first application and a target node pool, where the first association relationship is determined based on initial deployment information of the first application and node pool description information corresponding to the first application, where the initial deployment information is used to represent native information required to deploy the first application in the resource deployment system;
[0177] A second acquisition module 802 is used to acquire a first available deployment resource of each running node in the target node pool;
[0178] A first determination module 803 is used to determine a target running node corresponding to the first application based on the first available deployment resources of each running node, so as to obtain target deployment information corresponding to the first application, wherein the target deployment information includes the target node pool and the target running node;
[0179] The creation module 804 is used to create an operation unit in the target operation node of the target node pool based on the target deployment information to deploy the first application.
[0180] In some optional implementations, the first determining module 803 is specifically configured to:
[0181] Determine a target first available deployment resource that matches the first deployment resource among the first available deployment resources;
[0182] The running node corresponding to the target first available deployment resource is determined as the target running node corresponding to the first application.
[0183] In some optional implementations, the apparatus further includes a second determination module;
[0184] A second determination module, configured to determine whether the node pool description information includes the target node pool before obtaining the first association relationship between the first application and the target node pool;
[0185] If yes, obtaining the target node pool from the node pool description information;
[0186] If not, a target node pool among a plurality of node pools included in the resource deployment system is determined according to the initial deployment information and the load balancing rule.
[0187] In some optional implementations, the first acquisition module 801 is specifically used to:
[0188] Obtaining an application deployment request of the first application and identifiers of at least two of the target node pools, wherein the application deployment request carries the initial deployment information;
[0189] If the copies of the first application deployed in at least two of the target node pools are exactly the same, generating first node pool description information based on the first deployment rule and the initial deployment information; the identifiers of the at least two target node pools are represented by the node pool list field in the first deployment rule;
[0190] A first association relationship between the first application and at least two of the target node pools is generated based on the first node pool description information.
[0191] In some optional embodiments, the device further includes a deletion module;
[0192] a deletion module, configured to establish a second association relationship between the first application and the copy;
[0193] If a deletion request of the first application is received, determining the copy associated with the first application according to the second association relationship;
[0194] The first application and the copy are deleted.
[0195] In some optional implementations, the first acquisition module 801 is further configured to:
[0196] If there are differences between the copies of the first application deployed in at least two of the target node pools, second node pool description information is generated based on a second deployment rule and the initial deployment information, wherein the identifiers of the at least two target node pools are represented by a request rewrite field in the second deployment rule, and the request rewrite field is used to rewrite the application deployment request into a deployment request for deploying a copy of the first application in each of the target node pools;
[0197] A first association relationship between the first application and at least two of the target node pools is generated based on the second node pool description information.
[0198] In some optional implementations, the device further includes: a third acquisition module;
[0199] The third acquisition module is used to acquire the identifiers of the at least two target node pools after the first acquisition module 801 acquires the application deployment request of the first application, if the label carried in the application deployment request is the same as the preset label.
[0200] The application deployment device provided in this embodiment obtains the first association relationship between the first application and the target node pool, and obtains the first available deployment resource of each node in the target node pool; based on each first available deployment resource, determines the target running node corresponding to the first application to obtain the target deployment information corresponding to the first application; and creates a running unit in the target running node of the target node pool based on the target deployment information to deploy the first application. Among them, the first association relationship is determined based on the initial deployment information of the first application and the node pool description information corresponding to the first application, and the initial deployment information is used to characterize the native information required for deploying the application in the resource deployment system. Therefore, based on the native information required to deploy the first application, supplemented by the node pool description information corresponding to the first application, the first association relationship between the first application and the target node pool is obtained, thereby determining the target running node corresponding to the first application in the target node pool, and deploying the first application in the target running node. It can ensure that all running units of the first application are deployed in the same node pool without making any changes to the first application, thereby avoiding the failure of business processing caused by the need for cross-node pool communication between different running units when performing business processing based on the first application.
[0201] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0202] The application deployment device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0203] In this embodiment, an application access device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0204] This embodiment provides an application access device, such as Fig. 9 As shown, including:
[0205] A receiving module 901 is used to receive an access request for a target service of a second application; the second application is deployed in an operating unit of an operating node in at least one first node pool according to the application deployment method provided in any of the foregoing embodiments;
[0206] A determination module 902, configured to determine, according to the access request, a running unit associated with the second application;
[0207] A screening module 903 is used to screen out a target running unit in the node pool where the current running node is located from the associated running units;
[0208] The forwarding module 904 is used to determine the data to be forwarded according to the access request, and forward the data to be forwarded to the target operation unit.
[0209] In some optional implementations, the determination module 902 is specifically configured to:
[0210] Determine a target address corresponding to the target service based on the access request;
[0211] A corresponding running unit list is determined based on the target address to obtain the running unit associated with the second application.
[0212] In some optional implementations, the screening module 903 is specifically used to:
[0213] Based on the associated operating unit, determining the operating node information corresponding to the associated operating unit;
[0214] Obtaining a node pool identifier from the running node information corresponding to the associated running unit;
[0215] Filter out a target node pool identifier that matches an identifier of a first node pool where the current running node is located from the node pool identifiers in the running node information;
[0216] A target operating unit corresponding to the target node pool identifier is determined in the associated operating units.
[0217] The application access device provided in this embodiment determines the target address corresponding to the target service based on the access request, determines the operating unit associated with the second application based on the target address, and determines the operating node information corresponding to the associated operating unit; and selects the target node pool identifier that matches the identifier of the first node pool where the current operating node is located from the node pool identifier included in the operating node information, thereby determining the target operating unit. This ensures that the determined target operating unit is located in the first node pool where the current operating unit is located, avoids cross-node data forwarding, and improves the forwarding success rate of the data to be forwarded.
[0218] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0219] The application access device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0220] The present disclosure also provides a computer device having the above Figure 8 The application deployment device shown, or Fig. 9 The application access device shown.
[0221] See also Fig.10 , Fig.10 is a schematic diagram of a computer device provided by an optional embodiment of the present disclosure, such as Fig.10As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Fig.10 A processor 10 is taken as an example.
[0222] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0223] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.
[0224] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device 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.
[0225] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0226] The computer device also includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30 and the output device 40 may be connected via a bus or other means. Fig.10 The example of connecting through bus is taken in the following.
[0227] The input device 30 can receive input digital or character information, and generate key signal input related to the user settings and function control of the computer device, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator bar, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display and a plasma display. In some optional embodiments, the display device may be a touch screen.
[0228] The embodiments of the present disclosure also provide a computer-readable storage medium. The above-mentioned method according to the embodiments of the present disclosure can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium and downloaded through a network, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0229] A part of the present disclosure may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present disclosure through the operation of the computer. Those skilled in the art should understand that the existence of computer program instructions in computer-readable media includes, but is not limited to, source files, executable files, installation package files, etc., and accordingly, the way in which computer program instructions are executed by a computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to the computer.
[0230] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0231] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.
[0232] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0233] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0234] Although the embodiments of the present disclosure have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. An application deployment method, characterized in that: Applied to a management node of a resource deployment system, the method comprises: Obtaining a first association relationship between a first application and a target node pool; the first association relationship is determined based on initial deployment information of the first application and node pool description information corresponding to the first application, the initial deployment information being used to characterize native information required to deploy the first application in the resource deployment system; Obtaining a first available deployment resource for each running node in the target node pool; Based on the first available deployment resources of each running node, determine the target running node corresponding to the first application to obtain target deployment information corresponding to the first application; the target deployment information includes the target node pool and the target running node; Creating an operation unit in a target operation node in the target node pool based on the target deployment information to deploy the first application; The obtaining of a first association relationship between the first application and the target node pool includes: Obtaining an application deployment request of the first application and identifiers of at least two of the target node pools, wherein the application deployment request carries the initial deployment information; If the copies of the first application deployed in at least two of the target node pools are exactly the same, generating first node pool description information based on the first deployment rule and the initial deployment information; the identifiers of the at least two target node pools are represented by the node pool list field in the first deployment rule; A first association relationship between the first application and at least two of the target node pools is generated based on the first node pool description information.
2. The method according to claim 1, characterized in that: The determining, based on the first available deployment resources of each of the running nodes, a target running node corresponding to the first application includes: Determining, according to the initial deployment information, first deployment resources required for deploying the first application; Determine a target first available deployment resource that matches the first deployment resource among the first available deployment resources; The running node corresponding to the target first available deployment resource is determined as the target running node corresponding to the first application.
3. The method according to claim 1, characterized in that Before obtaining the first association relationship between the first application and the target node pool, the method further includes: Determine whether the node pool description information includes a target node pool; If yes, obtaining the target node pool from the node pool description information; If not, a target node pool among a plurality of node pools included in the resource deployment system is determined according to the initial deployment information and the load balancing rule.
4. The method according to claim 1, characterized in that: After obtaining the target deployment information corresponding to the first application, the method further includes: Establishing a second association relationship between the first application and the copy; If a deletion request of the first application is received, determining the copy associated with the first application according to the second association relationship; The first application and the copy are deleted.
5. The method according to claim 1, characterized in that The obtaining of the first association relationship between the first application and the target node pool further includes: If there are differences between the copies of the first application deployed in at least two of the target node pools, second node pool description information is generated based on a second deployment rule and the initial deployment information, wherein the identifiers of the at least two target node pools are represented by a request rewrite field in the second deployment rule, and the request rewrite field is used to rewrite the application deployment request into a deployment request for deploying a copy of the first application in each of the target node pools; A first association relationship between the first application and at least two of the target node pools is generated based on the second node pool description information.
6. The method according to claim 1, characterized in that After obtaining the application deployment request of the first application, the method further includes: If the label carried in the application deployment request is the same as the preset label, the identifiers of the at least two target node pools are obtained.
7. An application access method, characterized in that: Applied to a running node of a resource deployment system, the method comprises: Receiving an access request for a target service of a second application; the second application is deployed in an operating unit of an operating node in at least one first node pool by the application deployment method according to any one of claims 1 to 6; Determining, according to the access request, an operating unit associated with the second application; Filtering out a target running unit in the first node pool where the current running node is located from the associated running units; Determine the data to be forwarded according to the access request, and forward the data to be forwarded to the target operation unit.
8. The method according to claim 7, characterized in that The determining, according to the access request, the running unit associated with the second application includes: Determine a target address corresponding to the target service based on the access request; A corresponding running unit list is determined based on the target address to obtain the running unit associated with the second application.
9. The method according to claim 7, characterized in that: The step of selecting a target running unit in the first node pool where the current running node is located from the associated running units includes: Based on the associated operating unit, determining the operating node information corresponding to the associated operating unit; Obtaining a node pool identifier from the running node information corresponding to the associated running unit; Filter out a target node pool identifier that matches an identifier of a first node pool where the current running node is located from the node pool identifiers in the running node information; A target operating unit corresponding to the target node pool identifier is determined in the associated operating units.
10. An application deployment device, characterized in that: Applied to a management node of a resource deployment system, the device comprises: A first acquisition module, used to acquire a first association relationship between a first application and a target node pool, wherein the first association relationship is determined based on initial deployment information of the first application and node pool description information corresponding to the first application, wherein the initial deployment information is used to represent native information required to deploy the first application in the resource deployment system; A second acquisition module is used to acquire a first available deployment resource of each running node in the target node pool; A first determination module, configured to determine a target running node corresponding to the first application based on the first available deployment resources of each running node, so as to obtain target deployment information corresponding to the first application, wherein the target deployment information includes the target node pool and the target running node; A creation module, configured to create an operation unit in a target operation node in the target node pool based on the target deployment information, so as to deploy the first application; Wherein, the first acquisition module is specifically used for: Obtaining an application deployment request of the first application and identifiers of at least two of the target node pools, wherein the application deployment request carries the initial deployment information; If the copies of the first application deployed in at least two of the target node pools are exactly the same, generating first node pool description information based on the first deployment rule and the initial deployment information; the identifiers of the at least two target node pools are represented by the node pool list field in the first deployment rule; A first association relationship between the first application and at least two of the target node pools is generated based on the first node pool description information.
11. An application access device, characterized in that: Applied to a running node of a resource deployment system, the device comprises: A receiving module, configured to receive an access request for a target service of a second application; the second application is deployed in an operating unit of an operating node in at least one first node pool according to the application deployment method according to any one of claims 1 to 6; A determination module, configured to determine, according to the access request, an operating unit associated with the second application; A screening module, used to screen out a target running unit in the node pool where the current running node is located from the associated running units; The forwarding module is used to determine the data to be forwarded according to the access request, and forward the data to be forwarded to the target operation unit.
12. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the application deployment method described in any one of claims 1 to 6, or executes the application access method described in any one of claims 7 to 9 by executing the computer instructions.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the application deployment method described in any one of claims 1 to 6, or to execute the application access method described in any one of claims 7 to 9.
14. A computer program product, characterized in that The method comprises computer instructions, wherein the computer instructions are used to cause a computer to execute the application deployment method according to any one of claims 1 to 6, or to execute the application access method according to any one of claims 7 to 9.
Citation Information
Patent Citations
Multi-CICS node calling method and device
CN113515375A
Elastic resource scheduling method, control equipment, device and readable storage medium
CN114610480A
Data transmission method and system
CN114884880A
Cluster management method and device, electronic equipment and storage medium
CN117155948A
Multi-resource pool application processing method and device, electronic equipment and storage medium
CN117608754A
