Method and apparatus for automatic deployment of application services, electronic device and storage medium
By automatically configuring domain names and IP addresses and leveraging Kubernetes to pull pre-deployed configuration files, the limitations of manual operation in existing technologies are overcome, enabling automated deployment of application services and simplifying operation and maintenance costs.
Patent Information
- Application Number
- CN202411909089.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2044-12-24
AI Technical Summary
Existing application automation deployment technologies, in the cloud-based 'one customer, one system' model, still require manual operation for functions such as domain name allocation, resource allocation, and custom service orchestration, and cannot achieve fully automated deployment.
By obtaining the target customer's identifier and application service identifier, the system automatically configures the domain name and IP address, and uses Kubernetes to pull pre-deployed configuration files to achieve automated deployment of application services, including resource configuration, service port configuration, and domain name service configuration.
It achieves automated deployment of subscription-as-a-service, simplifies the deployment and maintenance costs of application services, and improves development efficiency.
Smart Images

Figure CN119697263B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer, and particularly relates to an application service automatic deployment method and device, electronic equipment and storage medium. BACKGROUND
[0002] The existing application automatic deployment technology usually adopts a container orchestration system based on continuous integration of Kubernetes. Specifically, a developer focuses on code development, an operation and maintenance personnel realizes application automatic deployment by using a Jenkins pipeline tool and a YAML configuration file of Kubernetes based on the developed code, realizes functions such as automatic construction, deployment, elastic expansion and centralized management, and improves development efficiency.
[0003] The existing application automatic deployment technology solves the problems from code writing to compiling, packaging and deployment, but in the service mode of 'one customer one system' based on cloud service, the application has obvious limitations, and functions such as domain name allocation, resource allocation and service custom combination orchestration still need manual operation. SUMMARY
[0004] The present application aims to provide an application service automatic deployment method and device, electronic equipment and storage medium, so as to realize the automatic deployment effect of subscription as a service and simplify the deployment and operation and maintenance cost of application service.
[0005] In a first aspect, the present application provides an application service automatic deployment method, comprising:
[0006] When a service subscription request of a target customer is acquired, a target customer identifier and a target application service identifier of a target application service to be deployed are acquired;
[0007] According to the target customer identifier, a target domain name and a target IP address of the target customer are acquired, and domain name and network security configurations are performed based on the target domain name and the target IP address;
[0008] According to the target application service identifier, a target configuration file is pulled through Kubernetes, and deployment of the target application service is completed; wherein the target configuration file is generated based on a corresponding image stored in an image repository and is pre-deployed in the Kubernetes.
[0009] Further, according to the target customer identifier, the target domain name and the target IP address of the target customer are acquired, comprising:
[0010] Obtaining a target domain name corresponding to the target customer identifier from a domain name library; wherein the domain name library stores a corresponding relationship between customers and domain names, 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 by customer self-defined modification;
[0011] Randomly allocating an idle IP address to the target customer from a cloud IP address library to obtain a target IP address.
[0012] Further, based on the target domain name and the target IP address, the configuration of domain name and network security is carried out, including:
[0013] Using elastic load balancing service, the forwarding mechanism and matching relationship of the target domain name and the target IP address are configured;
[0014] The mapping relationship of the target domain name and the target IP address is configured on the firewall of the cloud platform side and the firewall of the application side respectively, and the security protection setting is carried out on the firewall of the application side, the security protection setting including CC attack protection setting, black and white list setting and website anti-crawler setting.
[0015] Further, 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] Sending the target application service identifier to Kubernetes;
[0017] Pulling the target configuration file corresponding to the target application service identifier through Kubernetes;
[0018] Based on the target configuration file, resource configuration, service port configuration and domain name service configuration are carried out through Kubernetes.
[0019] Further, the target configuration file includes deployment.yaml configuration file, service.yaml configuration file and ingress.yaml configuration file; based on the target configuration file, resource configuration, service port configuration and domain name service configuration are carried out through Kubernetes, including:
[0020] According to the deployment.yaml configuration file in the target configuration file, resource configuration of one or more of front-end server, back-end server, database and middleware is carried out through Kubernetes;
[0021] According to the service.yaml configuration file in the target configuration file, service port is configured through Kubernetes;
[0022] The domain name binding and forwarding rule configuration are performed by Kubernetes according to the ingress.yaml configuration file in the target configuration file.
[0023] Further, the resources parameter in the deployment.yaml configuration file is used for configuring the resource needs 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.
[0024] In the second aspect, the application further provides an application service automatic deployment device, which comprises:
[0025] An identity acquisition module is configured to acquire a target customer identity and a target application service identity of a target application service to be deployed when a service subscription request of the target customer is acquired.
[0026] A first configuration module is configured to acquire a target domain name and a target IP address of the target customer according to the target customer identity, and perform domain name and network security configuration based on the target domain name and the target IP address.
[0027] A second configuration module is configured to pull a target configuration file through Kubernetes according to the target application service identity, and complete deployment of the target application service, wherein the target configuration file is generated based on a corresponding image stored in an image repository and is pre-deployed in the Kubernetes.
[0028] Further, the second configuration module is specifically configured to send the target application service identity to the Kubernetes, pull the target configuration file corresponding to the target application service identity through the Kubernetes, and perform resource configuration, service port configuration and domain name service configuration based on the target configuration file through the Kubernetes.
[0029] In the third aspect, the application further provides an electronic device comprising a memory and a processor, wherein the memory stores a computer program capable of running on the processor, and the processor implements the application service automatic deployment method of the first aspect when executing the computer program.
[0030] In the fourth aspect, the application further provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program is executed by the processor to execute the application service automatic deployment method of the first aspect.
[0031] The application embodiment provides an application service automatic deployment method and device, electronic equipment and storage medium, when a service subscription request of a target customer is acquired, a target customer identifier and a target application service identifier of a target application service to be deployed are acquired; according to the target customer identifier, a target domain name and a target IP address of the target customer are acquired, and domain name and network security configurations are performed based on the target domain name and the target IP address; according to the target application service identifier, a target configuration file is pulled through Kubernetes, and deployment of the target application service is completed; wherein the target configuration file is generated based on a corresponding image stored in an image warehouse and is pre-deployed in the Kubernetes. In this way, the target configuration file is pre-deployed in the Kubernetes, and after the customer subscribes to the corresponding service, the deployment of the target application service can be automatically completed through identifier resolution, realizing the automatic deployment effect of subscription as a service, and simplifying the deployment and operation and maintenance cost of the application service. BRIEF DESCRIPTION OF DRAWINGS
[0032] In order to more clearly illustrate the technical solutions in the specific embodiments or prior art of the present application, the drawings needed in the specific embodiments or prior art description will be briefly introduced as follows. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor.
[0033] Figure 1 A flowchart of an application service automatic deployment method provided by an embodiment of the present application;
[0034] Figure 2 An implementation scenario diagram of an application service automatic deployment method provided by an embodiment of the present application;
[0035] Figure 3 An implementation flowchart of an application service automatic deployment method provided by an embodiment of the present application;
[0036] Figure 4 A structural diagram of an application service automatic deployment device provided by an embodiment of the present application;
[0037] Figure 5 A structural diagram of an electronic equipment provided by an embodiment of the present application. DETAILED DESCRIPTION
[0038] The technical solutions of the present application will be described clearly and completely in combination with embodiments. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the protection scope of the present application.
[0039] At present, the existing application automation deployment technology, when applied to the "one customer one system" service mode based on cloud service, the functions such as domain name allocation, resource allocation and service custom combination arrangement still need manual operation, and the complete automation deployment of application service cannot be realized. Based on this, the application service automation deployment method, device, electronic equipment and storage medium provided by the embodiment of the application can effectively solve the above problems, realize the application effect of subscription as a service, and the whole process only needs the customer to subscribe the service, and the background realizes the deployment of application service automatically.
[0040] In order to facilitate the understanding of the embodiment, first, a kind of application service automation deployment method disclosed by the embodiment of the application is introduced in detail.
[0041] The embodiment of the application provides an application service automation deployment method, which can be executed by an electronic device with data processing capability, which can be a server device of a cloud platform for realizing the method. Referring to the flow diagram of the application service automation deployment method shown in Figure 1 The method mainly includes the following steps S110 to S130:
[0042] Step S110, when the service subscription request of the target customer is obtained, the target customer identifier and the target application service identifier of the target application service to be deployed are obtained.
[0043] The customer can log in to the cloud platform, select the target application service required in the application service provided by the cloud platform, and initiate the corresponding service subscription request; the target customer identifier and the target application service identifier of the target customer can be obtained by analyzing the service subscription request, which can carry the target customer identifier and the target application service identifier of the target application service. Wherein, the target application service can be one or more, and different target application services are independently deployed subsequently.
[0044] Step S120, according to the target customer identifier, the target domain name and the target IP address of the target customer are obtained, and the domain name and network security configuration are performed based on the target domain name and the target IP address.
[0045] Multiple application services can share a domain name, and each application service can also be provided with a domain name. Therefore, when the target application service is multiple, the target domain name can be one, and a subdomain name under the target domain name can be allocated to each target application service; the target domain name can also be multiple, and a target domain name can be allocated to each target application service.
[0046] The target domain name can be pre-applied by the target customer, the target domain name can be stored in a domain name library, and the target IP address can be randomly allocated. Based on this, the above step of obtaining the target domain name and the target IP address of the target customer according to the target customer identifier can 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 the customer and the domain name, 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 is obtained by customizing the initial domain name; an idle IP address is randomly allocated to the target customer from a cloud IP address library to obtain the target IP address.
[0047] The customer can apply for a domain name before initiating a service subscription request, that is, initiate a domain name acquisition request; the cloud platform can automatically generate an initial domain name based on a preset domain name generation rule; the customer can choose to use the initial domain name as the target domain name, or customize the initial domain name to obtain the target domain name; wherein the preset domain name generation rule can include: for enterprise customers, using the first letter of the company name + custom characters to generate a domain name address, and for natural person customers, using the first letter of the name + the last six digits of the ID number + custom characters to generate a 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 step of configuring the domain name and network security based on the target domain name and the target IP address can include: using an elastic load balancing service to configure the forwarding mechanism and matching relationship of the target domain name and the target IP address; configuring the mapping relationship of the target domain name and the target IP address on the firewall of the cloud platform and the firewall of the application side respectively, and performing security protection settings on the firewall of the application side, the security protection settings including CC attack protection settings, black and white list settings, and website anti-crawler settings.
[0049] In step S130, the target configuration file is pulled by Kubernetes according to the target application service identifier, 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 is pre-deployed in Kubernetes.
[0050] In some possible embodiments, the above step S130 can 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 target configuration file can include a deployment.yaml configuration file, a service.yaml configuration file and an ingress.yaml configuration file, the deployment.yaml configuration file can be one or more, the number of the deployment.yaml configuration file is the same as the number of images corresponding to the target application service, the service.yaml configuration file and the ingress.yaml configuration file are both one; one or more of a front-end server, a back-end server, a database and middleware can be configured by Kubernetes according to the deployment.yaml configuration file in the target configuration file; a service port can be configured by Kubernetes according to the service.yaml configuration file in the target configuration file; domain name binding and forwarding rule configuration can be performed by Kubernetes according to the ingress.yaml configuration file in the target configuration file.
[0052] Further, the resources parameter in the deployment.yaml configuration file is used to configure the resource needs 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 application service automatic deployment method provided by the embodiment of the application comprises the following steps: when a service subscription request of a target customer is acquired, a target customer identifier and a target application service identifier of a target application service to be deployed are acquired; a target domain name and a target IP address of the target customer are acquired according to the target customer identifier, and domain name and network security configuration are performed based on the target domain name and the target IP address; a target configuration file is pulled by Kubernetes according to the target application service identifier, and deployment of the target application service is completed; wherein the target configuration file is generated based on corresponding images stored in an image repository and is pre-deployed in Kubernetes. In this way, the target configuration file is pre-deployed in Kubernetes, and after a user subscribes to a corresponding service, deployment of the target application service can be automatically completed through identifier resolution, thereby realizing automatic deployment of subscription-as-a-service and simplifying deployment and operation and maintenance costs of application services.
[0054] For ease of understanding, Figure 2As shown, the implementation scenario of the application service automatic deployment method includes that a developer completes development of an application service code and packages the application service code into an image, that is, completes manufacturing of an application image; the image is uniformly stored in an image warehouse (that is, an application image warehouse) and is uniformly managed by a platform service center, and a customer automatically completes all subsequent deployment work by the platform after subscribing to a corresponding service, and the deployment is performed in a customer application center, a uniform domain name bound to the customer is generated, 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, meter management, digital laboratory system, and work log management of a meter manufacturing client; the platform service center can perform container and image management, cluster monitoring and management, domain name management, resource management, and service management; and the customer application center includes customer 1, customer 2, and customer 3. Taking customer 1 as an example, the domain name of customer 1 is abc.yibia163.cn, and the application services of customer 1 include enterprise energy management, a production manufacturing client, and work log management.
[0055] An optional implementation process of the application service automatic deployment method is as follows: Figure 3 As shown, the entire process mainly involves a developer, an operation and maintenance personnel, and a customer, and can be divided into three main stages. The first stage mainly includes that the developer completes application development, submits a code to a code library, and the code in the code library is automatically packaged into an image warehouse by a Jenkins pipeline. The operation and maintenance personnel can manage the image warehouse. The second stage includes that the operation and maintenance personnel writes a configuration and a deployment file (that is, a deployment configuration file), that is, an image is referenced to generate the deployment configuration file by using a helm tool, and a chart is generated in the helm, to support automatic deployment of K8S (an abbreviation of Kubernetes). The third stage includes that a service of a mass customer is subscribed. After the customer clicks to subscribe, resources, a network, bandwidth, a domain name, and the like are allocated by a cloud service such as Huawei Cloud, and application service deployment is completed by K8S according to a preset deployment file of the helm, a dedicated domain name is provided, and the customer can access the dedicated domain name. The operation and maintenance personnel can perform cluster monitoring and management on Huawei Cloud and K8S.
[0056] The specific process can be as follows:
[0057] The first stage:
[0058] After the developer completes code development and testing work, the developer formally submits the code. A Jenkins pipeline tool automatically packages the new code into a service image, gives the service image a unique identification code, and loads the service image into an image warehouse.
[0059] Specifically, developers develop code based on the application service to be developed, and generate images using the Jenkins pipeline, which are then stored in an image repository. The unique identifier of the image is used later when generating the deployment.yaml configuration file; the deployment.yaml configuration file corresponding to the specified image is generated by specifying the unique identifier of the image.
[0060] Phase Two:
[0061] Operations personnel use images from the image repository as a base, write configuration files according to application requirements, and deploy the chart to Kubernetes.
[0062] An application service may correspond to one or more mirrors. For example, a single database service only needs one database mirror, and its application service identifier can directly adopt the unique identifier code of the mirror. Another example is that an ERP (Enterprise Resource Planning) management system needs one front-end, two back-ends, one database, and two middleware mirrors.
[0063] Helm can be used to create a chart. Once created, there will be three important configuration files: deployment.yaml, service.yaml, and ingress.yaml. The next step is to write these configuration files. The deployment.yaml file mainly configures application deployment, including the application name, application tag definition, number of pod replicas, pod selector tags, pod tag definition, container name, image address, image unique identifier code, and resources parameters. The number of deployment.yaml files is the same as the number of images. The service.yaml file configures the service's interface exposure. The ingress.yaml file is for the application's domain name service.
[0064] When deploying a chart to Kubernetes, you can use the command `helm upgrade --installmychartname` to deploy the generated chart to Kubernetes. You can check the chart deployment status by using the command `helm list|grepmychartname`. The `mychartname` part can usually be identified using a unique identifier.
[0065] Phase Three:
[0066] After the customer subscribes to the service on the platform, the background synchronously processes the services on both ends. One is to obtain the domain name and IP address through the Huawei Cloud API service, and complete the forwarding and matching mechanism of the domain name and IP address, and complete the configuration of the firewall (i.e. the firewall on the cloud platform side) and the WAF (i.e. the firewall on the application side). The other is to complete the automatic deployment of the application through kubernetes, including the back-end service calling the kubernetes interface service, passing the application deployment configuration parameters (i.e. application service identifier) to kubernetes, kubernetes automatically pulling the helm chart configuration (i.e. pulling the configuration file), allocating resources, completing the configuration of the front-end, back-end and database and other middleware, and providing services to the outside through the ingress service, and binding with the specific domain name of the customer. The customer can access the services of the specific application deployment.
[0067] Specifically, the customer can subscribe to one or more application services, and each application service is independently deployed. Before subscribing to the service, the customer first applies for a domain name, and the background will generate a domain name address using the first letter of the company name + custom characters for enterprise customers, and the first letter of the name + the last six digits of the ID number + custom characters for natural person customers. After receiving the domain name, the customer can customize the modification. After the customer subscribes to the service, the background obtains the domain name of the customer, and randomly allocates an IP address from the cloud IP address library. After obtaining the domain name and IP address through Huawei Cloud, the matched domain name and IP address are configured using the elastic load balancing ELB (Elastic Load Balancing) service. The matching relationship of the domain name and the IP address is configured. The WAF (Web Application Firewall) is configured with the domain name address and IP address mapping relationship, including CC (Challenge Collapsar, a form of distributed denial of service attack) attack protection, black and white list setting and website anti-crawler setting, etc. When the request accesses the specified domain name, the WAF firewall will play a role. The process is automatically completed through interface calling without manual configuration.
[0068] The application service identifier (such as application service ID) is included in the service subscription request of the customer, and the background can pass the application service identifier to kubernetes, and kubernetes automatically takes the corresponding configuration file. Among them, multiple deploment configuration files are used for the configuration of the front-end, back-end and database, and the resources parameter is used to configure the CPU and memory (i.e. memory) resources. The service.port is used to configure the service port. The rules in the ingress are used to set the domain name binding and forwarding rules, including the host, http.paths and backend.service parameters.
[0069] Compared with the prior art, the embodiment of the application realizes fully automatic configuration of services through cooperation and identification resolution of helm and kubernetes, and realizes automatic allocation of domain names and configuration of the network security level through fusion development with Huawei Cloud. The use of the ingress service of kubernetes can realize matching of domain names and application services, realize the application effect of subscription as use for users, different customers have relatively independent resource spaces, the safety of information resources is ensured, and the deployment and operation and maintenance cost of the application are greatly simplified.
[0070] Corresponding to the application service automatic deployment method described above, the embodiment of the application further provides an application service automatic deployment device. Referring to Figure 4 The device includes:
[0071] The identification acquisition module 401 is configured to acquire the target customer identification and the target application service identification of the target application service to be deployed when the service subscription request of the target customer is acquired.
[0072] The first configuration module 402 is configured to acquire the target domain name and the target IP address of the target customer according to the target customer identification, and perform configuration of the domain name and the network security based on the target domain name and the target IP address.
[0073] The second configuration module 403 is configured to pull the target configuration file through Kubernetes according to the target application service identification, and complete deployment of the target application service. The target configuration file is generated based on the corresponding image stored in the image warehouse and is pre-deployed in the Kubernetes.
[0074] The application service automatic deployment device provided by the embodiment of the application acquires the target customer identification and the target application service identification of the target application service to be deployed when the service subscription request of the target customer is acquired, acquires the target domain name and the target IP address of the target customer according to the target customer identification, performs configuration of the domain name and the network security based on the target domain name and the target IP address, and pulls the target configuration file through Kubernetes according to the target application service identification and completes deployment of the target application service. The target configuration file is generated based on the corresponding image stored in the image warehouse and is pre-deployed in the Kubernetes. In this way, the target configuration file is pre-deployed in the Kubernetes, the user can automatically complete deployment of the target application service through identification resolution after subscribing to the corresponding service, the automatic deployment effect of subscription as use is realized, and the deployment and operation and maintenance cost of the application service are simplified.
[0075] Further, the first configuration module 402 is specifically configured to: obtain a target domain name corresponding to the target customer identifier from a domain name library; the domain name library stores a correspondence between customers and domain names, 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 by custom modification of the customer; and randomly allocate an idle IP address to the target customer from a cloud IP address library to obtain a target IP address.
[0076] Further, the first configuration module 402 is further configured to: use an elastic load balancing service to configure a forwarding mechanism and a matching relationship of the target domain name and the target IP address; configure a mapping relationship of the target domain name and the target IP address on a firewall at the cloud platform side and a firewall at the application side respectively, and perform a security protection setting on the firewall at the application side, the security protection setting including a CC attack protection setting, a black and white list setting, and a website anti-crawler setting.
[0077] Further, the second configuration module 403 is specifically configured to: send the target application service identifier to Kubernetes; pull a 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] Further, the target configuration file includes a deployment.yaml configuration file, a service.yaml configuration file, and an ingress.yaml configuration file; and the second configuration module 403 is further configured to: perform resource configuration of one or more of a front-end server, a back-end server, a database, and a middleware according to the deployment.yaml configuration file in the target configuration file through Kubernetes; configure a service port according to the service.yaml configuration file in the target configuration file through Kubernetes; and perform domain name binding and forwarding rule configuration according to the ingress.yaml configuration file in the target configuration file through Kubernetes.
[0079] Further, a resources parameter in the deployment.yaml configuration file is used to configure resource needs of CPU and memory; a host parameter in the ingress.yaml configuration file is used for domain name binding, and http.paths and backend.service parameters are used for forwarding rule configuration.
[0080] The device provided in the embodiment has the same implementation principle and generated technical effects as the foregoing method embodiments, and for brevity of description, the part not mentioned in the device embodiment can be referred to the corresponding content in the foregoing method embodiments.
[0081] As shown in Figure 5 The electronic device 500 provided by the embodiment of the present application includes a processor 501, a memory 502 and a bus. The memory 502 stores a computer program which can run on the processor 501. When the electronic device 500 runs, the processor 501 communicates with the memory 502 through the bus. The processor 501 executes the computer program to implement the application service automatic deployment method.
[0082] Specifically, the memory 502 and the processor 501 can be general memory and processor, which are not limited here.
[0083] The embodiment of the present application further provides a computer readable storage medium, which stores a computer program. The computer program is run by a processor to execute the application service automatic deployment method in the foregoing method embodiment. The computer readable storage medium includes a U disk, a mobile hard disk, a read-only memory (ROM), a RAM, a magnetic disk or an optical disk and various storage program codes.
[0084] The term "and / or" in the present document is only used to describe the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B can mean that A exists alone, A and B exist together, and B exists alone. In addition, the term "at least one" in the present document means any one of the plurality or any combination of at least two of the plurality, for example, including at least one of A, B and C can mean including any one or more elements selected from the set consisting of A, B and C.
[0085] In all the examples shown and described herein, any specific value should be interpreted as merely exemplary and not as a limitation, therefore, other examples of the exemplary embodiments can have different values.
[0086] The flow diagrams and the block diagrams in the drawings are presented to illustrate the architecture, functionality, and operation of possible implementations of apparatuses, methods, and computer program products according to various embodiments of the present application. In this regard, each block in the flow diagrams or block diagrams can represent a module, a segment, or a portion of code, which comprises one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently or the blocks can sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and / or flow diagrams, and combinations thereof, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
[0087] In several embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented by other manners. The apparatus embodiments described above are merely illustrative, for example, the division of units is merely a logical function division, and actual implementation can have another division manner, and for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some communication interfaces, devices or units, and can be electrical, mechanical or other forms.
[0088] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e. they can be located in one place or distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiments.
[0089] In addition, the functional units in each embodiment of the present application can be integrated into a processing unit, or each unit can be physically present separately, or two or more units can 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 application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for automated deployment of application services, characterized in that, include: When a service subscription request from a target customer is received, the target customer identifier and the target application service identifier of the target application service to be deployed are obtained. Based on the target customer identifier, obtain the target domain name and target IP address of the target customer, and configure domain name and network security based on the target domain name and target IP address; Based on 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; The step of obtaining the target domain name and target IP address of the target customer based on the target customer identifier includes: Obtain the target domain name corresponding to the target customer identifier from the domain name database; wherein, the domain name database stores the correspondence between customers and domain names, and the target domain name is automatically generated or obtained by the customer through preset domain name generation rules based on the domain name acquisition request initiated by the target customer; A free IP address is randomly assigned to the target customer from the cloud IP address database to obtain the target IP address; The step of pulling the target configuration file via Kubernetes based on the target application service identifier and completing the deployment of the target application service includes: Send the target application service identifier to the Kubernetes; The target configuration file corresponding to the target application service identifier is retrieved using the Kubernetes module. Based on the target configuration file, Kubernetes performs resource configuration, service port configuration, and domain name service configuration.
2. The method according to claim 1, characterized in that, The configuration of domain name and network security based on the target domain name and the target IP address includes: Use the 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, including CC attack protection settings, blacklist and whitelist settings, and website anti-crawler settings.
3. The method according to claim 1, characterized in that, The target configuration files include deployment.yaml, service.yaml, and ingress.yaml. The process of configuring resources, service ports, and domain name services using Kubernetes based on these target configuration files includes: Kubernetes configures one or more of the following resources based on the deployment.yaml configuration file in the target configuration file: front-end server, back-end server, database, and middleware. The Kubernetes system configures the service port according to the service.yaml configuration file in the target configuration file. The Kubernetes system configures domain name binding and forwarding rules based on the ingress.yaml configuration file in the target configuration file.
4. The method according to claim 3, characterized in that, 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.
5. An automated deployment device for application services, characterized in that, include: The identifier acquisition module is used to acquire the target customer identifier and the target application service identifier of the target application service to be deployed when a service subscription request from a target customer is received. The first configuration module is used to obtain the target domain name and target IP address of the target customer based on the target customer identifier, and to configure domain name and network security based on the target domain name and 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; The first configuration module is specifically used for: obtaining the target domain name corresponding to the target customer identifier from the domain name database; wherein, the domain name database stores the correspondence between customers and domain names, and the target domain name is automatically generated or customized by the customer based on the domain name acquisition request initiated by the target customer; and randomly assigning an idle IP address to the target customer from the cloud IP address database to obtain the target IP address. The second configuration module is specifically used for: sending the target application service identifier to the Kubernetes; pulling the target configuration file corresponding to the target application service identifier through the Kubernetes; and configuring resources, service ports, and domain name services through the Kubernetes based on the target configuration file.
6. An electronic device comprising a memory and a processor, wherein the memory stores a computer program executable on the processor, characterized in that, When the processor executes the computer program, it implements the application service automated deployment method according to any one of claims 1-4.
7. A computer-readable storage medium storing a computer program thereon, characterized in that, The computer program is executed by the processor to perform the application service automated deployment method according to any one of claims 1-4.
Citation Information
Patent Citations
Request scheduling method and device, equipment and storage medium
CN115309497A
Simplified installation and deployment method based on rancher platform
CN117827233A