Application environment deployment method and device, computer program product and electronic equipment

By declarative language describing the application environment and generating configuration files, the application environment is automated, and the inefficiency and high failure problems caused by manual deployment are solved, and the delivery efficiency and consistency are improved.

CN119396415APending Publication Date: 2025-02-07CHINA GUANGFA BANK
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411454819.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-17
Publication Date
2025-02-07

AI Technical Summary

Technical Problem

The prior art deploys the application operation environment through manual operation, and there are problems such as low delivery efficiency and high operating failure rate.

Method used

Use a simple and easy-to-understand declarative language to describe the application environment to be deployed, and generates the first declaration file, which covers the infrastructure resource collection and resource configuration of the application running environment, and converts it into the configuration file used by the infrastructure definition tool. Implement automated deployment of application environments.

Benefits of technology

It improves the delivery efficiency of the application environment, reduces the operating failure rate, and ensures consistency of the application environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119396415A_ABST
    Figure CN119396415A_ABST
Patent Text Reader

Abstract

The invention discloses an application environment deployment method and device, a computer program product and electronic equipment. The method comprises the steps that an application environment deployment request sent by a target object is received, and the application environment deployment request carries infrastructure resource information of at least one target infrastructure associated with a to-be-deployed application environment and multiple pieces of attribute information related to the application environment; the attribute information comprises application environment variable information and application environment output information; determining a corresponding deployment unit based on the infrastructure resource information of each target infrastructure; describing each deployment unit and the multiple pieces of attribute information by using a preset first format to obtain a first declaration file; and converting the first declaration file into a corresponding configuration file, and deploying the application environment based on the configuration file. According to the method and the device, the technical problems of relatively low delivery efficiency and relatively high running failure rate due to the fact that the application program running environment is deployed through manual operation in related technologies are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and more specifically, to an application environment deployment method and device, a computer program product, and an electronic device. Background Art

[0002] With the continuous development and evolution of cloud computing technology, more and more enterprises choose to migrate and deploy their applications to cloud computing platforms, so more and more applications are deployed on cloud computing platforms. Although enterprises can obtain infrastructure resources for application operation on demand, in order to smoothly deliver the application environment and complete the deployment and operation of the application, a series of complex infrastructure resource configurations and combinations are required, which makes the delivery efficiency of the application environment low. In addition, since the application involves manual operations during the entire environment deployment process, this will also cause deviations between the application test environment and the production environment, thereby increasing the probability of application operation failures.

[0003] Therefore, how to quickly and conveniently provide the application environment and ensure the consistency of the application environment is an urgent problem to be solved. Summary of the invention

[0004] The embodiments of the present application provide an application environment deployment method, apparatus, computer program product, and electronic device to at least solve the technical problem that the related art deploys the application operating environment through manual operation, which has low delivery efficiency and high operating failure rate.

[0005] According to one aspect of an embodiment of the present application, there is provided an application environment deployment method, comprising: obtaining a first declaration file corresponding to the application environment, wherein the first declaration file is obtained by describing multiple attribute information associated with the application environment using a preset first format, and the attribute information at least includes: a deployment unit obtained by combining and encapsulating infrastructure resource information of at least one infrastructure; converting the first declaration file in the first format into a first configuration file in a second format used by an infrastructure definition tool; and using the infrastructure definition tool to deploy the application environment based on the first configuration file.

[0006] Optionally, the infrastructure resource information includes: definition parameters and configuration parameters of the infrastructure resources, wherein the packaging process of the deployment unit includes: for each infrastructure, packaging the configuration parameters of the infrastructure resources and the associated software running parameters of the infrastructure respectively to obtain multiple first packaging modules, and combining and packaging the multiple first packaging modules to obtain a second packaging module; using an infrastructure definition tool to define the multiple second packaging modules corresponding to each infrastructure and the definition parameters of the infrastructure resources respectively to obtain multiple definition modules; combining and packaging the multiple definition modules to obtain a deployment unit.

