Application service automatic deployment method and device, electronic equipment and storage medium

By automatically obtaining the domain name and IP address of the target customer and using Kubernetes to complete the deployment of application services, the limitations of manual operation in the cloud service mode are solved, and the full automation deployment of application services is realized and the operation and maintenance costs are simplified.

CN119697263AActive Publication Date: 2025-03-25JINAN DALU ELECTROMECHANICAL CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202411909089.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-24
Publication Date
2025-03-25
Estimated Expiration
2044-12-24

AI Technical Summary

Technical Problem

In the cloud service mode, existing application automation deployment technology still requires manual operation of domain name allocation, resource allocation and service custom combination orchestration, and full automated deployment cannot be achieved.

Method used

By obtaining the service subscription request of the target customer, obtaining the target customer identity and application service identity, automatically obtaining the target domain name and IP address, and configuring the domain name and network security based on this information. Then, use Kubernetes to pull the target configuration files pre-deployed in the mirror repository to complete the automatic deployment of the application service.

Benefits of technology

It realizes the full automated deployment of application services, simplifies the deployment process and operation and maintenance costs, and achieves the automated deployment effect of subscription-as-a-service.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119697263A_ABST
    Figure CN119697263A_ABST
Patent Text Reader

Abstract

The invention provides an application service automatic deployment method and device, electronic equipment and a storage medium, and relates to the technical field of computers, and the method comprises the steps: obtaining a target customer identifier and a target application service identifier of a to-be-deployed target application service when a service subscription request of a target customer is obtained; obtaining a target domain name and a target IP address of the target customer according to the target customer identifier, and performing domain name and network security configuration based on the target domain name and the target IP address; and according to the target application service identifier, pulling the target configuration file through Kubernetes, and completing deployment of the target application service. According to the invention, the target configuration file is pre-deployed in the Kubernetes, and after the customer subscribes the corresponding service, the deployment of the target application service can be automatically completed through identification analysis, so that the automatic deployment effect of subscription-as-a-service is realized, and the deployment and operation and maintenance costs of the application service are reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to an application service automatic deployment method, device, electronic device and storage medium. Background Art

[0002] Existing application automation deployment technologies usually use a container orchestration system based on continuous integration of Kubernetes. Specifically, developers focus on code development, and operation and maintenance personnel use the Jenkins pipeline tool and Kubernetes' YAML configuration files based on the developed code to achieve application automation deployment, realize automated construction, deployment, elastic expansion, centralized management and other functions, and improve development efficiency.

[0003] Existing application automation deployment technology solves the problems from code writing to compilation, packaging and deployment. However, its application has obvious limitations in the "one customer, one system" service model based on cloud services. Functions such as domain name allocation, resource allocation and custom service combination orchestration still require manual operations. Summary of the invention

[0004] The purpose of the present invention is to provide an application service automatic deployment method, device, electronic device and storage medium to achieve the automatic deployment effect of subscription as a service and simplify the deployment and operation and maintenance costs of application services.

[0005] In a first aspect, the present invention provides an application service automatic deployment method, comprising:

[0006] When a service subscription request from a target customer is obtained, the target customer identifier and the target application service identifier of the target application service to be deployed are obtained;

[0007] According to the target customer identifier, the target domain name and target IP address of the target customer are obtained, and domain name and network security are configured based on the target domain name and target IP address;

[0008] According to the target application service identifier, the target configuration file is pulled through Kubernetes, and the deployment of the target application service is completed; wherein the target configuration file is generated based on the corresponding image stored in the image repository and pre-deployed in Kubernetes.

[0009] Further, according to the target customer identifier, the target domain name and target IP address of the target customer are obtained, including:

[0010] Obtaining a target domain name corresponding to the target customer identifier from a domain name library; wherein the domain name library stores the correspondence between customers and domain names, and the target domain name is automatically generated based on a domain name acquisition request initiated by the target customer through a preset domain name generation rule or obtained through custom modification by the customer;

[0011] Randomly assign an idle IP address to the target customer from the cloud IP address database to obtain the target IP address.

[0012] Furthermore, domain name and network security configuration is performed based on the target domain name and target IP address, including:

[0013] Use the elastic load balancing service to configure the forwarding mechanism and matching relationship between the target domain name and target IP address;

