CN113900742A - Application instance management method and device, electronic equipment and storage medium - Google Patents

Application instance management method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113900742A
CN113900742A CN202111020856.1A CN202111020856A CN113900742A CN 113900742 A CN113900742 A CN 113900742A CN 202111020856 A CN202111020856 A CN 202111020856A CN 113900742 A CN113900742 A CN 113900742A
Authority
CN
China
Prior art keywords
template
management operation
management
application
application instance
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111020856.1A
Other languages
Chinese (zh)
Inventor
时文涛
杨旭荣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sangfor Technologies Co Ltd
Original Assignee
Sangfor Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sangfor Technologies Co Ltd filed Critical Sangfor Technologies Co Ltd
Priority to CN202111020856.1A priority Critical patent/CN113900742A/en
Publication of CN113900742A publication Critical patent/CN113900742A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4482Procedural
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The application discloses a management method and device of an application example, electronic equipment and a storage medium. The method comprises the following steps: presenting at least one management operation function item aiming at a target application example on a front-end page of the cloud platform; responding to the selection operation aiming at the management operation function item, and acquiring a first identifier corresponding to the selection operation; the first identification represents the type of a first management operation corresponding to the selection operation; acquiring a first template corresponding to the first management operation according to the first identifier; the first template at least comprises execution flow information required for executing the first management operation aiming at the target application instance; and executing the first management operation on the target application instance based on the first template.

Description

