CN114281539A - Resource allocation method, system and storage medium - Google Patents

Resource allocation method, system and storage medium Download PDF

Info

Publication number
CN114281539A
CN114281539A CN202111597004.9A CN202111597004A CN114281539A CN 114281539 A CN114281539 A CN 114281539A CN 202111597004 A CN202111597004 A CN 202111597004A CN 114281539 A CN114281539 A CN 114281539A
Authority
CN
China
Prior art keywords
middleware
configuration
resource
information
list
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111597004.9A
Other languages
Chinese (zh)
Inventor
雷明芬
何渝君
田宇
孙雪涛
舒忠玲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hanyun Technology Co Ltd
Original Assignee
Hanyun Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hanyun Technology Co Ltd filed Critical Hanyun Technology Co Ltd
Priority to CN202111597004.9A priority Critical patent/CN114281539A/en
Publication of CN114281539A publication Critical patent/CN114281539A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention provides a resource allocation method, a resource allocation system and a storage medium. The resource allocation method is used for resource allocation of middleware by using a resource allocation system, and comprises the following steps: acquiring basic information of the middleware; acquiring a middleware configuration file of the middleware according to the basic information; generating a visual configuration list according to the middleware configuration file; and according to the change of the visual configuration list, realizing the resource deployment of the middleware. The resource configuration method provided by the invention can be used for configuring and modifying the specific deployment items of the configuration file and the deployment information of each deployment item in visual containerized deployment, reduces the creation difficulty and the management difficulty of the configuration file, enables the containerized deployment process to be simpler and more efficient, and further improves the delivery, operation and maintenance efficiency of software.

Description