[0014] Configure the mapping relationship between the target domain name and the target IP address on the firewall on the cloud platform side and the firewall on the application side respectively, and perform security protection settings on the firewall on the application side. The security protection settings include CC attack protection settings, blacklist and whitelist settings, and website anti-crawler settings.

[0015] Furthermore, according to the target application service identifier, the target configuration file is pulled through Kubernetes, and the deployment of the target application service is completed, including:

[0016] Send the target application service identifier to Kubernetes;

[0017] Pull the target configuration file corresponding to the target application service identifier through Kubernetes;

[0018] Through Kubernetes, resource configuration, service port configuration, and domain name service configuration are performed based on the target configuration file.

[0019] Furthermore, the target configuration files include deployment.yaml configuration files, service.yaml configuration files, and ingress.yaml configuration files. Kubernetes performs resource configuration, service port configuration, and domain name service configuration based on the target configuration files, including:

[0020] Through Kubernetes, configure resources for one or more of the front-end server, back-end server, database, and middleware according to the deployment.yaml configuration file in the target configuration file;

[0021] Configure the service port through Kubernetes according to the service.yaml configuration file in the target configuration file;

[0022] Use Kubernetes to configure domain name binding and forwarding rules based on the ingress.yaml configuration file in the target configuration file.

[0023] Furthermore, the resources parameter in the deployment.yaml configuration file is used to configure the CPU and memory resource requirements; the host parameter in the ingress.yaml configuration file is used for domain name binding, and the http.paths and backend.service parameters are used for forwarding rule configuration.

[0024] In a second aspect, the present invention further provides an application service automatic deployment device, comprising:

[0025] An identification acquisition module, used to acquire the target customer identification and the target application service identification of the target application service to be deployed when a service subscription request of the target customer is acquired;

[0026] The first configuration module is used to obtain the target domain name and target IP address of the target customer according to the target customer identifier, and configure the domain name and network security based on the target domain name and target IP address;

[0027] The second configuration module is used to pull the target configuration file through Kubernetes according to the target application service identifier and complete the deployment of the target application service; wherein the target configuration file is generated based on the corresponding image stored in the image repository and pre-deployed in Kubernetes.

[0028] Furthermore, the second configuration module is specifically used to: send the target application service identifier to Kubernetes; pull the target configuration file corresponding to the target application service identifier through Kubernetes; and perform resource configuration, service port configuration, and domain name service configuration based on the target configuration file through Kubernetes.

[0029] In a third aspect, the present invention further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program executable on the processor, and when the processor executes the computer program, the method for automatic deployment of application services of the first aspect is implemented.

[0030] In a fourth aspect, the present invention further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for automatic deployment of application services in the first aspect is executed.

[0031] The method, device, electronic device and storage medium for automatic deployment of application services provided by the embodiments of the present invention obtain the target customer identifier and the target application service identifier of the target application service to be deployed when the service subscription request of the target customer is obtained; the target domain name and target IP address of the target customer are obtained according to the target customer identifier, and the domain name and network security are configured based on the target domain name and target IP address; according to the target application service identifier, the target configuration file is pulled through Kubernetes, and the deployment of the target application service is completed; wherein the target configuration file is generated based on the corresponding image stored in the image repository and pre-deployed in Kubernetes. In this way, the target configuration file is pre-deployed in Kubernetes, and after the customer subscribes to the corresponding service, the deployment of the target application service can be automatically completed through identity resolution, realizing the automatic deployment effect of subscription as a service, and simplifying the deployment and operation and maintenance costs of the application service. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0033] Figure 1 A schematic diagram of a process flow of an application service automated deployment method provided by an embodiment of the present invention;

[0034] Figure 2 A schematic diagram of an implementation scenario of an application service automatic deployment method provided by an embodiment of the present invention;

[0035] Figure 3 A schematic diagram of an implementation flow of an application service automatic deployment method provided by an embodiment of the present invention;

[0036] Figure 4 A schematic diagram of the structure of an automatic deployment device for application services provided by an embodiment of the present invention;

