Description file generation method and computer program product
By providing an information input interface to generate a description file during the continuous delivery process, the problem of difficult to unify the generation methods and standard formats of different software resources is solved, and the unified configuration and automated deployment of software resources are realized, and the efficiency of continuous delivery is improved.
Patent Information
- Application Number
- CN202411803931.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-09
- Publication Date
- 2025-05-13
AI Technical Summary
During the continuous delivery process, it is difficult to unify the generation methods and standard formats of different software resources, which affects the system's development efficiency.
By providing an information input interface, the user can enter the description information of the software resources to be deployed and generate a description file to indicate the configuration information of the software resources and support automated deployment.
It realizes unified configuration of software resources and developers from different sources, generates description files in a unified format, ensures the unified generation method and standard format of software resources during continuous delivery, and improves the efficiency of continuous delivery.
Smart Images

Figure CN119987850A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of software development, and in particular to a method for generating a description file and a computer program product. Background Art
[0002] Continuous delivery (CD) refers to the automated process of developing software resources from source code to deployment. Continuous delivery is an effective software development practice that helps companies respond to market changes faster, reduce development risks and improve software quality by accelerating the cycle of software building, testing and release.
[0003] In the continuous delivery process, the development and operation of the system is accompanied by the support of a variety of software resources. However, due to the different sources of different software resources and different developers, the continuous delivery process faces the problem of diverse software resources, and the difficulty in unifying the generation method and standard format, which will affect the development efficiency of the system. Summary of the invention
[0004] The embodiments of the present application provide a method for generating a description file and a computer program product, which can at least solve the problem that it is difficult to unify the generation methods and standard formats of different software resources in the continuous delivery process.
[0005] To achieve the above objectives, the embodiments of the present application adopt the following technical solutions:
[0006] In a first aspect, a method for generating a description file is provided, the method comprising: displaying an information input interface; the information input interface is used to input description information of software resources to be deployed; in response to an operation on the information input interface, the description information of the software to be deployed is obtained; based on the description information of the software resources to be deployed, a description file is generated; the description file is used to indicate configuration information of the software resources to be deployed and to support automated deployment of the software resources to be deployed.
[0007] The method for generating a description file provided in the embodiment of the present application provides an information input interface, and the user can input the description information of the software resources to be deployed according to the instructions of the interface. Then, a description file is generated based on the description information, which facilitates the subsequent automatic deployment of the software resources to be deployed based on the description file. It can be seen that the embodiment of the present application limits which description information the user can configure in the process of deploying software resources through the interface display method, so that software resources from different sources and different developers can configure software resources according to the content specified in the information input interface, generate a description file in a unified format, ensure the unification of the generation method and specification format of different software resources in the continuous delivery process, and thus improve the efficiency of continuous delivery.
[0008] In combination with the first aspect, in one embodiment, the information input interface includes at least one of the following: an interface for inputting basic information of the software resources to be deployed; the basic information is used to indicate the system module to which the software resources to be deployed belong; an interface for inputting upgrade-related information of the software resources to be deployed; an interface for inputting initialization-related information of the software resources to be deployed.
[0009] In combination with the first aspect, in one embodiment, the input parameters included in the basic information interface correspond to at least one of the following fields in the description file: system name; module name; whether health check is required; whether synchronous deployment is required; software version; central processing unit CPU usage limit; memory usage limit; Docker image information.
[0010] In combination with the first aspect, in one implementation, the input parameters included in the interface of upgrade-related information correspond to at least one of the following fields in the description file: describing specific information of dependent resources during the upgrade process; describing the types of dependent resources during the upgrade process.
[0011] In combination with the first aspect, in one implementation, the input parameters included in the initialization related information interface correspond to at least one of the following fields in the description file: describing specific information of dependent resources during the initialization process; describing the types of dependent resources during the initialization process.
[0012] In combination with the first aspect, in one implementation, the content of the specific information of the dependent resource and the value of the type of the dependent resource are generated according to the content format specified by the resource management software package.
[0013] In combination with the first aspect, in one implementation, the information input interface is further used to upload files of software resources to be deployed; and the description file is further used to index files of software resources to be deployed.
[0014] In combination with the first aspect, in one embodiment, the method further includes: uploading the description file to the code library of the target system so that the server where the target system is located runs the software resources to be deployed based on the description file; the software resources to be deployed are used to add new functions to the target system or update existing functions.
[0015] In combination with the first aspect, in one implementation, the format of the description file is in YAML format or extensible markup language XML format.
[0016] In a second aspect, a description file generation device is provided, comprising: a display module for displaying an information input interface; the information input interface is used to input description information of software resources to be deployed; an acquisition module for obtaining the description information of the software to be deployed in response to an operation on the information input interface; a generation module for generating a description file based on the description information of the software resources to be deployed; the description file is used to indicate configuration information of the software resources to be deployed and to support automated deployment of the software resources to be deployed.
[0017] In some embodiments, the information input interface includes at least one of the following: an interface for inputting basic information of the software resources to be deployed; the basic information is used to indicate the system module to which the software resources to be deployed belong; an interface for inputting upgrade-related information of the software resources to be deployed; an interface for inputting initialization-related information of the software resources to be deployed.
[0018] In some embodiments, the input parameters included in the basic information interface correspond to at least one of the following fields in the description file: system name; module name; whether health check is required; whether synchronous deployment is required; software version; CPU usage limit; memory usage limit; Docker image information.
[0019] In some embodiments, the input parameters included in the interface of the upgrade-related information correspond to at least one of the following fields in the description file: specific information describing dependent resources during the upgrade process; and types of dependent resources during the upgrade process.
[0020] In some embodiments, the input parameters included in the interface of the initialization-related information correspond to at least one of the following fields in the description file: describing specific information of dependent resources during the initialization process; describing the types of dependent resources during the initialization process.
[0021] In some embodiments, the content of the specific information of the dependent resource and the value of the type of the dependent resource are generated according to the content format specified by the resource management software package.
[0022] In some embodiments, the information input interface is further used to upload the files of the software resources to be deployed; and the description file is further used to index the files of the software resources to be deployed.
[0023] In some embodiments, the device further comprises an uploading module, which uploads the description file to the code base of the target system so that the server where the target system is located runs the software resources to be deployed based on the description file; the software resources to be deployed are used to add new functions to the target system or update existing functions.
[0024] In a third aspect, an electronic device is provided, comprising: a processor and a memory; the memory is used to store computer execution instructions, and when the electronic device is running, the processor executes the computer execution instructions stored in the memory to enable the electronic device to execute the method described in the first aspect above.
[0025] In a fourth aspect, an electronic device is provided, comprising: a processor; the processor is used to couple with a memory, and after reading instructions in the memory, execute the method as described in the first aspect according to the instructions.
[0026] In a fifth aspect, a computer-readable storage medium is provided, wherein instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium is run on a computer, the computer can execute the method described in the first aspect.
[0027] In a sixth aspect, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute the method described in the first aspect.
[0028] Among them, the technical effects brought about by any design method in the second to sixth aspects can refer to the technical effects brought about by different design methods in the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 A schematic diagram of an application environment of a method for generating a description file provided in an embodiment of the present application;
[0030] Figure 2 A flowchart of a method for generating a description file provided in an embodiment of the present application;
[0031] Figure 3 A schematic diagram of an information input interface provided in an embodiment of the present application;
[0032] Figure 4 A flowchart of another method for generating a description file provided in an embodiment of the present application;
[0033] Figure 5 A schematic diagram of the composition of a description file generation device provided in an embodiment of the present application;
[0034] Figure 6 A schematic diagram of the composition of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0035] In the description of the embodiments of the present application, the terms used in the following embodiments are only for the purpose of describing specific embodiments, and are not intended to be used as limitations to the present application. As used in the specification and the appended claims of the present application, the singular expressions "a", "said", "above", "the" and "this" are intended to also include such expressions as "one or more", unless there is a clear contrary indication in the context. It should also be understood that in the following embodiments of the present application, "at least one", "one or more" refer to one or more (including two). The term "and / or" is used to describe the association relationship of associated objects, indicating that three relationships can exist; for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the associated objects before and after are a kind of "or" relationship.
[0036] References to "one embodiment" or "some embodiments" etc. described in this specification mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Thus, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways. The term "connection" includes direct connection and indirect connection, unless otherwise specified. "First" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated.
[0037] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0038] The technical terms designed in the embodiments of the present application are explained below.
[0039] 1. Continuous delivery: refers to the automatic deployment of source code to a pre-production environment to ensure that new changes are released to users quickly in a sustainable manner.
[0040] 2. Software resources: can also be called software resource dependencies, software peripherals, etc. In the embodiment of the present application, it refers to the libraries, frameworks, services, data, etc. required for the development and operation of the software system / project.
[0041] As described in the background technology, in the continuous delivery process, the development and operation of the system is accompanied by the support of multiple software resources. However, due to the different sources of different software resources and different developers, the continuous delivery process faces the problem of diverse software resources, and the difficulty in unifying the generation method and standard format, which will affect the development efficiency of the system.
[0042] Based on this, the description file generation method provided in the embodiment of the present application provides an information input interface, and the user can input the description information of the software resources to be deployed according to the instructions of the interface. Then, a description file is generated based on the description information, which facilitates the subsequent automatic deployment of the software resources to be deployed based on the description file. It can be seen that the embodiment of the present application limits which description information the user can configure in the process of deploying software resources through the interface display method, so that software resources from different sources and different developers can configure software resources according to the content specified in the information input interface, generate a description file in a unified format, ensure the unification of the generation method and specification format of different software resources in the continuous delivery process, and thus improve the efficiency of continuous delivery.
[0043] The description file generation method provided in this application can be applied to Figure 1 In the application environment shown. Figure 1 As shown, the application environment may include: an electronic device 101 and a deployment server 102. The personal computer 101 and the deployment server 102 are connected to each other.
[0044] The electronic device 101 may be a terminal device such as a personal computer, a mobile phone, or a laptop computer, which has a display interface, and a user may develop software on the electronic device 101 . Figure 1 A personal computer is shown as an example.
[0045] The deployment server 102 mentioned here may be a server cluster composed of multiple servers, or a single server, or a computer. The embodiment of the present application does not limit the specific device form of the above-mentioned server. Figure 1 A single server is shown as an example.
[0046] In some embodiments, the electronic device 101 may display an information input interface for inputting description information of the software resources to be deployed. Further, the electronic device 101 obtains the description information in response to the user's operation on the information input interface, and generates a description file based on the description information. Finally, the electronic device 101 may complete the automatic deployment of the software to be deployed on the deployment server 102 based on the description file.
[0047] Figure 2 A flowchart of a method for generating a description file provided in an embodiment of the present application. Figure 2 As shown, the method for generating a description file provided in the present application can be implemented by the above electronic device 101, and specifically includes the following steps:
[0048] S201, displaying an information input interface.
[0049] The information input interface is used to input description information of the software resources to be deployed.
[0050] In some embodiments, when a developer needs to deploy software resources, the developer can operate on the electronic device so that the electronic device displays an information input interface, such as when a user inputs an instruction to open the information input interface.
[0051] For example, an information input interface can be provided for developers based on the platform provided by the Intellij IDEA development tool, so that users can obtain description information of the software resources to be deployed. Intellij IDEA is a widely used integrated development environment designed to improve developer productivity and code quality. It provides powerful debugging tools, version control integration, and a rich plug-in ecosystem, allowing developers to extend and customize its functions as needed.
[0052] In some embodiments, the information input interface includes at least one of the following:
[0053] An interface for inputting basic information of software resources to be deployed. The basic information is used to indicate the system module to which the software resources to be deployed belong.
[0054] An interface for inputting upgrade-related information for software resources to be deployed.
[0055] An interface for inputting initialization-related information about the software resources to be deployed.
[0056] Among them, upgrade-related information is used to describe deployment information for upgrades, such as deployment information configured when a function of the target system is upgraded. Initialization-related information is used to describe deployment information for initialization, such as deployment information configured when a function is added to the target system.
[0057] In some embodiments, the input parameters included in the basic information interface correspond to at least one of the following fields in the description file:
[0058] System name (systemname);
[0059] modulename;
[0060] Whether a health check is required;
[0061] Whether synchronous deployment is required;
[0062] Software version (version);
[0063] Central processing unit (CPU) usage limit (limitCPU);
[0064] Memory usage limit (limitMemory);
[0065] Docker image information (dockerImage).
[0066] Among them, the system name can be the name of the software system. The module name can be the name of a module in the software system (a system can include multiple modules, for example, corresponding to different functions). Health check refers to the regular or real-time monitoring and evaluation of the running status of software resources after they are deployed to the production environment to ensure that the software resources can operate normally and meet business needs. Synchronous deployment refers to the synchronization of the latest version or updated content of software resources to the specified deployment environment during the continuous delivery process. The software version is at least the current development version of the software resource. The CPU usage limit and memory usage limit indicate the maximum computer resources that can be occupied by the software resource when it is running. The Docker image includes various contents required to run the software resources, and the Docker image information is used to describe these related contents.
[0067] In some embodiments, the input parameters included in the interface of the upgrade related information correspond to at least one of the following fields in the description file:
[0068] Describes the specific information of the dependent resources during the upgrade process (specific information around it, resource.content);
[0069] Describes the type of dependent resources during the upgrade process (the type of the surrounding resource, resource.type).
[0070] In some embodiments, the input parameters included in the interface for initializing relevant information correspond to at least one of the following fields in the description file:
[0071] Describes the specific information of dependent resources during the initialization process;
[0072] Describes the types of dependent resources during initialization.
[0073] The types of dependent resources mentioned here may include database configuration, network configuration, routing configuration, etc.
[0074] In some embodiments, the value of the specific information of the dependent resource and the value of the type of the dependent resource are generated according to the content format specified by the resource management software package.
[0075] It should be noted that the resource management software package is essentially a jar package, which maintains multiple resource models. Different resource models have their own specific data structures and behavior patterns. Generating specific information and types of dependent resources according to the provisions of the resource management software package can effectively standardize the content that needs to be input for dependent resources and ensure the standardization and unification of the subsequent generated description files.
[0076] Exemplarily, each resource model in the resource management software package may include at least one of the following fields: name, used to indicate the name of the resource model. expose, used to indicate whether the resource model is public or exposed to external use. type, used to indicate the type of data or the category of the object in the resource model. markettagld, used to uniquely identify the resource model in the market tag or category. formclass, used to indicate the class name related to the form. The form class is generally used to encapsulate form data, including validation rules, data conversion logic, etc.
[0077] As an example, the dependent resources in the above initialization process and upgrade process may include: polarDB, nacos configuration, fizz routing, application authentication, menu data, event data, rocketMQ, websocket, etc. PolarDB is a relational database service that uses a distributed architecture and storage and computing separation technology, and has the characteristics of high performance, high availability, high elasticity, and easy scalability. Nacos is a dynamic service discovery, configuration management, and service management platform that makes it easier to build cloud-native applications. Fizz routing is a lightweight, high-performance application program interface (API) gateway that provides powerful routing functions. Through Fizz routing, users can flexibly configure and manage API access paths and forwarding rules to achieve service decoupling and flexible scheduling of traffic. Application authentication refers to the process of authenticating and authorizing an application to ensure that the application has access to specific resources or services. Menu data refers to data used to display and operate menu items in an application or website. Event data refers to data generated by events that occur in an application or system. RocketMQ is a distributed message middleware that provides high-performance, low-latency messaging services. WebSocket is a full-duplex communication protocol over a single transmission control protocol (TCP) connection, making data exchange between clients and servers simpler and more efficient without the need to continuously establish and close connections like traditional hypertext transfer protocol (HTTP) requests.
[0078] S202: In response to the operation on the information input interface, obtain description information of the software to be deployed.
[0079] In some embodiments, when a developer needs to deploy software resources, he or she can operate on the electronic device to display an information input interface. The developer can operate on the information input interface and input description information of the software resources to be deployed in sequence according to the content specified in the information input interface.
[0080] S203: Generate a description file based on the description information of the software resources to be deployed.
[0081] The description file is used to indicate the configuration information of the software resources to be deployed and to support the automatic deployment of the software resources to be deployed.
[0082] In some embodiments, after the developer completes input in the information input interface, the electronic device can obtain the description information of the software to be deployed, and convert it into a description file for storage at the source code level.
[0083] In some embodiments, the format of the description file may be in YAML format or extensible markup language (XML) format.
[0084] Among them, the YAML format can represent a variety of data structures, such as common values (numbers, strings, Boolean values, dates, etc.), arrays, lists, collections, etc., which enables YAML to meet various complex configuration requirements and improves the flexibility and scalability of configuration. In addition, YAML supports the representation of sequences (lists) and mappings in a language-independent way, which makes YAML files easily portable between multiple programming languages.
[0085] XML can store and transmit data in a structured form, and clearly specify the hierarchy and relationship of data through tags, making the data clearer and easier to understand. The structure of XML files can be customized as needed, with high flexibility and scalability, and XML can be used between different operating systems to achieve efficient sharing and exchange of data.
[0086] Optionally, the description file may be in a text format such as word or txt.
[0087] In some embodiments, the information input interface is also used to upload files of software resources to be deployed; the description file is also used to index files of software resources to be deployed.
[0088] That is, attachments can also be uploaded in the information input interface. After the developer uploads the attachments and generates a description file, the electronic device can save the attachments in a specified storage location and record the address of the storage location in the description file, so that in the subsequent process of software resource deployment based on the description file, the attachments can be accessed based on the address to complete the deployment relying on these attachments.
[0089] For example, Figure 3 This is a schematic diagram of an information input interface provided in an embodiment of the present application. Figure 3 As shown, an information input interface is displayed for developers to build resource dependencies, that is, to configure the description information of the software resources to be deployed. Figure 3 The interface includes an interface for entering basic information. Developers can enter the system name, module name, version, whether to deploy synchronously, whether to perform health check, CPU limit, memory limit and other information in sequence according to the requirements of the interface. In addition, when the initialization-related functions are required, you can click Figure 3 Initialize the controls on the left to configure the parameters under them. If you need to configure upgrade-related functions, you can click Figure 3, and then click on the left side of the upgrade control to configure the parameters under it. After the configuration is completed, the developer can click Figure 3 Click the OK control in the lower right corner of the form, and the electronic device will convert the information entered by the developer into a description file for source code level storage. At the same time, if the form contains attachments, the electronic device will also save the attachments in the specified storage location and record the location in the description file.
[0090] It can be understood that the information input interface specifies what content is required. When different developers deploy software resources, they can input relevant information in sequence according to the same information input interface. The electronic device can generate a description file in a unified format for software resources from different sources based on the input content, so as to ensure the uniformity of the generation method and specification format of software resources during the continuous delivery process.
[0091] In some embodiments, Figure 4 As shown, the method for generating a description file provided in the embodiment of the present application also includes:
[0092] S204: Upload the description file to the code base of the target system, so that the server where the target system is located runs the software resources to be deployed based on the description file.
[0093] The software resources to be deployed are used to add new functions to the target system or update existing functions.
[0094] It should be noted that the target system is generally deployed independently on a separate server to provide continuous services to users. In the continuous delivery scenario, when developers need to update the functions of the target system (such as adding new functions or upgrading the original functions), they can generate a description file on their personal computer and upload it to the code base of the target system through the personal computer. Then, the server where the target system is located ( Figure 1 The deployment server in the deployment server can parse the description file, obtain relevant information of the software resources to be deployed (such as attachment storage location, network configuration, database configuration, etc.), run the deployment of the software resources to be deployed, generate resource objects and execute the initialization of the corresponding model, and realize that all the contents required for the software resources to be deployed are ready and initialized to the expected state.
[0095] For example, a developer needs to deploy a new web application (software resource to be deployed) to the target system, which requires a database and a storage space to store files uploaded by users. The server where the target system is located creates a new database instance based on the description file corresponding to the network element application, configures the user name and password, and creates the database table. Then, a new storage space is created, access permissions are configured, and lifecycle rules are set. Based on the description file, the dependent libraries required for the web application are downloaded and installed, and the environment variables are configured to point to the database and storage space. Finally, it is checked that the database and storage space have been correctly configured and can be accessed through the application. At this point, the initialization state of the corresponding model is completed, and the software resources to be deployed are deployed.
[0096] Through continuous delivery, the software resources to be deployed can be quickly put online, and the steps of manual participation can be saved. Developers only need to configure and generate description files, and the subsequent servers can automatically complete the download, installation and configuration of related content according to the description files, and deploy them online after testing, thus improving the efficiency of software development.
[0097] The method for generating a description file provided in the embodiment of the present application provides an information input interface, and the user can input the description information of the software resources to be deployed according to the instructions of the interface. Then, a description file is generated based on the description information, which facilitates the subsequent automatic deployment of the software resources to be deployed based on the description file. It can be seen that the embodiment of the present application limits which description information the user can configure in the process of deploying software resources through the interface display method, so that software resources from different sources and different developers can configure software resources according to the content specified in the information input interface, generate a description file in a unified format, ensure the unification of the generation method and specification format of different software resources in the continuous delivery process, and thus improve the efficiency of continuous delivery.
[0098] It is understandable that the electronic device provided in the embodiment of the present application includes a hardware structure and / or software module corresponding to each function in order to realize the above functions. Those skilled in the art should easily realize that, in conjunction with the units and algorithm steps of each example described in the embodiment disclosed herein, the embodiment of the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the embodiment of the present application.
[0099] The embodiment of the present application can divide the functional modules of the above-mentioned electronic device according to the above-mentioned method example. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0100] In an exemplary embodiment, the present application also provides a device for generating a description file, which may include one or more functional modules for implementing the method for generating a description file in the above method embodiment.
[0101] For example, Figure 5 A schematic diagram of the composition of a description file generation device provided in this application. Figure 5 As shown, the device for generating the description file includes: a display module 501 , an acquisition module 502 and a generation module 503 .
[0102] The display module 501 is used to display an information input interface; the information input interface is used to input description information of the software resources to be deployed;
[0103] The acquisition module 502 is used to obtain the description information of the software to be deployed in response to the operation on the information input interface;
[0104] The generation module 503 is used to generate a description file based on the description information of the software resources to be deployed; the description file is used to indicate the configuration information of the software resources to be deployed and to support the automatic deployment of the software resources to be deployed.
[0105] In some embodiments, the information input interface includes at least one of the following: an interface for inputting basic information of the software resources to be deployed; the basic information is used to indicate the system module to which the software resources to be deployed belong; an interface for inputting upgrade-related information of the software resources to be deployed; an interface for inputting initialization-related information of the software resources to be deployed.
[0106] In some embodiments, the input parameters included in the basic information interface correspond to at least one of the following fields in the description file: system name; module name; whether health check is required; whether synchronous deployment is required; software version; CPU usage limit; memory usage limit; Docker image information.
[0107] In some embodiments, the input parameters included in the interface of upgrade-related information correspond to at least one of the following fields in the description file: specific information describing dependent resources during the upgrade process; and types of dependent resources during the upgrade process.
[0108] In some embodiments, the input parameters included in the interface of the initialization-related information correspond to at least one of the following fields in the description file: describing specific information of dependent resources during the initialization process; describing the types of dependent resources during the initialization process.
[0109] In some embodiments, the content of the specific information of the dependent resource and the value of the type of the dependent resource are generated according to the content format specified by the resource management software package.
[0110] In some embodiments, the information input interface is also used to upload files of software resources to be deployed; the description file is also used to index files of software resources to be deployed.
[0111] In some embodiments, the apparatus further includes an upload module 504. The description file is uploaded to the code base of the target system so that the server of the target system runs the software resources to be deployed based on the description file; the software resources to be deployed are used to add new functions to the target system or update existing functions.
[0112] In one example, see Figure 6 , which shows a possible structural diagram of the electronic device involved in the above embodiment. The electronic device 600 includes: a processing unit 610 and a storage unit 620.
[0113] The processing unit 610 is used to control and manage the actions of the electronic device 600. The storage unit 620 is used to store the program code and data of the electronic device 600. The processing unit 610 calls the program code stored in the storage unit 620 to execute each step in the above method embodiment.
[0114] Of course, the unit modules in the above-mentioned electronic device 600 include but are not limited to the above-mentioned processing unit 610 and storage unit 620. For example, the electronic device 600 may also include a display unit, a communication unit, a power supply unit, etc. The display unit is used to display the user interface of the electronic device 600, for example, display application icons, display application interfaces, etc. The communication unit is used for the electronic device 600 to communicate with other electronic devices; the power supply unit is used to supply power to the electronic device 600.
[0115] The processing unit 610 may be a processor or a controller, such as a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. The storage unit 620 may be a memory. The display unit may be a display screen, etc.
[0116] For example, the processing unit 610 is a processor, the storage unit 620 can be a memory, and the display unit can be a display screen. The above processor, memory, display screen, etc. can be connected together, for example, through a bus. The processor calls the program code stored in the memory to execute each step in the above method embodiment.
[0117] An embodiment of the present application also provides a computer-readable storage medium, which includes computer instructions. When the computer instructions are executed on the above-mentioned electronic device, the electronic device executes each function or step in the above-mentioned method embodiment.
[0118] The embodiment of the present application also provides a computer program product. When the computer program product is run on a computer, the computer is enabled to execute each function or step in the above method embodiment.
[0119] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0120] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0121] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0122] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0123] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0124] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application shall be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims
1. A method for generating a description file, characterized in that: The method comprises: Displaying an information input interface; the information input interface is used to input description information of the software resources to be deployed; In response to an operation on the information input interface, obtaining description information of the software to be deployed; Based on the description information of the software resources to be deployed, a description file is generated; the description file is used to indicate the configuration information of the software resources to be deployed and to support the automatic deployment of the software resources to be deployed.
2. The method according to claim 1, characterized in that The information input interface includes at least one of the following: An interface for inputting basic information of the software resources to be deployed; the basic information is used to indicate the system module to which the software resources to be deployed belong; An interface for inputting upgrade-related information of the software resources to be deployed; An interface for inputting initialization related information of the software resources to be deployed.
3. The method according to claim 2, characterized in that The input parameters included in the basic information interface correspond to at least one of the following fields in the description file: System name; Module name; Whether a health check is required; Whether synchronous deployment is required; Software version; CPU usage limit; Memory usage limits; Docker image information.
4. The method according to claim 2, characterized in that: The input parameters included in the interface of the upgrade related information correspond to at least one of the following fields in the description file: Describes the specific information of the dependent resources during the upgrade process; Describes the types of resources that the upgrade process depends on.
5. The method according to claim 2, characterized in that: The input parameters included in the interface of the initialization related information correspond to at least one of the following fields in the description file: Describes the specific information of dependent resources during the initialization process; Describes the types of dependent resources during initialization.
6. The method according to claim 4 or 5, characterized in that: The value of the specific information of the dependent resource and the value of the type of the dependent resource are generated according to the content format specified by the resource management software package.
7. The method according to claim 1, characterized in that The information input interface is also used to upload the files of the software resources to be deployed; The description file is also used to index the file of the software resource to be deployed.
8. The method according to claim 1, characterized in that The method further comprises: The description file is uploaded to the code base of the target system, so that the server where the target system is located runs the software resources to be deployed based on the description file; the software resources to be deployed are used to add new functions to the target system or update existing functions.
9. The method according to claim 1, characterized in that: The format of the description file is YAML format or Extensible Markup Language XML format.
10. A computer program product, characterized in that The computer program product comprises computer instructions, and when the computer instructions are executed on a computer, the computer is caused to execute the method for generating a description file according to any one of claims 1 to 9.