[0007] Optionally, the attribute information also includes: environment variable parameters, output parameters, wherein the generation process of the first declaration file includes: determining at least one target deployment unit, at least one target environment variable parameter, and at least one target output parameter associated with the application environment; describing each target deployment unit, each target environment variable parameter, and each target output parameter in accordance with the first format to obtain the first declaration file.

[0008] Optionally, converting a first declaration file in a first format into a first configuration file in a second format used by an infrastructure definition tool includes: calling a preset parsing engine to parse the first declaration file to obtain multiple attribute information; and using the second format to describe each attribute information to obtain a first configuration file.

[0009] Optionally, before using the second format to describe each attribute information to obtain the first configuration file, the method also includes: verifying whether the multiple attribute information described in the first declaration file is consistent with the multiple attribute information obtained by parsing; if inconsistent, determining at least one abnormal attribute information and issuing an alarm message of verification failure, wherein the alarm message carries at least one abnormal attribute information.

[0010] Optionally, the method also includes: responding to a modification request for the first declaration file, wherein the modification request carries at least one attribute information to be modified and a corresponding modification result; changing the first declaration file according to the modification results corresponding to each attribute information to be modified to obtain a second declaration file.

[0011] According to another aspect of an embodiment of the present application, an application environment deployment device is also provided, including: an acquisition module, used to acquire a first declaration file corresponding to the application environment, wherein the first declaration file is obtained by describing multiple attribute information associated with the application environment using a preset first format, and the attribute information at least includes: a deployment unit obtained by combining and encapsulating infrastructure resource information of at least one infrastructure; a conversion module, used to convert the first declaration file in the first format into a first configuration file in the second format used by an infrastructure definition tool; and a deployment module, used to use the infrastructure definition tool and deploy the application environment based on the first configuration file.

[0012] According to another aspect of an embodiment of the present application, a computer program product is further provided. The computer program product includes a stored computer program, wherein the computer program implements the above-mentioned application environment deployment method when executed by a processor.

[0013] According to another aspect of an embodiment of the present application, an electronic device is further provided, the electronic device comprising: a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to execute the above-mentioned application environment deployment method through the computer program.

[0014] In an embodiment of the present application, a first declaration file corresponding to an application environment is obtained, wherein the first declaration file is obtained by describing multiple attribute information associated with the application environment using a preset first format, and the attribute information includes at least: a deployment unit obtained by combining and encapsulating infrastructure resource information of at least one infrastructure; converting the first declaration file in the first format into a first configuration file in a second format used by an infrastructure definition tool; and using the infrastructure definition tool to deploy the application environment based on the first configuration file.

[0015] In the above technical solution, a plain and easy-to-understand declarative language is used to describe the application environment to be deployed, and a first declaration file is obtained to ensure that the first declaration file can cover the infrastructure resource set and the corresponding resource configuration of the application running environment. Therefore, when the application environment is subsequently deployed, the first declaration file can be converted into a corresponding configuration file for automatic deployment of the application environment, thereby solving the technical problems of low delivery efficiency and high operation failure rate in related technologies that deploy application running environments through manual operations. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0017] Figure 1 It is a hardware structure block diagram of a computer terminal for implementing an application environment deployment method according to an embodiment of the present application;

[0018] Figure 2 It is a flowchart of an optional application environment deployment method according to an embodiment of the present application;

[0019] Figure 3 is a schematic diagram of an optional declaration file according to an embodiment of the present application;

[0020] Figure 4 It is a schematic diagram of converting an optional YAML format declaration file to a Terraform configuration file according to an embodiment of the present application;

[0021] Figure 5 It is a structural diagram of an optional application environment deployment device according to an embodiment of the present application. DETAILED DESCRIPTION

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

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

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

[0025] Example 1

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

[0027] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 FIG. 1 shows a hardware structure block diagram of a computer terminal for implementing an application environment deployment method. Figure 1As shown, the computer terminal 10 may include one or more (102a, 102b, ..., 102n are used to illustrate) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.

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

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

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

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