Resource allocation method, system and storage medium
Technical Field
The invention relates to the field of software engineering, in particular to a resource allocation method, a resource allocation system and a storage medium.
Background
As the functions of various application software become more and more powerful, the composition of the application software becomes more and more complex, and correspondingly, the resource configuration between the various components of the application software becomes more and more difficult to coordinate. Compared with the traditional deployment mode, the container deployment is carried out by using Docker, Kubernetes (also called as k8s) and the like, so that the automatic allocation of container resources is realized, the computing resources are more effectively utilized, and the delivery, operation and maintenance difficulty is reduced, so that the container deployment is more and more widely applied.
However, it still needs a high programming capability for a practitioner to perform resource configuration by using containerization deployment, and when kubernets are used to perform resource deployment, for example, it is necessary for a user to write a yaml file as a configuration file for providing deployment by kubernets according to resource deployment requirements. For the operation and maintenance personnel of the software, the resource deployment of the software still has considerable difficulty.
Disclosure of Invention
The embodiment of the invention aims to provide a resource configuration method, a resource configuration system and a storage medium, which are used for visualizing specific deployment items of configuration files in containerized deployment and deployment information of each deployment item. The original program compiling process is simplified into parameter setting or parameter selection of the corresponding configuration items by performing a hierarchical listing on the compiling process of the specific configuration files and providing corresponding default configuration information for the new configuration items, so that the creating difficulty and the management difficulty of the configuration files are reduced. And a visual configuration list is generated according to the middleware configuration file, and resource deployment of the middleware is realized according to the change of the visual configuration list, so that the containerization deployment process is simpler and more efficient, and the delivery, operation and maintenance efficiency of software is further improved.
In a first aspect, the present invention provides a resource allocation method, where the resource allocation method is used to perform resource allocation on middleware by using a resource allocation system, and the method includes: acquiring basic information of the middleware; acquiring a middleware configuration file of the middleware according to the basic information; generating a visual configuration list according to the middleware configuration file; and according to the change of the visual configuration list, realizing the resource deployment of the middleware.
According to the resource configuration method in the embodiment of the invention, the programming process of the configuration file can be visualized into the editable list, so that the writing or changing process of the configuration file is simplified, and the professional requirement on resource deployment of the software middleware is reduced.
Further, the acquiring the basic information of the middleware includes: acquiring information to be configured of newly created middleware; the implementing resource deployment of the middleware according to the change of the visual configuration list comprises: and changing the information to be configured in the visual configuration list to realize the resource deployment of the newly created middleware.
The resource configuration method in the embodiment of the invention can realize visual generation and editing of the configuration file of the newly created middleware by matching with the resource configuration system, can realize resource deployment of the newly created middleware through simple parameter setting, reduces the compiling difficulty of the configuration file, and improves the efficiency of resource deployment of the middleware.
Further, after the acquiring the basic information of the middleware, the method further includes: generating a middleware list according to the basic information of all the middleware; wherein the middleware list is used for realizing management of all the middleware through editing.
According to the resource configuration method in the embodiment of the invention, the management of the configuration file of the middleware can be realized by listing all the middleware, so that a software developer or an operation and maintenance worker can efficiently and quickly complete the resource configuration and the resource configuration change of the middleware.
Further, the obtaining the middleware configuration file of the middleware according to the basic information includes: acquiring configuration items in the middleware configuration file and configuration information of the configuration items; and acquiring the component types of the components and the component configuration information of the components in the middleware configuration file.
According to the resource allocation method in the embodiment of the invention, the hierarchical list of the middleware is realized by acquiring the middleware in the configuration file and the configuration items and configuration information of the components contained in the middleware, so that the resource allocation structure of the middleware is clear, software developers or operation and maintenance personnel can conveniently and quickly find the corresponding configuration items to perform parameter setting or parameter change, and the middleware is efficiently and conveniently subjected to resource allocation or resource allocation change.
Further, the implementing resource deployment for the middleware according to the change of the visual configuration list includes: adding and deleting components in the middleware configuration file; and changing the component configuration information of the components to realize the resource deployment of the components included in the middleware.
The resource configuration method in the embodiment of the invention can realize generation or change of the configuration information of the components in the middleware in a visual mode, thereby realizing resource deployment of each component. Through the form of a hierarchical list, the configuration items of the components and the configuration information of the configuration items are visualized, so that software developers can conveniently check the specific configuration information of the components, and pertinently and quickly modify the parts needing to be modified during operation and maintenance, and the efficiency of resource deployment and operation and maintenance is improved.
Further, the method further comprises: setting a data interface between the middleware configuration file and a database; storing the configuration information in the middleware configuration file in the database; the data interface is used for acquiring configuration information in the middleware configuration file; and the data interface is also used for extracting the information in the database and realizing the change of the configuration information in the configuration file based on the information.
According to the resource configuration method in the embodiment of the invention, the data interface is arranged between the configuration file and the database, so that the information interaction between the configuration file and the database as well as between the configuration file and the front-end visual configuration list is realized, the operation of a developer or an operation and maintenance worker on the visual configuration list at the front end is mapped into the configuration file, and the visualization of resource deployment of the middleware is realized. The difficulty of resource deployment of software is reduced, and the resource deployment efficiency is improved.
Further, the resource deployment of the middleware is realized according to the change of the visual configuration list, which comprises the steps of changing corresponding configuration information in the database according to the change of the visual configuration list; according to the change of the corresponding configuration information in the database, the change of the middleware configuration file is realized; and carrying out resource deployment on the middleware according to the changed middleware configuration file.
The resource configuration method in the embodiment of the invention realizes the visual setting of resource deployment, realizes the mutual mapping of all links through the resource configuration system, transmits and converts the data after the front end is changed, and realizes the final resource deployment at the containerization deployment system end.
Further, the middleware configuration file is a yaml file.
The resource configuration method in the embodiment of the invention can visually edit the configuration file in the yaml format, and in the whole process, only developers need to edit various configuration information in the visual configuration list according to needs, so that the resource configuration system can correspondingly change the yaml configuration file according to corresponding changes, and the developers do not need to write the yaml file to deploy the software resources. The difficulty of resource deployment is reduced, and the requirement of the resource deployment on professional knowledge of developers is reduced. Meanwhile, the visual list mode is convenient for developers to quickly master the resource deployment condition of the software, targeted editing is carried out on the places needing to be changed, and the software resource deployment efficiency and the management efficiency are improved.
In a second aspect, an embodiment of the present invention provides a resource allocation system, where the resource allocation system includes: the information acquisition module is used for acquiring basic information of the middleware and acquiring a middleware configuration file of the middleware according to the basic information; the list generation module is used for generating a visual configuration list according to the middleware configuration file; and the resource deployment module is used for realizing the resource deployment of the middleware according to the change of the visual configuration list.
The resource configuration system in the embodiment of the invention can realize visual editing and visual management of the configuration file, improve the resource deployment efficiency in the software development process and the resource redeployment efficiency in the later maintenance or upgrading of the software, and facilitate the management and modification of the resource deployment of the software.
In a third aspect, an embodiment of the present invention provides an electronic device, including: the system comprises a processor, a memory and a bus, wherein the processor and the memory are communicated with each other through the bus; the memory stores program instructions executable by the processor, the processor being capable of performing the method steps of the first aspect when invoked by the program instructions.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to perform the method steps of the first aspect.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the embodiments of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments of the present invention will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 is a first flowchart illustrating a resource allocation method according to an embodiment of the present invention;
fig. 2 is a second flowchart illustrating a resource allocation method according to an embodiment of the present invention;
fig. 3 is a third flowchart illustrating a resource allocation method according to an embodiment of the present invention;
fig. 4 is a fourth flowchart illustrating a resource allocation method according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a resource allocation system according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Icon: 10-a resource configuration system, an information acquisition module-12, a list generation module-14 and a resource deployment module-16;
20-electronic device, 21-processor, 22-communication interface, 23-memory, 24-communication bus.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. Meanwhile, in the description of the present invention, the terms "first", "second", and the like are used only for distinguishing the description, and are not to be construed as indicating or implying relative importance.
It should be noted that embodiments or technical features of the embodiments of the present invention may be combined without conflict.
The invention provides a resource allocation method, a system and a storage medium, and the resource allocation method can use a resource allocation system to allocate resources to middleware of software. The resource configuration system provided by the embodiment of the invention comprises configuration template information of various kinds of middleware.
In a first aspect, an embodiment of the present invention provides a resource allocation method. Fig. 1 is a first flowchart illustrating a resource allocation method according to an embodiment of the present invention, as shown in fig. 1, the method includes:
step S102: and acquiring basic information of the middleware.
Specifically, the resource configuration system provided by the embodiment of the present invention may obtain the basic information of the middleware through operator input, or the resource configuration system obtains the basic information of the middleware used by the software through software identification. The basic information includes information such as name and version of the middleware.
Step S104: and acquiring the middleware configuration file of the middleware according to the basic information.
Specifically, the resource configuration system includes default configuration items and corresponding configuration information of configuration files of various middleware, and the corresponding middleware configuration files can be queried through basic information of the middleware. Or, the middleware already has a corresponding middleware configuration file, and the resource configuration system in the embodiment of the application can obtain the corresponding middleware configuration file through the basic information query of the middleware.
Step S106: and generating a visual configuration list according to the middleware configuration file.
Specifically, after the middleware configuration file is obtained, the resource configuration system generates a visual configuration list according to the configuration items in the middleware configuration file and the corresponding configuration information, where the visual configuration list includes information such as the names of the configuration items, specific parameters of the configuration items, and optional ranges of the parameters.
Step S108: and according to the change of the visual configuration list, realizing the resource deployment of the middleware.
Specifically, the configuration parameters of the corresponding configuration items are changed in the visual configuration list of the resource configuration system, so that the resource configuration file can be changed, the resource deployment of the middleware can be changed, and the resource deployment of the middleware meets the corresponding deployment requirement.
According to the resource configuration method in the embodiment of the invention, the programming process of the configuration file can be visualized into the editable list, so that the writing or changing process of the configuration file is simplified, and the professional requirement on resource deployment of the software middleware is reduced.
Further, step S102 obtains the basic information of the middleware, including not only obtaining the basic information of the middleware of which the configuration file has been edited, but also obtaining the information to be configured obtained from the newly created middleware. Step S108, according to the change to the visual configuration list, implementing resource deployment to the middleware includes: and changing the information to be configured in the visual configuration list to realize the resource deployment of the newly created middleware.
Specifically, for a newly-built middleware, resource deployment is required, and a configuration file is required to be newly built, the resource configuration system provided in the embodiment of the present invention includes configuration file templates of various middleware, and can generate a corresponding configuration file according to basic information such as a name and a version of the newly-built middleware of an operator, and generate a visual configuration list according to the configuration file. And the resource configurator can complete the editing of the configuration file of the newly created middleware by setting or changing the corresponding information in the visual list, thereby realizing the resource deployment of the newly created middleware.
The resource configuration method in the embodiment of the invention can realize visual generation and editing of the configuration file of the newly created middleware by matching with the resource configuration system, can realize resource deployment of the newly created middleware through simple parameter setting, reduces the compiling difficulty of the configuration file, and improves the efficiency of resource deployment of the middleware.
Further, please continue to refer to fig. 1, after the step S102 obtains the basic information of the middleware, the resource allocation method according to the embodiment of the present invention may further include the step S103: and generating a middleware list according to the basic information of all the middleware. The middleware list is used for realizing management of all the middleware through editing.
Specifically, the resource configuration system provided in the embodiment of the present invention may generate the middleware list according to the acquired basic information of all the middleware, that is, the middleware list includes all the middleware used in software that performs resource deployment by using the resource configuration system and the basic information of the middleware. By deleting the corresponding item of the middleware in the list, the configuration file of the middleware can be deleted. Through the operations of adding and modifying in the list, the resource configuration of the corresponding middleware can be realized.
According to the resource configuration method in the embodiment of the invention, the management of the configuration file of the middleware can be realized by listing all the middleware, so that a software developer or an operation and maintenance worker can efficiently and quickly complete the resource configuration and the resource configuration change of the middleware.
Further, the step S104 in fig. 1 of acquiring the middleware configuration file of the middleware according to the basic information may include: acquiring configuration items in the middleware configuration file and configuration information of the configuration items; and acquiring the component types of the components and the component configuration information of the components in the middleware configuration file.
Specifically, the resource configuration system provided in the embodiment of the present invention obtains information in a configuration file that needs to be visualized, including names of configuration items in a middleware configuration file and configuration information of corresponding configuration items. The middleware comprises a plurality of components, and the resource configuration system can acquire the component types and corresponding component configuration information in the middleware configuration file. The resource configuration system can be used for grading the acquired information to generate a corresponding visual configuration list, and the resource deployment of each component in the middleware is realized by editing the visual configuration list, so that the resource deployment of the middleware is realized.
According to the resource allocation method in the embodiment of the invention, the hierarchical list of the middleware is realized by acquiring the middleware in the configuration file and the configuration items and configuration information of the components contained in the middleware, so that the resource allocation structure of the middleware is clear, software developers or operation and maintenance personnel can conveniently and quickly find the corresponding configuration items to perform parameter setting or parameter change, and the middleware is efficiently and conveniently subjected to resource allocation or resource allocation change.
Further, step S108 implements resource deployment of the middleware according to the change of the visualization configuration list, which may specifically include: adding and deleting components in the middleware configuration file; and changing the component configuration information of the components to realize the resource deployment of the components included in the middleware.
Specifically, according to the component configuration information included in the visual configuration list generated by the middleware configuration file, the resource configuration of the corresponding component can be changed by editing the visual configuration list. And the corresponding components are added and deleted in the visual configuration list, so that the configuration files of the components can be added and deleted.
For the newly added component in the middleware, the component type corresponding to the newly added component can be selected from a component list provided by a resource configuration system, the resource configuration system adds the corresponding component configuration file to the original configuration file according to the selection of a software developer, adds the corresponding component to the original visual configuration list, and displays the configuration information of each component in the component configuration file of the newly added component.
And deleting the component in the visual configuration list, wherein the corresponding configuration file of the component is deleted in the middleware configuration file.
In the visual configuration list corresponding to the component and comprising the component information, the configuration information of the component is changed, so that the change of the corresponding configuration information in the middleware configuration file of the middleware where the component is located can be realized, and the resource deployment of the component is further realized.
Optionally, the configuration items of the newly created component may include some parts in the component configuration template provided in the resource configuration system, and may be added or deleted according to the needs of the developer.
The resource configuration method in the embodiment of the invention can realize generation or change of the configuration information of the components in the middleware in a visual mode, thereby realizing resource deployment of each component. Through the form of a hierarchical list, the configuration items of the components and the configuration information of the configuration items are visualized, so that software developers can conveniently check the specific configuration information of the components, and pertinently and quickly modify the parts needing to be modified during operation and maintenance, and the resource deployment efficiency is improved.
Further, referring to fig. 2, fig. 2 is a second flowchart illustrating a resource allocation method according to an embodiment of the present invention. On the basis of the first flowchart of the resource allocation method provided in the embodiment of the present invention, the resource allocation method in the embodiment of the present invention shown in fig. 2 is implemented in step S102: before acquiring the basic information of the middleware, the method further comprises the following steps:
step S100: setting a data interface between the middleware configuration file and a database;
step S101: and storing the configuration information in the middleware configuration file in the database.
Specifically, the resource configuration system provided in the embodiment of the present invention provides a data interface capable of synchronizing information with the configuration file, and through setting, synchronization of configuration information between the configuration file and the database can be achieved, thereby achieving mutual operations. And the database stores the contents in the configuration files according to the configuration items included in the configuration files and the configuration information of the corresponding configuration items.
The resource configuration system generates a visual configuration list which can be displayed at the front end according to the stored configuration information in the database, after the visual configuration list is correspondingly changed, for example, the parameter information of the configuration items is changed, new configuration items are added or the original configuration items are deleted, the resource configuration system acquires the changes, the configuration information is correspondingly changed in the database, and the corresponding change of the configuration information in the configuration files is realized through a data interface between a data port and the configuration files. Optionally, data exchange is performed between the database and the front-end visual configuration list through JSON data, each configuration is a JSON object, all the JSON objects form a form, the front-end collects corresponding operations on the visual configuration list through the form and transmits the operations to the back-end database, and the JSON objects herein may include title (configuration item Name of middleware), type (type of form), Name (field Name transmitted to the back-end when the form is submitted), valid (check rule and default value), tips (detailed information of components), and the like.
After the corresponding change of the visual configuration list is completed, the configuration file is correspondingly changed through the database, and then the new configuration file is applied to perform resource deployment on the corresponding middleware. Optionally, after the configuration file is changed, the visual configuration list at the front end is updated according to the configuration information of the new configuration file.
According to the resource configuration method in the embodiment of the invention, the data interface is arranged between the configuration file and the database, so that the information interaction between the configuration file and the database as well as between the configuration file and the front-end visual configuration list is realized, the operation of a developer or an operation and maintenance worker on the visual configuration list at the front end is mapped into the configuration file, and the visualization of resource deployment of the middleware is realized. The difficulty of resource deployment of software is reduced, and the resource deployment efficiency is improved.
Further, referring to fig. 3, fig. 3 is a third flowchart illustrating a resource allocation method according to an embodiment of the present invention. On the basis of the first flowchart of the resource allocation method provided in the embodiment of the present invention, step S108 implements resource allocation to the middleware according to the change to the visual configuration list, and may be detailed as step S1081 to step S1083:
step S1081: according to the change of the visual configuration list, changing corresponding configuration information in the database;
s1082: according to the change of the corresponding configuration information in the database, the change of the middleware configuration file is realized;
s1083: and carrying out resource deployment on the middleware according to the changed middleware configuration file.
Specifically, the resource deployment of the middleware is realized by changing the visual configuration list, specifically, three times of data conversion are needed, firstly, the change of the visual configuration list is mapped to the change of the corresponding configuration information in the database, then, the change of the configuration information in the database is mapped to the change of the configuration information of the corresponding configuration item in the configuration file through a data interface, and finally, the corresponding resource deployment is performed on the software middleware according to the configuration file generated by the resource configuration system, a containerization deployment system, such as k8 s.
The resource configuration method in the embodiment of the invention realizes the visual setting of resource deployment, realizes the mutual mapping of all links through the resource configuration system, transmits and converts the data after the front end is changed, and realizes the final resource deployment at the containerization deployment system end.
Further, the middleware configuration file may be a yaml file.
Specifically, please refer to fig. 4, where fig. 4 is a fourth flowchart illustrating a resource allocation method according to an embodiment of the present invention. For a new middleware, basic information such as the name, version and the like of the middleware is obtained first.
Optionally, the configuration file of the middleware is stored in a Git repository, where the configuration files of all the built-up middleware of the software are stored, and the Git repository also stores corresponding configuration file templates corresponding to various kinds of middleware. The configuration file template comprises basic configuration items of the middleware and default configuration parameters of the basic configuration items. When the basic information of the newly-built middleware is obtained, the Git address corresponding to the middleware also needs to be obtained. Wherein the configuration file is a yaml file.
Optionally, in the resource configuration system, for various middleware, icons of the middleware are further included to represent the middleware, and when the basic information of the middleware is acquired, the icon (icon information) of the middleware can also be acquired.
Then, the resource allocation system generates a middleware list according to the obtained basic information of each intermediate, wherein the middleware list comprises all the middleware in the software and the basic information of the corresponding middleware. By editing, deleting and the like the middleware list, corresponding operation can be carried out on the corresponding middleware configuration file, and one-key deployment of each middleware resource in the software is realized.
And the database of the resource configuration system acquires the configured middleware configuration file of the established middleware from the Git warehouse according to the Git address in the basic information of the middleware, and acquires the configuration file template of the middleware from the Git warehouse according to the Git address of the newly-established middleware. And establishing a data interface between the database and the middleware configuration file in the Git warehouse, so that the data between the database and the middleware configuration file can be synchronized.
And the front end of the resource configuration system acquires the configuration information of the middleware according to the name and the version number of the middleware to generate a visual configuration list. Specifically, configuration items in the visual configuration list and specific parameter information of the configuration items are obtained through an interface between the front-end visual configuration list and the database, and the configuration information is displayed in the list.
According to the component information (type value) contained in the yaml configuration file of the middleware, the component configuration information in the configuration file is stored in the database through a data interface between the database and the configuration file, and the component configuration information is displayed in a lower list of the middleware in a visual configuration list. Specifically, a dynamic rendering mode is used, the component configuration information of the middleware is displayed according to the specific storage sequence of the configuration information in the database and the content, and when the configuration information in the yaml configuration file is changed so that the configuration information stored in the database is changed, the dynamic rendering mode can correspondingly change the configuration information in the visualization configuration list displayed at the front end.
For the middleware with the newly added component, the resource configuration system can newly add a corresponding configuration file in a lower-level list of the middleware, developers select the type of the corresponding newly added component in the resource configuration system, and the resource configuration system can display a component configuration item and component default configuration information of the component in a visual configuration list at the front end according to a configuration template of the component. The developer can change the configuration information of the displayed component configuration items according to the displayed component configuration items, or add and delete the configuration items of the component according to needs, for example, for the component of the multi-box, edit which items the multi-box comprises, and if the default value is directly used, directly check the default value.
And the developer edits the configuration information in the visual configuration list at the front end, wherein the configuration information comprises configuration items and middleware configuration information of the editing middleware, and configuration items and component configuration information of components contained in the middleware. And the change of the configuration information in the visual configuration list at the front end is directly returned to the database, the configuration information in the database is changed, and the change is further mapped to the change of the yaml configuration file through a data interface in the database and the configuration file. Applying the changed yaml configuration file, k8s performs resource deployment on each middleware in the software. And when the resource deployment of the middleware of the software is changed next time, displaying the configuration information in the visual configuration list at the front end according to the changed yaml configuration file.
The resource configuration method in the embodiment of the invention can visually edit the configuration file in the yaml format, and in the whole process, only developers need to edit various configuration information in the visual configuration list according to needs, so that the resource configuration system can correspondingly change the yaml configuration file according to corresponding changes, and the developers do not need to write the yaml file to deploy the software resources. The difficulty of resource deployment is reduced, and the requirement of the resource deployment on professional knowledge of developers is reduced. Meanwhile, the visual list mode is convenient for developers to quickly master the resource deployment condition of the software, targeted editing is carried out on the places needing to be changed, and the software resource deployment efficiency and the management efficiency are improved.
In a second aspect, based on the same inventive concept, the embodiment of the present invention further provides a resource allocation system. Fig. 5 is a schematic structural diagram of a resource allocation system according to an embodiment of the present invention, and as shown in fig. 5, the resource allocation system 10 includes: an information acquisition module 12, a list generation module 14, and a resource deployment module 16.
Specifically, the information obtaining module 12 is configured to obtain basic information of the middleware, and obtain a middleware configuration file of the middleware according to the basic information; the list generating module 14 is configured to generate a visual configuration list according to the middleware configuration file; the resource deployment module 16 is configured to implement resource deployment on the middleware according to the change to the visual configuration list. Alternatively, the configuration file may be a file in the yaml format.
Optionally, the information obtaining module 12 is configured to obtain not only basic information of the middleware of the edited configuration file, but also basic information of the middleware of the newly created un-edited configuration file. For the middleware with the edited configuration file, the information obtaining module 12 obtains the configuration item and the configuration information of the configuration item in the configuration file of the middleware through a data interface between the configuration file and the database, obtains the component types of a plurality of components and the component configuration information of the components included in the configuration file of the middleware, and stores the obtained configuration information in the database. For the newly created middleware, the information obtaining module 12 obtains the basic information of the newly created middleware, obtains the configuration file template of the newly created middleware, the configuration items included in the configuration file template, and the default parameters of the corresponding configuration items according to the basic information, and stores the configuration information in the database.
The list generation module 14 may also generate a middleware list according to the basic information of all the middleware, and generate a lower level visualization configuration list according to the components included in the middleware. That is, the list generating module may generate the lists according to the middleware basic information, the middleware configuration information, and the component configuration information acquired by the information acquiring module 12. Optionally, three levels of visual configuration lists may be generated, where the largest first level visual configuration list is a middleware list in which all middleware in the software is listed; the visual configuration list of the second level is a refinement of the visual configuration list of the first level, wherein configuration items of each middleware, middleware configuration information, components contained in the middleware and component types are included in the middleware; the visualization configuration list of the third level is a refinement of the visualization configuration list of the second level, which includes configuration items of each component and component configuration information.
The resource deployment module 16 includes configuration files of all middleware of the software, and templates of various middleware configuration files, in addition to configuration file templates of components that may be included in the middleware. The resource deployment module is respectively connected with a configuration file end of the software and a resource deployment end of a container deployment system such as k8s, and the configuration information in the configuration file is stored by the database by setting a data interface between the middleware configuration file of the software and the database of the resource configuration system 10 and setting an interface between the list generation module 14 and the database, so that the list generation module 14 can generate a visual configuration list according to the configuration information stored in the database through dynamic rendering. Further, the resource deployment module 16 implements changing of the configuration information in the visual configuration list by an interface between the database and the list generation module 14, mapping the changing of the configuration information in the visual configuration list to a changing of the corresponding configuration information in the database, and then mapping the changing of the configuration information in the database to a changing of the configuration file by a data interface between the configuration file and the database of the resource configuration system 10, thereby implementing resource deployment of each middleware of the software.
The resource configuration system in the embodiment of the invention can realize visual editing and visual management of the configuration file, improve the resource deployment efficiency in the software development process and the resource redeployment efficiency in the later maintenance or upgrading of the software, and facilitate the management and modification of the resource deployment of the software.
In a third aspect, an embodiment of the present invention provides an electronic device. Referring to fig. 6, fig. 6 is a schematic structural diagram of an electronic device of a resource allocation method according to an embodiment of the present invention, where the electronic device 20 may include: at least one processor 21, e.g. a CPU, at least one communication interface 22, at least one memory 23 and at least one communication bus 24. Wherein the communication bus 24 is used for realizing direct connection communication of these components. The communication interface 22 of the device in the embodiment of the present invention is used for performing signaling or data communication with other node devices. The memory 23 may be a high-speed RAM memory or a non-volatile memory (e.g., at least one disk memory). The memory 23 may optionally be at least one memory device located remotely from the aforementioned processor. The memory 23 stores computer readable instructions, and when the computer readable instructions are executed by the processor 21, the electronic device may execute the method processes shown in fig. 1 to 4.
It will be appreciated that the configuration shown in fig. 6 is merely illustrative and that the electronic device may include more or fewer components than shown in fig. 6 or have a different configuration than shown in fig. 6. The components shown in fig. 6 may be implemented in hardware, software, or a combination thereof.
In a fourth aspect, embodiments of the present invention provide a computer-readable storage medium storing computer instructions that cause the computer to perform the methods provided in fig. 1 to 4 and the method embodiments described above. Examples include: acquiring basic information of the middleware; acquiring a middleware configuration file of the middleware according to the basic information; generating a visual configuration list according to the middleware configuration file; and according to the change of the visual configuration list, realizing the resource deployment of the middleware.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
In addition, units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
Furthermore, the functional modules in the embodiments of the present invention may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
It should be noted that the functions, if implemented in the form of software functional modules and sold or used as independent products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
In this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.
The above description is only an example of the present invention, and is not intended to limit the scope of the present invention, and it will be apparent to those skilled in the art that various modifications and variations can be made in the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A resource allocation method, for resource allocation of middleware using a resource allocation system, the method comprising:
acquiring basic information of the middleware;
acquiring a middleware configuration file of the middleware according to the basic information;
generating a visual configuration list according to the middleware configuration file; and
and according to the change of the visual configuration list, realizing the resource deployment of the middleware.
2. The method of claim 1, wherein the obtaining the basic information of the middleware comprises: acquiring information to be configured of newly created middleware;
the implementing resource deployment of the middleware according to the change of the visual configuration list comprises: and changing the information to be configured in the visual configuration list to realize the resource deployment of the newly created middleware.
3. The method of claim 1, wherein after the obtaining of the basic information of the middleware, the method further comprises:
generating a middleware list according to the basic information of all the middleware;
wherein the middleware list is used for realizing management of all the middleware through editing.
4. The method according to claim 1, wherein the obtaining the middleware configuration file of the middleware according to the basic information comprises:
acquiring configuration items in the middleware configuration file and configuration information of the configuration items; and
and acquiring the component types of the components and the component configuration information of the components in the middleware configuration file.
5. The resource configuration method according to claim 4, wherein the implementing resource deployment to the middleware according to the change to the visual configuration list comprises:
adding and deleting components in the middleware configuration file;
and changing the component configuration information of the components to realize the resource deployment of the components included in the middleware.
6. The method of claim 1, further comprising:
setting a data interface between the middleware configuration file and a database;
storing the configuration information in the middleware configuration file in the database;
the data interface is used for acquiring configuration information in the middleware configuration file; and
the data interface is also used for extracting the information in the database and realizing the change of the configuration information in the configuration file based on the information.
7. The method according to claim 6, wherein the implementing resource deployment to the middleware according to the change to the visual configuration list comprises:
according to the change of the visual configuration list, changing corresponding configuration information in the database;
according to the change of the corresponding configuration information in the database, the change of the middleware configuration file is realized; and
and carrying out resource deployment on the middleware according to the changed middleware configuration file.
8. The resource configuration method of any one of claims 1-7, wherein the middleware configuration file is a yaml file.
9. A resource configuration system, the resource configuration system comprising:
the information acquisition module is used for acquiring basic information of the middleware and acquiring a middleware configuration file of the middleware according to the basic information;
the list generation module is used for generating a visual configuration list according to the middleware configuration file; and
and the resource deployment module is used for realizing the resource deployment of the middleware according to the change of the visual configuration list.
10. A computer-readable storage medium storing computer instructions that cause a computer to perform the method of any one of claims 1-8.
CN202111597004.9A 2021-12-24 2021-12-24 Resource allocation method, system and storage medium Pending CN114281539A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111597004.9A CN114281539A (en) 2021-12-24 2021-12-24 Resource allocation method, system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111597004.9A CN114281539A (en) 2021-12-24 2021-12-24 Resource allocation method, system and storage medium