[0037] Figure 5 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0038] The technical solution of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0039] When currently used in the "one customer one system" service model based on cloud services, the existing application automation deployment technology still requires manual operations for functions such as domain name allocation, resource allocation, and custom service combination arrangement, and cannot achieve fully automated deployment of application services. Based on this, an application service automation deployment method, device, electronic device, and storage medium provided in an embodiment of the present invention can effectively solve the above problems and achieve the application effect of subscription as a service. During the entire process, customers only need to subscribe to the service, and the deployment of application services is fully automated in the background.

[0040] To facilitate understanding of this embodiment, a method for automatic deployment of application services disclosed in an embodiment of the present invention is first introduced in detail.

[0041] The embodiment of the present invention provides an automatic deployment method for application services, which can be executed by an electronic device with data processing capability, and the electronic device can be a server device of a cloud platform for implementing the method. Figure 1 The flowchart of a method for automatic deployment of application services shown in FIG. 1 mainly includes the following steps S110 to S130:

[0042] Step S110, when a service subscription request of a target customer is obtained, a target customer identifier and a target application service identifier of a target application service to be deployed are obtained.

[0043] Customers can log in to the cloud platform, select the target application service they need from the application services provided by the cloud platform, and initiate a corresponding service subscription request; the service subscription request can carry the target customer ID of the target customer and the target application service ID of the target application service. By parsing the service subscription request, the target customer ID and the target application service ID can be obtained. There can be one or more target application services, and different target application services are deployed independently later.

[0044] Step S120, obtaining the target domain name and target IP address of the target customer according to the target customer identifier, and configuring the domain name and network security based on the target domain name and target IP address.

[0045] Multiple application services can share a domain name, or each application service can have a separate domain name. Therefore, when there are multiple target application services, the target domain name can be one, and a subdomain under the target domain name can be assigned to each target application service; the target domain name can also be multiple, and a target domain name can be assigned to each target application service.

[0046] The target domain name may be obtained by the target customer in advance, the target domain name may be stored in a domain name library, and the target IP address may be randomly assigned. Based on this, the above step of obtaining the target domain name and target IP address of the target customer according to the target customer identifier may include: obtaining the target domain name corresponding to the target customer identifier from the domain name library; wherein the domain name library stores the correspondence between customers and domain names, and the target domain name is automatically generated based on the domain name acquisition request initiated by the target customer through a preset domain name generation rule or obtained by custom modification by the customer; and randomly assigning an idle IP address to the target customer from the cloud IP address library to obtain the target IP address.

[0047] Before initiating a service subscription request, customers can first apply for a domain name, that is, initiate a domain name acquisition request; the cloud platform can automatically generate an initial domain name based on the preset domain name generation rules; customers can choose to use the initial domain name as their target domain name, or customize the initial domain name to obtain the target domain name; among which, the preset domain name generation rules may include: for corporate customers, the first letter of the unit name + custom characters are used to generate the domain name address, and for natural person customers, the first letter of the name + the last six digits of the ID number + custom characters are used to generate the domain name address. After allocating the target IP address to the target customer, the cloud IP address library can mark the target IP address as allocated, and can also record the correspondence between the target IP address and the target customer identifier.

[0048] In some possible embodiments, the above-mentioned steps of configuring domain name and network security based on the target domain name and target IP address may include: using elastic load balancing service to configure the forwarding mechanism and matching relationship of the target domain name and target IP address; configuring the mapping relationship between the target domain name and the target IP address on the firewall on the cloud platform side and the firewall on the application side respectively, and performing security protection settings on the firewall on the application side, the security protection settings including CC attack protection settings, black and white list settings, and website anti-crawler settings.

[0049] Step S130, according to the target application service identifier, pull the target configuration file through Kubernetes and complete the deployment of the target application service; wherein the target configuration file is generated based on the corresponding image stored in the image repository and pre-deployed in Kubernetes.

[0050] In some possible embodiments, the above step S130 may include: sending the target application service identifier to Kubernetes; pulling the target configuration file corresponding to the target application service identifier through Kubernetes; and performing resource configuration, service port configuration, and domain name service configuration based on the target configuration file through Kubernetes.

[0051] The above-mentioned target configuration file may include a deployment.yaml configuration file, a service.yaml configuration file and an ingress.yaml configuration file. The deployment.yaml configuration file may be one or more. The number of deployment.yaml configuration files is the same as the number of images corresponding to the target application service. There is one service.yaml configuration file and one ingress.yaml configuration file. Kubernetes may configure one or more resources of the front-end server, the back-end server, the database and the middleware according to the deployment.yaml configuration file in the target configuration file. Kubernetes may configure the service port according to the service.yaml configuration file in the target configuration file. Kubernetes may configure the domain name binding and forwarding rule according to the ingress.yaml configuration file in the target configuration file.

