A service deployment method, device, computer equipment and storage medium
Through automated service deployment methods, in response to user configuration information construction and release services, solve the problem of manual construction and deployment services in existing technologies, and achieve efficient and automated service deployment process.
Patent Information
- Application Number
- CN202011593956.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-29
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2040-12-29
AI Technical Summary
The existing service deployment method requires users to manually build service code and submit it to the version repository, resulting in cumbersome deployment process, high development cost and error-prone.
Provide a service deployment method, to respond to the user's deployment request, display the service deployment page, build target services based on the configuration information entered by the user, and publish it to the microservice registration center to generate a matching service page.
The automation of the service deployment process has reduced the difficulty of technology, saved deployment time, and improved service deployment efficiency.
Smart Images

Figure CN112667251B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of computer technology, and in particular to a service deployment method, apparatus, computer equipment, and storage medium. Background Art
[0002] With the development of computer technology, software developers are constantly developing new services to meet the different needs of users. When software developers develop services, they usually use DevOps (development and operation) technology to release and deploy services.
[0003] Among them, DevOps is the merger of the two fields of development and operations. However, DevOps itself does not provide the function of building, publishing and deploying services. Instead, it cooperates with other development tools (such as Jenkins) by installing plug-ins to achieve the construction, release and deployment of services. The existing service deployment method is usually that the user manually submits the service code to be built to the version repository (such as GitHub and GitLab), and then Jenkins regularly obtains the latest service code from the version repository, and combines DevOps technology and packaging tools to build the corresponding service, and then writes the built service package into the application container engine docker, docker pushes the service package image to the image server, and then can notify the application server to pull the service package to start the service.
[0004] However, the existing service deployment method requires users to manually build service code and submit the service code to the version repository. The deployment process is cumbersome, the development cost is high, and it is easy to make mistakes during the deployment process. Summary of the invention
[0005] The embodiments of the present invention provide a service deployment method, apparatus, computer equipment and storage medium, which can realize automation of the service deployment process, reduce the technical difficulty in the service deployment process, and improve the deployment efficiency of the service.
[0006] In a first aspect, an embodiment of the present invention provides a service deployment method, the method comprising:
[0007] In response to a user's request for service deployment, display the service deployment page to the user;
[0008] In response to configuration information input by a user in the service deployment page, building a target service matching the configuration information;
[0009] The target service is published to a microservice registration center according to the configuration information, and a service page matching the target service is generated.
[0010] In a second aspect, an embodiment of the present invention further provides a service deployment device, the device comprising:
[0011] A deployment page display module, used to display the service deployment page to the user in response to the user's request for service deployment;
[0012] A target service construction module, configured to construct a target service matching the configuration information in response to the configuration information input by the user in the service deployment page;
[0013] The target service publishing module is used to publish the target service to the microservice registration center according to the configuration information and generate a service page matching the target service.
[0014] In a third aspect, an embodiment of the present invention further provides a computer device, the computer device comprising:
[0015] one or more processors;
[0016] A storage device for storing one or more programs;
[0017] When the one or more programs are executed by the one or more processors, the one or more processors execute the service deployment method provided by any embodiment of the present invention.
[0018] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the service deployment method provided by any embodiment of the present invention is implemented.
[0019] The technical solution of the embodiment of the present invention can realize the automation of the service deployment process, reduce the technical difficulty of the service deployment process, save the time required for the service deployment process, and improve the deployment efficiency of the service by responding to the user's request for service deployment, and constructing a target service matching the configuration information in response to the configuration information entered by the user in the service deployment page, publishing the target service to the microservice registration center according to the configuration information, and generating a service page matching the target service. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 is a flow chart of a service deployment method in Embodiment 1 of the present invention;
[0021] Figure 2a is a flow chart of a service deployment method in Embodiment 2 of the present invention;
[0022] Figure 2b is a schematic diagram of an application support platform page in Embodiment 2 of the present invention;
[0023] Figure 2c This is a schematic diagram of a service deployment page in Embodiment 2 of the present invention;
[0024] Figure 2d This is a schematic diagram of a service deployment page in a code-free mode in Embodiment 2 of the present invention;
[0025] Figure 2e This is a schematic diagram of a service deployment page in a code mode in Embodiment 2 of the present invention;
[0026] Figure 2f is a schematic diagram of a service page in Embodiment 2 of the present invention;
[0027] Figure 2g is a schematic diagram of a public service system page in Embodiment 2 of the present invention;
[0028] Figure 3 is a flow chart of a service deployment method in Embodiment 3 of the present invention;
[0029] Figure 4 It is a structural diagram of a service deployment device in Embodiment 4 of the present invention;
[0030] Figure 5 It is a structural diagram of a computer device in Embodiment 5 of the present invention. DETAILED DESCRIPTION
[0031] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0032] Embodiment 1
[0033] Figure 1 This is a flow chart of a service deployment method provided in Embodiment 1 of the present invention. This embodiment is applicable to the situation of automatically deploying services in an application support platform. The method can be executed by a service deployment device, which can be implemented by software and / or hardware and can generally be integrated in a computer and all intelligent devices (for example, terminal devices or servers) that include program running functions. Specifically, the method includes the following steps:
[0034] Step 110: In response to the user's request for service deployment, the service deployment page is displayed to the user.
[0035] In this embodiment, a service deployment page is pre-set in the application support platform. When a user wants to deploy a new service, a "deploy service" request can be triggered in the application support platform. When the application support platform receives the request, the service deployment page is opened to allow the user to enter the corresponding configuration information on the page.
[0036] Step 120: In response to the configuration information input by the user in the service deployment page, construct a target service matching the configuration information.
[0037] The service deployment page may include multiple configuration modules, and the configuration information is the specific configuration content corresponding to a specific configuration module. In the service deployment page, the user can select the default configuration information in each configuration module, or can customize the input configuration information. This can reduce the technical difficulty in the service deployment process, reduce the user's learning cost and the development cost of the service deployment process.
[0038] In this embodiment, after receiving the configuration information corresponding to all modules input by the user, a complete microservice architecture code corresponding to the configuration information can be generated according to each configuration information and the development tools pre-stored in the application support platform; then the service construction tool is called to construct a target service matching the configuration information according to the microservice architecture code. The target service is the new service that the user wants to deploy.
[0039] In this embodiment, by generating microservice architecture code and calling the service construction tool to build the target service, the user does not need to manually build the service code, thereby avoiding errors in the service deployment process, automating the service deployment process, saving the time required for the service deployment process, and improving the service deployment efficiency.
[0040] Step 130: Publish the target service to a microservice registration center according to the configuration information, and generate a service page matching the target service.
[0041] In this embodiment, the configuration information may include attribute information (such as port information, etc.) of the new service (i.e., the target service) that the user wants to deploy, and then, based on the pre-stored mapping relationship between each service attribute information and the microservice registration center, the address information of the microservice registration center matching the target service is queried, and the target service is published to the microservice registration center according to the address information; in addition, according to the configuration information, the address information of the corresponding microservice gateway can also be queried, and in order to enable the user to access the target service through a unified access gateway, the target service can also be published to the corresponding microservice gateway.
[0042] In a specific embodiment, the configuration information may include the title information of the new service (i.e., the target service) that the user wants to deploy. After the target service is published to the microservice registration center, a service page matching the target service can be rendered based on the title information using a preset page rendering engine.
[0043] The technical solution of the embodiment of the present invention can realize the automation of the service deployment process, reduce the technical difficulty of the service deployment process, save the time required for the service deployment process, and improve the deployment efficiency of the service by responding to the user's request for service deployment, and constructing a target service matching the configuration information in response to the configuration information entered by the user in the service deployment page, publishing the target service to the microservice registration center according to the configuration information, and generating a service page matching the target service.
[0044] Embodiment 2
[0045] This embodiment is a further refinement of the above-mentioned embodiment 1. The explanation of terms that are the same or corresponding to those in the above-mentioned embodiment will not be repeated in this embodiment. Figure 2a Flow chart of a service deployment method provided in Embodiment 2 of the present invention. In this embodiment, the technical solution of this embodiment can be combined with one or more methods in the solutions of the above embodiments. In this embodiment, Figure 2a As shown, the method provided by the embodiment of the present invention may also include:
[0046] Step 210: In response to the user's request for service deployment, the service deployment page is displayed to the user.
[0047] in, Figure 2b is a schematic diagram of the application support platform page in this embodiment, such as Figure 2b As shown in the figure, the existing services in the application support platform include inspection and testing agency management system, consistency inspection management system, scientific and technological project management system, full life cycle management system, and internal control management system. When the user wants to deploy a new service, he can trigger the control with the symbol "+" in this page. When the application support platform detects that the control is triggered, it opens the service deployment page (such as Figure 2c ) as shown.
[0048] Step 220: In response to the configuration information input by the user in the service deployment page, generate a standard service code matching the service to be deployed according to the configuration information.
[0049] In this embodiment, the service to be deployed is a new service that the user wants to deploy, that is, the target service in the subsequent steps. In one implementation of the embodiment of the present invention, a standard service code matching the service to be deployed is generated according to the configuration information, including: generating a corresponding initial service code according to the configuration information using a preset development tool; the initial service code is used to represent a microservice architecture matching the configuration information; matching the initial service code using a regular expression, and modifying the initial service code to a standard service code according to the matching result.
[0050] Among them, after obtaining the configuration information input by the user, the application support platform can generate a domain model file corresponding to the configuration information according to the pre-stored business logic, and then generate the initial service code based on the domain model file using development tools (such as JHipster). The initial service code is the microservice architecture code corresponding to the configuration information. Then, a regular expression is used to match the initial service code, and the matched string is modified to a service code that conforms to the standard specifications of the service R&D center, that is, the standard service code.
[0051] The initial service code includes the public microservice governance components and business microservice architecture corresponding to the configuration information. Specifically, the public microservice governance components may include the ZuulProxy service, microservice registry (Registry), service governance components, and microservice authentication components in the microservice framework (Spring Cloud); the business microservice architecture may include the Spring Boot framework and the Spring Cloud framework.
[0052] Among them, the Zuul Proxy service is used to encapsulate dynamic routing microservices; the Registry is used to encapsulate the service discovery framework Eureka and the configuration center Config Server; the service governance component is used to encapsulate the log monitoring tool Elk, as well as the distributed link monitoring component Sleuth Zipkin, etc.; the microservice authentication component is used to integrate user login authentication functions, such as centralized authentication based on the open authorization protocol OAUTH2, or stateless authentication based on the authentication protocol JWT.
[0053] In this embodiment, after the initial service code is generated, the initial service code can be replaced with a standard service code through a regular expression. Among them, the regular expression predetermines the character string to be modified and the corresponding standard character string. Specifically, the awk command can be used to extract the target field in the initial service code, and the find command or the sed command can be used to search for the target character string that matches the character string to be modified in the target field, and then the target character string can be replaced with the standard character string, so as to achieve the modification of the initial service code to the standard service code.
[0054] In this embodiment, by modifying the initial service code into a standard service code, a unified service architecture and a consistent service deployment method can be achieved, thereby improving the efficiency of service deployment.
[0055] In a specific embodiment, Figure 2c As shown, the configuration information may include public configuration information, wherein the public configuration information includes a group base package name, port information of the target service, a service package name corresponding to the target service, and identification information of the target service (i.e. Figure 2c The microservice name corresponding to the target service in the target service), and the service name of the organization to which the target service belongs (that is, Figure 2c The group base package name can be understood as the file directory name storing the standard service code, and the service package name can be understood as the code package name of the standard service code.
[0056] In addition, the configuration information may also include secret configuration information, where the secret configuration information is menu information corresponding to the target service. Figure 2c As shown, the user can enter secret configuration information through codeless mode or code mode.
[0057] in, Figure 2d This is a schematic diagram of the service deployment page in the codeless mode in this embodiment. As shown in the figure, when the user selects the codeless mode, the service deployment page can pop up multiple menu information configuration modules, such as Figure 2d In the codeless mode, users can select the default configuration information in each menu information configuration module, or can customize the input configuration information without manually entering code, which can reduce the technical difficulty of service deployment and improve service deployment efficiency.
[0058] In this embodiment, when the user selects the codeless mode, the configuration information confirmed by the user in each menu information configuration module can be converted into a configuration file in JDL format, and the application support platform generates the corresponding initial service code based on the configuration file and the JDL usage instruction "jhipster import-jdl***.jdl". Among them, JDL is a specific domain language in the development tool JHipster, and the JHipster generator Jhipster Generator is pre-integrated in the application support platform.
[0059] in, Figure 2e This is a schematic diagram of the service deployment page in the code mode in this embodiment. Figure 2eAs shown, when the user selects the code mode, a paste code module may pop up on the service deployment page, and the user may input the code associated with the menu information into the paste code module to complete the configuration of the menu information.
[0060] Therefore, by setting the code mode and the codeless mode, the dual mode can be switched on demand, the flexibility of the configuration information input method in the service deployment page is improved, and the user's configuration experience of the target service is enriched.
[0061] Step 230, create the gitlab version repository name and jenkins task.
[0062] Step 240: Upload the standard service code to a storage location in gitlab that matches the version repository name.
[0063] In this embodiment, after the standard service code is generated, it is automatically uploaded to a storage location that matches the version repository name without the need for manual uploading by the user. This simplifies the service deployment process, avoids errors during the upload process, and improves service deployment efficiency.
[0064] Step 250: Call the Jenkins task to obtain the standard service code from the storage location, and build a target service that matches the standard service code.
[0065] Among them, Jenkins is a continuous integration tool developed based on Java, which is used to monitor continuous and repetitive work. When it detects new standard service code in gitlab, it obtains the standard service code and builds a matching target service, thereby ensuring the timeliness of the target service construction process and improving the deployment efficiency of the target service.
[0066] Step 260: Publish the target service to a microservice registration center according to the configuration information, and generate a service page matching the target service.
[0067] In this embodiment, the configuration information may include the title information of the new service (i.e., the target service) that the user wants to deploy and the attribute information corresponding to each title. Assuming that the title information entered by the user is the project proposal unit, the proposed funding amount in 10,000 yuan, the project name, and the project type, the generated service page is as follows: Figure 2f As shown. Among them, Figure 2f The demand collection, project declaration and project acceptance in the application support platform are newly added modules for the target service; the remaining modules (such as process center, message center, user center, authority center, operation and maintenance center, log center and workbench) are all public service modules in the application support platform. These modules can be automatically added to the public service system in the application support platform, such as Figure 2gTherefore, by deploying the public service module in a unified system interface, it is convenient for users to access the public service module, thereby improving the user experience.
[0068] The technical solution of the embodiment of the present invention responds to the user's request for service deployment, displays the service deployment page to the user, responds to the configuration information entered by the user in the service deployment page, generates a standard service code matching the service to be deployed according to the configuration information, creates a gitlab version repository name and a jenkins task, then uploads the standard service code to a storage location matching the version repository name in gitlab, calls the jenkins task to obtain the standard service code from the storage location, builds a target service matching the standard service code, and finally publishes the target service to the microservice registration center according to the configuration information. The technical means of generating a service page matching the target service can reduce the technical difficulty in the service deployment process, simplify the service deployment process, and improve the deployment efficiency of the target service.
[0069] Embodiment 3
[0070] This embodiment is a further refinement of the above-mentioned embodiment 2. The explanation of terms that are the same or corresponding to those in the above-mentioned embodiment will not be repeated in this embodiment. Figure 3 Flow chart of a service deployment method provided in Embodiment 3 of the present invention. In this embodiment, the technical solution of this embodiment can be combined with one or more methods in the solutions of the above embodiments. In this embodiment, Figure 3 As shown, the method provided by the embodiment of the present invention may also include:
[0071] Step 310: In response to the user's request for service deployment, the service deployment page is displayed to the user.
[0072] Step 320: In response to the configuration information input by the user in the service deployment page, generate a standard service code matching the service to be deployed according to the configuration information.
[0073] Step 330, create the gitlab version repository name and jenkins task.
[0074] Step 340: Upload the standard service code to a storage location in gitlab that matches the version repository name.
[0075] Step 350: Call the Jenkins task to obtain the standard service code from the storage location, and build a target service that matches the standard service code.
[0076] Step 360: Generate a configuration file matching the service to be deployed according to the standard service code.
[0077] In this embodiment, the configuration file may include the address information of the microservice registration center. Typically, the address information may be the Internet Protocol Address (IP address) of the microservice registration center. In addition, the configuration file may also include the running port number of the microservice registration center, the IP address of the microservice gateway, and the running port number of the microservice gateway.
[0078] Therefore, by generating a configuration file that matches the service to be deployed, the addresses of the microservice registration center and the microservice gateway can be quickly obtained, which facilitates the subsequent release of the target service.
[0079] Step 370: Publish the target service to a microservice registration center according to the address information.
[0080] In this embodiment, preferably, the target service may also be published to a microservice gateway so that users can access the target service through a unified access gateway.
[0081] Step 380: Generate a service page matching the target service according to the standard service code, the preset data format, and the page building tool.
[0082] In a specific embodiment, the title information of the new service (i.e., the target service) that the user wants to deploy can be obtained in the standard service code, and then a service page matching the target service can be generated according to the preset data format and the page building tool VUE, thereby realizing the standardized display of the content of each module in the service page and improving the user's reading experience. Among them, VUE is a progressive JavaScript framework for building user interfaces.
[0083] In this embodiment, after the service page matching the target service is generated, the method further includes: in response to a trigger request of the user for the service page, displaying the target service to the user.
[0084] Among them, after the deployment of the target service is completed, when the user wants to view the target service, a request to "open the target service" can be triggered in the application support platform. When the application support platform receives the request, it opens the service page and displays the target service to the user.
[0085] The technical solution of the embodiment of the present invention is to display the service deployment page to the user in response to the user's deployment request for the service, and to generate a standard service code matching the service to be deployed according to the configuration information entered by the user in the service deployment page, and to create a gitlab version warehouse name and a jenkins task, and then upload the standard service code to a storage location matching the version warehouse name in gitlab, call the jenkins task to obtain the standard service code from the storage location, and build a target service matching the standard service code, and generate a configuration file matching the service to be deployed according to the standard service code, and finally publish the target service to the microservice registration center according to the address information, and generate a service page matching the target service according to the standard service code, a preset data format, and a page building tool. The technical means can reduce the technical difficulty in the service deployment process, simplify the service deployment process, and improve the deployment efficiency of the target service.
[0086] Embodiment 4
[0087] Figure 4 This is a structural diagram of a service deployment device provided in Embodiment 4 of the present invention. The device includes: a deployment page display module 410, a target service construction module 420 and a target service publishing module 430.
[0088] The deployment page display module 410 is used to display the service deployment page to the user in response to the user's request for service deployment;
[0089] A target service construction module 420 is used to construct a target service matching the configuration information in response to the configuration information input by the user in the service deployment page;
[0090] The target service publishing module 430 is used to publish the target service to the microservice registration center according to the configuration information and generate a service page matching the target service.
[0091] The technical solution of the embodiment of the present invention can realize the automation of the service deployment process, reduce the technical difficulty of the service deployment process, save the time required for the service deployment process, and improve the deployment efficiency of the service by responding to the user's request for service deployment, and constructing a target service matching the configuration information in response to the configuration information entered by the user in the service deployment page, publishing the target service to the microservice registration center according to the configuration information, and generating a service page matching the target service.
[0092] Based on the above embodiments, the target service construction module 420 may include:
[0093] A standard service code generating unit, used to generate a standard service code matching the service to be deployed according to the configuration information;
[0094] The configuration information includes a group base package name, port information of the target service, a service package name corresponding to the target service, identification information of the target service, a service name to which the target service belongs, and menu information corresponding to the target service;
[0095] Task creation unit, used to create gitlab version repository name and jenkins tasks;
[0096] A standard service code uploading unit, used to upload the standard service code to a storage location in gitlab that matches the version repository name;
[0097] A standard service code acquisition unit, used for calling the Jenkins task to acquire the standard service code from the storage location, and constructing a target service matching the standard service code;
[0098] An initial service code generating unit, configured to generate a corresponding initial service code according to the configuration information using a preset development tool; the initial service code is used to represent a microservice architecture matching the configuration information;
[0099] The code modification unit is used to match the initial service code with a regular expression and modify the initial service code into a standard service code according to the matching result.
[0100] The target service publishing module 430 may include:
[0101] A configuration file generating unit, configured to generate a configuration file matching the service to be deployed according to the standard service code;
[0102] Wherein, the configuration file includes the address information of the microservice registration center;
[0103] A publishing unit, used to publish the target service to a microservice registration center according to the address information;
[0104] The page generating unit is used to generate a service page matching the target service according to the standard service code, a preset data format, and a page building tool.
[0105] Based on the above embodiments, the service deployment device further includes:
[0106] The service display module is used to display the target service to the user in response to the user's trigger request for the service page.
[0107] The service deployment device provided in the embodiment of the present invention can execute the service deployment method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0108] Embodiment 5
[0109] Figure 5 A schematic diagram of the structure of a computer device provided in Embodiment 5 of the present invention is shown in FIG. Figure 5 As shown, the computer device includes a processor 510, a memory 520, an input device 530, and an output device 540; the number of the processor 510 in the computer device can be one or more. Figure 5 A processor 510 is taken as an example; the processor 510, the memory 520, the input device 530 and the output device 540 in the computer device can be connected via a bus or other means. Figure 5 The example of connecting via a bus is taken. The memory 520, as a computer-readable storage medium, can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to a service deployment method in any embodiment of the present invention (for example, a deployment page display module 410, a target service construction module 420 and a target service publishing module 430 in a service deployment device). The processor 510 executes various functional applications and data processing of the computer device by running the software programs, instructions and modules stored in the memory 520, that is, implements the above-mentioned service deployment method. That is, when the program is executed by the processor, it implements:
[0110] In response to a user's request for service deployment, display the service deployment page to the user;
[0111] In response to configuration information input by a user in the service deployment page, building a target service matching the configuration information;
[0112] The target service is published to a microservice registration center according to the configuration information, and a service page matching the target service is generated.
[0113] The memory 520 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the terminal, etc. In addition, the memory 520 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 520 may further include a memory remotely arranged relative to the processor 510, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof. The input device 530 may be used to receive input digital or character information, and to generate key signal input related to user settings and function control of the computer device, and may include a keyboard and a mouse, etc. The output device 540 may include a display device such as a display screen.
[0114] Embodiment 6
[0115] Embodiment 6 of the present invention further provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the method described in any embodiment of the present invention is implemented. Of course, a computer-readable storage medium provided by an embodiment of the present invention can perform related operations in a service deployment method provided by any embodiment of the present invention. That is, when the program is executed by a processor, it implements:
[0116] In response to a user's request for service deployment, display the service deployment page to the user;
[0117] In response to configuration information input by a user in the service deployment page, building a target service matching the configuration information;
[0118] The target service is published to a microservice registration center according to the configuration information, and a service page matching the target service is generated.
[0119] Through the above description of the implementation methods, the technicians in the relevant field can clearly understand that the present invention can be implemented by means of software and necessary general hardware, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in each embodiment of the present invention.
[0120] It is worth noting that in the above-mentioned embodiment of a service deployment device, the various units and modules included are divided only according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be realized; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.
[0121] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A service deployment method, characterized in that: The method comprises: In response to a user's request for service deployment, display the service deployment page to the user; In response to configuration information input by a user in the service deployment page, building a target service matching the configuration information; Publishing the target service to a microservice registration center according to the configuration information, and generating a service page matching the target service; wherein the target service is a new service deployed by the user; Construct a target service that matches the configuration information, including: Generate a standard service code matching the service to be deployed according to the configuration information; Create the gitlab version repository name and jenkins task; Automatically upload the standard service code to a storage location in gitlab that matches the version repository name; Calling the Jenkins task to obtain the standard service code from the storage location, and building a target service matching the standard service code; Generate a standard service code that matches the service to be deployed based on the configuration information, including: According to the configuration information input by the user, the application support platform generates a domain model file corresponding to the configuration information according to the pre-stored business logic; based on the domain model file, a corresponding initial service code is generated using a development tool; the initial service code is used to represent a microservice architecture that matches the configuration information; A regular expression is used to match the initial service code, and the initial service code is modified into a standard service code according to the matching result.
2. The method according to claim 1, characterized in that Publishing the target service to the microservice registration center according to the configuration information includes: Generate a configuration file matching the service to be deployed according to the standard service code; Wherein, the configuration file includes the address information of the microservice registration center; According to the address information, the target service is published to the microservice registration center.
3. The method according to claim 1, characterized in that Generate a service page matching the target service, including: A service page matching the target service is generated according to the standard service code, the preset data format, and the page building tool.
4. The method according to claim 1, characterized in that: The configuration information includes a group base package name, port information of the target service, a service package name corresponding to the target service, identification information of the target service, a service name to which the target service belongs, and menu information corresponding to the target service.
5. The method according to claim 1, characterized in that After generating a service page matching the target service, the method further includes: In response to a user's triggering request for the service page, the target service is displayed to the user.
6. A service deployment device, characterized in that: The device comprises: A deployment page display module, used to display the service deployment page to the user in response to the user's request for service deployment; A target service construction module, configured to construct a target service matching the configuration information in response to the configuration information input by the user in the service deployment page; A target service publishing module, used to publish the target service to a microservice registration center according to the configuration information, and generate a service page matching the target service; wherein the target service is a new service deployed by the user; The target service building module further includes: A standard service code generating unit, used to generate a standard service code matching the service to be deployed according to the configuration information; Task creation unit, used to create gitlab version repository name and jenkins tasks; A standard service code uploading unit, used for automatically uploading the standard service code to a storage location in gitlab that matches the version repository name; A standard service code acquisition unit, used for calling the Jenkins task to acquire the standard service code from the storage location, and constructing a target service matching the standard service code; An initial service code generating unit is used to generate a domain model file corresponding to the configuration information according to the pre-stored business logic of the application support platform based on the configuration information input by the user; based on the domain model file, a corresponding initial service code is generated using a development tool; the initial service code is used to represent a microservice architecture matching the configuration information; The code modification unit is used to match the initial service code with a regular expression and modify the initial service code into a standard service code according to the matching result.
7. A computer device comprising: one or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the service deployment method according to any one of claims 1 to 5 is implemented when the one or more processors execute the programs.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the service deployment method as described in any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
A project creation system and an automated project creation method
CN109582302A
Multi-place cross-cluster server deployment method and system
CN110572436A