[0032] In the above operating environment, Figure 2 is a flow chart of an optional application environment deployment method according to an embodiment of the present application, such as Figure 2 As shown, the method at least includes steps S202-S208, wherein:

[0033] Step S202: receiving an application environment deployment request sent by a target object.

[0034] In the technical solution provided in step S202, the computer can receive an application environment deployment request sent by the target object, wherein the application environment deployment request carries infrastructure resource information of at least one target infrastructure associated with the application environment to be deployed and multiple attribute information related to the application environment, and the attribute information includes: application environment variable information, application environment output information.

[0035] Generally speaking, infrastructure includes but is not limited to the basic hardware, software, network and other resources associated with the application environment to be deployed and required to support the operation of the application or software, including but not limited to servers, databases, storage devices, load balancers, network equipment, monitoring systems, etc. Infrastructure resource information can be understood as information related to the infrastructure resources of the infrastructure. In addition, the above-mentioned application environment output information refers to the IP address, host name and other information of the application environment after the application environment is deployed.

[0036] Step S204: determining corresponding deployment units based on infrastructure resource information of each target infrastructure.

[0037] In the technical solution provided in step S204, the computer can determine the corresponding deployment unit based on the infrastructure resource information of each target infrastructure, wherein the deployment unit is obtained by combining and packaging the infrastructure resource information of the target infrastructure, so it can be understood as a set of infrastructure resource collections of the target infrastructure and various resource configurations that are uniformly packaged. Therefore, the infrastructure resource information includes: software operation parameters associated with the target infrastructure, infrastructure definition parameters, and infrastructure configuration parameters.

[0038] Specifically, the encapsulation process of the above deployment unit can be implemented through the following steps:

[0039] Step S1, for each target infrastructure, respectively encapsulate the infrastructure configuration parameters and the associated software operation parameters of the target infrastructure to obtain a plurality of first encapsulation modules, and combine and encapsulate the plurality of first encapsulation modules to obtain a second encapsulation module;

[0040] Step S2, using an infrastructure definition tool to define the second encapsulation module and the infrastructure definition parameters respectively, to obtain a plurality of definition modules;

[0041] Step S3, combining and packaging multiple definition modules to obtain a deployment unit corresponding to the target infrastructure.

[0042] Among them, the above-mentioned infrastructure definition tool Terraform is an open source tool for safely and efficiently building, changing and versioning infrastructure. As an infrastructure-as-code tool, it helps to develop and expand cloud services and manage network status. In addition, when implementing the encapsulation of the deployment unit, the embodiment of the present application can also adopt the automated operation and maintenance tool Ansible, where Ansible is an important way to automate and configure applications and IT infrastructure. Ansible has its own language to describe system configurations, and Ansible is agentless, which allows it to manage large deployments across enterprises and perform tasks using Windows Power Shell or SSH.

[0043] Therefore, the implementation of the encapsulation process of each deployment unit in the embodiment of the present application can be understood as follows: First, the infrastructure configuration parameters of the target infrastructure and the operating parameters such as the software installation running thereon are encapsulated as the Roles (i.e., the first encapsulation module) of the automated operation and maintenance tool Ansible; then, the multiple Ansible Roles obtained in the previous step are combined and encapsulated to obtain the Ansible Playbook (i.e., the second encapsulation module); then, the Ansible script (Playbook) obtained in the previous step is respectively encapsulated as the Resource (i.e., definition module) of the infrastructure definition tool Terraform, and at the same time, the infrastructure definition parameters of the target infrastructure are encapsulated as the Resource (i.e., definition module) of Terraform; finally, the multiple Terraform Resources obtained in the previous step are combined and encapsulated to obtain the Terraform Module (i.e., deployment unit). Through the above steps, multiple deployment units such as the following Table 1 can be obtained, and the description corresponding to each deployment unit is specifically explained in Table 1.

[0044] Table 1

[0045] Deployment Unit illustrate Load Balancing Describe the load balancer used Network permissions Describe network access relationships and permissions between servers NAS File System Describe the NAS file system used by the server, including new creation and reuse Middleware Server Describe the server and the middleware software and configuration installed on the server Database Server Describe the server and the database software and configuration installed on it