Publications (1)

Publication Number Publication Date
CN114281539A true CN114281539A (en) 2022-04-05

Family

ID=80874793

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111597004.9A Pending CN114281539A (en) 2021-12-24 2021-12-24 Resource allocation method, system and storage medium

Country Status (1)

Country Link
CN (1) CN114281539A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115567392A (en) * 2022-10-10 2023-01-03 浙江保融科技股份有限公司 Automatic deployment and upgrade method for customer internal business system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115567392A (en) * 2022-10-10 2023-01-03 浙江保融科技股份有限公司 Automatic deployment and upgrade method for customer internal business system
CN115567392B (en) * 2022-10-10 2023-08-15 浙江保融科技股份有限公司 Automatic deployment upgrading method for customer internal service system

Similar Documents

Publication Publication Date Title
US7577909B2 (en) Flexible management user interface from management models
US6466973B2 (en) Method and system for managing storage devices over a network
CN105511873B (en) User interface control display method and device
US9367289B2 (en) Method and apparatus for enabling agile development of services in cloud computing and traditional environments
CN111694565A (en) Data visualization application development method and system
CN113535165A (en) Interface generation method and device, electronic equipment and computer readable storage medium
JP2012243127A (en) Techniques, programs and systems for reflecting manipulation of object as image of mapping in graph data
CN111538500A (en) Method and system for visually modifying menu
CN114281539A (en) Resource allocation method, system and storage medium
CN107220044B (en) Method and device for driving business object based on meta-model
US10896161B2 (en) Integrated computing environment for managing and presenting design iterations
CN115469849B (en) Service processing system, method, electronic equipment and storage medium
CN112579664A (en) Processing method and device for chart linkage
CN116009847A (en) Code generation method, device, electronic equipment and storage medium
CN104267967A (en) Method and device for generating program codes of software
CN115268846A (en) Method and device for adding attribute information and computer readable storage medium
CN113705182A (en) Contract online generation method and device and readable storage medium
CN113031947A (en) Configuration data management method and device used in interface design tool
CN107506299B (en) Code analysis method and terminal equipment
CN110688108A (en) Model generation method and device and storage medium
JP2016157415A (en) Information management device and file management method
CN117609102B (en) Building industry Internet counting platform system testing method
CN113703748B (en) Method, device and equipment for visualizing running logic in configuration web application program
JP2016197291A (en) Object-oriented model generation device, object-oriented model generation method, and object-oriented model generation program
CN117093209A (en) Method and device for generating code of interface component, storage medium and electronic equipment

Legal Events

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