[0052] Furthermore, the resources parameter in the above deployment.yaml configuration file is used to configure the resource requirements of CPU and memory; the host parameter in the ingress.yaml configuration file is used for domain name binding, and the http.paths and backend.service parameters are used for forwarding rule configuration.

[0053] The method for automatic deployment of application services provided by an embodiment of the present invention obtains the target customer identifier and the target application service identifier of the target application service to be deployed when the service subscription request of the target customer is obtained; obtains the target domain name and target IP address of the target customer according to the target customer identifier, and configures the domain name and network security based on the target domain name and target IP address; pulls the target configuration file through Kubernetes according to the target application service identifier, and completes the deployment of the target application service; wherein the target configuration file is generated based on the corresponding image stored in the image repository and pre-deployed in Kubernetes. In this way, the target configuration file is pre-deployed in Kubernetes, and after the user subscribes to the corresponding service, the deployment of the target application service can be automatically completed through identity resolution, realizing the automatic deployment effect of subscription as a service, and simplifying the deployment and operation and maintenance costs of the application service.

[0054] For ease of understanding, Figure 2As shown, the implementation scenarios of the above-mentioned application service automatic deployment method include: developers complete the development of application service code and package it into an image, that is, complete the application image manufacturing; the images are uniformly stored in the image warehouse (i.e., the application image warehouse), and are uniformly managed by the platform service center. After the customer subscribes to the corresponding service, the platform automatically completes all subsequent deployment work, deploys it in the customer application center, generates a unified domain name bound to the customer, and the customer can directly access and use the subscribed application service through the domain name. For example, Figure 2 As shown, the application image warehouse can store images corresponding to application services such as enterprise energy management, measuring instrument management, digital laboratory system and work log management of instrument manufacturing clients; the platform service center can perform container and image management, cluster monitoring and management, domain name management, resource management and service management, etc.; the customer application center includes customer 1, customer 2 and customer 3. Taking customer 1 as an example, its domain name is abc.yibia163.cn, and its application services include enterprise energy management, production and manufacturing client and work log management.

[0055] An optional implementation process of the above application service automatic deployment method is as follows: Figure 3 As shown in the figure, the whole process mainly involves developers, operation and maintenance personnel and customers, and can be divided into three main stages. The first stage is mainly for developers to complete application development and submit codes to the code base. The codes in the code base are automatically packaged into the image warehouse through the Jenkins pipeline, and the operation and maintenance personnel can manage the image warehouse; the second stage is for the operation and maintenance personnel to write configuration and deployment files (i.e. deployment configuration files), that is, use the helm tool to reference the image to generate deployment configuration files, and generate charts in helm to support the automated deployment of K8S (short for Kubernetes); the third stage is the service subscription of a large number of customers. After the customer clicks to subscribe, resources, networks, bandwidth, domain names, etc. are allocated through cloud services such as Huawei Cloud, and application service deployment is completed through K8S according to the preset helm deployment files, providing exclusive domain names for customer access. Operation and maintenance personnel can monitor and manage clusters of Huawei Cloud and K8S.

[0056] The specific process can be as follows:

[0057] Phase 1:

[0058] After developers complete code development and testing, they formally submit the code. The Jenkins pipeline tool automatically packages the new code into a service image, encodes the image production unique identification, and loads it into the image repository.

[0059] Specifically, developers develop code based on the application service to be developed, and generate images through the Jenkins pipeline and store them in the image repository. The unique identification code of the image is used when the depoyment.yaml configuration file is generated later. The depoyment.yaml configuration file corresponding to the corresponding image is generated by specifying the unique identification code of the image.

[0060] Phase 2:

[0061] The operation and maintenance personnel write configuration files based on the images in the image repository according to application requirements and deploy the chart to Kubernetes.

[0062] An application service may correspond to one or more images. For example, a single database service only needs a database image, and its application service identifier can directly use the unique identification code of the image. For example, an ERP (Enterprise Resource Planning) management system requires a front-end, two back-ends, a database, and two middleware images.