[0046] Step S206: describe each deployment unit and multiple attribute information using a preset first format to obtain a first declaration file.

[0047] In the technical solution provided in step S206, in order to manage and configure the infrastructure in a unified manner, a deployment unit and multiple attribute information corresponding to the infrastructure resource information of the target infrastructure can be described in a first format in a plain and easy-to-understand declaration language to obtain a first declaration file. The first format can be a YAML format or a JSON format.

[0048] Specifically, if the first format is the YAML format, the basic elements defined therein include: units, variables, and outputs, which respectively define the deployment units, application environment variable information, and application environment output information contained in the application environment, and the format of the first declaration file generated therein is as follows: Figure 3 As shown, where:

[0049] Units is a list of deployment units to be combined, where the list of deployment units includes multiple deployment units. For each deployment unit, module is the Terraform module and version corresponding to the specified deployment unit; dependsOn refers to the dependency between the current deployment unit and other deployment units; vars refers to the parameter value of the Terraform module (i.e., the configuration parameters and definition parameters corresponding to the current deployment unit), where the parameter value source can be the output of other Terraform modules or the value of variables.

[0050] Variables refers to a list of variables, which includes multiple application environment variables associated with the application environment to be deployed, such as defining the application name, region, production or test environment, etc. For each application environment variable, name is the name of the specified application environment variable; Type is the data type of the application environment variable; Value is the value of the application environment variable.

[0051] Outputs refers to the output list, which includes the application environment output parameters after the application environment is deployed. For each application environment output parameter, Name is the name of the specified application environment output parameter; Value is the value of the application environment output parameter, and the source of the value can be the output of the Terraform module.

[0052] Step S208: convert the first declaration file into a corresponding configuration file, and deploy the application environment based on the configuration file.

[0053] In the technical solution provided in the above step S208, since the declaration file only describes the infrastructure and attribute information related to the application environment, and when actually deploying the application environment, what is needed is a configuration file, that is, a setting containing the configuration and attribute information of each infrastructure, therefore, the corresponding first declaration file can also be converted into a configuration file that can be deployed and used, and the application environment can be deployed based on the configuration file.

[0054] As an optional implementation, in the technical solution provided in the above step S208, the implementation method of converting the first declaration file into the corresponding configuration file is as follows:

[0055] Step 1: calling a preset parsing engine to parse the first declaration file to obtain a first parsing result, wherein the first parsing result at least includes: a plurality of parsed deployment units and a plurality of parsed attribute information;

[0056] Step 2: Describe the first parsing result using the second format used by the infrastructure definition tool to obtain a configuration file.

[0057] In the above embodiment, the second format used by the infrastructure definition tool Terraform includes: HCL (HashiCorp Configuration Language) format and JSON (JavaScript Object Notation) format, and the HCL format is the main declarative configuration language used by Terraform, which is used to define the status and resources of the infrastructure; and although the JSON format can also be used to write Terraform configuration files, the readability of the JSON format is poor compared to the HCL format. Therefore, in the embodiment of the present application, the second format is preferably the HCL format.

[0058] For example, Figure 4 is a schematic diagram of converting an optional YAML format declaration file to a Terraform configuration file according to an embodiment of the present application, such as Figure 4 As shown in the figure, it specifically converts the three parts of the YAML declaration file (app.envy.yml) - units, variables, and outputs - into corresponding Terraform configuration files (.tf).

[0059] In addition, before obtaining the configuration file through the second step, it can also parse multiple first parsed contents for verification and exception handling, and the specific implementation method is as follows:

[0060] Verify whether each attribute information and each deployment unit described in the first declaration file is consistent with the first parsing result;

[0061] If they are inconsistent, at least one abnormal information is determined, and an alarm message of verification failure is issued, wherein the alarm message carries at least one abnormal information.

[0062] Furthermore, after obtaining the configuration file, the application environment can be deployed in the following ways:

[0063] First, the configuration file is parsed using an infrastructure definition tool to obtain a second parsing result, wherein the second parsing result at least includes: a deployment unit corresponding to the infrastructure resource content information of each target infrastructure;

[0064] Then, the application environment is deployed based on the second analysis result using an automated operation and maintenance tool.

[0065] That is to say, in the embodiment of the present application, the application environment resources can be automatically deployed through the infrastructure definition tool Terraform and the automated operation and maintenance tool Ansible. Among them, the Terraform tool reads and parses the Terraform configuration file to obtain the second parsing result, which at least includes the specific configuration and association relationship of each Terraform module (Module) (that is, the deployment unit corresponding to the infrastructure resource content information of each target infrastructure), and according to the specific configuration and association relationship of each Terraform module parsed, the infrastructure definition tool Terraform and the automated operation and maintenance tool Ansible are used to complete the deployment of the application environment (including server construction, NAS file system allocation authorization, middleware and database installation and configuration, network permission activation, load balancing configuration, etc.), so as to realize the integrated supply of the application environment.

[0066] It should be noted that the above-mentioned automated operation and maintenance tools can also be used: Puppet, Chef, SaltStack, etc.

[0067] As an optional implementation, after completing the deployment of the application environment according to the configuration file, a modification request for the first declaration file from the target object can also be received, wherein the modification request carries at least one piece of information to be modified and a corresponding modification result; the first declaration file is modified according to the modification results corresponding to each piece of information to be modified to obtain a second declaration file.

[0068] That is, if the target object wants to modify certain information of the deployed application environment (such as infrastructure resource information, application environment variable information, application environment output information), it can directly call the first declaration file of the application environment, and make modifications directly in the first declaration file, and execute step S206 to implement the redeployment of the application environment to ensure that the application environment declaration file is consistent with the actual application environment resources.

[0069] Based on the scheme defined in the above steps S202 to S208, it can be learned that, in an embodiment, a declarative language that is easy to understand is used to describe the application environment to be deployed, and a first declaration file is obtained to ensure that the first declaration file can cover the infrastructure resource set and the corresponding resource configuration of the application operating environment, so that when the application environment is subsequently deployed, the first declaration file can be converted into a corresponding configuration file for automatic deployment of the application environment, thereby solving the technical problems of low delivery efficiency and high operating failure rate in related technologies that deploy application operating environments through manual operations.

[0070] Example 2

[0071] Based on Embodiment 1 of the present application, an embodiment of an application environment deployment device is also provided, and the application environment deployment method of the above embodiment is executed when the device is running. Figure 5 is a schematic diagram of the structure of an optional application environment deployment device according to an embodiment of the present application, such as Figure 5 As shown, the application environment deployment device at least includes a receiving module 51, a determining module 52, a describing module 53 and a deploying module 54, wherein:

[0072] The receiving module 51 is used to receive an application environment deployment request sent by a target object.

[0073] The application environment deployment request carries infrastructure resource information of at least one target infrastructure associated with the application environment to be deployed and multiple attribute information related to the application environment, and the attribute information includes: application environment variable information and application environment output information.

[0074] The determination module 52 is used to determine the corresponding deployment unit based on the infrastructure resource information of each target infrastructure.

[0075] The infrastructure resource information includes: software operation parameters associated with the target infrastructure, infrastructure definition parameters, and infrastructure configuration parameters. Therefore, the determination module 52 can determine the corresponding deployment unit by the following method:

[0076] For each target infrastructure, respectively encapsulate the infrastructure configuration parameters and the associated software operation parameters of the target infrastructure to obtain a plurality of first encapsulation modules, and combine and encapsulate the plurality of first encapsulation modules to obtain a second encapsulation module;

[0077] Using an infrastructure definition tool to define the second encapsulation module and the infrastructure definition parameters respectively, to obtain a plurality of definition modules;

[0078] Combine and encapsulate multiple definition modules to obtain the deployment unit corresponding to the target infrastructure.

[0079] The description module 53 is used to describe each deployment unit and multiple attribute information using a preset first format to obtain a first declaration file.

