Application deployment method and apparatus, application access method and apparatus, and device and storage medium
By obtaining the association between the application and the target node pool and the available deployment resources, the target running node is determined, which solves the problem of cross-node pool communication in Kubernetes multi-node pool mode and realizes efficient and unmodified application deployment and access.
Patent Information
- Application Number
- PCT/CN2025/079567
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-06-28
- Filing Date
- 2025-02-27
- Publication Date
- 2026-01-02
AI Technical Summary
In Kubernetes' multi-node pool mode, application runtime units may be deployed in different node pools, leading to cross-node pool communication failures. Existing solutions require changes to deployment strategies or modifications to business systems and are incompatible with open-source components.
By obtaining the association between the application and the target node pool and the available deployment resources, the target running node is determined, and a running unit is created in the target node pool to ensure that the application's running units are deployed within the same node pool, thus avoiding cross-node pool communication.
Without modifying the application, this ensures that the application's runtime units are deployed within the same node pool, preventing business processing failures and improving deployment efficiency and compatibility.
Smart Images

Figure CN2025079567_02012026_PF_FP_ABST
Abstract
Description
Application deployment method, application access method, device, equipment and storage medium
[0001] The present application claims priority to the Chinese patent application No. 202410865555.6, filed on June 28, 2024, and entitled "Application deployment method, application access method, device, equipment and storage medium", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD
[0002] The present disclosure relates to the technical field of computer, and particularly relates to an application deployment method, an application access method, a device, equipment and a storage medium. BACKGROUND
[0003] K8S (Kubernetes) is an open source container orchestration system, which provides resource management and application orchestration capabilities, supports flexible and highly scalable management of containerized applications, and makes it easier to deploy, manage and expand applications in large-scale cluster environments. K8S puts containers in Pods running on nodes to perform specific workloads. SUMMARY
[0004] Therefore, the present disclosure provides an application deployment method, an application access method, a device, equipment and a storage medium.
[0005] In a first aspect, the present disclosure provides an application deployment method, applied to a management node of a resource deployment system, and the method comprises:
[0006] obtaining a first association relationship between a first application and a target node pool, the first association relationship being 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 represent native information required for deploying the first application in the resource deployment system;
[0007] obtaining first available deployment resources of each running node in the target node pool;
[0008] determining a target running node corresponding to the first application based on the first available deployment resources of each running node, to obtain target deployment information corresponding to the first application; the target deployment information comprises the target node pool and the target running node;
[0009] creating a running unit in the target running node of the target node pool based on the target deployment information, to deploy the first application.
[0010] The application deployment method provided in the disclosure comprises the following steps: obtaining a first association relationship between a first application and a target node pool, and obtaining first available deployment resources of each node in the target node pool; determining a target running node corresponding to the first application based on the first available deployment resources, so as to obtain 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. 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 for deploying the application in a resource deployment system. Thus, the first association relationship between the first application and the target node pool is obtained based on the native information required for deploying the first application, supplemented by the node pool description information corresponding to the first application, 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. Without any modification of the first application, each running unit of the first application can be deployed in the same node pool, so that the business processing failure caused by the cross-node pool communication between different running units during the business processing based on the first application is avoided.
[0011] In an optional implementation, the determining of the target running node corresponding to the first application based on the first available deployment resources of each running node comprises:
[0012] determining, according to the initial deployment information, first deployment resources required for deploying the first application;
[0013] determining, from the first available deployment resources, a target first available deployment resource that matches the first deployment resources;
[0014] determining, as the target running node corresponding to the first application, a running node corresponding to the target first available deployment resource.
[0015] In the application deployment method provided in the embodiment, the first deployment resources required for deploying the first application are determined, the target first available deployment resource that matches the first deployment resources is determined from 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 can meet the resource requirement for deploying the first application, which provides a guarantee for successfully deploying the first application.
[0016] In an optional implementation, the obtaining of the first association relationship between the first application and the target node pool comprises:
[0017] obtaining an application deployment request of the first application and an identifier of at least two target node pools, and the application deployment request carries the initial deployment information.
[0018] If the replicas of the first application deployed in the at least two target node pools are completely identical, the first node pool description information is generated based on the first deployment rule and the initial deployment information, and the identities of the at least two target node pools are represented by a node pool list field in the first deployment rule;
[0019] The first association relationship between the first application and the at least two target node pools is generated based on the first node pool description information.
[0020] In the application deployment method provided in the embodiment, when the replicas of the first application deployed in the at least two target node pools are completely identical, the first node pool description information is generated based on the first deployment rule, and the first association relationship is generated based on the first node pool description information, so that the same application replicas are deployed in multiple node pools.
[0021] In an optional implementation, after the target deployment information corresponding to the first application is obtained, the method further includes:
[0022] establishing a second association relationship between the first application and the replicas of the first application;
[0023] If a deletion request of the first application is received, the replicas associated with the first application are determined according to the second association relationship;
[0024] The first application and the replicas associated with the first application are deleted.
[0025] In the application deployment method provided in the embodiment, when the multiple replicas of the first application are completely identical, the user can delete the replicas by sending one deletion request, so that the deletion efficiency is improved.
[0026] In an optional implementation, the first association relationship between the first application and the target node pools further includes:
[0027] If the replicas of the first application deployed in the at least two target node pools are different, the second node pool description information is generated based on the second deployment rule and the initial deployment information, and the identities of the at least two target node pools are represented by a request rewriting field in the second deployment rule, and the request rewriting field is used to rewrite the application deployment request into a deployment request for deploying the replicas of the first application in each target node pool respectively;
[0028] The first association relationship between the first application and the at least two target node pools is generated based on the second node pool description information.
[0029] The application deployment method provided in the embodiment includes the following steps.
[0030] In an optional implementation, after the application deployment request of the first application is acquired, the method further includes:
[0031] If the label carried in the application deployment request is the same as the preset label, the identification of the at least two target node pools is acquired.
[0032] The application deployment method provided in the embodiment guarantees that the deployment mode of the first application can match the demand of the user through the matching of the label.
[0033] In a second aspect, the disclosure provides an application access method applied to a running node of a resource deployment system, and the method includes the following steps.
[0034] An access request of a target service of a second application is received; the second application is deployed in a running unit of the running node in at least one first node pool according to the application deployment method provided in the first aspect;
[0035] According to the access request, a running unit associated with the second application is determined.
[0036] From the associated running unit, a target running unit in the first node pool in which the current running node is located is screened out.
[0037] According to the access request, to-be-forwarded data is determined, and the to-be-forwarded data is forwarded to the target running unit.
[0038] The application access method provided in the embodiment includes the following steps. When the access request of the target service of the second application is received, the running unit associated with the second application is determined. From the associated running unit, the target running unit in the first node pool in which the current running node is located is screened out. According to the access request, the to-be-forwarded data is determined, and the to-be-forwarded data is forwarded to the target running unit. In this way, by screening the running unit associated with the second application, the target running unit in the first node pool in which the current running node is located is obtained, and the to-be-forwarded data is forwarded to the target running unit, so that the to-be-forwarded data is forwarded within the first node pool in which the current running node is located, and cross-node pool forwarding is avoided, and thus the effective access of the target application is guaranteed.
[0039] In an optional implementation, according to the access request, the running unit associated with the second application is determined, and the method includes the following steps.
[0040] According to the access request, a target address corresponding to the target service is determined.
[0041] Determine the corresponding running unit list based on the target address, and obtain the running unit associated with the second application.
[0042] The application access method provided in the embodiment guarantees the accuracy of the determined running unit by determining the running unit associated with the second application based on the target address corresponding to the target service.
[0043] In an optional implementation, the target running unit in the first node pool where the current running node is located is screened out from the associated running unit, including:
[0044] Determine the running node information corresponding to the associated running unit based on the associated running unit;
[0045] Obtain the node pool identifier in the running node information corresponding to the associated running unit;
[0046] Screen out the target node pool identifier matching the identifier of the first node pool where the current running node is located from the node pool identifier in the running node information;
[0047] Determine the target running unit corresponding to the target node pool identifier from the associated running unit.
[0048] In the application access method provided in the embodiment, the running node information corresponding to the associated running unit is determined, and the target node pool identifier matching the identifier of the first node pool where the current running node is located is screened out from the node pool identifier included in the running node information, so as to determine the target running unit. It is guaranteed that the determined target running unit is located in the first node pool where the current running unit is located, cross-node data forwarding is avoided, and the success rate of the to-be-forwarded data forwarding is improved.
[0049] In a third aspect, the present disclosure provides an application deployment device applied to a management node of a resource deployment system, which includes:
[0050] The first obtaining module is configured to obtain a first association relationship between the first application and the target node pool, and 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 is used to represent native information required for deploying the first application in the resource deployment system.
[0051] The second obtaining module is configured to obtain first available deployment resources of each running node in the target node pool.
[0052] The first determining module is 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. The target deployment information includes the target node pool and the target running node.
[0053] The creating module is configured to create a running unit in a target running node of the target node pool based on the target deployment information, so as to deploy the first application.
[0054] 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 comprises:
[0055] The receiving module is configured to receive an access request for a target service of a second application; the second application is deployed in a running unit of a running node in at least one first node pool according to the application deployment method provided in the first aspect.
[0056] The determining module is configured to determine, according to the access request, a running unit associated with the second application.
[0057] The screening module is configured to screen a target running unit in a node pool in which the current running node is located from the associated running unit.
[0058] The forwarding module is configured to determine to-be-forwarded data according to the access request, and forward the to-be-forwarded data to the target running unit.
[0059] In a fifth aspect, the present disclosure provides a computer device, which comprises a memory and a processor, the memory and the processor are communicatively connected with each other, the memory stores computer instructions, and the processor executes the computer instructions, thereby executing the application deployment method of the first aspect or any one of the corresponding embodiments thereof, or executing the application access method of the second aspect or any one of the corresponding embodiments thereof.
[0060] In a sixth aspect, the present disclosure provides a computer readable storage medium, which stores computer instructions, and the computer instructions are used to make a computer execute the application deployment method of the first aspect or any one of the corresponding embodiments thereof, or execute the application access method of the second aspect or any one of the corresponding embodiments thereof.
[0061] In a seventh aspect, the present disclosure provides a computer program product, which comprises computer instructions, and the computer instructions are used to make a computer execute the application deployment method of the first aspect or any one of the corresponding embodiments thereof, or execute the application access method of the second aspect or any one of the corresponding embodiments thereof.
[0062] In the present disclosure, based on the native information required for deploying the first application, and with the aid of 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 that the target running node corresponding to the first application in the target node pool is determined, and the first application is deployed in the target running node. BRIEF DESCRIPTION OF DRAWINGS
[0063] In order to more clearly illustrate the technical solutions in the specific embodiments or the related art of the present disclosure, the accompanying drawings needed to be used in the specific embodiments or the related art description will be briefly introduced. Obviously, the accompanying drawings in the following description are some embodiments of the present disclosure, and for those skilled in the art, other drawings can also be obtained without creative labor.
[0064] FIG. 1 is a flow diagram of an application deployment method according to an embodiment of the present disclosure;
[0065] FIG. 2 is a flow diagram of another application deployment method according to an embodiment of the present disclosure;
[0066] FIG. 3 is a flow diagram of yet another application deployment method according to an embodiment of the present disclosure;
[0067] FIG. 4 is a flow diagram of still another application deployment method according to an embodiment of the present disclosure;
[0068] FIG. 5 is a scenario diagram of an application deployment method according to an embodiment of the present disclosure;
[0069] FIG. 6 is a flow diagram of an application access method according to an embodiment of the present disclosure;
[0070] FIG. 7 is a flow diagram of another application access method according to an embodiment of the present disclosure;
[0071] FIG. 8 is a structural block diagram of an application deployment apparatus according to an embodiment of the present disclosure;
[0072] FIG. 9 is a structural block diagram of an application access apparatus according to an embodiment of the present disclosure;
[0073] FIG. 10 is a hardware structure diagram of a computer device according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0074] In order to make the purpose, technical solutions and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be described clearly and completely with reference to the accompanying drawings in the embodiments of the present disclosure. Obviously, the described embodiments are some 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 labor are within the scope of protection of the present disclosure.
[0075] The multi-node pool mode is one of the management modes of K8S, in which the networks between different node pools are isolated, and thus the Pods in different node pools cannot communicate with each other. Based on the original 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. However, due to the network isolation between different node pools, communication between Pod1 and Pod2 fails, and ultimately business 1 cannot run normally. In order to solve this technical problem, one method in the related art is to modify the deployment strategy under the original single-node pool mode, and to explicitly constrain the associated workloads to a single node pool. However, this will cause differences between the deployment under the single-node pool mode and the multi-node pool mode, and at the same time requires the business deployment personnel to perceive the distribution of the underlying Node resources, which is a high requirement for business deployment. Moreover, if the business system uses open source components, the open source components cannot be adapted to the multi-node pool mode because they are developed based on the single-node pool mode. On the other hand, if the same business is deployed to multiple node pools, all components of the business need to be operated in each node pool, that is, it is necessary to ensure that all components are deployed in the same node pool. In this way, when the business is accessed, cross-node pool access will not occur. Another method is to provide a new load definition through the extension function of K8S, and to split the business unit according to the node pool in the new workload, and to construct the business architecture according to the new workload. This method also causes an intrusion to the conventional single-node pool application architecture, and requires the business system to actively modify the new workload. At the same time, if open source components are used, the problem of difficult direct reuse will be encountered, and the original system must be modified.
[0076] Based on this, the present disclosure provides an application deployment method, which comprises the following steps: obtaining a first association relationship between a first application and a target node pool, and obtaining first available deployment resources of each node in the target node pool; determining a target running node corresponding to the first application based on the first available deployment resources, to obtain 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, to deploy the first application. 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, and the initial deployment information is used to represent native information required for deploying the application in a resource deployment system. Thus, based on the native information required for deploying the first application, the first association relationship between the first application and the target node pool is obtained by supplementing the node pool description information corresponding to the first application, 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. Without any modification of the first application, each running unit of the first application can be deployed in the same node pool, so that the business processing failure caused by the cross-node pool communication between different running units during the business processing based on the first application is avoided.
[0077] According to the embodiments of the present disclosure, an application deployment method and an application access method are provided. It should be noted that the steps shown in the flowchart can be executed in a computer system such as a set of computer executable instructions, and although the 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.
[0078] It can be understood that before using the technical solutions disclosed in the embodiments of the present disclosure, the type, use range, use scenario, etc. of the personal information involved in the present disclosure should be informed to the user and the authorization of the user should be obtained through appropriate means according to relevant laws and regulations.
[0079] For example, in response to receiving the active request of the user, prompt information is sent to the user to explicitly prompt the user that the operation requested to be executed will require obtaining and using the personal information of the user. Thus, the user can voluntarily choose whether to provide the personal information to the software or hardware such as electronic device, application program, server or storage medium, etc. that executes the operation of the technical solutions of the present disclosure according to the prompt information.
[0080] As an optional but not limited implementation manner, in response to receiving the active request of the user, the manner of sending the prompt information to the user may, for example, be a pop-up window manner, and the prompt information may, for example, be presented in the form of text in the pop-up window. In addition, the pop-up window may, for example, carry a selection control for the user to select "agree" or "disagree" to provide the personal information to the electronic device.
[0081] It can be understood that the above notification and user authorization process is only illustrative, and does not limit the implementation of the present disclosure, and other ways that meet the relevant laws and regulations can also be applied to the implementation of the present disclosure.
[0082] It can be understood that the data involved in the technical solution (including but not limited to the data itself, the acquisition or use of the data) should comply with the requirements of the relevant laws and regulations and the relevant provisions.
[0083] According to the embodiments 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 group of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that here.
[0084] An application deployment method is provided in the present embodiment, which can be used for a management node of a resource deployment system. In some embodiments, a distribution component can be arranged in the management node. Accordingly, the application deployment method provided in the present embodiment can be specifically applied to the distribution component. FIG. 1 is a flowchart of an application deployment method according to an embodiment of the present disclosure. As shown in FIG. 1, the flow includes the following steps:
[0085] In step S101, a first association relationship between a first application and a target node pool is obtained. 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 is used to represent native information required for deploying the first application in the resource deployment system.
[0086] The resource deployment system in the present disclosure can include at least one management node and a plurality of node pools, and each node pool includes at least one running node. In some embodiments, the management node can include a human-computer interaction interface. When a first user wants to deploy a first application in the resource deployment system, the human-computer interaction interface can be operated to edit the initial deployment information of the first application and the identifier of the target node pool corresponding to the first application, and after the editing is completed, a submission control is operated 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.
[0087] In some embodiments, the management node can comprise 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 can be operated to edit the initial deployment information of the first application, and after the editing is completed, a submission control is operated to send an application deployment request to the management node. Correspondingly, the management node, in response to the submission operation of the first user, acquires the application deployment request, acquires 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 preset node pool description information corresponding to the first application. The node pool description information is generated in advance based on the user demand of the first user.
[0088] In some embodiments, the management node can comprise 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 can be operated to edit the initial deployment information of the first application, and after the editing is completed, a submission control is operated to send an application deployment request to the management node. Correspondingly, the management node, in response to the submission operation of the first user, acquires the application deployment request, and displays a node pool configuration template. If the identification of the node pool submitted by the first user based on the node pool configuration template is acquired, the node pool description information corresponding to the first application is generated according to the identification of the node pool. The first association relationship between the first application and the target node pool is determined based on the initial deployment information in the application deployment request and the node pool description information.
[0089] In some embodiments, the management node can be in communication connection with a request device, and the request device can comprise 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 request device can be operated, and the application deployment request is sent to the management node through the request device. When the management node receives the application deployment request sent by the request device, the first association relationship between the first application and the target node pool is determined in the manner described above.
[0090] In step S102, the first available deployment resources of each running node in the target node pool are acquired.
[0091] Considering that the deployment resources required for deploying different applications are often different, 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 acquired. The first available deployment resources include available storage resources, available network resources, available ports, etc.
[0092] In some embodiments, a resource configuration file of each running node in the target node pool can be acquired, and the first available deployment resource can be acquired from the resource configuration file. Alternatively, a resource acquisition request can be sent to each running node in the target node pool, and the first available deployment resource sent by each running node in the target node pool can be received. The acquisition manner of the first available deployment resource is not specifically limited in the present disclosure.
[0093] In step S103, the target running node corresponding to the first application is determined based on the first available deployment resource of each running node, so as to obtain the target deployment information corresponding to the first application. The target deployment information includes the target node pool and the target running node.
[0094] In some embodiments, the target running node corresponding to the first application is determined based on the first available deployment resource of each node, 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, and the node pool information of the target node pool.
[0095] In step S104, a running unit is created in the target running node of the target node pool based on the target deployment information, so as to deploy the first application.
[0096] The first application can include a plurality of components, and each created running unit can correspond to one of the plurality of components.
[0097] In the application deployment method provided by the embodiment, the first association relationship between the first application and the target node pool is acquired, and the first available deployment resource of each node in the target node pool is acquired. The target running node corresponding to the first application is determined based on each first available deployment resource, so as to obtain the target deployment information corresponding to the first application. A running unit is created in the target running node of the target node pool based on the target deployment information, so as 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. Thus, the first association relationship between the first application and the target node pool is acquired based on the native information required for deploying the first application, supplemented by the node pool description information corresponding to the first application, 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. Without any modification of the first application, each running unit of the first application can be deployed in the same node pool, so that the business processing failure caused by the communication across the node pools between different running units during the business processing based on the first application can be avoided.
[0098] In the embodiment, a method for deploying an application is provided, which can be applied to a management node of a resource deployment system. In some embodiments, a distribution component can be arranged in the management node. Accordingly, the method for deploying an application provided in the embodiment can be applied to the distribution component. FIG. 2 is a flowchart of the method for deploying an application according to an embodiment of the present disclosure. As shown in FIG. 2, the flow includes the following steps:
[0099] In step S201, a first association relationship between a first application and a target node pool is obtained. 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 is used to represent native information required for deploying the first application in the resource deployment system.
[0100] In step S202, first available deployment resources of each running node in the target node pool are obtained.
[0101] The specific implementation of steps S201 and S202 can be referred to the related description in the foregoing, and details are not described herein.
[0102] In step S203, a target running node corresponding to the first application is determined based on the first available deployment resources of each running node, so as to obtain target deployment information corresponding to the first application. The target deployment information includes the target node pool and the target running node.
[0103] In some embodiments, step S203 can include steps S2031 to S2033.
[0104] In step S2031, first deployment resources required for deploying the first application are determined according to the initial deployment information.
[0105] Specifically, the first deployment resources required for deploying the first application are obtained from the initial deployment information.
[0106] In step S2032, a target first available deployment resource that matches the first deployment resources is determined from the first available deployment resources.
[0107] Specifically, for each first available deployment resource of each running node, it is determined whether the first deployment resources are included in the first available deployment resource. If yes, the corresponding first available deployment resource is determined as the target first available deployment resource that matches the first deployment resources. For example, the initial deployment information includes that a storage space required for deploying the first application is 2 MB, and the available storage space in the first available deployment resource is 1 GB. It is determined that the first available deployment resource is the target first available deployment resource.
[0108] In step S2033, a running node corresponding to the target first available deployment resource is determined as the target running node corresponding to the first application.
[0109] In step S204, a running unit is created in a target running node of the target node pool based on the target deployment information, so as to deploy the first application.
[0110] In the application deployment method provided in this embodiment, the first deployment resource required for deploying the first application is determined, the target first available deployment resource that matches the first deployment resource is determined from 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. It is ensured that the available deployment resource of the target running node can meet the resource requirement for deploying the first application, thereby providing a guarantee for successfully deploying the first application.
[0111] In this embodiment, an application deployment method is provided, which can be used for a management node of a resource deployment system. In some embodiments, a distribution component can be arranged in the management node. Accordingly, the application deployment method provided in this embodiment can be specifically applied to the distribution component. FIG. 3 is a flowchart of an application deployment method according to an embodiment of the present disclosure. As shown in FIG. 3, the flowchart includes the following steps:
[0112] In step S301, it is determined whether the target node pool is included in the node pool description information corresponding to the first application. If yes, the target node pool is obtained from the node pool description information, so as to obtain the first association relationship between the first application and the target node pool. If no, the target node pool is determined from the multiple node pools included in the resource deployment system according to the initial deployment information of the first application and the load balancing rule, so as to obtain the first association relationship between the first application and the target node pool.
[0113] Specifically, when the management node obtains the application deployment request, the node pool description information corresponding to the first application is obtained, and it is determined whether the target node pool is included in the node pool description information corresponding to the first application. If the target node pool is included in the node pool description information, the target node pool is obtained from the node pool description information, and the first association relationship between the first application and the target node pool is generated. If the target node pool is not included in the node pool description information, the candidate node pool can be first determined from the multiple node pools included in the resource deployment system based on the load balancing principle, the second available deployment resource of each candidate node pool is obtained, the target second available deployment resource that matches the first deployment resource is determined from the second available deployment resources, and the candidate node pool corresponding to the target second available deployment resource is determined as the target node pool corresponding to the first application.
[0114] The node pool description information can be generated based on the identifier of the target node pool specified by the first user in the application deployment request, or can be the node pool description information generated in advance according to the user demand. The specific process can be referred to the related description in the foregoing, which will not be described here.
[0115] In step S302, first available deployment resources of each running node in the target node pool are acquired.
[0116] In step S303, a target running node corresponding to the first application is determined based on the first available deployment resources of each running node, to obtain target deployment information corresponding to the first application; the target deployment information includes the target node pool and the target running node.
[0117] In step S304, a running unit is created in the target running node of the target node pool based on the target deployment information, to deploy the first application.
[0118] The specific implementation of steps S302 to S304 can refer to the related description in the foregoing, and details are not described herein.
[0119] 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, so as to meet the personalized configuration requirements of the user 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, so as to guarantee the accuracy of the determined target node pool on the basis of avoiding load imbalance, and provide a guarantee for effectively deploying the first application.
[0120] In this embodiment, an application deployment method is provided, which can be used for a management node of a resource deployment system, and in some embodiments, a distribution component can be arranged in the management node. Correspondingly, the application deployment method provided in this embodiment can be specifically applied to the distribution component. FIG. 4 is a flowchart of an application deployment method according to an embodiment of the present disclosure, as shown in FIG. 4, the flowchart includes the following steps:
[0121] In step S401, an application deployment request of a first application and an identifier of at least two target node pools are acquired, and the application deployment request carries initial deployment information of the first application.
[0122] It is considered that in actual application, some users may wish to deploy the application according to the native deployment manner of the resource deployment system, and some users may wish to deploy according to the application deployment manner of the present disclosure. In order to meet the different needs of users, in some embodiments, a label can also be carried in the application deployment request, and the deployment manner is determined based on the label. That is, after the application deployment request of the first application is acquired in step S401, it can further include: if it is determined that the label carried in the application deployment request is the same as a preset label, the identifier of the at least two target node pools is acquired.
[0123] In some embodiments, the application deployment request of the first application can carry the identification of the at least two target node pools, and accordingly, the identification of the at least two target node pools obtained in step S401 can include: obtaining the identification of the at least two target node pools in the application deployment request.
[0124] In some other embodiments, when the management node obtains the application deployment request from the first user, the management node can display a node pool configuration template and obtain the identification of the at least two target node pools submitted by the first user based on the node pool configuration template.
[0125] The first application in the present disclosure can be developed in a single-node pool mode.
[0126] In step S402, if the copies of the first application deployed in the at least two target node pools are completely identical, the first node pool description information is generated based on the first deployment rule and the initial deployment information, and the identification of the at least two target node pools is represented by a node pool list field in the first deployment rule.
[0127] It can be understood that when there are multiple target node pools, the identification of the target node pools is represented by the node pool list field in the first deployment rule, which means that the copies of the first application deployed in the target node pools are completely identical. In actual applications, some users want the copies of the first application deployed in different target node pools to be completely identical, and some users want the copies of the first application deployed in different target node pools to be different. Based on this, in some embodiments, the identification of the target node pools can be represented by different fields to distinguish whether the copies of the first application are completely identical. That is, in step S402, if it is determined that the identification of the at least two target node pools is represented by the node pool list field in the first deployment rule, it is determined that the copies of the first application deployed in the at least two target node pools are completely identical, and the first node pool description information is generated based on the first deployment rule and the initial deployment information. The first node pool description information can include the identification of each target node pool. In some embodiments, the node pool list field can be poolList.
[0128] In step S403, the first association relationship between the first application and the at least two target node pools is generated based on the first node pool description information, and step S406 is executed.
[0129] In step S404, if the copies of the first application deployed in the at least two target node pools are different, the second node pool description information is generated based on the second deployment rule and the initial deployment information, the identification of the at least two target node pools is represented by a request rewriting field in the second deployment rule, and the request rewriting field is used to rewrite the application deployment request into a deployment request for deploying the copies of the first application in each target node pool respectively.
[0130] Specifically, if it is determined that the identifiers of the at least two target node pools are represented by the request override field in the second deployment rule, it is determined that the copies of the first application deployed in the at least two target node pools are different, and the second node pool description information is generated based on the second deployment rule and the initial deployment information. In some embodiments, the request override field can be
[0131] In step S405, the first association relationship between the first application and the at least two target node pools is generated based on the second node pool description information.
[0132] In step S406, the first available deployment resources of each running node in the target node pool are obtained.
[0133] In step S407, the target running node corresponding to the first application is determined based on the first available deployment resources of each running node, to obtain the target deployment information corresponding to the first application; the target deployment information includes the target node pool and the target running node.
[0134] In step S408, a running unit is created in the target running node of the target node pool based on the target deployment information, to deploy the first application.
[0135] The specific implementation process of steps S406 to S408 can be referred to the related description in the foregoing, and the repeated parts will not be described here.
[0136] Further, when the copies of the first application deployed in the at least two target node pools are completely the same, after obtaining the target deployment information corresponding to the first application in step S407, the method can further include:
[0137] establishing a second association relationship between the first application and the copy of the first application;
[0138] If a deletion request of the first application is received, the copy of the first application is determined according to the second association relationship;
[0139] deleting the first application and the copy of the first application.
[0140] Therefore, when the copies of the first application deployed in the at least two target node pools are completely the same, the user sends a deletion request once, and the deletion processing of the first application and each copy thereof can be realized, which reduces the user operation and improves the deletion efficiency.
[0141] According to the application deployment method provided in the embodiment, when a user wants to deploy a copy of a first application in multiple node pools, the identity of a target node pool can be set by using different fields according to the deployment state of the copy of the first application in different target node pools. In this way, without modifying the first application, the copy of the first application can be deployed in multiple node pools by sending one application deployment request, without the user sending multiple application deployment requests. Therefore, without the user paying attention to the network interconnection between underlying resources, an application developed in a single-node pool mode can be directly deployed in multiple node pools, and the application deployment efficiency is improved.
[0142] As one or more specific application embodiments of the present disclosure, as shown in FIG. 5, the resource deployment system can be a K8S system, the management node can be a Master node, 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 the distribution component in the management node obtains an application deployment request, the target deployment information can be obtained based on a directed acyclic graph (DAG). In the DAG, each DAG node describes a set of execution strategies, and FIG. 5 exemplarily shows that the DAG includes three DAG nodes. The K8S system can include at least one management node (only one is shown in FIG. 5) and multiple node pools, and each node pool includes multiple running nodes. Specifically, when the distribution component in the management node obtains an application deployment request from a first user, corresponding processing is performed based on the execution strategies described by the nodes in the DAG, and finally the target deployment information is generated; 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 a target running node of a target node pool, so as to deploy a 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; 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 noted that FIG. 5 is used for illustration only and is not limited, and each node pool can include more running nodes.
[0143] As can be seen, without any modification of the first application, each running unit of the first application is deployed in the same node pool, so that the 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 is avoided.
[0144] An application access method is provided in the embodiment, which can be used in a running node of a resource deployment system. In some embodiments, a discovery component can be arranged in the running node. Accordingly, the application access method provided in the embodiment can be specifically applied to the discovery component. FIG. 6 is a flowchart of the application access method according to an embodiment of the present disclosure. As shown in FIG. 6, the flow includes the following steps:
[0145] In step S601, an access request for a target service of a second application is received.
[0146] The second application is deployed in a running unit of a running node in at least one first node pool according to the application deployment method provided in any of the foregoing embodiments. Specifically, after the second application is deployed in the resource deployment system according to the foregoing application deployment method, when a target service of the second application is accessed by a second user, an access request for the target service of the second application can be sent to the running node. The access request can include a target address of the target service. The target service can correspond to at least one running unit.
[0147] In step S602, the running unit associated with the second application is determined according to the access request.
[0148] Since multiple node pools in the resource deployment system can deploy the second application, in order to accurately determine the target running unit in the node pool where the current running node is located, in some embodiments of the present disclosure, the running units associated with the second application in the resource deployment system are first determined according to the access request. The current running node is the running node that receives the access request.
[0149] In step S603, the target running unit in the first node pool where the current running node is located is filtered out from the associated running units.
[0150] In order to avoid cross-node pool access and cause access failure, 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.
[0151] In step S604, the to-be-forwarded data is determined according to the access request, and the to-be-forwarded data is forwarded to the target running unit.
[0152] The to-be-forwarded data can include five-tuple data, and the five-tuple data can include a source IP address, a source port, a target address, a target port, and a protocol.
[0153] The application access method provided in the embodiment includes the following steps:
[0154] In the embodiment, an application access method is provided, which can be applied to a running node of a resource deployment system. In some embodiments, a discovery component can be arranged in the running node. Accordingly, the application access method provided in the embodiment can be specifically applied to the discovery component. FIG. 7 is a flowchart of the application access method according to the embodiment of the present disclosure. As shown in FIG. 7, the flowchart includes the following steps:
[0155] In step S701, an access request of a target service of a second application is received.
[0156] The implementation manner of step S701 is the same as that of step S601, and reference can be made to the related description in the foregoing.
[0157] In step S702, a running unit associated with the second application is determined according to the access request.
[0158] In some embodiments, step S702 can include the following step S7021 and step S7022.
[0159] In step S7021, a target address corresponding to the target service is determined based on the access request.
[0160] Specifically, the target address corresponding to the target service of the second application is obtained from the access request.
[0161] In step S7022, a running unit list corresponding to the target address is determined based on the target address, so as to obtain the running unit associated with the second application.
[0162] In some embodiments, a third association relationship between the addresses of each service and the running unit list can be established in advance. 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, so as to obtain the running unit associated with the second application.
[0163] Step S703: screening a target running unit in the first node pool where the current running node is located from the associated running units;
[0164] In some embodiments, step S703 can include steps S7031 to S7034 as follows:
[0165] Step S7031: determining, based on the associated running unit, running node information corresponding to the associated running unit;
[0166] To facilitate the determination of the relationship between the running unit and the running node, in some embodiments, a fourth association relationship between the running unit information and the running node information can be established after the creation of the running unit. Accordingly, in step S7031, the running node information of the second application associated running unit is obtained in the fourth association relationship according to the running unit information of the second application associated running unit, and the obtained running node information is determined as the running node information corresponding to the second application associated running unit. The node pool information of the node pool where the running node is located can be included in the running node information.
[0167] Step S7032: obtaining a node pool identifier in the running node information corresponding to the associated running unit;
[0168] Specifically, the node pool identifier is extracted from the running node information corresponding to the second application associated running unit.
[0169] Step S7033: screening, in the node pool identifier in the running node information, a target node pool identifier matching the identifier of the first node pool where the current running node is located;
[0170] Since the extracted node pool identifier can 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 a specified location, and compare the obtained node pool identifier with the node pool identifier in the running node information to obtain the target node pool identifier consistent with the comparison.
[0171] Step S7034: determining, in the associated running unit, a target running unit corresponding to the target node pool identifier.
[0172] Specifically, the running unit corresponding to the target node pool identifier is determined as the target running unit.
[0173] Step S704: determining the data to be forwarded according to the access request, and forwarding the data to be forwarded to the target running unit.
[0174] Further, considering that in actual application, the application can also be deployed according to the native deployment manner of the resource deployment system, in order to realize effective access of the target service, in some embodiments, when the management node receives the access request, the management node can also include, obtaining the target address corresponding to the target service from the received access request, determining whether the target address is associated with the preset service; if yes, it is determined that the second application corresponding to the access request is deployed according to the application deployment manner provided in the foregoing embodiments; if no, it is determined that the second application corresponding to the access request is deployed according to the native deployment manner.
[0175] In the application access method provided in the embodiment, the target address corresponding to the target service is determined based on the access request, the running unit associated with the second application is determined based on the target address, and the running node information corresponding to the associated running unit is determined; and in the node pool identifier included in the running node information, the target node pool identifier matching the identifier of the first node pool in which the current running node is located is filtered out, so that the target running unit is determined. It is ensured that the determined target running unit is located in the first node pool in which the current running unit is located, cross-node data forwarding is avoided, and the success rate of forwarding the to-be-forwarded data is improved.
[0176] In the embodiment, an application deployment apparatus is also provided, which is used to implement the above-described embodiments and preferred embodiments, and will not be described herein. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
[0177] The application deployment apparatus provided in the embodiment includes, as shown in FIG. 8:
[0178] The first obtaining module 801 is configured to obtain a first association relationship between a first application and a target node pool, the first association relationship being 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 represent native information required for deploying the first application in the resource deployment system;
[0179] The second obtaining module 802 is configured to obtain first available deployment resources of each running node in the target node pool;
[0180] The first determining module 803 is configured to determine a target running node corresponding to the first application based on the first available deployment resources of the each running node, so as to obtain target deployment information corresponding to the first application, the target deployment information including the target node pool and the target running node;
[0181] The creating module 804 is configured to create a running unit in a target running node of the target node pool based on the target deployment information, so as to deploy the first application.
[0182] In some optional embodiments, the first determining module 803 is specifically configured to:
[0183] determine a target first available deployment resource that matches the first deployment resource from the first available deployment resources;
[0184] determine a running node corresponding to the target first available deployment resource as a target running node corresponding to the first application.
[0185] In some optional embodiments, the apparatus further includes a second determining module.
[0186] The second determining module is configured to determine whether the target node pool is included in the node pool description information before obtaining a first association relationship between the first application and the target node pool.
[0187] If yes, the target node pool is obtained from the node pool description information.
[0188] If no, a target node pool from a plurality of node pools included in the resource deployment system is determined according to the initial deployment information and a load balancing rule.
[0189] In some optional embodiments, the first obtaining module 801 is specifically configured to:
[0190] obtain an application deployment request of the first application and identifiers of at least two target node pools, the application deployment request carrying the initial deployment information;
[0191] If the copies of the first application deployed in the at least two target node pools are completely identical, a first node pool description information is generated based on a first deployment rule and the initial deployment information; the identifiers of the at least two target node pools are represented by a node pool list field in the first deployment rule.
[0192] A first association relationship between the first application and the at least two target node pools is generated based on the first node pool description information.
[0193] In some optional embodiments, the apparatus further includes a deleting module.
[0194] The deleting module is configured to establish a second association relationship between the first application and the copies.
[0195] If a deletion request of the first application is received, the copies associated with the first application are determined according to the second association relationship.
[0196] performing a deletion process on the first application and the copy.
[0197] In some optional embodiments, the first obtaining module 801 is further configured to:
[0198] If the copies of the first application deployed in at least two of the target node pools are different, the second node pool description information is generated based on a second deployment rule and the initial deployment information, the identities of the at least two target node pools are represented by a request rewriting field in the second deployment rule, and the request rewriting field is used to rewrite the application deployment request into deployment requests for deploying the copies of the first application in the respective target node pools.
[0199] The first association relationship between the first application and the at least two target node pools is generated based on the second node pool description information.
[0200] In some optional embodiments, the apparatus further includes a third obtaining module.
[0201] The third obtaining module is configured to, after the first obtaining module 801 obtains the application deployment request of the first application, if a tag carried in the application deployment request is the same as a preset tag, obtain the identities of the at least two target node pools.
[0202] The application deployment apparatus provided in this embodiment obtains the first association relationship between the first application and the target node pools and the first available deployment resources of the nodes in the target node pools, determines the target running nodes corresponding to the first application based on the first available deployment resources, obtains the target deployment information corresponding to the first application, and creates a running unit in the target running nodes 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. Thus, based on the native information required for deploying the first application, the first association relationship between the first application and the target node pools is obtained with the aid of the node pool description information corresponding to the first application, the target running nodes corresponding to the first application in the target node pools are determined, and the first application is deployed in the target running nodes. Without any modification of the first application, each running unit of the first application can be deployed in the same node pool, thereby avoiding the failure of business processing caused by the communication across node pools between different running units when the first application is used for business processing.
[0203] Further function descriptions of the above modules and units are the same as those of the corresponding embodiments, which will not be repeated here.
[0204] The application deployment apparatus in the embodiments is presented in the form of functional units, where the units refer to ASIC (Application Specific Integrated Circuit) circuits, processors and memories that execute one or more software or fixed programs, and / or other devices that can provide the above functions.
[0205] The application access apparatus is also provided in the embodiments, which is used to implement the above embodiments and preferred embodiments, and will not be described herein. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, implementation of hardware, or a combination of software and hardware, is also possible and contemplated.
[0206] The application access apparatus provided in the embodiments includes the following components, as shown in FIG. 9:
[0207] The receiving module 901 is configured to receive an access request for a target service of a second application; the second application is deployed in a running unit of a running node in at least one first node pool according to the application deployment method provided in any of the preceding embodiments;
[0208] The determining module 902 is configured to determine, according to the access request, a running unit associated with the second application;
[0209] The screening module 903 is configured to screen a target running unit in a node pool where a current running node is located from the associated running unit;
[0210] The forwarding module 904 is configured to determine to-be-forwarded data according to the access request, and forward the to-be-forwarded data to the target running unit.
[0211] In some optional embodiments, the determining module 902 is specifically configured to:
[0212] determine a target address corresponding to the target service based on the access request;
[0213] determine a corresponding running unit list based on the target address, to obtain the running unit associated with the second application.
[0214] In some optional embodiments, the screening module 903 is specifically configured to:
[0215] determine running node information corresponding to the associated running unit based on the associated running unit;
[0216] obtain a node pool identifier in the running node information corresponding to the associated running unit.
[0217] In the node pool identifier in the running node information, a target node pool identifier matching the identifier of the first node pool where the current running node is located is screened out;
[0218] A target running unit corresponding to the target node pool identifier is determined in the associated running unit.
[0219] The application access device provided in the embodiment determines the target address corresponding to the target service based on the access request, determines the running unit associated with the second application based on the target address, and determines the running node information corresponding to the associated running unit. In the node pool identifier included in the running node information, a target node pool identifier matching the identifier of the first node pool where the current running node is located is screened out, so as to determine the target running unit. It is ensured that the determined target running unit is located in the first node pool where the current running unit is located, cross-node data forwarding is avoided, and the success rate of the to-be-forwarded data is improved.
[0220] Further function descriptions of the above various modules and units are the same as those of the above corresponding embodiments, and will not be described here.
[0221] The application access device in the embodiment is presented in the form of a functional unit. The unit herein refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and a memory executing one or more software or fixed programs, and / or other devices that can provide the above functions.
[0222] The disclosure embodiments also provide a computer device having the application deployment device shown in FIG. 8 or the application access device shown in FIG. 9.
[0223] Referring to FIG. 10, FIG. 10 is a structural diagram of a computer device according to an optional embodiment of the present disclosure. As shown in FIG. 10, 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. The various components communicate with each other using different buses, and can be mounted on a common main board or mounted in other manners as needed. The processor can process instructions executed within the computer device, including instructions stored in the memory or on the memory to display graphical information of a GUI on an external input / output device such as a display device coupled to the interface. In some optional embodiments, multiple processors and / or multiple buses can be used with multiple memories and multiple memory banks, if necessary. Also, multiple computer devices can be connected, each device providing part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). One processor 10 is taken as an example in FIG. 10.
[0224] The processor 10 can be a central processor, a network processor, or a combination thereof. The processor 10 can further include a hardware chip. The hardware chip can be an application specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device can be a complex programmable logic device, a field programmable logic device, a general array logic, or any combination thereof.
[0225] The memory 20 stores instructions executable by the at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiments.
[0226] The memory 20 can include a program storage area and a data storage area. The program storage area can store an operating system and application programs required by at least one function; the data storage area can store data created according to the use of the computer device, etc. In addition, the memory 20 can include a high-speed random access memory, and can also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state memory device. In some optional embodiments, the memory 20 can optionally include a memory remotely arranged with respect to the processor 10, and these remote memories can be connected to the computer device through a network. Examples of the network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0227] The memory 20 can include a volatile memory, such as a random access memory; the memory can also include a non-volatile memory, such as a flash memory, a hard disk, or a solid-state disk; and the memory 20 can further include a combination of the above kinds of memories.
[0228] 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 20 can be connected by a bus or other means, and are connected by a bus in FIG. 10 as an example.
[0229] The input device 30 can receive inputted digital or character information, and generate key signal input related to user settings and function control of the computer device, such as a touch screen, a keypad, a mouse, a trackpad, a touchpad, a pointing stick, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 can include a display device, an auxiliary lighting device (e.g., an LED), a tactile feedback device (e.g., a vibration motor), etc. The display device includes, but is not limited to, a liquid crystal display, a light emitting diode, a display, and a plasma display. In some alternative embodiments, the display device can be a touch screen.
[0230] The embodiments of the present disclosure further provide a computer readable storage medium, and the method according to the embodiments of the present disclosure can be implemented in hardware, firmware, or recorded in a storage medium, or be implemented as computer code downloaded from a network and stored in a remote storage medium or a non-transitory machine readable storage medium and then stored in a local storage medium, so that the method described herein can be processed by such software using a general purpose computer, a special purpose processor, or programmable or special hardware. The storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, or a solid state disk, etc. Further, the storage medium can also include a combination of the above-mentioned types of memories. It can be understood that the computer, the processor, the microprocessor controller, or the 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 the computer, the processor, or the hardware, the method shown in the above embodiments is implemented.
[0231] Part of the present disclosure can be applied as a computer program product, for example, computer program instructions, when executed by a computer, through the operation of the computer, the method and / or technical solutions according to the present disclosure can be called or provided. Those skilled in the art should understand that the form of computer program instructions in a computer readable medium includes but is not limited to source files, executable files, installation package files, etc. Correspondingly, the way of executing the computer program instructions by the computer includes but is not limited to: the computer directly executes the instructions, or the computer executes the corresponding compiled program after compiling the instructions, or the computer reads and executes the instructions, or the computer executes the corresponding installed program after reading and installing the instructions. Here, the computer readable medium can be any available computer readable storage medium or communication medium accessible to the computer.
[0232] It can be understood that, before using the technical solutions disclosed in the embodiments of the present disclosure, the type of personal information involved in the present disclosure, the use range, the use scenario and the like should be informed to the user and the authorization of the user should be obtained through appropriate means according to relevant laws and regulations.
[0233] For example, in response to receiving the active request of the user, the prompt information is sent to the user to explicitly prompt the user that the operation requested to be performed will require obtaining and using the personal information of the user. Thus, the user can autonomously select whether to provide the personal information to the software or hardware such as the electronic device, the application program, the server or the storage medium performing the operation of the technical solutions of the present disclosure according to the prompt information.
[0234] As an optional but non-limiting implementation manner, in response to receiving the active request of the user, the manner of sending the prompt information to the user may, for example, be a pop-up window manner, and the prompt information may be presented in the form of text in the pop-up window. In addition, the pop-up window may also carry a selection control for the user to select “agree” or “disagree” to provide the personal information to the electronic device.
[0235] It can be understood that the above notification and obtaining of the authorization of the user are only illustrative, and do not limit the implementation manners of the present disclosure, and other manners meeting the relevant laws and regulations can also be applied to the implementation manners of the present disclosure.
[0236] Although the embodiments of the present disclosure are described in combination with the drawings, various modifications and variations can be made by those skilled in the art without departing from the spirit and scope of the present disclosure, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. An application deployment method, wherein, The method, applied to a management node of a resource deployment system, includes: Obtain a first association relationship between the first application and the target node pool; 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, wherein the initial deployment information is used to characterize the native information required to deploy the first application in the resource deployment system; Obtain the first available deployment resources for each running node in the target node pool; Based on the first available deployment resources of each running node, the target running node corresponding to the first application is determined to obtain the target deployment information corresponding to the first application; the target deployment information includes the target node pool and the target running node; Based on the target deployment information, a running unit is created in the target running node of the target node pool to deploy the first application.
2. The method according to claim 1, wherein, The step of determining the target running node corresponding to the first application based on the first available deployment resources of each running node includes: Based on the initial deployment information, the first deployment resources required to deploy the first application are determined; Identify the target first available deployment resource that matches the first deployment resource among the first available deployment resources; The running node corresponding to the first available deployment resource of the target is determined as the target running node corresponding to the first application.
3. The method according to claim 1, wherein, 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 the target node pool; If so, the target node pool is obtained from the node pool description information; If not, then based on the initial deployment information and load balancing rules, determine the target node pool among the multiple node pools included in the resource deployment system.
4. The method according to claim 1, wherein, The step of obtaining the first association relationship between the first application and the target node pool includes: Obtain the application deployment request of the first application and the identifiers of at least two 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 identical, then a first node pool description is generated 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. Based on the first node pool description information, a first association relationship is generated between the first application and at least two of the target node pools.
5. The method according to claim 4, wherein, After obtaining the target deployment information corresponding to the first application, the method further includes: Establish a second association between the first application and the copy; If a deletion request from the first application is received, the copy associated with the first application is determined according to the second association relationship; The first application and its copy are deleted.
6. The method according to claim 4, wherein, The step of obtaining the first association relationship between the first application and the target node pool also includes: If there are differences between the copies of the first application deployed in at least two of the target node pools, then based on the second deployment rule and the initial deployment information, second node pool description information is generated. The identifiers of the 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 to deploy copies of the first application in each of the target node pools respectively. A first association relationship is generated between the first application and at least two of the target node pools based on the second node pool description information.
7. The method according to claim 4, wherein, After obtaining the application deployment request of the first application, the method further includes: If the tag carried in the application deployment request is the same as the preset tag, then the identifiers of the at least two target node pools are obtained.
8. An application access method, wherein, The method, applied to the runtime node of a resource deployment system, includes: Receive an access request for the target service of the second application; the second application is deployed in the running unit of at least one running node in the first node pool according to the application deployment method of any one of claims 1 to 7; Based on the access request, determine the operating unit associated with the second application; Filter the target running units in the first node pool where the current running node is located from the associated running units; Based on the access request, determine the data to be forwarded, and forward the data to be forwarded to the target running unit.
9. The method according to claim 8, wherein, The step of determining the operating unit associated with the second application based on the access request includes: The target address corresponding to the target service is determined based on the access request; Based on the target address, a list of corresponding running units is determined, and the running unit associated with the second application is obtained.
10. The method according to claim 8, wherein, The step of filtering the target running unit from the associated running units within the first node pool where the current running node resides includes: Based on the associated running units, determine the running node information corresponding to the associated running units; Obtain the node pool identifier from the running node information corresponding to the associated running unit; Among the node pool identifiers in the running node information, the target node pool identifier that matches the identifier of the first node pool where the current running node is located is selected. The target running unit corresponding to the target node pool identifier is determined from the associated running units.
11. An application deployment apparatus, wherein, The device, used as a management node in a resource deployment system, includes: The first acquisition module is used to acquire a first association relationship between the first application and the target node pool. 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. The initial deployment information is used to characterize the native information required to deploy the first application in the resource deployment system. The second acquisition module is used to acquire the first available deployment resources of each running node in the target node pool; The first determining module is used to determine the target running node corresponding to the first application based on the first available deployment resources of each running node, so as to obtain the target deployment information corresponding to the first application. The target deployment information includes the target node pool and the target running node. A creation module is used to create 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.
12. An application access device, wherein, The device is used as a runtime node in a resource deployment system and includes: A receiving module is configured to receive an access request for the target service of a second application; the second application is deployed in a running unit of a node running in at least one first node pool according to the application deployment method according to any one of claims 1 to 7. The determining module is used to determine the running unit associated with the second application based on the access request; The filtering module is used to filter out the target running units 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 based on the access request and forward the data to be forwarded to the target running unit.
13. A computer device, wherein, include: A memory and a processor are communicatively connected, the memory stores computer instructions, and the processor executes the computer instructions to perform the application deployment method of any one of claims 1 to 7, or the application access method of any one of claims 8 to 10.
14. A computer-readable storage medium, wherein, The computer-readable storage medium stores computer instructions for causing the computer to perform the application deployment method of any one of claims 1 to 7, or the application access method of any one of claims 8 to 10.
15. A computer program product, wherein, It includes computer instructions for causing a computer to perform the application deployment method of any one of claims 1 to 7, or the application access method of any one of claims 8 to 10.
Citation Information
Patent Citations
Service updating method and device, computer equipment and storage medium
CN113407222A
Application deployment method and device for distributed system, electronic equipment and medium
CN114911494A
Task scheduling method and device, equipment and storage medium
CN114911598A
Resource scheduling method and device, equipment and storage medium
CN115061811A
Application deployment method and device, application access method and device, equipment and storage medium
CN118394357A