Application instance management method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of cloud computing technologies, and in particular, to a method and an apparatus for managing an application instance, an electronic device, and a storage medium.
Background
With the development of cloud computing technology, cloud computing platforms (hereinafter, referred to as cloud platforms) are endowed with higher values. Through the cloud platform, the rapid deployment and distribution of the application environment can be realized, and the time consumption for deploying the application instance can be greatly reduced; meanwhile, the cloud platform can provide an online management operation function aiming at different application examples, and the use by a user is facilitated.
However, in the related art, the management operations supported by the cloud platform for the application instances are mostly static, that is, a user can only perform some simple and fixed management operations on the application instances through the cloud platform.
Disclosure of Invention
In order to solve the related technical problems, embodiments of the present application provide a method and an apparatus for managing an application instance, an electronic device, and a storage medium.
The technical scheme of the embodiment of the application is realized as follows:
the embodiment of the application provides a management method of an application instance, which is applied to a cloud platform and comprises the following steps:
presenting at least one management operation function item aiming at a target application instance on a front-end page of the cloud platform;
responding to the selection operation aiming at the management operation function item, and acquiring a first identifier corresponding to the selection operation; the first identification represents the type of a first management operation corresponding to the selection operation;
acquiring a first template corresponding to the first management operation according to the first identifier; the first template at least comprises execution flow information required for executing the first management operation aiming at the target application instance;
and executing the first management operation on the target application instance based on the first template.
In the foregoing solution, the executing the first management operation on the target application instance based on the first template includes:
generating an operation instruction corresponding to the first management operation based on the first template;
and issuing the operation instruction to a cloud host corresponding to the target application instance to instruct the cloud host to execute the first management operation on the target application instance.
In the foregoing solution, the generating an operation instruction corresponding to the first management operation based on the first template includes:
according to the first template, judging whether the first management operation executed aiming at the target application example needs to acquire the operation parameters input through the front-end page;
and generating an operation instruction corresponding to the first management operation based on the first template under the condition that the operation parameter does not need to be acquired.
In the foregoing solution, the generating an operation instruction corresponding to the first management operation based on the first template without acquiring the operation parameter includes:
presenting a confirmation option on the front-end page without acquiring the operation parameter; the confirmation option is used for confirming whether to execute the first management operation;
and responding to the confirmation operation aiming at the confirmation option, and generating an operation instruction corresponding to the first management operation based on the first template.
In the foregoing solution, the generating an operation instruction corresponding to the first management operation based on the first template includes:
according to the first template, judging whether the first management operation executed aiming at the target application example needs to acquire the operation parameters input through the front-end page;
under the condition that the operation parameters need to be obtained, obtaining a second template corresponding to the first management operation according to the first identifier; the second template is used for rendering a form (English can be expressed as form) for inputting the operation parameters on the front end page;
and generating an operation instruction corresponding to the first management operation based on the first template and the second template.
In the foregoing solution, the generating an operation instruction corresponding to the first management operation based on the first template and the second template includes:
rendering a form for inputting the operation parameters on the front-end page by using the second template, and acquiring the operation parameters input through the form;
and generating the operation instruction by utilizing the first template according to the operation parameters.
In the above scheme, the method further comprises:
acquiring an execution result of executing the first management operation on the target application instance;
rendering the execution result on the front-end page.
An embodiment of the present application further provides a management apparatus for an application instance, including:
the system comprises a first processing unit, a second processing unit and a third processing unit, wherein the first processing unit is used for presenting at least one management operation function item aiming at a target application instance on a front end page of a cloud platform;
the second processing unit is used for responding to the selection operation aiming at the management operation function item and acquiring a first identifier corresponding to the selection operation; the first identification represents the type of a first management operation corresponding to the selection operation;
the third processing unit is used for acquiring a first template corresponding to the first management operation according to the first identifier; the first template at least comprises execution flow information required for executing the first management operation aiming at the target application instance;
a fourth processing unit, configured to execute the first management operation on the target application instance based on the first template.
An embodiment of the present application further provides an electronic device, including: a processor and a memory for storing a computer program capable of running on the processor,
wherein the processor is configured to perform the steps of any of the above methods when running the computer program.
Embodiments of the present application also provide a storage medium having a computer program stored thereon, where the computer program is executed by a processor to implement the steps of any one of the above methods.
According to the management method and device, the electronic equipment and the storage medium of the application example, at least one management operation function item aiming at a target application example is presented on a front-end page of a cloud platform; responding to the selection operation aiming at the management operation function item, and acquiring a first identifier corresponding to the selection operation; the first identification represents the type of a first management operation corresponding to the selection operation; acquiring a first template corresponding to the first management operation according to the first identifier; the first template at least comprises execution flow information required for executing the first management operation aiming at the target application instance; and executing the first management operation on the target application instance based on the first template. According to the scheme of the embodiment of the application, the management operation on the application instance is abstracted into the operation template (namely the first template) on the cloud platform, and the management operation is executed on the application instance based on the operation template; therefore, on one hand, the cloud platform can support flexible, rich and complex dynamic management operation aiming at the application example, so that the user experience can be improved; on the other hand, decoupling between the application package and the cloud platform can be realized, namely decoupling between a management operation function aiming at the application example and the cloud platform is realized, under the condition that the management operation function aiming at the application example needs to be expanded, system upgrading is not needed to be carried out on the cloud platform, and quick online and iteration of the application package can be realized based on updating of the operation template, so that the development cycle of the application package can be shortened.
Drawings
FIG. 1 is a flowchart illustrating a management method of an application example according to an embodiment of the present application;
FIG. 2 is a flowchart illustrating an embodiment of an application executing management operations on an application instance;
FIG. 3 is a schematic diagram of application example related information and management operation function items presented on a front-end page of an application center platform according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a form rendered on a front-end page of an application center platform according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a confirmation option presented on a front page of an application center platform according to an embodiment of the present application;
FIG. 6 is a diagram illustrating a result of execution of a management operation presented on a front-end page of an application center platform according to an embodiment of the present application;
FIG. 7 is a schematic structural diagram of a management device according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples.
In the related art, the cloud platform lacks architectural support for dynamic management operation of the application instance, and is difficult to execute complex management operation. Moreover, the management operation function for the application instance is coupled with the cloud platform system, that is, under the condition that the management operation function for the application instance needs to be expanded, the cloud platform needs to be upgraded, the application package is released online after the complex front-end and back-end collaborative development is performed, and the development period of the application package is long. Therefore, the cloud platform cannot meet the user-defined requirements of different management operations of various application examples and the requirement of the application packages to be on line quickly.
Based on this, in various embodiments of the present application, the management operation on the application instance is abstracted to an operation template (i.e. the first template) in the cloud platform, and the management operation is performed on the application instance based on the operation template; therefore, on one hand, the cloud platform can support flexible, rich and complex dynamic management operation aiming at the application example, so that the user experience can be improved; on the other hand, decoupling between the application package and the cloud platform can be realized, namely decoupling between a management operation function aiming at the application example and the cloud platform is realized, under the condition that the management operation function aiming at the application example needs to be expanded, system upgrading is not needed to be carried out on the cloud platform, and quick online and iteration of the application package can be realized based on updating of the operation template, so that the development cycle of the application package can be shortened.
An embodiment of the present application provides a management method for an application instance, which is applied to a cloud platform, and as shown in fig. 1, the method includes:
step 101: presenting at least one management operation function item aiming at a target application instance on a front-end page of the cloud platform;
step 102: responding to the selection operation aiming at the management operation function item, and acquiring a first identifier corresponding to the selection operation;
here, the first identifier represents a type of a first management operation corresponding to the selection operation;
step 103: acquiring a first template corresponding to the first management operation according to the first identifier; the first template at least comprises execution flow information required for executing the first management operation aiming at the target application instance;
step 104: and executing the first management operation on the target application instance based on the first template.
Here, the cloud Platform in the embodiment of the present application may be a private cloud, a public cloud, or a cloud of other forms, provides basic resources such as computation, storage, and network, and a management interface of the basic resources, and implements management of an application instance through a cloud computing Service mode of Platform as a Service (PaaS).
In actual application, the cloud platform may also be referred to as an application center, an application center platform, an application management platform, and the like on the cloud.
In actual application, the application instance may be understood as a specific application service deployed on the cloud platform based on an application package, and one application instance may specifically include at least one cloud host and an application service installed inside each cloud host, and is uniformly managed by the cloud platform. The application may be a monolithic middleware application (i.e., a monolithic service), such as MySQL, Remote dictionary service (Redis), Kafka, MongoDB, RabbitMQ, etc.; or a complex system combining a plurality of single services, such as a blog system (including a plurality of application services such as Web, MySQL, Redis, etc.), a big data management system (including a plurality of application services such as Hadoop, Hive, hbse, etc.), and the like.
During actual application, an application developer can customize management operation on an application instance according to user requirements. Specifically, a developer can develop a data package (i.e., an application package) of a specific application according to an application package development specification of the cloud platform, where the application package is used to define logic such as a deployment process, an operation and maintenance process, and page rendering of an application instance; when an application package is developed, developers can customize operation templates (namely first templates) for different types of management operations of corresponding application instances according to user requirements; in other words, the application package may contain at least one first template, each first template corresponding to a management operation for a target application instance. Therefore, through abstraction (namely templating) of management operations for application instances, the cloud platform can meet the customized requirements of users on different management operations of various application instances, executes corresponding management operations on the premise of not perceiving the types and the contents (namely operation flows) of the management operations, and realizes unified management and execution of different types of management operations of different application instances by the cloud platform.
Here, one management operation for the target application instance may be understood as one type of management operation for the target application instance, that is, the type corresponding to each management operation for the target application instance is different. The developer may upload the developed application package to the cloud platform, and the cloud platform may perform at least one management operation on the target application instance based on the at least one first template, such as application package management, application instance creation, automated deployment of the application instance, application instance deletion, online operation and maintenance of the application instance, and the like. Illustratively, for a MySQL application instance, a user can perform management operations of creating a user, creating a database, authorizing the user, modifying parameters and the like on line through the cloud platform.
In actual application, different service functions can be realized through each management operation of a target application instance; for example, the function of creating a database on line can be realized by the management operation of creating the database of the MySQL application example; for another example, the online queue creation function may be implemented through a queue creation management operation on the RabbitMQ application instance.
Based on this, in step 101, in order to allow a user to select a service function that can be provided by an application instance, that is, to select a management operation that needs to be executed, when the application is actually applied, the cloud platform may determine, according to at least one first template included in an application package, at least one management operation function item that is presented on a front-end page of the cloud platform after receiving the developed application package, that is, the first template corresponds to the management operation function item one to one.
In step 102, in actual application, each management operation function item presented in the front-end page may be associated with a management operation identifier (that is, the first identifier) representing a management operation type, a user may select, according to a requirement, a management operation function item corresponding to a management operation that needs to be executed for the target application instance on the front-end page, and in response to a selection operation of the user, the cloud platform may obtain the first identifier.
In step 103, during actual application, the first template may include or be associated with the first identifier, where the first identifier may be an index corresponding to the first management operation, a name of the first management operation, and the like.
In practical application, the first template may be understood as a rule defined by a developer to execute the first management operation, that is, a data structure of a background execution flow of the first management operation. Specifically, the first template may contain the following:
the type information of the first management operation may be understood as a name of the first management operation, for example, in a case where the first management operation is a management operation of a creation user for a MySQL application instance, the type information may be a "creation user"; the type information of the first management operation may be used to display an operation name on a corresponding management operation function item of the front-end page, such as "create user" on a button;
operation instruction information for the cloud host required for executing the first management operation;
returning information after the first management operation is executed, such as the type of a return value, such as success or failure of execution of the operation;
version information of the first template; the template updating method is used for distinguishing templates before and after updating in subsequent template updating.
In actual application, executing the first management operation may require a user to input operation parameters through the front-end page, for example, when executing a management operation of a creation user for a MySQL application instance, the user is required to input operation parameters such as a user name. Therefore, the first template may further contain operation parameter information input through the front-end page required for performing the first management operation, such as a parameter name, a parameter type, whether it is a necessary parameter, and the like.
In actual application, when the first template includes operation parameter information input through the front-end page and required for executing the first management operation, the operation instruction information for the cloud host and required for executing the first management operation may further include a formatting policy of a corresponding operation parameter, so that the cloud platform generates an operation instruction that can be executed by the cloud host corresponding to the target application instance.
In step 104, during actual application, since the first template includes operation instruction information for a cloud host required for executing the first management operation, the cloud platform may generate an operation instruction corresponding to the first management operation based on the first template, and issue the operation instruction to at least one cloud host corresponding to the target application instance to instruct the at least one cloud host to execute the first management operation on the target application instance, so that the cloud platform can execute the corresponding management operation without sensing the type and content (i.e., operation flow) of the management operation.
Based on this, in an embodiment, the performing the first management operation on the target application instance based on the first template may include:
generating an operation instruction corresponding to the first management operation based on the first template;
and issuing the operation instruction to a cloud host corresponding to the target application instance to instruct the cloud host to execute the first management operation on the target application instance.
In actual application, the cloud platform may determine whether to execute the first management operation by determining whether the first template includes operation parameter information that is required for executing the first management operation and is input through the front-end page, and may generate an operation instruction corresponding to the first management operation directly based on the first template without acquiring the operation parameter.
Based on this, in an embodiment, the generating an operation instruction corresponding to the first management operation based on the first template may include:
according to the first template, judging whether the first management operation executed aiming at the target application example needs to acquire the operation parameters input through the front-end page;
and generating an operation instruction corresponding to the first management operation based on the first template under the condition that the operation parameter does not need to be acquired.
In practical application, in order to avoid that the user selects an incorrect management operation function item, under the condition that the operation parameters do not need to be acquired, the cloud platform can present a confirmation option on the front-end page so that the user can confirm whether the first management operation needs to be executed again, thereby avoiding the execution of the incorrect management operation and improving the user experience.
Based on this, in an embodiment, the generating, based on the first template, an operation instruction corresponding to the first management operation without acquiring the operation parameter may include:
presenting a confirmation option on the front-end page without acquiring the operation parameter; the confirmation option is used for confirming whether to execute the first management operation;
and responding to the confirmation operation aiming at the confirmation option, and generating an operation instruction corresponding to the first management operation based on the first template.
In actual application, in the process of developing an application package, after a developer self-defines at least one first template, aiming at the management operation needing to acquire the operation parameters input through the front-end page, a second template used for rendering a form for inputting the operation parameters on the front-end page can be developed; in other words, the application package may further comprise the second template, which may comprise or be associated with the first identifier.
Based on this, in an embodiment, the generating an operation instruction corresponding to the first management operation based on the first template may include:
according to the first template, judging whether the first management operation executed aiming at the target application example needs to acquire the operation parameters input through the front-end page;
under the condition that the operation parameters need to be obtained, obtaining a second template corresponding to the first management operation according to the first identifier; the second template is used for rendering a form for inputting the operation parameters on the front end page;
and generating an operation instruction corresponding to the first management operation based on the first template and the second template.
Here, the rendering may be understood as a process of generating a front-end code of the form and rendering the form on the front-end page, i.e., the second template defines a data structure of the first management operation for rendering the form on the front-end page. Specifically, the second template may contain the following:
grouping information of form fields, such as grouping name; a display field for the front-end page group;
list information of form fields, namely field list information contained in each field group;
the necessity information of the form field, namely whether the form field is a necessary field;
name information of form fields;
tag information of form fields;
type information of form fields, such as string (string), integer (int), floating point (float), drop-down list (choice), multiple choice (multicchoice), etc.;
initial values of form fields;
constraint rules for form fields, such as maximum or minimum length constraints, maximum or minimum value constraints, and the like.
In actual application, in the process of generating the operation instruction corresponding to the first management operation based on the first template and the second template, the cloud platform may render a form for inputting the operation parameter on the front-end page by using the second template, and a user may input the operation parameter through the form; after the cloud platform obtains the operation parameters input by the user, the operation instruction can be generated by using the first template according to the operation parameters.
Based on this, in an embodiment, the generating an operation instruction corresponding to the first management operation based on the first template and the second template may include:
rendering a form for inputting the operation parameters on the front-end page by using the second template, and acquiring the operation parameters input through the form;
and generating the operation instruction by utilizing the first template according to the operation parameters.
Here, since the operation instruction information for the cloud host, which is included in the first template and is required to perform the first management operation, may further include a formatting policy of the corresponding operation parameter, the cloud platform may format the operation parameter into the operation instruction by using the formatting policy, that is, generate an operation instruction that can be executed by the cloud host corresponding to the target application instance.
In actual application, after the cloud platform issues the operation instruction to the cloud host corresponding to the target application instance, the cloud host responds to the operation instruction, executes the first management operation, and returns an execution result (such as execution success or execution failure) of the first management operation to the cloud platform; after receiving the execution result of the first management operation, the cloud platform can present the execution result on the front-end page, so that a user can know the execution condition of the first management operation.
Based on this, in an embodiment, the method may further include:
acquiring an execution result of executing the first management operation on the target application instance;
rendering the execution result on the front-end page.
According to the management method of the application example, at least one management operation function item aiming at a target application example is presented on a front-end page of a cloud platform; responding to the selection operation aiming at the management operation function item, and acquiring a first identifier corresponding to the selection operation; the first identification represents the type of a first management operation corresponding to the selection operation; acquiring a first template corresponding to the first management operation according to the first identifier; the first template at least comprises execution flow information required for executing the first management operation aiming at the target application instance; and executing the first management operation on the target application instance based on the first template. According to the scheme of the embodiment of the application, the management operation on the application instance is abstracted into the operation template (namely the first template) on the cloud platform, and the management operation is executed on the application instance based on the operation template; therefore, on one hand, the cloud platform can support flexible, rich and complex dynamic management operation aiming at the application example, so that the user experience can be improved; on the other hand, decoupling between the application package and the cloud platform can be realized, namely decoupling between a management operation function aiming at the application example and the cloud platform is realized, under the condition that the management operation function aiming at the application example needs to be expanded, system upgrading is not needed to be carried out on the cloud platform, and quick online and iteration of the application package can be realized based on updating of the operation template, so that the development cycle of the application package can be shortened.
The present application will be described in further detail with reference to the following application examples.
In this application embodiment, the cloud platform is referred to as an application center platform; the first template is called an operation template; the second template is referred to as a User Interface (UI) form template.
In the embodiment of the application, the management operation of the application instance is abstracted into the operation template and the UI form template in the application center platform, and an application developer (also called a developer) can customize the type of the management operation of the application instance and parameters input by a user for executing the management operation. After the application center platform completes the deployment of the application example based on the application package containing the operation template and the UI form template, a user can select the management operation to be executed aiming at the application example through the front-end page of the application center platform; in response to the selection of the user, the application center platform may support the user to dynamically input the operation parameters based on a dynamic online rendering technology of the front-end page, that is, the application center platform may present a form on the front-end page by using a corresponding UI form template, and the user may input various parameters for the management operation through the form, so as to implement flexible, rich, and complex dynamic management operations for the application instances, implement unified management and execution of different management operations for different application instances by the application center platform, and implement decoupling of the application package and the application management platform: when the functions of the application package need to be expanded, the system framework of the application center platform does not need to be upgraded, and the quick online and iteration of the application package can be realized through the updating of the template. It will be appreciated that the type and content of the management operations are defined entirely by the application package itself, i.e., by the operation templates, and that the application centric platform can perform the management operations without being aware of the type and content of the management operations (i.e., the execution flow).
In this application embodiment, the operation template defines a data structure of a background execution flow of a management operation of an application instance, and may include information such as a version number of the operation, a name displayed by an operation button (i.e., an operation name displayed by the management operation function item), a parameter that needs to be input by a user in the operation flow, a command that needs to be executed in the operation flow (i.e., an operation instruction that needs to be executed by a corresponding cloud host), and return data after the operation flow is completed (i.e., the execution result); different types of management operations for different application instances can be freely defined by the operation template.
Illustratively, one operation template may contain the following:
Figure BDA0003241903680000121
Figure BDA0003241903680000131
in the embodiment of the application, the UI form template defines a data structure of a front-end page rendering form of one management operation of an application instance, and may include information such as grouping information of form fields, a field list, field names, field tag information, field types, initial values of fields, constraint rules of field data, and the like.
Illustratively, one UI form template may contain the following:
Figure BDA0003241903680000132
Figure BDA0003241903680000141
in the embodiment of the application, the application center platform can automatically generate the page form content according to the UI form template, that is, generate the front-end code of the form, and directly return the page form content to the front-end page, that is, render the form that the user needs to fill in. The user may submit the form information (i.e. the parameters required for executing the corresponding management operation) to the application center after filling in the form information, and trigger the execution flow of the corresponding management operation.
Illustratively, the page form content that the application centric platform automatically generates from the UI form template may be as follows:
Figure BDA0003241903680000151
in the embodiment of the application, the application center platform is provided with an operation executor and a form renderer; the operation executor is used for executing the management operation logic of the application example, issuing an operation command (namely the operation instruction) to the cloud host where the application example is located for execution, and returning an execution result. For example, for the management operation of creating the database of the MySQL application instance, the operation executor may be connected to the cloud host in which the MySQL application instance is deployed, and execute the operation command of creating the database. The form renderer is used for acquiring a pre-stored UI form template through an operation index (namely the first identifier) after receiving a command that a user needs to execute management operation on a target application instance (namely, in response to selection operation on a management operation function item), and automatically rendering the UI form template into a form of a Web page (namely, the front-end page) for the user to input operation parameters. For example, for the management operation of the database created by the MySQL application instance, the user is required to input information such as the name of the database to be created, and the form renderer renders the UI form template corresponding to the database created operation defined in the application package to the Web page, so that the user can input information such as the name of the database to be created.
In this application embodiment, based on the operation executor and the form renderer, as shown in fig. 2, a process of the application center platform executing the management operation for the application instance may specifically include the following steps:
step 201: selecting operation; step 202 is then performed.
Specifically, after the application center completes deployment of the application instance based on the application package, at least one management operation function item for the application instance may be presented on the front-end page according to an operation template included in the application package, and a user may select a management operation to be executed for the application instance by selecting the management operation function item; different application instances may be free to define different types of management operations in the application package.
Illustratively, as shown in fig. 3, the front-end page of the application center platform presents the relevant information of one MongoDB application instance and the management operation function item corresponding to the management operation of the application instance, and the management operation function items of different application instances may be different. The management operation function items presented in fig. 3 include "modify configuration" and "create user". The user can trigger the management operation of the creating user for the MongoDB application example by clicking the operation button (namely the management operation function item) of the creating user, and can trigger the management operation of the modified configuration for the MongoDB application example by clicking the operation button of the modified configuration.
Step 202: inquiring an operation template; step 203 is then performed.
Specifically, after the user selects the management operation function item on the front-end page, in response to the selection operation of the user, the application center platform may obtain an operation index (i.e., the first identifier), the operation executor may obtain a preset operation template according to the operation index, and determine whether to execute the management operation by using the user to input an operation parameter according to the operation template, that is, execute step 203.
Step 203: judging whether parameters are needed; if yes, go to step 204; if not, go to step 206.
Specifically, the operation executor determines whether to execute the management operation according to the operation template, and if so, the operation executor notifies the form renderer to render a corresponding form, that is, step 204 is executed; if not, the operation executor notifies the form renderer to render a confirmation popup for the user to confirm again whether the management operation needs to be performed, i.e., step 206.
Step 204: rendering the form; step 205 is then performed.
Specifically, the form renderer receives an operation index sent by the operation executor, obtains a preset UI form template according to the operation index, and automatically renders a form on a front-end page according to the UI form template so that a user can input operation parameters.
Illustratively, after the user clicks the operation button of the "create user" on the front-end page shown in fig. 3, the form renderer may render the form shown in fig. 4, the content of the form presentation being defined in the background by the UI form template included in the corresponding application package; the developer can freely define different information such as input parameters, parameter constraints and the like for different management operations, namely, the forms corresponding to different management operations can be different.
Step 205: inputting parameters; step 207 is then performed.
Specifically, the user fills out the form, i.e., the input parameters required to perform the corresponding management operation, on the front-end page.
Step 206: rendering a confirmation popup; step 207 is then performed.
Specifically, the form renderer may render a confirmation popup based on a preset template to prompt a user to confirm execution of a corresponding management operation.
Step 207: confirming the execution operation; step 208 is then performed.
Specifically, after step 205 is executed, that is, after the user completes the filling-in of the form, the user may confirm to execute the corresponding management operation by clicking a confirmation button such as "next step" or "complete". After step 206 is executed, i.e. after the front page presents the confirmation popup, the user can directly confirm the confirmation popup to confirm that the management operation without inputting parameters is executed.
Illustratively, after step 205 is performed (i.e., after FIG. 4 completes the information filling and clicks the "Next" button), the front end page may present a confirmation page as shown in FIG. 5, and the user may submit the filled information by clicking the "OK" button, i.e., to confirm that the administrative operation of the creating user is performed.
Step 208: and executing the operation and returning an execution result.
Specifically, the operation executor receives the form parameters (i.e., the operation parameters) and the operation index returned by the front-end page, acquires a preset operation template according to the operation index, formats the form parameters into an operation command, and issues the operation command to the cloud host corresponding to the application instance for execution. After the cloud host executes the management operation aiming at the application instance, returning an execution result to the operation executor; the operation executor may present the execution result to the front-end page through the form renderer.
Illustratively, the result of the execution of the management operation for front-end page rendering may be as shown in fig. 6.
The scheme provided by the application embodiment has the following advantages:
1) an application developer can freely define any UI form template in the background (such as a back-end server) of the application center platform, and automatic dynamic form rendering is realized on the front-end page of the application center platform based on the UI form template.
2) By combining with a dynamic form rendering technology and based on an operation template, a dynamic operation command can be issued to a cloud host where an application instance is located according to a page parameter (namely, the form parameter), so that an application center can support richer application instance management operation.
In order to implement the method according to the embodiment of the present application, an embodiment of the present application further provides a management device for an application instance, where the management device is disposed on a cloud platform, and as shown in fig. 7, the management device includes:
a first processing unit 701, configured to present at least one management operation function item for a target application instance on a front-end page of a cloud platform;
a second processing unit 702, configured to, in response to a selection operation for the management operation function item, acquire a first identifier corresponding to the selection operation; the first identification represents the type of a first management operation corresponding to the selection operation;
a third processing unit 703, configured to obtain, according to the first identifier, a first template corresponding to the first management operation; the first template at least comprises execution flow information required for executing the first management operation aiming at the target application instance;
a fourth processing unit 704, configured to perform the first management operation on the target application instance based on the first template.
In an embodiment, the fourth processing unit 704 is specifically configured to:
generating an operation instruction corresponding to the first management operation based on the first template;
and issuing the operation instruction to a cloud host corresponding to the target application instance to instruct the cloud host to execute the first management operation on the target application instance.
In an embodiment, the fourth processing unit 704 is further configured to:
according to the first template, judging whether the first management operation executed aiming at the target application example needs to acquire the operation parameters input through the front-end page;
and generating an operation instruction corresponding to the first management operation based on the first template under the condition that the operation parameter does not need to be acquired.
In an embodiment, the fourth processing unit 704 is further configured to:
presenting a confirmation option on the front-end page without acquiring the operation parameter; the confirmation option is used for confirming whether to execute the first management operation;
and responding to the confirmation operation aiming at the confirmation option, and generating an operation instruction corresponding to the first management operation based on the first template.
In an embodiment, the fourth processing unit 704 is further configured to:
according to the first template, judging whether the first management operation executed aiming at the target application example needs to acquire the operation parameters input through the front-end page;
under the condition that the operation parameters need to be obtained, obtaining a second template corresponding to the first management operation according to the first identifier; the second template is used for rendering a form for inputting the operation parameters on the front end page;
and generating an operation instruction corresponding to the first management operation based on the first template and the second template.
In an embodiment, the fourth processing unit 704 is further configured to:
rendering a form for inputting the operation parameters on the front-end page by using the second template, and acquiring the operation parameters input through the form;
and generating the operation instruction by utilizing the first template according to the operation parameters.
In an embodiment, the fourth processing unit 704 is further configured to:
acquiring an execution result of executing the first management operation on the target application instance;
rendering the execution result on the front-end page.
Here, the functions of the first processing unit 701, the second processing unit 702, the third processing unit 703 and the fourth processing unit 704 are equivalent to those of the operation executor and the form renderer in the above application embodiment; in other words, the management apparatus of the application instance can implement the functions of the operation executor and the form renderer in the application embodiments described above.
In actual application, the first processing unit 701, the second processing unit 702, the third processing unit 703 and the fourth processing unit 704 may be implemented by a processor in a management device of an application instance in combination with a communication interface.
It should be noted that: the management apparatus for an application instance provided in the foregoing embodiment is only illustrated by the above-mentioned division of each program module when managing the application instance, and in actual application, the above-mentioned processing allocation may be completed by different program modules according to needs, that is, the internal structure of the apparatus is divided into different program modules (such as the operation executor and the form renderer in the foregoing application embodiment) to complete all or part of the above-mentioned processing. In addition, the management apparatus of the application example and the management method embodiment of the application example provided in the above embodiments belong to the same concept, and specific implementation processes thereof are detailed in the method embodiment and are not described herein again.
Based on the hardware implementation of the program module, and in order to implement the method according to the embodiment of the present application, an embodiment of the present application further provides an electronic device, which is configured to deploy a cloud platform, and as shown in fig. 8, the electronic device 800 includes:
a communication interface 801 capable of performing information interaction with other electronic devices;
the processor 802 is connected with the communication interface 801 to realize information interaction with other electronic devices, and is used for executing the method provided by one or more technical schemes when running a computer program;
a memory 803 storing a computer program capable of running on the processor 802.
Specifically, the processor 802 is configured to:
presenting at least one management operation function item aiming at a target application instance on a front-end page of the cloud platform;
responding to the selection operation aiming at the management operation function item, and acquiring a first identifier corresponding to the selection operation; the first identification represents the type of a first management operation corresponding to the selection operation;
acquiring a first template corresponding to the first management operation according to the first identifier; the first template at least comprises execution flow information required for executing the first management operation aiming at the target application instance;
and executing the first management operation on the target application instance based on the first template.
In an embodiment, the processor 802 is specifically configured to:
generating an operation instruction corresponding to the first management operation based on the first template;
and issuing the operation instruction to a cloud host corresponding to the target application instance to instruct the cloud host to execute the first management operation on the target application instance.
In an embodiment, the processor 802 is further configured to:
according to the first template, judging whether the first management operation executed aiming at the target application example needs to acquire the operation parameters input through the front-end page;
and generating an operation instruction corresponding to the first management operation based on the first template under the condition that the operation parameter does not need to be acquired.
In an embodiment, the processor 802 is further configured to:
presenting a confirmation option on the front-end page without acquiring the operation parameter; the confirmation option is used for confirming whether to execute the first management operation;
and responding to the confirmation operation aiming at the confirmation option, and generating an operation instruction corresponding to the first management operation based on the first template.
In an embodiment, the processor 802 is further configured to:
according to the first template, judging whether the first management operation executed aiming at the target application example needs to acquire the operation parameters input through the front-end page;
under the condition that the operation parameters need to be obtained, obtaining a second template corresponding to the first management operation according to the first identifier; the second template is used for rendering a form for inputting the operation parameters on the front end page;
and generating an operation instruction corresponding to the first management operation based on the first template and the second template.
In an embodiment, the processor 802 is further configured to:
rendering a form for inputting the operation parameters on the front-end page by using the second template, and acquiring the operation parameters input through the form;
and generating the operation instruction by utilizing the first template according to the operation parameters.
In an embodiment, the processor 802 is further configured to:
acquiring an execution result of executing the first management operation on the target application instance;
rendering the execution result on the front-end page.
It should be noted that: the process of the processor 802 specifically executing the above operations is detailed in the method embodiment, and is not described here again.
Of course, in practice, the various components in the electronic device 800 are coupled together by a bus system 804. It is understood that the bus system 804 is used to enable communications among the components. The bus system 804 includes a power bus, a control bus, and a status signal bus in addition to a data bus. For clarity of illustration, however, the various buses are labeled as bus system 804 in FIG. 8.
The memory 803 in the present embodiment is used to store various types of data to support the operation of the electronic device 800. Examples of such data include: any computer program for operating on the electronic device 800.
The method disclosed in the embodiments of the present application can be applied to the processor 802, or implemented by the processor 802. The processor 802 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 802. The Processor 802 may be a general purpose Processor, a Digital Signal Processor (DSP), or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like. The processor 802 may implement or perform the methods, steps, and logic blocks disclosed in the embodiments of the present application. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the method disclosed in the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software modules may be located in a storage medium located in the memory 803, and the processor 802 reads the information in the memory 803 and performs the steps of the aforementioned methods in conjunction with its hardware.
In an exemplary embodiment, the electronic Device 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), DSPs, Programmable Logic Devices (PLDs), Complex Programmable Logic Devices (CPLDs), Field Programmable Gate Arrays (FPGAs), general purpose processors, controllers, Micro Controllers (MCUs), microprocessors (microprocessors), or other electronic components for performing the foregoing methods.
It is to be appreciated that the memory 803 of the subject embodiment can be either volatile memory or nonvolatile memory, and can include both volatile and nonvolatile memory. Among them, the nonvolatile Memory may be a Read Only Memory (ROM), a Programmable Read Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), a magnetic random access Memory (FRAM), a Flash Memory (Flash Memory), a magnetic surface Memory, an optical disk, or a Compact Disc Read-Only Memory (CD-ROM); the magnetic surface storage may be disk storage or tape storage. Volatile Memory can be Random Access Memory (RAM), which acts as external cache Memory. By way of illustration and not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), Enhanced Synchronous Dynamic Random Access Memory (Enhanced DRAM), Synchronous Dynamic Random Access Memory (SLDRAM), Direct Memory (DRmb Access), and Random Access Memory (DRAM). The memories described in the embodiments of the present application are intended to comprise, without being limited to, these and any other suitable types of memory.
In an exemplary embodiment, the present application further provides a storage medium, specifically a computer storage medium, for example, a memory 803 storing a computer program, which can be executed by the processor 802 of the electronic device 800 to perform the steps of the foregoing method. The computer readable storage medium may be Memory such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface Memory, optical disk, or CD-ROM.
It should be noted that: "first," "second," and the like are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
The technical means described in the embodiments of the present application may be arbitrarily combined without conflict.
The above description is only a preferred embodiment of the present application, and is not intended to limit the scope of the present application.