[0080] The deployment module 54 is used to convert the first declaration file into a corresponding configuration file and deploy the application environment based on the configuration file.

[0081] Specifically, the deployment module 54 includes a conversion submodule and a deployment submodule, wherein:

[0082] The conversion submodule can convert the first declaration file into the corresponding configuration file by the following method: calling a preset parsing engine to parse the first declaration file to obtain a first parsing result, wherein the first parsing result at least includes: multiple deployment units after parsing, and multiple attribute information after parsing; using the second format used by the infrastructure definition tool to describe the first parsing result to obtain a configuration file.

[0083] The above-mentioned deployment sub-module can deploy the application environment in the following manner: use the infrastructure definition tool to parse the configuration file to obtain a second parsing result, wherein the second parsing result at least includes: a deployment unit corresponding to the infrastructure resource content information of each target infrastructure; use the automated operation and maintenance tool to deploy the application environment based on the second parsing result.

[0084] In addition, the deployment module 54 also includes a verification submodule, wherein the verification submodule can verify whether the various attribute information and various deployment units described in the first declaration file are consistent with the first parsing result; if inconsistent, at least one exception information is determined, and an alarm message of verification failure is issued, wherein the alarm message carries at least one exception information.

[0085] It should be noted that the various modules in the above-mentioned application environment deployment device can be program modules (for example, a set of program instructions that implement a certain specific function) or hardware modules. For the latter, it can be expressed in the following forms, but is not limited to this: the expression form of each of the above-mentioned modules is a processor, or the functions of each of the above-mentioned modules are implemented by a processor.

[0086] Example 3

[0087] According to an embodiment of the present application, a computer program product is also provided, which includes a stored computer program, wherein when the computer program is executed by a processor, the application environment deployment method in Example 1 is implemented.

[0088] Optionally, the computer program executes the following steps:

[0089] Step S202, receiving an application environment deployment request sent by a target object, wherein the application environment deployment request carries infrastructure resource information of at least one target infrastructure associated with the application environment to be deployed and multiple attribute information related to the application environment, and the attribute information includes: application environment variable information, application environment output information;

[0090] Step S204, determining corresponding deployment units based on infrastructure resource information of each target infrastructure;

[0091] Step S206, describing each deployment unit and multiple attribute information using a preset first format to obtain a first declaration file;

[0092] Step S208: convert the first declaration file into a corresponding configuration file, and deploy the application environment based on the configuration file.

[0093] According to an embodiment of the present application, a processor is also provided, which is used to run a program, wherein the application environment deployment method in Example 1 is executed when the program is running.

[0094] Optionally, the following steps are performed when the program is running:

[0095] Step S202, receiving an application environment deployment request sent by a target object, wherein the application environment deployment request carries infrastructure resource information of at least one target infrastructure associated with the application environment to be deployed and multiple attribute information related to the application environment, and the attribute information includes: application environment variable information, application environment output information;

[0096] Step S204, determining corresponding deployment units based on infrastructure resource information of each target infrastructure;

[0097] Step S206, describing each deployment unit and multiple attribute information using a preset first format to obtain a first declaration file;

[0098] Step S208: convert the first declaration file into a corresponding configuration file, and deploy the application environment based on the configuration file.

[0099] According to an embodiment of the present application, an electronic device is also provided, wherein the electronic device includes one or more processors; a memory for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors are implemented to run the programs, wherein the program is configured to execute the application environment deployment method in the above-mentioned embodiment 1 when running.

[0100] Optionally, the processor is configured to implement the following steps by executing a computer program:

[0101] Step S202, receiving an application environment deployment request sent by a target object, wherein the application environment deployment request carries infrastructure resource information of at least one target infrastructure associated with the application environment to be deployed and multiple attribute information related to the application environment, and the attribute information includes: application environment variable information, application environment output information;

[0102] Step S204, determining corresponding deployment units based on infrastructure resource information of each target infrastructure;

[0103] Step S206, describing each deployment unit and multiple attribute information using a preset first format to obtain a first declaration file;