[0063] You can use helm to create a chart. After the creation is completed, there will be three important configuration files: deployment.yaml, service.yaml, and ingress.yaml. The next step is to write the configuration files. Among them, the deployment.yaml configuration file is mainly the application deployment configuration, including the application name, application label definition, number of pod replicas, pod selector label, pod label definition, container name, image address, image unique identification code, and resources parameters. The number of deployment.yaml configuration files is the same as the number of images. The service.yaml configuration file is the interface exposure of the configuration service. The ingress.yaml configuration file is the domain name service of the application.

[0064] When deploying a chart to Kubernetes, you can use the command helm upgrade –installmychartname to deploy the generated chart to Kubernetes. You can view the chart deployment status by using the command helm list | grepmychartname. The mychartname in this part can usually be identified by a unique identification code.

[0065] Phase 3:

[0066] After the customer subscribes to the service on the platform, the backend processes the services on both ends simultaneously. First, the domain name and IP address are obtained through the Huawei Cloud API service, and the forwarding and matching mechanism of the domain name and IP address are completed, and the configuration of the firewall (i.e. the firewall on the cloud platform side) and WAF (i.e. the firewall on the application side) is completed; second, the automatic deployment of the application is completed through kubernetes, including the backend service calling the kubernetes interface service, passing the application deployment configuration parameters (i.e. the application service identifier) ​​to kubernetes, kubernetes automatically pulls the helm chart configuration (i.e. pulls the configuration file), allocates resources, completes the configuration of the front-end, back-end, database and other middleware, and provides services to the outside through the ingress service, which is bound to the specific domain name of the customer. Customers can access the services deployed by specific applications.

[0067] Specifically, customers can subscribe to one or more application services, and each application service is deployed independently. Before subscribing to the service, customers first apply for a domain name. The backend will use the initials of the company name + custom characters to generate a domain name address for corporate customers, and the initials of the name + the last six digits of the ID number + custom characters for natural person customers. Customers can modify the domain name after receiving it. After the customer subscribes to the service, the backend obtains the customer's domain name and randomly assigns an IP address from the cloud IP address library. After obtaining the domain name and IP address through Huawei Cloud, the paired domain name and IP address are configured with the Elastic Load Balancing (ELB) service to match the domain name and IP address. WAF stands for web application firewall, which maps the domain name address to the IP address and configures it on WAF, including CC (Challenge Collapsar, a form of distributed denial of service attack) attack protection, blacklist and whitelist settings, and website anti-crawler settings. When a request is made to access the specified domain name, the WAF firewall will take effect. This process is automatically completed through interface calls without manual configuration.

[0068] The customer's service subscription request includes the application service identifier (such as the application service ID). The backend can pass the application service identifier to Kubernetes, and Kubernetes automatically retrieves the corresponding configuration file. Among them, multiple deployment configuration files are used for the configuration of the front-end, back-end and database respectively. The resources parameter is used to configure the CPU and memory resources; service.port is used to configure the service port; and the rules in ingress are used to set the domain name binding and forwarding rules, including parameters such as host, http.paths and backend.service.

[0069] Compared with the prior art, the embodiment of the present invention realizes fully automated configuration of services through the cooperation and identity resolution of helm and kubernetes, and realizes automatic allocation of domain names and configuration of network security through integrated development with Huawei Cloud. By using the ingress service of kubernetes, domain names can be matched with application services, and the user-oriented subscription-based application effect can be achieved. Different customers have relatively independent resource spaces, which ensures the security of their information resources and greatly simplifies the deployment and operation and maintenance costs of applications.

[0070] Corresponding to the above-mentioned application service automatic deployment method, the embodiment of the present invention also provides an application service automatic deployment device. Figure 4 A schematic diagram of the structure of an application service automatic deployment device is shown, the device comprising:

[0071] The identification acquisition module 401 is used to acquire the target customer identification and the target application service identification of the target application service to be deployed when a service subscription request of the target customer is acquired;

[0072] The first configuration module 402 is used to obtain the target domain name and target IP address of the target customer according to the target customer identifier, and configure the domain name and network security based on the target domain name and target IP address;

