Application program management method and device, electronic equipment, storage medium and product
By configuring the application version configuration interface and storage version association relationship in the Git system, the problem of multi-version management is solved, and the semantic and visual management of application versions is realized, which improves the flexibility and efficiency of version configuration and delivery.
Patent Information
- Application Number
- CN202410013948.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-02
- Publication Date
- 2025-07-04
AI Technical Summary
In the prior art, there is a lack of effective version management methods for how to better manage multiple application versions, especially in Git systems.
By displaying the application's version configuration interface, configure the target semantic information and component information, generate the target deployment file, and store the version association to achieve application version management.
It realizes semantics and visual management of application versions, improves the flexibility and efficiency of version configuration and delivery, and supports efficient management of multiple versions.
Smart Images

Figure CN120255940A_ABST
Abstract
Description
Technical Field
[0001] This application relates to technical fields such as cloud technology and cloud storage, and provides an application management method, device, electronic device, storage medium and product. Background Art
[0002] With the rapid development of Internet technology, there are a wide variety of application programs in the network. Git is a distributed version control system that supports project management. In this field, the Git system is usually used to manage application programs. Developers can use the Git system to implement processes such as repository code construction, testing, and release of application programs.
[0003] In related technologies, the repository hosting service of the Git system is usually used to implement processes such as construction, testing, and release of the repository code of application programs. However, with the continuous iterative development of application programs, an application program will derive multiple versions. How to better manage multiple versions of application programs has always been an urgent problem in this field of technology. Summary of the Invention
[0004] This application provides an application management method, device, electronic device, storage medium and product. The technical solutions are as follows:
[0005] On the one hand, an embodiment of this application provides an application management method, which includes:
[0006] Display a version configuration interface of the application to be delivered. At least one semantic dimension to be configured and component information of at least one component are displayed in the version configuration interface. The component information of each component includes at least one component version.
[0007] In response to configuration operations for each semantic dimension and each component, determine the target semantic information and target component information corresponding to the configured target version. The target semantic information includes the version semantic information of the application of the target version corresponding to each semantic dimension, and the target component information includes the target component versions of the application of the target version corresponding to each component.
[0008] Generate a target deployment file corresponding to the target version based on the target semantic information and target component information, and deliver the application of the target version based on the target deployment file.
[0009] Store the version association relationship between the target version and the target semantic information and target component information to perform version management on the application based on the stored version association relationship.
[0010] On the other hand, an embodiment of this application provides an application management device, which includes:
[0011] A display module for displaying a version configuration interface of an application to be delivered, where at least one semantic dimension to be configured and component information of at least one component are displayed in the version configuration interface, and the component information of each component includes at least one component version;
[0012] A determination module for determining, in response to configuration operations for each semantic dimension and each component, target semantic information and target component information corresponding to the configured target version; the target semantic information includes version semantic information of the application of the target version corresponding to each semantic dimension, and the target component information includes target component versions of the application of the target version corresponding to each component;
[0013] A generation module for generating a target deployment file corresponding to the target version based on the target semantic information and target component information, and delivering the application of the target version based on the target deployment file;
[0014] An associated storage module for storing a version association relationship between the target version and the target semantic information and target component information;
[0015] A management module for performing version management on the application based on the stored version association relationship.
[0016] In a possible implementation manner, the apparatus further includes:
[0017] A code storage module for storing source code files of each component submitted for the application into a code repository;
[0018] An image push module for pushing image files generated based on the source code files of each component to an image repository;
[0019] A component information storage module for storing component information of each component corresponding to the application into a database;
[0020] When displaying the version configuration interface of the application to be delivered, the display module is configured to:
[0021] Read component information of each component corresponding to the application from the database, and display the component information of each semantic dimension and each component to be configured in the version configuration interface.
[0022] In a possible implementation manner, the component information of each component further includes component metadata of the component, and each component corresponds to at least one component version;
[0023] When storing the component information of each component corresponding to the application in the database, the component information storage module is specifically configured to:
[0024] For each component, associate and store each component version of the component and the component metadata corresponding to each component version in the database;
[0025] When storing the version association relationship between the target version, the target semantic information, and the target component information, the association storage module is specifically configured to:
[0026] Determine the association relationship of the target component version of each component corresponding to the target version from the association relationship between each component version and the component metadata;
[0027] Store the target version and the target semantic information in the association relationship of each target component version to obtain the version association relationship.
[0028] In a possible implementation, the device further includes:
[0029] A detection module, configured to periodically detect each component in the code repository;
[0030] A first building module, configured to, in response to detecting a changed component in the code repository, build an image file of the changed component based on the changed source code file corresponding to the changed component, and push the image file to the image repository;
[0031] A component information update module, configured to update the association relationship between each component version and the component metadata stored in the database based on the changed component information of the changed component.
[0032] In a possible implementation, when performing version management on the application based on the stored version association relationship, the management module is configured to:
[0033] In response to a component update event of an application of any version, determine at least one associated version corresponding to the updated component based on the version association relationship, and update the applications of each associated version based on the updated component;
[0034] Wherein, the version association relationship includes the association relationship between each configured application version and the version semantic information of each semantic dimension and the component information of each component, and each configured application version includes the target version.
[0035] In a possible implementation, a version creation entry is further displayed in the version configuration interface;
[0036] The display module, when displaying the version configuration interface of the application to be delivered, is used for:
[0037] In response to a trigger operation for the version creation entry, display, in the version configuration interface, the component information of at least one semantic dimension and at least one component to be configured, where the version configuration page includes an identification configuration control;
[0038] The determination module, when determining the target semantic information and target component information corresponding to the configured target version in response to the configuration operations for each semantic dimension and each component, is used for:
[0039] In response to a trigger operation on the identification configuration control and the configuration operations for each semantic dimension and each component, obtain the version identifier of the target version configured based on the trigger operation, and use the semantic information and component information configured based on the configuration operation as the target semantic information and target component information corresponding to the target version.
[0040] In a possible implementation, a version selection entry is also displayed in the version configuration interface;
[0041] The management module, when performing version management on the application based on the stored version association relationship, is used for:
[0042] In response to a trigger operation on the version selection entry, based on the version association relationship, display, in the version configuration interface, each configured application version and the associated information corresponding to each application version, where the associated information includes at least one of the version semantic information of each semantic dimension or the component information of each component;
[0043] Wherein, the version association relationship includes the association relationships between each configured application version and the version semantic information of each semantic dimension and the component information of each component, and each configured application version includes the target version;
[0044] In response to a selection operation on any application version, deliver the application of the selected version based on the application deployment file corresponding to the selected version.
[0045] In a possible implementation, the management module, when performing version management on the application based on the stored version association data, is used for:
[0046] Display the application release interface of the application, where the target version and its corresponding component list are displayed in the application release interface, and a version upgrade control is included in the application release interface;
[0047] In response to a version upgrade operation triggered by the version upgrade control, based on the version association relationship, periodically detect the version of the delivered application;
[0048] When it is detected that the application has been upgraded to the expected version, publish the application of the expected version based on the application deployment file corresponding to the expected version.
[0049] In a possible implementation manner, the device further includes:
[0050] A prompt module, configured to display a prompt message on the application release interface when it is detected that the application has not been upgraded to the expected version after exceeding the target duration, where the prompt message is used to prompt that the release of the expected version of the application fails;
[0051] A rollback release module, configured to, in response to a rollback operation triggered in the application release interface, roll back the application to the historical version for release based on the application deployment file corresponding to the delivered historical version.
[0052] In a possible implementation manner, the at least one semantic dimension includes at least one environment variable of the cloud environment to be deployed; the target semantic information includes variable values configured for each environment variable;
[0053] When generating the target deployment file corresponding to the target version based on the target semantic information and the target component information, the generating module is configured to:
[0054] Generate an environment configuration file corresponding to the target version based on the target semantic information; obtain the mirror files of each component from the mirror repository based on the target component information;
[0055] Obtain the target deployment file corresponding to the target version based on the environment configuration file and the mirror files of each component.
[0056] In a possible implementation manner, the component metadata of each component includes at least one of the following:
[0057] The name of the code repository corresponding to the component;
[0058] The address of the code repository corresponding to the component;
[0059] The code branch corresponding to the component;
[0060] The build time of the component;
[0061] The build tag of the component.
[0062] On the other hand, an electronic device is provided, including a memory, a processor, and a computer program stored on the memory, where the processor executes the computer program to implement the above application program management method.
[0063] On the other hand, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the above application program management method is implemented.
[0064] On the other hand, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the above application program management method is implemented.
[0065] The beneficial effects brought by the technical solutions provided in the embodiments of the present application are as follows:
[0066] The application program management method provided in the present application, through the visual version configuration interface of the application program, can support configuration for each semantic dimension and each component to obtain the target semantic information and target component information corresponding to the configured target version; through the target semantic information, the version semantic information of the target version in each semantic dimension can be configured, and through the target component information, the components corresponding to any version of the target version can be supported; and a target deployment file is generated based on the target semantic information and target component information to deliver the application program of the target version; thus realizing the semanticization and visualization of the version naming of the application program, and improving the flexibility and efficiency of the version configuration and delivery of the application program. Moreover, the version association relationship between the target version and the target semantic information and target component information can also be stored to more efficiently and conveniently manage multiple versions of the application program based on this version association relationship; thereby improving the flexibility and efficiency of the version management of the application program. Description of the Drawings
[0067] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description in the embodiments of the present application.
[0068] Figure 1 It is a schematic diagram of the implementation environment of an application program management method provided in the embodiments of the present application;
[0069] Figure 2 It is a schematic flowchart of an application program management method provided in the embodiments of the present application;
[0070] Figure 3 It is a schematic diagram of an image building task provided in the embodiments of the present application;
[0071] Figure 4 It is a schematic diagram of concurrent building of multiple images provided in the embodiments of the present application;
[0072] Figure 5 A schematic diagram of a version configuration interface provided by an embodiment of the present application;
[0073] Figure 6 A schematic diagram of generating an application deployment file provided by an embodiment of the present application;
[0074] Figure 7 A schematic diagram of generating an environment configuration file provided by an embodiment of the present application;
[0075] Figure 8 A schematic diagram of data stored in a database provided by an embodiment of the present application;
[0076] Figure 9 A schematic diagram of multi - version repair provided by an embodiment of the present application;
[0077] Figure 10 A schematic diagram of a version configuration interface provided by an embodiment of the present application;
[0078] Figure 11 An overall flowchart of an application management method provided by an embodiment of the present application;
[0079] Figure 12 A schematic diagram of the structure of an application management device provided by an embodiment of the present application;
[0080] Figure 13 A schematic diagram of the structure of an electronic device provided by an embodiment of the present application. Detailed implementation manners
[0081] The embodiments of the present application will be described below with reference to the accompanying drawings in the present application. It should be understood that the embodiments described below in conjunction with the drawings are exemplary descriptions for explaining the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions of the embodiments of the present application.
[0082] Those skilled in the art of the present technology can understand that, unless specifically stated otherwise, the singular forms "a", "an", "the" and "said" used herein may also include the plural forms. The terms "comprising" and "including" used in the embodiments of the present application mean that the corresponding features can be implemented as the presented features, information, data, steps, operations, but do not exclude the implementation of other features, information, data, steps, operations, etc. supported by the art of the present technology.
[0083] It is understandable that in the specific implementation of this application, any data related to the user or the user's application, such as the application's version semantic information, component information, environment configuration information, application deployment files, version association data, etc., when the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions. In other words, if any user-related data is involved in the above techniques in the embodiments of this application, these data must be obtained with the user's authorization and consent and in compliance with the relevant laws, regulations and standards of the country and region.
[0084] Figure 1 A schematic diagram of an implementation environment of an application management method provided in this application. Figure 1 As shown, the implementation environment includes: a management device 101 and a cloud device 102. The management device 101 is installed with a Git system, and the management device 101 can use the Git system to perform version management on the application's construction, testing, delivery, and release processes. The management device 101 can be a terminal or a server. When managing an application based on the Git system, the management device 101 can publish the application deployment file of the application to the cloud environment; exemplarily, in a cloud native technology scenario, the application is containerized and deployed based on the Kubernetes platform. The cloud device 102 can be a device in a cloud environment, and the management device 101 can deploy the application to the cloud device 102 based on the Git system. The cloud device 102 can be a server, a cloud computing center, and the like.
[0085] When managing applications based on the Git system, the present application can support configuration operations for various semantic dimensions and components through a visual version configuration interface, thereby realizing semantic and visual version naming of the application; and, the target semantic information and target component information corresponding to the target version can be associated and stored to obtain version association data, so as to more efficiently and stably manage the version of the application based on the version association data.
[0086] Cloud native is a concept of software development and deployment that aims to improve the reliability, elasticity and scalability of applications by leveraging technologies such as cloud computing, containerization, microservice architecture and automation. K8s (Kubernetes) is a container orchestration system widely used in the cloud native field. It has the characteristics of high scalability, high availability, self-healing, and open source ecology. As a base, it can support large-scale production-level cluster deployment.
[0087] Among them, the server can be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server or a server cluster that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. The above network can include, but is not limited to: wired networks, wireless networks. Among them, the wired network includes: local area networks, metropolitan area networks, and wide area networks, and the wireless network includes: Bluetooth, Wi-Fi, and other networks that implement wireless communication. The terminal can be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a laptop computer, a digital broadcast receiver, a MID (Mobile Internet Devices), a PDA (Personal Digital Assistant), a desktop computer, a vehicle-mounted terminal (such as a vehicle-mounted navigation terminal, a vehicle-mounted computer, etc.), a smart speaker, a smart watch, etc. The management device 101 and the cloud device 102 can be directly or indirectly connected through wired or wireless communication methods, but are not limited thereto. Specifically, it can also be determined based on the actual application scenario requirements and is not limited here.
[0088] Figure 2 It is a schematic flowchart of an application program management method provided by an embodiment of this application. The execution subject of this method can be an electronic device. For example, this electronic device can be a server or a terminal. As Figure 2 shown, this method includes the following steps.
[0089] Step 201, the electronic device displays a version configuration interface of the application program to be delivered. The version configuration interface displays at least one semantic dimension to be configured and component information of at least one component. The component information of each component includes at least one component version.
[0090] The application program management method of this application supports semantic definition of the version of the application program. The semantic dimension refers to the dimension for semantic definition of the version of the application program; semantic definition can be the process of configuring the semantic features of each version of the application program in each semantic dimension.
[0091] This application can also support configuring the components included in each version of the application program. Specifically, it can be configured which components each version of the application program includes, and which component version of each component is adopted.
[0092] In a possible implementation, the at least one semantic dimension includes at least one environment variable of the cloud environment to be deployed. For example, in the scenario of cloud native technology, applications can be containerized and deployed based on the Kubernetes platform, such as in cloud environments like public clouds, private clouds, or hybrid clouds. Among them, the environment variables of the cloud environment corresponding to the application can be configured based on each semantic dimension. For example, the at least one environment variable can include, but is not limited to: region (geographical area), zone (availability zone), CPU (central processing unit), memory, disk, etc.
[0093] In addition, the at least one semantic dimension can also include the scope of objects applicable to the application; for example, the application can be a VIP version applicable to VIP users or a general version applicable to ordinary users. The at least one semantic dimension can also include the stage corresponding to the application. Different stages can correspond to different deployment environments respectively; for example, the development stage, test stage, or production stage of the application, and the cloud environments corresponding to the deployment in each stage can be the development environment, test environment, or production environment respectively.
[0094] In a possible implementation, the component information of each component also includes component metadata; among them, the component metadata of each component includes at least one of the following:
[0095] The name of the code repository corresponding to the component;
[0096] The address of the code repository corresponding to the component;
[0097] The code branch corresponding to the component;
[0098] The build time of the component;
[0099] The build tag of the component.
[0100] Among them, the code repository is used to store the source code files of the components submitted for the application. Exemplarily, an application is generally composed of multiple components, and each component cooperates with each other to implement various functions of the business; in this application, the source code files of each component can be submitted to the corresponding code repository. The name of the code repository and the address of the code repository are the name and address of the code repository storing the source code files of the component.
[0101] In a possible scenario, the Git system supports multi-branch management. By using branches, different functions can be developed, bugs can be fixed, and experimental features can be tried simultaneously in the same code repository without interfering with or affecting the mainline development. For example, for an application, there can be a development branch, a release branch, etc., and the code branch corresponding to the component is also the branch corresponding to the application containing the component.
[0102] For example, the build time of a component can be the time when the source code file of the component is submitted to the code repository, and the build tag can be the tag marked when the component is submitted, which can represent the development progress or version of the source code file of the component, etc.
[0103] In a possible implementation, before displaying the version configuration interface, the information of the components submitted for the application can also be stored, so as to display the version configuration interface based on the stored information; before displaying the version configuration interface of the application to be delivered, the method further includes the following steps:
[0104] Store the source code files of each component submitted for the application in the code repository; and push the image files generated by building based on the source code files of each component to the image repository;
[0105] Store the component information of each component corresponding to the application in the database;
[0106] Correspondingly, displaying the version configuration interface of the application to be delivered includes:
[0107] Read the component information of each component corresponding to the application from the database, and display the component information of each semantic dimension to be configured and each component in the version configuration interface.
[0108] Among them, the image file is generated by building based on the source code file. The image file can include an executable file obtained by compiling, building, and packaging the source code file of the component and the corresponding execution environment, such as rootfs (root file system), configuration files, etc. The code repository can be a local repository of the electronic device, and the image repository can be a repository of the application corresponding in the cloud. Through the image repository, storage, query, download, etc. of the image files of each component are supported to support processes such as the delivery and release of the application.
[0109] In a possible example, the component versions and component metadata of a component can be associated and stored. Correspondingly, storing the component information of each component corresponding to the application in the database includes:
[0110] For each component, associate and store each component version of the component and the component metadata corresponding to each component version in the database.
[0111] In this application, the Git system can configure a code repository and a database (DB). Among them, the code repository is used to store the source code files of each component submitted for the application; the database can be used to store the component information of each component in the code repository. Exemplarily, the component versions and component metadata of each component can be associated and stored in the database. For example, MySQL can be used to persistently store the component metadata corresponding to each component version of each component in the form of a data table in the database. Based on the "database + Git repository" method, the associated storage of different component versions and component metadata of each component can be realized, and the persistent associated data storage can ensure the reusability, traceability, and high availability of multi-version components.
[0112] As Figure 3 shown, for each version of the application, after storing the source code files of each component submitted for the application in the code repository, mirror files of the source code files of each component can also be built to store the mirror files of each component in an image registry. Moreover, the component information of each component, specifically including component versions and metadata such as the tag of the component, repo information of the code repository, corresponding branch, build time, etc., can be associated and stored in the database DB.
[0113] In a possible implementation, the change situation of the component can also be periodically detected, and the mirror building task can be automatically triggered. Correspondingly, the method further includes the following steps:
[0114] Periodically detect each component in the code repository;
[0115] In response to detecting a changed component in the code repository, build a mirror file of the changed component based on the changed source code file corresponding to the changed component, and push the mirror file of the changed component to the image registry;
[0116] Based on the changed component information of the changed component, update the association relationship between the component versions and component metadata stored in the database.
[0117] Among them, a changed component refers to a component whose corresponding source code file has changed; for example, a changed component can be a component that has been repaired, that is, the source code file has been repaired; a changed component can also be a component with new features added, such as editing, updating, or deleting the content in the source code file to adapt to the new features. If the source code file has changed and the executable file obtained by compiling the source code file has also changed, a mirror task for the changed component needs to be built to update the mirror file corresponding to the changed component in the image registry.
[0118] In this step, the electronic device can periodically detect each component in the code repository according to the pre-configured detection cycle. When it detects that the commitID corresponding to any component has changed; that is, there is a change in the commitID of the source code file submitted for any component in the code repository, indicating that a new source code file has been submitted for any component; then the electronic device can treat any component as a changed component. The detection cycle can be configured based on needs, for example, once every 3 minutes, once every 5 minutes, etc.
[0119] The electronic device can use CronJob to implement periodic detection and build image building tasks. It should be noted that CronJob is a built-in resource type in K8s. Its main function is to periodically execute tasks in a containerized manner and judge the task status of the corresponding Job based on the exit code of the container process. Users can customize the scheduling cycle and configure it in units of year, month, day, hour, minute, and week.
[0120] In a possible example, the CronJob resource type in K8s can be used to pull the source code corresponding to each component from the code repository branch in a pull manner to determine whether the corresponding commitID has changed; if the commitID has changed, that is, whether it is the commitID of the previous detection cycle, then build an image task for the changed component. After automatically building the image task, the image file of the changed component can be stored in the image repository; the newly built image file can also be applied to each associated version of the application; based on this, an automated and efficient build process of one-time build and multiple references can be implemented to support the rapid construction, development, and deployment of business applications.
[0121] like Figure 4 As shown, the present application supports multi-version image building of an application. Usually, an application includes multiple components, and each component is distributed in multiple repositories and multiple branches. For example, in CronJob, component A of version V1, component B of version V2, component C of version V1, and component D of version V2 can be built concurrently. Specifically, the CronJob resource type can be used, with one component corresponding to one Job, to concurrently build image tasks of component A, component B, component C, and component D, and update the component information corresponding to component A, component B, component C, and component D in the database.
[0122] It should be noted that in the related art, using Git repository hosting services, using Git repositories or product storage systems to store applications, it is necessary to use an active push method to deploy the application to the target deployment environment; however, the active push method requires the configuration of permissions for each repository separately, and the control of the frequency of application release is not flexible. In this application, based on the CronJob resource type of the K8s platform, the image task is automatically built in a pull manner, which can realize an automated and efficient construction process of one-time build and multiple references. In addition, using a containerized deployment method, only one permission configuration is required to achieve efficient deployment of multi-version references.
[0123] In a possible implementation, the version configuration interface can be displayed based on the component information of each component stored in the database. The electronic device displays the version configuration interface of the application to be delivered, including: the electronic device reads the component information of each component corresponding to the application from the database, and displays each semantic dimension to be configured and the component information of each component in the version configuration interface.
[0124] For each component, the electronic device may display the component version of each component in the application version interface, or display the component version and component metadata of each component.
[0125] The version configuration interface also displays a version creation entry; the version creation entry is used to trigger the creation process of a new version of the application. Accordingly, the version configuration interface showing the application to be delivered includes:
[0126] In response to a triggering operation for creating an entry for the version, the electronic device displays component information of at least one semantic dimension and at least one component to be configured in the version configuration interface.
[0127] Exemplarily, the version creation entry may be a new version button, and when the new version button is clicked, the component information of each semantic dimension and each component is displayed in the version configuration interface. The identification configuration control may be used to trigger the configuration process of the version identification for the application.
[0128] For at least one semantic dimension, the various semantic dimensions and the configuration controls corresponding to each semantic dimension can be specifically displayed in the version configuration interface, and the configuration controls of each semantic dimension can be used to trigger the configuration process of the application version in the semantic dimension. For the component information of at least one component, the component version of each component can be specifically displayed; or, the component version of each component and the component metadata corresponding to each component version can be displayed.
[0129] Step 202: The electronic device determines target semantic information and target component information corresponding to the configured target version of the application in response to configuration operations for each semantic dimension and each component.
[0130] Among them, the target semantic information includes version semantic information corresponding to each semantic dimension of the target version of the application, and the target component information includes target component versions corresponding to each component of the target version of the application.
[0131] Exemplarily, the version configuration page includes an identification configuration control. In this step, the electronic device can, in response to a trigger operation triggered on the identification configuration control and configuration operations for each semantic dimension and each component, obtain a version identifier of the target version configured based on the trigger operation, and use the semantic information and component information configured based on the configuration operation as the target semantic information and target component information corresponding to the target version.
[0132] As Figure 5 shown, the newly created version in the version configuration interface is selected. The version identifier may include a version name, and the identification configuration control may be an input control for triggering the input of the version name, and the user can input the version name based on the input control. As Figure 5 shown, the version configuration interface may display multiple components such as Component A, Component B, and Component C, and each component may correspond to at least one candidate component version; the configuration operation for each component may be a selection operation for each candidate component version of each component. For example, configure Version 1 of Component A for Component A and configure Version 2 of Component B for Component B. Based on this, an application version name can correspond to a combination of various versions of each component.
[0133] As Figure 5 shown, the version configuration interface may also display each semantic dimension. For example, each semantic dimension may include a deployment environment, a locale, resource information, whether it is VIP, etc. Among them, each semantic dimension may correspond to at least one candidate semantic information. For example, the candidate semantic items corresponding to the deployment environment include: development environment, test environment, production environment; the candidate semantic items corresponding to the locale include: Beijing, Shanghai, Guangzhou; the candidate semantic items corresponding to the resource information include: 4C8G, 8C16G, 16C32G; the candidate semantic items corresponding to whether it is VIP include: yes or no. Of course, the version configuration interface may also display other semantic dimensions and their corresponding candidate semantic items. This application only uses Figure 5 as an example for introduction, but does not limit each semantic dimension.
[0134] Among them, the configuration operation for each semantic dimension can be a selection operation for each candidate semantic information of each semantic dimension. Based on this, the version semantic information of each semantic dimension corresponding to the current version name can be configured. When a trigger operation on the submit button is detected, the target semantic information and target component information corresponding to the target version can be obtained.
[0135] Step 203: The electronic device generates a target deployment file corresponding to the target version based on the target semantic information and target component information, and delivers the application of the target version based on the target deployment file.
[0136] Among them, the target deployment file is a deployment file of the application in the cloud environment, and the target deployment file may include an executable file of the application and an environment configuration file. In this step, the electronic device can generate a configuration file corresponding to the target version based on the target semantic information, and determine the executable file corresponding to the target version based on the target component information, so as to obtain the target deployment file.
[0137] In a possible implementation manner, the at least one semantic dimension includes at least one environment variable of the cloud environment to be deployed; the target semantic information includes variable values configured for each environment variable; correspondingly, the electronic device generates a target deployment file corresponding to the target version based on the target semantic information and target component information, including the following steps:
[0138] Generate an environment configuration file corresponding to the target version based on the target semantic information; obtain mirror files of each component from the mirror repository based on the target component information;
[0139] Obtain the target deployment file corresponding to the target version based on the environment configuration file and the mirror files of each component.
[0140] Exemplarily, the electronic device may submit the target component information and the target semantic information to Helm for specific Artifact generation. It should be noted that this application can utilize Helm to generate the deployment package of the application; among them, Helm is an open-source package manager for K8s, similar to apt used in Ubuntu (an operating system of a Linux distribution mainly for desktop applications), yum used in CentOs (Community Enterprise Operating System), or pip in Python. Helm has the function of quickly searching, downloading, and installing software packages. In this application, the deployment package generated by Helm may include multiple Chart packages. A Chart package includes images, dependencies, resource definitions, etc. required to run an application, and may also include service configurations in the Kubernetes cluster, such as the cloud environment required for containerization deployment based on the Kubernetes platform.
[0141] Among them, for the target semantic information including various environment variables, a specified template and each environment variable and its variable value can be used to generate a manifests deployment manifest file.
[0142] Such as Figure 6 As shown, when using Helm to generate the environment configuration file, by using the Template file pre-loaded with the application process running and the Values file carrying the set of environment variables of the cloud environment, through the Go-Template syntax, the manifests.yaml file can be quickly and efficiently rendered as the environment configuration file, and the generated yaml file can be directly deployed to the K8s cloud environment. It should be noted that Go-Template is a template engine built into the Go language for generating text output. It uses a template language similar to HTML to combine data and templates to generate the final output result.
[0143] It should be noted that.yaml is a highly readable format for expressing data serialization, and currently several programming languages or scripting languages support (or parse) this language. It is the default serialization input and output data format for resources in K8s.
[0144] Such as Figure 7As shown in the figure, the electronic device can pull the component versions and component metadata of each configured component from the database DB, and submit the pulled component information and environmental variables such as region, zone, CPU, memory, disk and their variable values to Helm. Using Helm, based on the mirror files corresponding to each component version pulled from the mirror repository and manifests.yaml, specific artifacts are generated, that is, the deployment package of the application of the target version.
[0145] Step 204: The electronic device stores the version association relationship between the target version, the target semantic information, and the target component information, so as to perform version management on the application based on the stored version association relationship.
[0146] In this step, the electronic device can store the version association relationship in the database, that is, store the semantic version information of each semantic dimension corresponding to the target version and the component versions of each component in the database; in addition, the component metadata corresponding to each component version can also be associated and stored.
[0147] In a possible implementation manner, the configured target version can also be associated and stored based on the component versions and component metadata already stored in the database. Correspondingly, storing the version association relationship between the target version, the target semantic information, and the target component information includes the following steps:
[0148] Determine the association relationship of the target component versions of each component corresponding to the target version from the association relationship between each component version and component metadata;
[0149] Store the target version and target semantic information in the association relationship of each target component version to obtain the version association relationship.
[0150] Exemplarily, the electronic device can add the version identifier and target semantic information of the configured target version to the association relationship of each component version and component metadata already associated and stored in the database.
[0151] As Figure 8 shown, Figure 8Shows the association relationships between the versions of each component stored in the database and the component metadata. Among them, when detecting each component such as component A, component B, component C, etc. submitted for the application, the component information can be automatically built into the database. For example, specifically, multiple fields such as the component version of each component, the corresponding repository name, repository address, repository branch, build date, creation time, update time, publisher, etc. can be associated and stored. When the application versions corresponding to each component have not been configured, the application version positions of each component are empty. If the application version corresponding to the component is configured on the version configuration page, the name of the corresponding application version can be associated with the corresponding component. For example, application version V2310 is correspondingly associated with component B of version V2 and component C of version V1; while component A does not have a corresponding application version.
[0152] It should be noted that whenever version configuration is performed based on this version configuration interface, the version and its corresponding version semantic information configured each time, and the version association relationships between the component information can be stored. Based on this, the version association relationships stored in this database can include the association relationships between each configured application version, the version semantic information of each semantic dimension, and the component information of each component. Each of the configured application versions includes the target version.
[0153] It should be noted that the above is introduced by taking database storage as an example. In addition, it can also be directly persisted and stored in a Git repository in the form of files, that is, each application version can correspond to a file directory, and each file in the file directory can store information such as the component version of each component, component metadata, version identifier of the target version, version semantics, etc.
[0154] In the cloud-native scenario, more and more services adopt the cloud-native method to deploy application services, microservices, software systems, etc. in a containerized manner into the cloud environment. With the continuous iterative development of the application program, the same application program will derive multiple versions with different characteristics. This application uses a database to persistently store data such as version association relationships and multi-version metadata, and realizes the data association of multiple versions based on the method of database + Git repository. The persisted data ensures the reusability, traceability, and high availability of multiple versions; and supports both the single-repository mode (a single repository contains multiple sub-components) and the multi-repository mode (one component corresponds to one repository); through the UI interaction of the user in the visualization interface, the generation of the manifests deployment list file is realized, and functions such as multi-version upgrade, repair, rollback, etc. are also supported, which greatly meets the needs of the version diversification of the application program and improves the flexibility and efficiency of the version management of the application program.
[0155] The following introduces the processes such as repair, upgrade, rollback, etc.
[0156] In a possible implementation, the version management of the application based on the stored version association relationship includes:
[0157] In response to a component update event of any version of the application, determine at least one associated version corresponding to the updated component based on the version association relationship, and update the applications of each associated version based on the updated component.
[0158] Among them, the component update event may be an event that there is an update to the source code file corresponding to the component. For example, when repairing the source code file, such as using hotfix (hot patch) for repair, the updated component is the repaired component; or, when editing, updating, or deleting the source code file to adapt to new features, the updated component is the component with new feature addition; or, when performing daily version iteration on the source code file, such as iterating from version V2 of component A to V2.2 and then to V2.3, the updated component is the component with version iteration.
[0159] Exemplarily, the version association relationship can also be used to locate the associated versions corresponding to the updated component, that is, which versions of the application use the updated component, so as to modify the corresponding components in the applications of each associated version together.
[0160] Such as Figure 9 As shown, for example, when there is a bug in version V2 of the application that needs to be fixed, hotfix can be used to fix the V2.2 code of the latest commit of version V2. And after verification, through the cherry-pick instruction of the Git system, the mirror file of the repaired component can be synchronized to the applications of each associated version, such as version V1, version V3, and the latest HEAD version and other associated versions. Based on this, it can be realized that a certain vulnerability repair of a certain version will cause corresponding repairs to all related versions.
[0161] In a possible implementation, the version association relationship can also be used to select an existing version for delivery. A version selection entry is also displayed in the version configuration interface; the version selection entry can be used to trigger the process of delivering the configured version. Correspondingly, the version management of the application based on the stored version association relationship includes:
[0162] In response to a trigger operation on the version selection entry, based on the version association relationship, display the configured application versions and the association information corresponding to each application version in the version configuration interface, where the association information includes at least one of the version semantic information of each semantic dimension or the component information of each component;
[0163] In response to a selection operation for any application version, the application of the selected version is delivered based on the application deployment file corresponding to the selected version.
[0164] As Figure 10 shown, the "Select Existing Version" in the version configuration interface is selected; the configured versions V2310, V2311, and V2312 are displayed on the version configuration page; each version may specifically include multiple deliveries for that version. For example, under the V2310 version, there are V2310.1 and V2310.2. Currently, V2310.1 of the V2310 version is selected, and based on the version association relationship, the version semantic information of each semantic dimension corresponding to the selected version is displayed on the right.
[0165] Among them, when the submit button on the version configuration page is clicked, the selected V2310.1 version can be delivered.
[0166] In a possible implementation, the version management of the application is performed based on the stored version association data, including:
[0167] Display the application release interface of the application. The application release interface displays the target version and its corresponding component list, and the application release interface includes a version upgrade control;
[0168] In response to a version upgrade operation triggered based on the version upgrade control, periodically detect the version of the delivered application based on the version association relationship;
[0169] When it is detected that the application is upgraded to the desired version, release the application of the desired version based on the application deployment file corresponding to the desired version.
[0170] Among them, the component list includes each component corresponding to the target version. The component list can be obtained based on the manifests.yaml file, which is the deployment manifest file corresponding to the target version and may contain each component manifest corresponding to the target version. In this step, the version identifier of the target version and the yaml list in the file can be displayed in the application release interface.
[0171] Among them, the application release interface may include a version upgrade space, and the version upgrade control is used to trigger the process of upgrading and releasing the version of the application, that is, automatically release when the desired version is generated.
[0172] Exemplarily, the application release interface can be the ArgoCD web interface provided by the visualization release system ArgoCD. It should be noted that ArgoCD is a cloud-native CD (Continuous Delivery) tool that deploys relevant components using K8s containerization and supports various operation methods such as visualization and command line. Additionally, the ArgoCD web interface may also include controls such as sync, diff, and delete to support visualization operations such as sync, diff, and delete for each component or manifest file. It should be noted that CD continuous delivery is to achieve the automated construction, testing, and deployment of code to the online environment based on a certain tool or platform to deliver high-quality products, representing the update iteration rate of a development team.
[0173] When an upgrade operation triggered by the version upgrade control is detected, the selected desired version can be obtained, and the version of the delivered application can be polled at regular intervals to check if it reaches the desired version. If it reaches the desired version, the application of that desired version is released. For example, if the current version of the application is V1, V2 or V3 can be selected as the desired version for upgrade and release; the current version is polled at regular intervals (such as once every 5 seconds) through an interface to check if it reaches the desired version, and it can also be detected whether each component corresponding to the current version is running healthily, etc.; if it is detected that the desired version is reached and each component corresponding to this version is running healthily, then it is released, and the status of this upgrade and release is updated to the success status (Succeeded).
[0174] In a possible way, a version rollback function can also be provided for the situation where the upgrade to the desired version has not been completed for a long time. This process includes the following steps:
[0175] When it is detected that the application has not been upgraded to the desired version after exceeding the target duration, a prompt message is displayed on the application release interface, and this prompt message is used to indicate that the release of the desired version of the application has failed;
[0176] In response to a rollback operation triggered on the application release interface, based on the application deployment file corresponding to the delivered historical version, the application is rolled back to that historical version for release.
[0177] Among them, the electronic device can display the current release status as the release failure status (Failed) in the application release interface for prompting. In addition, voice, video and other prompt signals can be further sent for prompting to remind the release personnel to check the reasons for the local release failure. In addition, a rollback control can be provided in the application release interface, and the rollback control can be used to trigger the rollback of the application program to the previous version for release. For example, if the expected version has not been successfully detected after a certain period of time (for example, more than 10 minutes), or the running status of each component of the expected version has not reached the healthy state for more than 10 minutes, the current release status can be updated to the failure status and the corresponding failure alarm can be issued. When a rollback operation triggered by the rollback control is detected, the release is performed based on the selected original V1 version.
[0178] The operation and maintenance mode of this application is based on the Git system. Git is used as the single true source, and the management and deployment of infrastructure and application programs are realized through the version management and automation tools of Git. The K8s Job / CronJob is used to customize the build process and automatically execute the build tasks, realizing an efficient build mode of building in one place and referencing in multiple places. MySQL is used to persistently store data such as component information and version association relationships, which is convenient for managing multiple versions of application programs. Thus, functions such as maintenance, upgrade, gray scale, and rollback of multiple versions are realized based on the database + Git repository. A Git application multi-version release management system for cloud-native K8s clusters is realized, which has functions such as multi-version management of application programs, automated image building, persistent storage of version association data and component metadata, and visual release management. It also supports features such as multi-version gray scale, rollback, unified docking with public clouds, private clouds, etc.
[0179] Figure 11 It is a schematic diagram of the overall process of application program management provided by an embodiment of this application. As Figure 11 shown, the overall process can be divided into two stages: the multi-version build preparation stage and the version release stage according to demand. Among them, in the multi-version build preparation stage, it can include daily version iteration of components, automated image building, and persistent storage of component information to the DB, etc. Then, the information stored in the DB and the image are submitted to the next stage, that is, the version release stage according to demand. The user configures a new version according to demand, and quickly and dynamically renders and generates artifacts through the Helm tool, which can be uniformly docked and deployed to various cloud environments such as public clouds, private clouds, and hybrid clouds, greatly improving the deployment efficiency of business applications.
[0180] The application management method provided by this application, through the visual version configuration interface of the application, supports configuration for each semantic dimension and each component to obtain the target semantic information and target component information corresponding to the configured target version; through the target semantic information, the version semantic information of the target version in each semantic dimension can be configured, and through the target component information, the components corresponding to any version of the target version can be supported; and a target deployment file is generated based on the target semantic information and the target component information to deliver the application of the target version; thereby realizing the semanticization and visualization of the version naming of the application, improving the flexibility and efficiency of the version configuration and delivery of the application. Moreover, the version association relationship between the target version, the target semantic information, and the target component information can also be stored to more efficiently and conveniently manage multiple versions of the application based on this version association relationship; thereby improving the flexibility and efficiency of the version management of the application.
[0181] The application management method provided by this application involves technologies such as cloud technology, cloud storage, and cloud computing, and can be applied to cloud environments such as public clouds, private clouds, or hybrid clouds.
[0182] It can be understood that cloud computing is a computing model that distributes computing tasks across a resource pool composed of a large number of computing devices, enabling various application systems to obtain computing power, storage space, and information services as needed. The network that provides resources is called the "cloud". The resources in the "cloud" seem to the user to be infinitely expandable, and can be obtained at any time, used on demand, expanded at any time, and paid according to usage.
[0183] As a basic capability provider of cloud computing, a cloud computing resource pool (abbreviated as the cloud platform, generally called the IaaS (Infrastructure as a Service) platform) will be established, and various types of virtual resources will be deployed in the resource pool for external customers to choose and use. The cloud computing resource pool mainly includes: computing devices (virtual machines, including operating systems), storage devices, and network devices.
[0184] According to the logical function division, the PaaS (Platform as a Service) layer can be deployed on the IaaS (Infrastructure as a Service) layer, and the SaaS (Software as a Service) layer can be deployed on top of the PaaS layer, or the SaaS can also be directly deployed on the IaaS. PaaS is the platform for software operation, such as databases, web containers, etc. SaaS is various business software, such as web portals, SMS mass senders, etc. Generally speaking, SaaS and PaaS are upper layers relative to IaaS.
[0185] It is understandable that a private cloud creates cloud infrastructure and software and hardware resources within a firewall for various departments within an institution or enterprise to share the resources in the data center. To create a private cloud, in addition to hardware resources, there is generally cloud device (IaaS, Infrastructure as a Service) software.
[0186] Private cloud computing also includes three layers: cloud hardware, cloud platform, and cloud services. The difference is that cloud hardware is the user's own personal computer or server, rather than the data center of a cloud computing vendor. The purpose of a cloud computing vendor to build a data center is to provide public cloud services for millions of users, so it needs to have hundreds of thousands or even millions of servers. For private cloud computing, for an individual, it only serves relatives and friends, and for an enterprise, it only serves its own employees, customers, and suppliers. Therefore, an individual's or enterprise's own personal computer or server is sufficient to provide cloud services.
[0187] A public cloud usually refers to a cloud that can be used provided by a third-party provider. A public cloud can generally be used through the Internet and may be free or low-cost. The core attribute of a public cloud is shared resource services. There are many instances of this kind of cloud that can provide services in today's entire open public network.
[0188] A hybrid cloud combines a public cloud and a private cloud and is the main mode and development direction of cloud computing in recent years. The private cloud is mainly for enterprise users. Due to security considerations, enterprises are more willing to store data in the private cloud, but at the same time, they also hope to obtain the computing resources of the public cloud. In this case, the hybrid cloud is increasingly adopted. It mixes and matches the public cloud and the private cloud to achieve the best effect. This personalized solution achieves the goal of saving money and ensuring security.
[0189] Figure 12 It is a schematic structural diagram of an application program management device provided for the embodiments of this application. As Figure 12 shown, the device includes a display module 1201, a determination module 1202, a generation module 1203, an associated storage module 1204, and a management module 1205;
[0190] The display module 1201 is used to display the version configuration interface of the application program to be delivered. At least one semantic dimension to be configured and component information of at least one component are displayed in the version configuration interface. The component information of each component includes at least at least one component version;
[0191] A determination module 1202, configured to determine target semantic information and target component information corresponding to a configured target version in response to configuration operations for each semantic dimension and each component; the target semantic information includes version semantic information corresponding to the application of the target version for each semantic dimension, and the target component information includes target component versions corresponding to the application of the target version for each component;
[0192] A generation module 1203, configured to generate a target deployment file corresponding to the target version based on the target semantic information and target component information, and deliver the application of the target version based on the target deployment file;
[0193] An associated storage module 1204, configured to store a version association relationship between the target version and the target semantic information and target component information;
[0194] A management module 1205, configured to perform version management on the application based on the stored version association relationship.
[0195] In a possible implementation manner, the apparatus further includes:
[0196] A code storage module, configured to store source code files of each component submitted for the application in a code repository;
[0197] An image push module, configured to push an image file generated based on the source code files of each component to an image repository;
[0198] A component information storage module, configured to store component information of each component corresponding to the application in a database;
[0199] When the display module 1201 displays a version configuration interface of an application to be delivered, it is configured to:
[0200] Read component information of each component corresponding to the application from the database, and display the component information of each semantic dimension and each component to be configured in the version configuration interface.
[0201] In a possible implementation manner, the component information of each component further includes component metadata of the component, and each component corresponds to at least one component version;
[0202] When the component information storage module stores the component information of each component corresponding to the application in the database, it is specifically configured to:
[0203] For each component, associatively store each component version of each component and the component metadata corresponding to each component version in the database;
[0204] When storing the version association relationship between the target version, the target semantic information, and the target component information, the associated storage module 1204 is specifically configured to:
[0205] Determine the association relationship of the target component versions of each component corresponding to the target version from the association relationships between each component version and the component metadata;
[0206] Store the target version and the target semantic information into the association relationships of each target component version to obtain the version association relationship.
[0207] In a possible implementation manner, the apparatus further includes:
[0208] A detection module, configured to periodically detect each component in the code repository;
[0209] A first building module, configured to, in response to detecting a changed component in the code repository, build an image file of the changed component based on the changed source code file corresponding to the changed component, and push the image file to the image repository;
[0210] A component information update module, configured to update the association relationship between each component version and the component metadata stored in the database based on the changed component information of the changed component.
[0211] In a possible implementation manner, when performing version management on the application based on the stored version association relationship, the management module 1205 is configured to:
[0212] In response to a component update event of an application of any version, determine at least one associated version corresponding to the updated component based on the version association relationship, and update the applications of each associated version based on the updated component;
[0213] Wherein, the version association relationship includes the association relationships between each configured application version and the version semantic information of each semantic dimension, and the component information of each component, and each configured application version includes the target version.
[0214] In a possible implementation manner, a version creation entry is further displayed in the version configuration interface;
[0215] When displaying the version configuration interface of the application to be delivered, the display module 1201 is configured to:
[0216] In response to a trigger operation on the version creation entry, display the component information of at least one semantic dimension and at least one component to be configured in the version configuration interface, and the version configuration page includes an identification configuration control;
[0217] When the determining module determines the target semantic information and target component information corresponding to the configured target version in response to the configuration operations for each semantic dimension and each component, it is used for:
[0218] In response to the trigger operation triggered by the identification configuration control and the configuration operations for each semantic dimension and each component, obtain the version identifier of the target version configured based on the trigger operation, and use the semantic information and component information configured based on the configuration operation as the target semantic information and target component information corresponding to the target version.
[0219] In a possible implementation, a version selection entry is also displayed in the version configuration interface;
[0220] When the management module 1205 performs version management on the application based on the stored version association relationship, it is used for:
[0221] In response to the trigger operation for the version selection entry, based on the version association relationship, display the configured application versions and the associated information corresponding to each application version in the version configuration interface, where the associated information includes at least one of the version semantic information of each semantic dimension or the component information of each component;
[0222] Among them, the version association relationship includes the association relationship between the configured application versions and the version semantic information of each semantic dimension and the component information of each component, and the configured application versions include the target version;
[0223] In response to the selection operation for any application version, deliver the application of the selected version based on the application deployment file corresponding to the selected version.
[0224] In a possible implementation, when the management module 1205 performs version management on the application based on the stored version association data, it is used for:
[0225] Display the application release interface of the application, where the target version and its corresponding component list are displayed in the application release interface, and a version upgrade control is included in the application release interface;
[0226] In response to the version upgrade operation triggered based on the version upgrade control, periodically perform version detection on the delivered application based on the version association relationship;
[0227] When it is detected that the application is upgraded to the desired version, release the application of the desired version based on the application deployment file corresponding to the desired version.
[0228] In a possible implementation, the device further includes:
[0229] A prompt module, configured to display a prompt message on the application release interface when it is detected that the application has not been upgraded to the expected version after exceeding the target duration, where the prompt message is used to prompt that the release of the expected version of the application fails;
[0230] A rollback release module, configured to, in response to a rollback operation triggered in the application release interface, roll back the application to the historical version for release based on the application deployment file corresponding to the delivered historical version.
[0231] In a possible implementation, the at least one semantic dimension includes at least one environment variable of the cloud environment to be deployed; the target semantic information includes the variable values configured for each environment variable;
[0232] When generating the target deployment file corresponding to the target version based on the target semantic information and the target component information, the generating module is configured to:
[0233] Generate an environment configuration file corresponding to the target version based on the target semantic information; obtain the mirror files of each component from the mirror repository based on the target component information;
[0234] Obtain the target deployment file corresponding to the target version based on the environment configuration file and the mirror files of each component.
[0235] In a possible implementation, the component metadata of each component includes at least one of the following:
[0236] The name of the code repository corresponding to the component;
[0237] The address of the code repository corresponding to the component;
[0238] The code branch corresponding to the component;
[0239] The build time of the component;
[0240] The build tag of the component.
[0241] The application management device provided by the present application can support configuration for each semantic dimension and each component through the visual version configuration interface of the application, so as to obtain the target semantic information and target component information corresponding to the configured target version; the version semantic information of the target version in each semantic dimension can be configured through the target semantic information, and the components corresponding to any version of the target version can be supported through the target component information; and a target deployment file is generated based on the target semantic information and the target component information to deliver the application of the target version; thereby realizing the semanticization and visualization of the version naming of the application, and improving the flexibility and efficiency of the version configuration and delivery of the application. In addition, the version association relationship between the target version, the target semantic information, and the target component information can be stored, so as to manage multiple versions of the application more efficiently and conveniently based on this version association relationship; and further improve the flexibility and efficiency of the version management of the application.
[0242] The device in the embodiment of the present application can execute the method provided by the embodiment of the present application, and its implementation principle is similar. The actions performed by each module in the device of each embodiment of the present application correspond to the steps in the method of each embodiment of the present application. For the detailed function description of each module of the device, reference can be specifically made to the description in the corresponding method shown above, and details are not described here again.
[0243] Figure 13 It is a schematic structural diagram of an electronic device provided in an embodiment of the present application. As Figure 13 shown, the electronic device includes: a memory, a processor, and a computer program stored on the memory. The processor executes the above computer program to implement the steps of the application management method, and compared with the related art, it can achieve:
[0244] The application management method provided by the present application can support configuration for each semantic dimension and each component through the visual version configuration interface of the application, so as to obtain the target semantic information and target component information corresponding to the configured target version; the version semantic information of the target version in each semantic dimension can be configured through the target semantic information, and the components corresponding to any version of the target version can be supported through the target component information; and a target deployment file is generated based on the target semantic information and the target component information to deliver the application of the target version; thereby realizing the semanticization and visualization of the version naming of the application, and improving the flexibility and efficiency of the version configuration and delivery of the application. In addition, the version association relationship between the target version, the target semantic information, and the target component information can be stored, so as to manage multiple versions of the application more efficiently and conveniently based on this version association relationship; and further improve the flexibility and efficiency of the version management of the application.
[0245] In an alternative embodiment, an electronic device is provided, as Figure 13 shownFigure 13 The electronic device 1300 shown includes: a processor 1301 and a memory 1303. Among them, the processor 1301 and the memory 1303 are connected, such as being connected through a bus 1302. Optionally, the electronic device 1300 may further include a transceiver 1304, and the transceiver 1304 can be used for data interaction between this electronic device and other electronic devices, such as data sending and / or data receiving, etc. It should be noted that in practical applications, the transceiver 1304 is not limited to one, and the structure of the electronic device 1300 does not constitute a limitation to the embodiments of the present application.
[0246] The processor 1301 can be a CPU (Central Processing Unit, central processor), a general-purpose processor, a DSP (Digital Signal Processor, data signal processor), an ASIC (Application Specific Integrated Circuit, application-specific integrated circuit), an FPGA (Field Programmable Gate Array, field programmable gate array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It can implement or execute various exemplary logic blocks, modules and circuits described in combination with the disclosure of the present application. The processor 1301 can also be a combination that realizes computing functions, such as a combination including one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0247] The bus 1302 may include a path for transmitting information between the above components. The bus 1302 can be a PCI (Peripheral Component Interconnect, peripheral component interconnect standard) bus or an EISA (Extended Industry Standard Architecture, extended industry standard structure) bus, etc. The bus 1302 can be divided into an address bus, a data bus, a control bus, etc. For the sake of representation, Figure 13 only a thick line is used to represent it in the figure, but it does not mean that there is only one bus or one type of bus.
[0248] The memory 1303 can be a ROM (Read Only Memory), or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory), or other types of dynamic storage devices that can store information and instructions. It can also be an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory), or other optical disc storage, optical disc storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media, other magnetic storage devices, or any other medium that can be used to carry or store computer programs and can be read by a computer, which is not limited herein.
[0249] The memory 1303 is used to store the computer program for implementing the embodiments of the present application, and is controlled by the processor 1301 to execute. The processor 1301 is used to execute the computer program stored in the memory 1303 to implement the steps shown in the foregoing method embodiments.
[0250] Among them, the electronic device includes but is not limited to: servers, terminals, cloud computing center devices, etc.
[0251] The embodiments of the present application provide a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps and corresponding contents of the foregoing method embodiments can be implemented.
[0252] The embodiments of the present application also provide a computer program product, including a computer program. When the computer program is executed by a processor, the steps and corresponding contents of the foregoing method embodiments can be implemented.
[0253] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program with a predetermined function, which works together with other related parts to achieve a predetermined goal, and can be fully or partially implemented by using software, hardware (such as a processing circuit or a memory), or a combination thereof. Similarly, one processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be a part of the overall module or unit that includes the function of the module or unit.
[0254] Those skilled in the art can understand that, unless specifically stated otherwise, the singular forms "a", "an", "the" and "said" used herein may also include the plural forms. The terms "comprising" and "including" used in the embodiments of the present application mean that the corresponding features can be implemented as the presented features, information, data, steps, operations, but do not exclude the implementation of other features, information, data, steps, operations, etc. supported by the technical field of the present application.
[0255] The terms "first", "second", "third", "fourth", "1", "2", etc. (if any) in the specification, claims and above-mentioned drawings of the present application are used to distinguish similar objects and do not necessarily describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances so that the embodiments of the present application described herein can be implemented in an order other than that shown or described in words.
[0256] It should be understood that although the flowcharts of the embodiments of the present application indicate various operation steps by arrows, the execution order of these steps is not limited to the order indicated by the arrows. Unless clearly stated herein, in some implementation scenarios of the embodiments of the present application, the implementation steps in each flowchart can be executed in other orders according to requirements. In addition, some or all of the steps in each flowchart may include multiple sub-steps or multiple stages based on the actual implementation scenario. Some or all of these sub-steps or stages can be executed at the same time, and each sub-step or stage among these sub-steps or stages can also be executed at different times respectively. In the scenario where the execution times are different, the execution order of these sub-steps or stages can be flexibly configured according to requirements, and the embodiments of the present application do not limit this.
[0257] The above are only optional implementation manners of some implementation scenarios of the present application. It should be noted that for those of ordinary skill in the art of the present technology, without departing from the technical concept of the solution of the present application, adopting other similar implementation means based on the technical idea of the present application also belongs to the protection scope of the embodiments of the present application.
Claims
1. An application management method, characterized in that, The method includes: Displaying a version configuration interface of an application to be delivered, where at least one semantic dimension to be configured and component information of at least one component are displayed in the version configuration interface, and the component information of each component includes at least one component version; In response to configuration operations for each semantic dimension and each component, determining target semantic information and target component information corresponding to the configured target version; the target semantic information includes version semantic information of the application of the target version corresponding to each semantic dimension, and the target component information includes target component versions of the application of the target version corresponding to each component; Generating a target deployment file corresponding to the target version based on the target semantic information and target component information, and delivering the application of the target version based on the target deployment file; Storing the version association relationship between the target version and the target semantic information and target component information to perform version management on the application based on the stored version association relationship.
2. The method according to claim 1, wherein Before displaying the version configuration interface of the application to be delivered, the method further includes: Storing source code files of each component submitted for the application in a code repository; and pushing image files generated based on the source code files of each component to an image repository; Storing component information of each component corresponding to the application in a database; The displaying the version configuration interface of the application to be delivered includes: Reading component information of each component corresponding to the application from the database and displaying the component information of each semantic dimension and each component to be configured in the version configuration interface.
3. The method according to claim 2, wherein The component information of each component further includes component metadata of the component, and each component corresponds to at least one component version; The storing the component information of each component corresponding to the application in the database includes: For each component, associatively storing each component version of each component and the component metadata corresponding to each component version in the database; The storing the version association relationship between the target version and the target semantic information and target component information includes: Determining the association relationship of the target component versions of each component corresponding to the target version from the association relationship between each component version and component metadata; Storing the target version and target semantic information in the association relationship of each target component version to obtain the version association relationship.
4. The method according to claim 2, wherein The method further includes: Periodically detecting each component in the code repository; In response to detecting a changed component in the code repository, building an image file of the changed component based on the changed source code file corresponding to the changed component, and pushing the image file of the changed component to the image repository; Updating the association relationship between each component version and component metadata stored in the database based on the changed component information of the changed component.
5. The method according to claim 1, wherein A version creation entry is further displayed in the version configuration interface; The displaying the version configuration interface of the application to be delivered includes: In response to a trigger operation for creating an entry for the version, at least one semantic dimension to be configured and component information of at least one component are displayed in the version configuration interface, and the version configuration page includes an identification configuration control; The determining of the target semantic information and target component information corresponding to the configured target version in response to the configuration operations for each semantic dimension and each component includes: In response to a trigger operation triggered on the identification configuration control and the configuration operations for each semantic dimension and each component, obtain the version identifier of the target version configured based on the trigger operation, and use the semantic information and component information configured based on the configuration operation as the target semantic information and target component information corresponding to the target version.
6. The method according to claim 5, characterized in that, A version selection entry is also displayed in the version configuration interface; The version management of the application program based on the stored version association relationship includes: In response to a trigger operation for the version selection entry, based on the version association relationship, display the configured application versions and the association information corresponding to each application version in the version configuration interface; the association information includes at least one of the version semantic information of each semantic dimension or the component information of each component; Wherein, the version association relationship includes the association relationships between the configured application versions and the version semantic information of each semantic dimension and the component information of each component, and the configured application versions include the target version; In response to a selection operation for any application version, deliver the application program of the selected version based on the application deployment file corresponding to the selected version.
7. The method according to claim 1, characterized in that, The version management of the application program based on the stored version association data includes: Display the application release interface of the application program, the application release interface displays the target version and its corresponding component list, and the application release interface includes a version upgrade control; In response to a version upgrade operation triggered based on the version upgrade control, periodically perform version detection on the delivered application program based on the version association relationship; When it is detected that the application program is upgraded to the desired version, release the application program of the desired version based on the application deployment file corresponding to the desired version.
8. The method according to claim 7, wherein The method further includes: When it is detected that the application program has not been upgraded to the desired version after exceeding the target duration, display a prompt message in the application release interface, and the prompt message is used to prompt that the release of the desired version of the application program fails; In response to a rollback operation triggered in the application release interface, roll back the application program to the historical version for release based on the application deployment file corresponding to the delivered historical version.
9. The method according to claim 1, characterized in that, The version management of the application program based on the stored version association relationship includes: In response to a component update event of the application program of any version, determine at least one associated version corresponding to the updated component based on the version association relationship, and update the application programs of the respective associated versions based on the updated component; Among them, the version association relationship includes the association relationship between each configured application version and the version semantic information of each semantic dimension and the component information of each component, and each configured application version includes the target version.
10. The method according to claim 1, wherein The at least one semantic dimension includes at least one environmental variable of the cloud environment to be deployed; the target semantic information includes the variable values configured for each environmental variable; Generating the target deployment file corresponding to the target version based on the target semantic information and the target component information includes: Generating an environment configuration file corresponding to the target version based on the target semantic information; obtaining the mirror files of each component from the mirror repository based on the target component information; Obtaining the target deployment file corresponding to the target version based on the environment configuration file and the mirror files of each component.
11. An application management device, characterized in that, The device includes: A display module, configured to display a version configuration interface of an application to be delivered, where at least one semantic dimension to be configured and the component information of at least one component are displayed in the version configuration interface, and the component information of each component includes at least one component version; A determination module, configured to determine the target semantic information and the target component information corresponding to the configured target version in response to configuration operations for each semantic dimension and each component; the target semantic information includes the version semantic information of the application of the target version corresponding to each semantic dimension, and the target component information includes the target component versions of the application of the target version corresponding to each component; A generation module, configured to generate a target deployment file corresponding to the target version based on the target semantic information and the target component information, and deliver the application of the target version based on the target deployment file; An associated storage module, configured to store the version association relationship between the target version and the target semantic information and the target component information; A management module, configured to perform version management on the application based on the stored version association relationship.
12. An electronic device, comprising a memory, a processor, and a computer program stored on the memory, characterized in that, The processor executes the computer program to implement the application management method according to any one of claims 1 to 10.
13. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the application management method according to any one of claims 1 to 10.
14. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the application management method according to any one of claims 1 to 10.
Citation Information
Cited By
Batch automatic release and process optimization method and system
CN121764484A