[0104] Step S208: convert the first declaration file into a corresponding configuration file, and deploy the application environment based on the configuration file.

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

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

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

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

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

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

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

Claims

1. A method for deploying an application environment, characterized in that: include: Receive an application environment deployment request sent by a target object, wherein the application environment deployment request carries infrastructure resource information of at least one target infrastructure associated with the application environment to be deployed and a plurality of attribute information related to the application environment, and the attribute information includes: application environment variable information and application environment output information; Determining corresponding deployment units based on infrastructure resource information of each of the target infrastructures; Describing each of the deployment units and the plurality of the attribute information using a preset first format to obtain a first declaration file; The first declaration file is converted into a corresponding configuration file, and the application environment is deployed based on the configuration file.

2. The method according to claim 1, characterized in that The infrastructure resource information includes: software operation parameters associated with the target infrastructure, infrastructure definition parameters, and infrastructure configuration parameters, wherein the corresponding deployment unit is determined based on the infrastructure resource information of each target infrastructure, including: For each of the target infrastructures, respectively encapsulate the infrastructure configuration parameters and the associated software operation parameters of the target infrastructure to obtain a plurality of first encapsulation modules, and combine and encapsulate the plurality of first encapsulation modules to obtain a second encapsulation module; Using an infrastructure definition tool to define the second encapsulation module and the infrastructure definition parameter respectively, to obtain a plurality of definition modules; The multiple definition modules are combined and packaged to obtain the deployment unit corresponding to the target infrastructure.

3. The method according to claim 1, characterized in that Converting the first declaration file into a corresponding configuration file includes: Invoke a preset parsing engine to parse the first declaration file to obtain a first parsing result, wherein the first parsing result at least includes: a plurality of parsed deployment units and a plurality of parsed attribute information; The first parsing result is described using a second format used by an infrastructure definition tool to obtain the configuration file.

4. The method according to claim 3, characterized in that Before describing the first parsing result in a second format used by the infrastructure definition tool to obtain the configuration file, the method further includes: Verifying whether each of the attribute information and each of the deployment units described in the first declaration file is consistent with the first parsing result; If they are inconsistent, at least one abnormal information is determined, and an alarm message of verification failure is issued, wherein the alarm message carries the at least one abnormal information.

5. The method according to claim 1, characterized in that Deploying the application environment based on the configuration file includes: Parsing the configuration file using an infrastructure definition tool to obtain a second parsing result, wherein the second parsing result at least includes: a deployment unit corresponding to the infrastructure resource information of each of the target infrastructures; The application environment is deployed based on the second analysis result using an automated operation and maintenance tool.

6. The method according to claim 1, characterized in that The method further comprises: receiving a modification request of the target object to the first declaration file, wherein the modification request carries at least one piece of information to be modified and a corresponding modification result; The first declaration file is modified according to the modification results corresponding to each of the information to be modified to obtain a second declaration file.

7. The method according to claim 1, characterized in that The first format includes at least one of the following: YAML format and JSON format.

8. An application environment deployment device, characterized in that: include: A receiving module, configured to receive an application environment deployment request sent by a target object, wherein the application environment deployment request carries infrastructure resource information of at least one target infrastructure associated with the application environment to be deployed and a plurality of attribute information related to the application environment, and the attribute information includes: application environment variable information and application environment output information; A determination module, configured to determine a corresponding deployment unit based on infrastructure resource information of each of the target infrastructures; A description module, used to describe each of the deployment units and the plurality of attribute information using a preset first format to obtain a first declaration file; A deployment module is used to convert the first declaration file into a corresponding configuration file and deploy the application environment based on the configuration file.

9. A computer program product, characterized in that include: A computer program, wherein when the computer program is executed by a processor, the application environment deployment method described in any one of claims 1 to 7 is implemented.

10. An electronic device, characterized in that: include: A memory and a processor, wherein the processor is used to run a program stored in the memory, wherein the program executes the application environment deployment method described in any one of claims 1 to 7 when running.