[0073] The second configuration module 403 is used to pull the target configuration file through Kubernetes according to the target application service identifier and complete the deployment of the target application service; wherein the target configuration file is generated based on the corresponding image stored in the image repository and pre-deployed in Kubernetes.

[0074] The application service automatic deployment device provided by the embodiment of the present invention obtains the target customer identifier and the target application service identifier of the target application service to be deployed when the service subscription request of the target customer is obtained; obtains the target domain name and target IP address of the target customer according to the target customer identifier, and configures the domain name and network security based on the target domain name and target IP address; pulls the target configuration file through Kubernetes according to the target application service identifier, and completes the deployment of the target application service; wherein the target configuration file is generated based on the corresponding image stored in the image repository and pre-deployed in Kubernetes. In this way, the target configuration file is pre-deployed in Kubernetes, and after the user subscribes to the corresponding service, the deployment of the target application service can be automatically completed through identity resolution, realizing the automatic deployment effect of subscription as a service, and simplifying the deployment and operation and maintenance costs of the application service.

[0075] Furthermore, the first configuration module 402 is specifically used to: obtain a target domain name corresponding to the target customer identifier from a domain name library; wherein the domain name library stores the correspondence between customers and domain names, and the target domain name is automatically generated based on a domain name acquisition request initiated by the target customer through a preset domain name generation rule or obtained through customer-defined modification; and randomly assign an idle IP address to the target customer from a cloud IP address library to obtain a target IP address.

[0076] Furthermore, the above-mentioned first configuration module 402 is also used to: use elastic load balancing service to configure the forwarding mechanism and matching relationship between the target domain name and the target IP address; configure the mapping relationship between the target domain name and the target IP address on the firewall on the cloud platform side and the firewall on the application side respectively, and perform security protection settings on the firewall on the application side, and the security protection settings include CC attack protection settings, black and white list settings, and website anti-crawler settings.

[0077] Furthermore, the second configuration module 403 is specifically used to: send the target application service identifier to Kubernetes; pull the target configuration file corresponding to the target application service identifier through Kubernetes; and perform resource configuration, service port configuration, and domain name service configuration based on the target configuration file through Kubernetes.

[0078] Furthermore, the above-mentioned target configuration file includes a deployment.yaml configuration file, a service.yaml configuration file and an ingress.yaml configuration file; the second configuration module 403 is also used to: perform resource configuration of one or more of the front-end server, the back-end server, the database and the middleware through Kubernetes according to the deployment.yaml configuration file in the target configuration file; configure the service port through Kubernetes according to the service.yaml configuration file in the target configuration file; perform domain name binding and forwarding rule configuration through Kubernetes according to the ingress.yaml configuration file in the target configuration file.

[0079] Furthermore, the resources parameter in the above deployment.yaml configuration file is used to configure the resource requirements of CPU and memory; the host parameter in the ingress.yaml configuration file is used for domain name binding, and the http.paths and backend.service parameters are used for forwarding rule configuration.

[0080] The implementation principle and technical effects of the device provided in this embodiment are the same as those of the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the device embodiment, reference may be made to the corresponding contents in the aforementioned method embodiment.

[0081] like Figure 5 As shown, an electronic device 500 provided by an embodiment of the present invention includes: a processor 501, a memory 502 and a bus, the memory 502 stores a computer program that can be run on the processor 501, when the electronic device 500 is running, the processor 501 and the memory 502 communicate through the bus, and the processor 501 executes the computer program to implement the above-mentioned application service automatic deployment method.

[0082] Specifically, the memory 502 and the processor 501 can be general-purpose memories and processors, which are not specifically limited here.

[0083] The embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the application service automatic deployment method in the above method embodiment is executed. The computer-readable storage medium includes: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a RAM, a magnetic disk or an optical disk, and other media that can store program codes.

[0084] The term "and / or" herein is only a description of the association relationship of the associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the term "at least one" herein represents any combination of at least two of any one or more of a plurality of. For example, including at least one of A, B, and C can represent including any one or more elements selected from the set consisting of A, B, and C.

[0085] In all examples shown and described herein, any specific values ​​should be interpreted as merely exemplary and not as limiting, and thus other examples of the exemplary embodiments may have different values.

[0086] The flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and a part of a module, a program segment or a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or the flowchart, and the combination of the boxes in the block diagram and / or the flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0087] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.

