Application example configuration method and device
By obtaining the construction explanation information of the application deployment model, determining the target application environment and adjusting the number of application instances according to the concurrency amount of the instance request, the problem of fixed number of instances in the prior art is solved, and dynamic configuration and flexible adjustment of application instances are realized. Improved deployment adaptability.
Patent Information
- Application Number
- CN202210446193.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-26
- Publication Date
- 2025-01-14
- Estimated Expiration
- 2042-04-26
AI Technical Summary
In the existing application deployment method, the number of instances is fixed and cannot be dynamically adjusted according to the actual operation requirements of the application instance, resulting in insufficient flexibility and manual intervention is required.
By obtaining the construction instructions of the application deployment model uploaded by the user, determining the target application environment, and adjusting the number of application instances according to the concurrency amount of instance requests, and dynamically configure the application instances.
It realizes flexible adjustment of the number of application instances without manual intervention, meets the actual operation needs of application instances, and improves the dynamicity and flexibility of deployment.
Smart Images

Figure CN115033338B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of cloud technology, and in particular to an application instance configuration method and device. Background Art
[0002] An application instance is an actual application in an application. For example, an application can log in to an account, and the account logged in to the application is the application instance of the application. In the process of deploying an application, the application instance of the application needs to be configured to realize the actual application after the application is deployed. At present, there are two mainstream modes for the deployment of applications: one is a mode based on a virtual machine, in which the application is packaged in the form of a package, such as a jar or war for a Java-based application. The user deploys the application package (jar / war, etc.) to an application server based on a virtual machine (such as tomcat) manually or automatically, and then restarts the application. The other is a mode based on an application container engine (Docker) and a container cluster management system (Kubernetes, referred to as K8s): the application is packaged in the form of a Docker image, and the user deploys the application through the K8s platform using visualization tools or K8s command line tools, etc., to ensure that a certain number of instances are deployed for the application and to achieve rolling upgrades.
[0003] In the two deployment methods of the related technologies, the number of deployed instances is fixed in advance, and any adjustment requires manual intervention, and cannot be dynamically and flexibly adjusted according to the actual operation requirements of the application instance. Summary of the invention
[0004] In view of this, the present invention provides an application instance configuration method, through which, after the application is deployed through the application deployment model, the number of instances can be flexibly adjusted according to the instance request concurrency of the application instance and the application instance can be deployed.
[0005] The present invention also provides an application example configuration device to ensure the implementation and application of the above method in practice.
[0006] An application instance configuration method, comprising:
[0007] Obtain the build description information uploaded by the user to the preset application deployment model;
[0008] Based on the build description information, determining a target application environment for using the application instance, the application deployment model comprising a plurality of application environments;
[0009] Deploy the target application corresponding to the build description information in the target application environment, and control the application deployment model to set instance properties of the application instance of the target application;
[0010] Adjusting the number of application instances of the target application based on the instance request concurrency in the instance attribute;
[0011] Based on the adjusted number of instances, the application deployment model is controlled to configure the application instances of the target application.
[0012] In the above method, optionally, determining the target application environment for running the application instance based on the build description information includes:
[0013] The environment configuration parameters included in the build description information are obtained, and based on the environment configuration parameters, a target application environment for running the application instance is determined.
[0014] In the above method, optionally, the controlling the application deployment model to set the instance attribute of the application instance of the target application includes:
[0015] Determine each environment entry included in the target application environment;
[0016] Based on the construction description information, selecting a target environment entry corresponding to the application instance of the target application from each of the environment entries of the target application environment;
[0017] Determining, based on the application type of the target application, an entry deployment configuration corresponding to the target environment entry;
[0018] The application deployment model is controlled to set instance properties of the application instance of the target application based on the entry deployment configuration.
[0019] In the above method, optionally, controlling the application deployment model to configure instance attributes of the application instance of the target application includes:
[0020] Obtaining configuration description information of the application instance of the target application included in the build description information;
[0021] Based on the configuration description information, the application deployment model is controlled to set instance properties of the application instance of the target application.
[0022] In the above method, optionally, the instance attribute further includes: an exclusive engine attribute; the method further includes:
[0023] Based on the exclusive engine attribute, determining whether the constructed application instance requires an independent engine for deployment;
[0024] If the constructed application instance requires an independent engine for deployment, then based on the grouping version in the instance attribute, in a preset computing resource model, determine the optimal computing resource grouping corresponding to the constructed application instance, wherein the computing resource model includes at least one cluster, each cluster includes multiple computing resource groups, and each computing resource group includes at least one virtual machine group and at least one K8S group;
[0025] The optimal computing resource grouping is applied to configure computing resources for the constructed application instance.
[0026] An application instance configuration device, comprising:
[0027] An acquisition unit, used to acquire the building description information uploaded by the user to the preset application deployment model;
[0028] A determination unit, configured to determine a target application environment for using the application instance based on the construction description information, wherein the application deployment model includes multiple application environments;
[0029] A setting unit, configured to deploy a target application corresponding to the build description information in the target application environment, and control the application deployment model to set instance properties of an application instance of the target application;
[0030] An adjusting unit, configured to adjust the number of application instances of the target application based on the instance request concurrency in the instance attribute;
[0031] A configuration unit is used to control the application deployment model to configure the application instance of the target application based on the adjusted number of instances.
[0032] In the above device, optionally, the determining unit includes:
[0033] The determination subunit is used to obtain the environment configuration parameters contained in the building description information, and determine the target application environment for running the application instance based on the environment configuration parameters.
[0034] In the above device, optionally, the setting unit includes:
[0035] A second determining subunit, used to determine each environment entry included in the target application environment;
[0036] A selection subunit, configured to select, based on the construction description information, a target environment entry corresponding to the application instance of the target application from among the environment entries of the target application environment;
[0037] A third determining subunit is used to determine the entry deployment configuration corresponding to the target environment entry based on the application type of the target application;
[0038] The setting subunit is used to control the application deployment model to set the instance attributes of the application instance of the target application based on the entry deployment configuration.
[0039] A storage medium includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the above-mentioned application instance configuration method.
[0040] An electronic device includes a memory and one or more instructions, wherein the one or more instructions are stored in the memory and are configured to be executed by one or more processors to perform the above-mentioned application instance configuration method.
[0041] Compared with the prior art, the present invention has the following advantages:
[0042] The present invention provides an application instance configuration method, including: obtaining a construction description uploaded by a user to a preset application deployment model; determining a target application environment for using the application instance based on the construction description; deploying a target application in the target application environment, controlling the application deployment model to configure the instance attributes of the application instance of the target application; adjusting the number of instances based on the instance request concurrency in the instance attributes; and controlling the application deployment model to configure the application instance of the target application based on the adjusted number of instances. The method provided by the present invention does not require manual intervention, and can flexibly adjust the number of instances according to the instance request concurrency of the application instance, thereby realizing dynamic and flexible adjustment of the actual operation requirements of the application instance. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0044] Figure 1 A method flow chart of an application example configuration method provided by an embodiment of the present invention;
[0045] Figure 2 Another method flow chart of an application example configuration method provided by an embodiment of the present invention;
[0046] Figure 3 A schematic diagram of the structure of an application deployment model provided by an embodiment of the present invention;
[0047] Figure 4 A flowchart of another method of configuring an application example provided by an embodiment of the present invention;
[0048] Figure 5 A schematic diagram of the structure of a computing resource model provided by an embodiment of the present invention;
[0049] Figure 6 A device structure diagram of a device for configuring an application example provided by an embodiment of the present invention;
[0050] Figure 7 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0051] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0052] In this application, relational terms such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. The terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of more restrictions, the elements defined by the sentence "comprise one..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0053] The present invention can be used in many general or special computing device environments or configurations, such as personal computers, server computers, handheld or portable devices, tablet devices, multi-processor devices, distributed computing environments including any of the above devices or devices, etc.
[0054] The embodiment of the present invention provides an application instance configuration method, which can be applied to a variety of system platforms, and its execution subject can be a computer terminal or a processor of various mobile devices. The method flow chart of the method is as follows: Figure 1 As shown, specifically including:
[0055] S101: Obtaining construction description information uploaded by a user to a preset application deployment model.
[0056] Specifically, the build instructions include descriptions of the application version, environment configuration parameters, entry configuration, and build results.
[0057] S102: Determine a target application environment for using the application instance based on the construction description information.
[0058] Among them, the application deployment model includes multiple application environments, each of which includes a test environment, a pre-release environment, and a production environment.
[0059] Specifically, based on the build description information, determining the target application environment for running the application instance may include:
[0060] The environment configuration parameters included in the building description information are obtained, and based on the environment configuration parameters, a target application environment of the application instance to be built is determined.
[0061] Optionally, in an embodiment of the present invention, after obtaining the build instructions, the build instructions can be deployed in the test and pre-release environments, and finally deployed to the production environment. For different application environments, the corresponding functions implemented are all different.
[0062] For example, when the environment configuration parameter is 0, the application environment corresponding to the parameter is a test environment; when the environment configuration parameter is 1, the application environment corresponding to the parameter is a pre-release environment; when the environment configuration parameter is 2, the application environment corresponding to the parameter is a production environment.
[0063] S103: deploying a target application corresponding to the build description information in the target application environment, and controlling the application deployment model to set instance properties of an application instance of the target application.
[0064] The instance attributes include time range, number of instances, group version, and concurrent instance requests. The target application is an application deployed and running in the target application environment.
[0065] It should be noted that the number of instances can be a single value or a value range, and the value range includes a maximum value and a minimum value.
[0066] S104: Adjust the number of application instances of the target application based on the instance request concurrency in the instance attribute.
[0067] In the embodiment of the present invention, the instance configuration is dynamic and can be adjusted dynamically according to time and instance request concurrency. A group version configuration can correspond to one or more instance configurations. There is a time range attribute in the instance configuration, which means that the configuration is only effective within this time range. The time ranges of multiple instance configurations cannot overlap. If it is not filled in, it applies to all times. The number of instances is also an interval value. The initial value is the minimum value. The specific value is dynamically adjusted according to the request concurrency, but it will not exceed the maximum value. Single instance TPS represents the processing capacity of each instance. The system should calculate how many instances should be based on the current TPS, and then adjust the number of instances in the instance number interval value. If it is a special value (such as -1), it means that it is not dynamically adjusted according to TPS.
[0068] It is understandable that when the number of instances is greater than the requirement for the concurrency of instance requests, the number of instances is dynamically adjusted.
[0069] S105: Based on the adjusted number of instances, controlling the application deployment model to configure application instances of the target application.
[0070] It should be noted that during the actual operation of the target application, the instance request concurrency in the instance attributes can change in real time. After the instance request concurrency changes, the number of instances can be changed in real time according to the instance request concurrency to implement the configuration of the application instance of the target application.
[0071] In the method provided by the embodiment of the present invention, when it is necessary to configure an application instance of a target application, the build instructions uploaded in advance to the application deployment model by the user are obtained, and the target application environment of the running application instance is determined through the build instructions. After the target application is deployed in the target application environment, the instance properties are set through the application deployment model, and the number of instances is adjusted according to the number of instances and the concurrency of instance requests in the instance properties, and the application instance of the target application is configured according to the adjusted number of instances.
[0072] By applying the method provided by the embodiment of the present invention, after deploying the target application in the target application environment, the instance attributes of the application instance are set, and the number of instances is adjusted according to the concurrent amount of instance requests in the instance attributes.
[0073] In the method provided by the embodiment of the present invention, the application deployment model includes test, pre-release and production environments, and each application environment can deploy multiple versions of applications. If it is necessary to deploy to a test or pre-release environment, it is deployed directly. If it is necessary to deploy to a production environment, an approval process is required. The implementation process of the approval process is as follows:
[0074] When the target application environment is a production environment, the application version of the target application to be configured contained in the build description information is obtained; the application version is approved; when the application version is approved, the target application is allowed to be deployed in the target application environment based on the build description information.
[0075] Specifically, an application can have multiple build versions. For each build, the user can fill in the build instructions. The successfully built version can be deployed to the test and pre-release environments. However, to deploy to the production environment, an approval process is required. Only the approved version can be deployed to the production environment.
[0076] In the method provided in the embodiment of the present invention, the process of configuring instance attributes can be implemented in multiple ways, see Figure 2 , the controlling the application deployment model to configure the instance attributes of the application instance of the target application may specifically include:
[0077] S201: Determine each environment entry included in the target application environment.
[0078] In an embodiment of the present invention, each application environment in the application deployment model may have multiple entrances, including at least one default entrance and at least one custom entrance.
[0079] It should be noted that the inlet is used to isolate traffic, and each inlet has its own deployment configuration. The deployment configuration includes isolation mode and group version configuration. The isolation mode is different for different types of applications. For HTTP applications, it can be the HTTP request path or the virtual machine host name. For microservice applications like Spring Cloud / Dubbo, it can be the service alias. The group version configuration can have multiple records. The unique identifier of the record is cluster + group + version. The environment attributes of the group must match the deployment environment. In this way, a deployment declaration can be deployed to multiple groups and multiple versions.
[0080] S202: Based on the building description information, select a target environment entry corresponding to the application instance of the target application from each of the environment entries in the target application environment.
[0081] It can be understood that, according to the build description information, the target environment entry is selected from various environment entries of the target application environment.
[0082] S203: Determine the entry deployment configuration corresponding to the target environment entry based on the application type of the target application.
[0083] The deployment configuration includes information such as the HTTP path, virtual machine host, and service alias.
[0084] S204: Control the application deployment model to set instance properties of the application instance of the target application based on the entry deployment configuration.
[0085] In the embodiment of the present invention, the instance attributes are configured based on the entry deployment configuration through the application deployment model, that is, the time range, the number of instances, the group version and the concurrent number of instance requests are configured.
[0086] In one embodiment of the present invention, a target environment entry of an application instance to be constructed is determined, an entry deployment configuration corresponding to the target environment entry is configured, and instance attributes are configured through the entry deployment configuration.
[0087] Specific reference Figure 3 , Figure 3 This is a structural diagram of the application deployment model, which includes test, pre-release, and production environments. Each environment has at least one default entry. In actual application, you can add custom entries as needed. Through each entry, you can perform operations such as entry deployment configuration, group version configuration, and instance configuration. Among them, instance configuration is instance attribute.
[0088] refer to Figure 4 In the method provided by the embodiment of the present invention, the controlling the application deployment model to configure the instance attributes of the application instance of the target application may specifically include:
[0089] S401: Acquire configuration description information of the application instance of the target application included in the build description information.
[0090] S402: Based on the configuration description information, control the application deployment model to set instance properties of the application instance of the target application.
[0091] It is understandable that the instance attributes of the application instance may be related configuration description information defined by the user in advance through the build instructions, and the instance attributes are set according to the configuration description information.
[0092] By applying the method provided in the embodiment of the present invention, dynamic adjustment of application instances can be achieved by configuring instance attributes.
[0093] Further, refer to Figure 3 In the application deployment model, instance attributes can include exclusive engine attributes in addition to time range, number of instances, group version, and instance request concurrency.
[0094] It should be noted that an exclusive engine means that the application requires an independent engine and cannot be deployed together with other applications to achieve better isolation, while a non-exclusive engine means that it can be deployed together with other applications to save resources. Therefore, the exclusive engine attribute is used to indicate whether an application instance requires an exclusive engine.
[0095] For example, if the exclusive engine attribute in the application instance is 0, it indicates a non-exclusive engine; if the exclusive engine attribute in the application instance is 1, it indicates an exclusive engine.
[0096] Furthermore, in addition to processing the application deployment model, the embodiment of the present invention may also include a computing resource model.
[0097] Specifically, when the instance attribute includes an exclusive engine attribute, the method provided by the embodiment of the present invention may further include:
[0098] Based on the exclusive engine attribute, determining whether the constructed application instance requires an independent engine for deployment;
[0099] If the constructed application instance requires an independent engine for deployment, then based on the grouping version in the instance attribute, in a preset computing resource model, determine the optimal computing resource grouping corresponding to the constructed application instance, wherein the computing resource model includes at least one cluster, each cluster includes multiple computing resource groups, and each computing resource group includes at least one virtual machine group and at least one K8S group;
[0100] The optimal computing resource grouping is applied to configure computing resources for the constructed application instance.
[0101] It should be noted that the computing resource model includes clusters and groups. Among them, clusters and groups are both abstractions of computing resources. There are 0 or more groups under a cluster, and a group belongs to only one cluster. Clusters have names and remarks. In addition, clusters are units of permission control, including a list of members who can use the cluster. A group is an abstract resource pool. There are two specific types of groups: virtual machine groups and K8s groups. The common attributes of the two types of groups include names, remarks, and an environment attribute, and the values include testing, pre-release, and production. The computing resources under the group are represented by engines. For virtual machine groups, the group is directly associated with multiple IPs, which generally need to be added by users. For K8s groups, the group is associated with a K8s namespace. Accessing the namespace requires K8sAPI server, K8s namespace, and K8s token. The engine under the K8s group is automatically created by K8s and does not need to be added manually by users. The properties of the model are shown in Table 1:
[0102]
[0103]
[0104] Table 1
[0105] refer to Figure 5 , Figure 5 This is a model structure diagram of the computing resource model. For virtual machine grouping and K8S grouping, the engines corresponding to the two groups are different.
[0106] The specific implementation processes and derivative methods of the above-mentioned embodiments are all within the protection scope of the present invention.
[0107] and Figure 1 Corresponding to the method described above, the embodiment of the present invention further provides an application instance configuration device for Figure 1 The specific implementation of the method in the embodiment of the present invention, the application example configuration device provided in the embodiment of the present invention can be applied to a computer terminal or various mobile devices, and its structural diagram is as follows Figure 6 As shown, specifically including:
[0108] The acquisition unit 601 is used to acquire the construction description information uploaded by the user to the preset application deployment model;
[0109] A determination unit 602 is used to determine a target application environment for using the application instance based on the construction description information, wherein the application deployment model includes multiple application environments;
[0110] A setting unit 603 is used to deploy the target application corresponding to the build description information in the target application environment, and control the application deployment model to set instance properties of the application instance of the target application;
[0111] An adjusting unit 604, configured to adjust the number of application instances of the target application based on the instance request concurrency in the instance attribute;
[0112] The configuration unit 605 is used to control the application deployment model to configure the application instance of the target application based on the adjusted number of instances.
[0113] In the device provided by the embodiment of the present invention, when it is necessary to configure an application instance of a target application, the build instructions uploaded in advance to the application deployment model by the user are obtained, and the target application environment of the running application instance is determined through the build instructions. After the target application is deployed in the target application environment, the instance attributes are set through the application deployment model, and the number of instances is adjusted according to the number of instances and the concurrency of instance requests in the instance attributes, and the application instance of the target application is configured according to the adjusted number of instances.
[0114] By using the device provided by the embodiment of the present invention, after deploying the target application in the target application environment, the instance attributes of the application instance are set, and the number of instances is adjusted according to the concurrent amount of instance requests in the instance attributes.
[0115] In the device provided by the embodiment of the present invention, the determining unit includes:
[0116] The determination subunit is used to obtain the environment configuration parameters contained in the building description information, and determine the target application environment for running the application instance based on the environment configuration parameters.
[0117] In the device provided by the embodiment of the present invention, the setting unit includes:
[0118] A second determining subunit, used to determine each environment entry included in the target application environment;
[0119] A selection subunit, configured to select, based on the construction description information, a target environment entry corresponding to the application instance of the target application from among the environment entries of the target application environment;
[0120] A third determining subunit is used to determine the entry deployment configuration corresponding to the target environment entry based on the application type of the target application;
[0121] The setting subunit is used to control the application deployment model to set the instance attributes of the application instance of the target application based on the entry deployment configuration.
[0122] In the device provided by the embodiment of the present invention, the determining unit includes:
[0123] Obtaining configuration description information of the application instance of the target application included in the build description information;
[0124] Based on the configuration description information, the application deployment model is controlled to set instance properties of the application instance of the target application.
[0125] In the device provided by the embodiment of the present invention, the instance attribute further includes: an exclusive engine attribute; the device further includes:
[0126] A judgment unit is used to judge whether the constructed application instance requires an independent engine for deployment based on the exclusive engine attribute; if the constructed application instance requires an independent engine for deployment, then based on the grouping version in the instance attribute, in a preset computing resource model, the optimal computing resource grouping corresponding to the constructed application instance is determined, the computing resource model includes at least one cluster, each cluster includes multiple computing resource groups, each computing resource group includes at least one virtual machine group and at least one K8S group; the optimal computing resource grouping is applied to configure computing resources for the constructed application instance.
[0127] For the specific working process of each unit and sub-unit in the application example configuration device disclosed in the above embodiment of the present invention, reference can be made to the corresponding content in the application example configuration method disclosed in the above embodiment of the present invention, which will not be repeated here.
[0128] An embodiment of the present invention further provides a storage medium, which includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the above-mentioned application instance configuration method.
[0129] The embodiment of the present invention further provides an electronic device, the structural diagram of which is shown in FIG. Figure 7 As shown, it specifically includes a memory 701 and one or more instructions 702, wherein the one or more instructions 702 are stored in the memory 701 and are configured to be executed by one or more processors 703 to perform the following operations:
[0130] Obtain the build description information uploaded by the user to the preset application deployment model;
[0131] Based on the build description information, determining a target application environment for using the application instance, the application deployment model comprising a plurality of application environments;
[0132] Deploy the target application corresponding to the build description information in the target application environment, and control the application deployment model to set instance properties of the application instance of the target application;
[0133] Adjusting the number of application instances of the target application based on the instance request concurrency in the instance attribute;
[0134] Based on the adjusted number of instances, the application deployment model is controlled to configure the application instances of the target application.
[0135] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without creative work.
[0136] Those skilled in the art may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein may be implemented by electronic hardware, computer software, or a combination of both.
[0137] In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.
[0138] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for configuring an application instance, characterized in that: include: Obtain the build description information uploaded by the user to the preset application deployment model; Based on the build description information, determining a target application environment for using the application instance, the application deployment model comprising multiple application environments; Deploy the target application corresponding to the build description information in the target application environment, and control the application deployment model to set instance properties of the application instance of the target application; Adjusting the number of application instances of the target application based on the instance request concurrency in the instance attribute; Based on the adjusted number of instances, the application deployment model is controlled to configure the application instances of the target application.
2. The method according to claim 1, characterized in that The step of determining a target application environment for running the application instance based on the construction description information includes: The environment configuration parameters included in the build description information are obtained, and based on the environment configuration parameters, a target application environment for running the application instance is determined.
3. The method according to claim 1, characterized in that The controlling the application deployment model to set instance attributes of the application instance of the target application includes: Determine each environment entry included in the target application environment; Based on the construction description information, selecting a target environment entry corresponding to the application instance of the target application from each of the environment entries of the target application environment; Determining, based on the application type of the target application, an entry deployment configuration corresponding to the target environment entry; The application deployment model is controlled to set instance properties of the application instance of the target application based on the entry deployment configuration.
4. The method according to claim 1, characterized in that: The controlling the application deployment model to configure instance attributes of the application instance of the target application includes: Obtaining configuration description information of the application instance of the target application included in the build description information; Based on the configuration description information, the application deployment model is controlled to set instance properties of the application instance of the target application.
5. The method according to any one of claims 1 to 4, characterized in that: The instance attributes further include: an exclusive engine attribute; the method further includes: Based on the exclusive engine attribute, determining whether the constructed application instance requires an independent engine for deployment; If the constructed application instance requires an independent engine for deployment, then based on the grouping version in the instance attribute, in a preset computing resource model, determine the optimal computing resource grouping corresponding to the constructed application instance, wherein the computing resource model includes at least one cluster, each cluster includes multiple computing resource groups, and each computing resource group includes at least one virtual machine group and at least one K8S group; The optimal computing resource grouping is applied to configure computing resources for the constructed application instance.
6. An application instance configuration device, characterized in that: include: An acquisition unit, used to acquire the building description information uploaded by the user to the preset application deployment model; A determination unit, configured to determine a target application environment for using the application instance based on the construction description information, wherein the application deployment model includes multiple application environments; A setting unit, configured to deploy a target application corresponding to the build description information in the target application environment, and control the application deployment model to set instance properties of an application instance of the target application; An adjusting unit, configured to adjust the number of application instances of the target application based on the instance request concurrency in the instance attribute; A configuration unit is used to control the application deployment model to configure the application instance of the target application based on the adjusted number of instances.
7. The device according to claim 6, characterized in that The determining unit comprises: The determination subunit is used to obtain the environment configuration parameters contained in the building description information, and determine the target application environment for running the application instance based on the environment configuration parameters.
8. The device according to claim 6, characterized in that The setting unit comprises: A second determining subunit, used to determine each environment entry included in the target application environment; A selection subunit, configured to select, based on the construction description information, a target environment entry corresponding to the application instance of the target application from among the environment entries of the target application environment; A third determining subunit is used to determine the entry deployment configuration corresponding to the target environment entry based on the application type of the target application; The setting subunit is used to control the application deployment model to set instance properties of the application instance of the target application based on the entry deployment configuration.
9. A storage medium comprising stored instructions, wherein: When the instruction is executed, the device where the storage medium is located is controlled to execute the application instance configuration method according to any one of claims 1 to 5.
10. An electronic device comprising a memory and one or more instructions, wherein the one or more instructions are stored in the memory and configured to be executed by one or more processors to perform the application instance configuration method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Containerized deployment method and device for stateful applications
CN112783646A
Multi-instance task execution method and device, terminal equipment and computer storage medium
CN112860419A