Claims (10)

1. The management method of the application instance is applied to a cloud platform and comprises the following steps:
presenting at least one management operation function item aiming at a target application instance on a front-end page of the cloud platform;
responding to the selection operation aiming at the management operation function item, and acquiring a first identifier corresponding to the selection operation; the first identification represents the type of a first management operation corresponding to the selection operation;
acquiring a first template corresponding to the first management operation according to the first identifier; the first template at least comprises execution flow information required for executing the first management operation aiming at the target application instance;
and executing the first management operation on the target application instance based on the first template.
2. The method of claim 1, wherein performing the first management operation on the target application instance based on the first template comprises:
generating an operation instruction corresponding to the first management operation based on the first template;
and issuing the operation instruction to a cloud host corresponding to the target application instance to instruct the cloud host to execute the first management operation on the target application instance.
3. The method according to claim 2, wherein the generating an operation instruction corresponding to the first management operation based on the first template comprises:
according to the first template, judging whether the first management operation executed aiming at the target application example needs to acquire the operation parameters input through the front-end page;
and generating an operation instruction corresponding to the first management operation based on the first template under the condition that the operation parameter does not need to be acquired.
4. The method according to claim 3, wherein the generating an operation instruction corresponding to the first management operation based on the first template without acquiring the operation parameter comprises:
presenting a confirmation option on the front-end page without acquiring the operation parameter; the confirmation option is used for confirming whether to execute the first management operation;
and responding to the confirmation operation aiming at the confirmation option, and generating an operation instruction corresponding to the first management operation based on the first template.
5. The method according to claim 2, wherein the generating an operation instruction corresponding to the first management operation based on the first template comprises:
according to the first template, judging whether the first management operation executed aiming at the target application example needs to acquire the operation parameters input through the front-end page;
under the condition that the operation parameters need to be obtained, obtaining a second template corresponding to the first management operation according to the first identifier; the second template is used for rendering a form for inputting the operation parameters on the front end page;
and generating an operation instruction corresponding to the first management operation based on the first template and the second template.
6. The method according to claim 5, wherein the generating an operation instruction corresponding to the first management operation based on the first template and the second template comprises:
rendering a form for inputting the operation parameters on the front-end page by using the second template, and acquiring the operation parameters input through the form;
and generating the operation instruction by utilizing the first template according to the operation parameters.
7. The method according to any one of claims 1 to 6, further comprising:
acquiring an execution result of executing the first management operation on the target application instance;
rendering the execution result on the front-end page.
8. An apparatus for managing an application instance, comprising:
the system comprises a first processing unit, a second processing unit and a third processing unit, wherein the first processing unit is used for presenting at least one management operation function item aiming at a target application instance on a front end page of a cloud platform;
the second processing unit is used for responding to the selection operation aiming at the management operation function item and acquiring a first identifier corresponding to the selection operation; the first identification represents the type of a first management operation corresponding to the selection operation;
the third processing unit is used for acquiring a first template corresponding to the first management operation according to the first identifier; the first template at least comprises execution flow information required for executing the first management operation aiming at the target application instance;
a fourth processing unit, configured to execute the first management operation on the target application instance based on the first template.
9. An electronic device, comprising: a processor and a memory for storing a computer program capable of running on the processor,
wherein the processor is adapted to perform the steps of the method of any one of claims 1 to 7 when running the computer program.
10. A storage medium having a computer program stored thereon, the computer program, when being executed by a processor, performing the steps of the method of any one of claims 1 to 7.
CN202111020856.1A 2021-09-01 2021-09-01 Application instance management method and device, electronic equipment and storage medium Pending CN113900742A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111020856.1A CN113900742A (en) 2021-09-01 2021-09-01 Application instance management method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111020856.1A CN113900742A (en) 2021-09-01 2021-09-01 Application instance management method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113900742A true CN113900742A (en) 2022-01-07