[0088] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0089] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0090] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for automatic deployment of application services, characterized in that: include: When a service subscription request from a target customer is obtained, the target customer identifier and the target application service identifier of the target application service to be deployed are obtained; According to the target customer identifier, obtain the target domain name and target IP address of the target customer, and configure the domain name and network security based on the target domain name and the target IP address; According to the target application service identifier, the target configuration file is pulled through Kubernetes, and the deployment of the target application service is completed; wherein the target configuration file is generated based on the corresponding image stored in the image repository and pre-deployed in the Kubernetes.

2. The method according to claim 1, characterized in that The step of obtaining a target domain name and a target IP address of the target customer according to the target customer identifier includes: Obtaining a target domain name corresponding to the target customer identifier from a domain name library; wherein the domain name library stores a correspondence between customers and domain names, and the target domain name is automatically generated based on a domain name acquisition request initiated by the target customer through a preset domain name generation rule or is obtained through custom modification by the customer; A free IP address is randomly allocated to the target client from the cloud IP address library to obtain the target IP address.

3. The method according to claim 1, characterized in that The configuring of domain name and network security based on the target domain name and the target IP address includes: Use elastic load balancing service to configure the forwarding mechanism and matching relationship between the target domain name and the target IP address; The mapping relationship between the target domain name and the target IP address is configured on the firewall on the cloud platform side and the firewall on the application side respectively, and security protection settings are performed on the firewall on the application side, wherein the security protection settings include CC attack protection settings, black and white list settings, and website anti-crawler settings.

4. The method according to claim 1, characterized in that: Pulling the target configuration file through Kubernetes according to the target application service identifier and completing the deployment of the target application service includes: Sending the target application service identifier to the Kubernetes; Pull the target configuration file corresponding to the target application service identifier through the Kubernetes; The Kubernetes performs resource configuration, service port configuration, and domain name service configuration based on the target configuration file.

5. The method according to claim 4, characterized in that The target configuration file includes a deployment.yaml configuration file, a service.yaml configuration file, and an ingress.yaml configuration file; the resource configuration, service port configuration, and domain name service configuration are performed by Kubernetes based on the target configuration file, including: Perform resource configuration of one or more of the front-end server, the back-end server, the database, and the middleware according to the deployment.yaml configuration file in the target configuration file through the Kubernetes; The service port is configured by Kubernetes according to the service.yaml configuration file in the target configuration file; The Kubernetes performs domain name binding and forwarding rule configuration according to the ingress.yaml configuration file in the target configuration file.

6. The method according to claim 5, characterized in that The resources parameter in the deployment.yaml configuration file is used to configure the resource requirements of CPU and memory; the host parameter in the ingress.yaml configuration file is used for domain name binding, and the http.paths and backend.service parameters are used for forwarding rule configuration.

7. An automatic deployment device for application services, characterized in that: include: An identification acquisition module, used to acquire the target customer identification and the target application service identification of the target application service to be deployed when a service subscription request of the target customer is acquired; A first configuration module, configured to obtain a target domain name and a target IP address of the target customer according to the target customer identifier, and configure a domain name and network security based on the target domain name and the target IP address; The second configuration module is used to pull the target configuration file through Kubernetes according to the target application service identifier and complete the deployment of the target application service; wherein the target configuration file is generated based on the corresponding image stored in the image repository and pre-deployed in the Kubernetes.

8. The device according to claim 7, characterized in that The second configuration module is specifically used to: send the target application service identifier to the Kubernetes; pull the target configuration file corresponding to the target application service identifier through the Kubernetes; and perform resource configuration, service port configuration, and domain name service configuration based on the target configuration file through the Kubernetes.

9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, characterized in that: When the processor executes the computer program, the method for automatic deployment of application services described in any one of claims 1 to 6 is implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for automatic deployment of application services according to any one of claims 1 to 6 is executed.

Citation Information

Patent Citations

  • Container application deployment method and device, computer equipment and storage medium

    CN108958927A

  • Client deployment method and device, computer equipment and storage medium

    CN113434254A

  • Request scheduling method and device, equipment and storage medium

    CN115309497A

  • Service routing method and system of cloud native platform microservice gateway

    CN115604199A

  • Service deployment method and device, equipment, storage medium and computer program product

    CN116319806A