Family

ID=79188299

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111020856.1A Pending CN113900742A (en) 2021-09-01 2021-09-01 Application instance management method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113900742A (en)

Similar Documents

Publication Publication Date Title
CN111078315B (en) Microservice arranging and executing method and system, architecture, equipment and storage medium
US9959198B1 (en) Simulated testing of API
CN108304201B (en) Object updating method, device and equipment
EP3433732B1 (en) Converting visual diagrams into code
US20210034336A1 (en) Executing a process-based software application in a first computing environment and a second computing environment
CN107491329B (en) Docker mirror image construction method, device, storage medium and electronic device
US11182276B2 (en) Development-time awareness of a production dependency injection environment
US11797273B2 (en) System and method for enhancing component based development models with auto-wiring
WO2018036342A1 (en) Csar-based template design visualization method and device
CN111522552A (en) Sub-application generation method and device, computer equipment and storage medium
CN112765023A (en) Test case generation method and device
CN110959165A (en) Techniques for automatically verifying functionality of offers in a cloud service broker system
US20150143267A1 (en) SYSTEM AND METHOD FOR DEVELOPING A RULE-BASED EVENT-DRIVEN MULTI-LAYERED FRONTEND FOR BUSINESS SERVICES AND RENDERING THE GUIs ON MULTIPLE CLIENT DEVICES
US20220283885A1 (en) Application programming interface compatibility
CN110806873A (en) Target control determining method and device, electronic equipment and storage medium
CN111858727A (en) Multi-data-source data export system and method based on template configuration
CN114048415A (en) Form generation method and device, electronic equipment and computer readable storage medium
CN112925583B (en) Host application capability extension method, device, equipment and storage medium
US10540151B1 (en) Graphical customization of a firmware-provided user interface (UI)
CN113568614A (en) Task issuing method, electronic device and storage medium
CN112527459A (en) Log analysis method and device based on Kubernetes cluster
CN116107623A (en) Software development method and device and electronic equipment
CN113900742A (en) Application instance management method and device, electronic equipment and storage medium
CN115774742A (en) Data storage newly-increased method, device, equipment, medium and product of private cloud
US11231457B1 (en) Continuous integration for integrated circuit design

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination