Cloud service deployment method and device, electronic equipment and readable storage medium
By deploying private DNS servers in each availability zone of the automotive cloud service and recording the correspondence between domain names and IP addresses, the problem of low deployment efficiency and security risks caused by IP address correction and omissions is solved, and efficient cloud service deployment and management are achieved.
Patent Information
- Application Number
- CN202410887907.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-03
- Publication Date
- 2024-10-29
AI Technical Summary
During the deployment process of automotive cloud services, IP address correction often leads to low efficiency of production environment deployment, which may lead to abnormal customer access and security risks. Especially in multi-availability zone deployment and overseas deployment, configuration errors and omissions are complex and troubleshooting time. Exponential increase.
Deploy a private DNS server in each availability zone where the cloud service is to be deployed. The corresponding relationship between the domain name and the IP address is recorded in the configuration file. The cloud service declares that the target domain name is consistent with the preset format. The parsing module parses the target domain name according to the configuration file to ensure correct access. IP address to avoid modifying the cloud service's own configuration every time it is deployed.
It simplifies the development, testing and deployment management of large-scale cloud services, reduces configuration errors caused by environmental differences, improves deployment and release efficiency, reduces the complexity of troubleshooting configuration problems, and avoids security risks.
Smart Images

Figure CN118869787A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a cloud service deployment method, device, electronic device and readable storage medium. Background Art
[0002] Automotive cloud services can provide services such as smart cockpit cloud services, voice interaction services, remote control and remote diagnosis of vehicles, and various surrounding ecological services of vehicles. They are characterized by complex functions and diverse services. Therefore, automotive cloud services are usually developed in a microservices manner from a software engineering perspective, which means that hundreds or thousands of microservice software projects need to be developed. These software projects need to access different databases, distributed caches, ecological services on the Internet, etc., and software projects also need to access each other.
[0003] To achieve these accesses, when developing in a development environment, the IP (Internet Protocol Address) address of the access target in the development environment is usually configured in the configuration file of the software project. When the software is developed and tested, when it is deployed in a production environment, the access target in these projects needs to be modified to the IP address in the production environment.
[0004] Since there are many projects involved, IP addresses are often changed incorrectly or missed, resulting in low deployment and release efficiency in the production environment. After the release, real customers may experience abnormal access to the automotive cloud service due to configuration errors or omissions, and even pose security risks. Summary of the invention
[0005] In view of the above problems, embodiments of the present invention are proposed to provide a cloud service deployment method, device, electronic device and readable storage medium that overcome the above problems or at least partially solve the above problems.
[0006] In order to achieve the above object, the technical solution adopted by the present invention is as follows:
[0007] In a first aspect, an embodiment of the present application discloses a cloud service deployment method, the method comprising:
[0008] Deploy a private DNS server in each availability zone of the cloud service to be deployed; the configuration file of the private DNS server includes the correspondence between the domain name and the IP address of the availability zone;
[0009] Obtaining a cloud service to be deployed; the cloud service declares a target domain name of the cloud service, the target domain name is declared in a preset format, and for the same cloud service, when deployed in different availability zones, the target domain name is consistent;
[0010] For any availability zone, the target domain name of the cloud service is parsed according to the configuration file, so that the cloud service to be deployed can correctly access the IP address corresponding to the target domain name when deployed in the availability zone.
[0011] In a second aspect, an embodiment of the present application discloses a cloud service deployment device, the device comprising:
[0012] A deployment module, used to deploy a private DNS server in each availability zone of the cloud service to be deployed; the configuration file of the private DNS server includes a correspondence between the domain name and the IP address of the availability zone;
[0013] An acquisition module is used to acquire a cloud service to be deployed; the cloud service declares a target domain name of the cloud service, the target domain name is declared in a preset format, and for the same cloud service, when deployed in different availability zones, the target domain name is consistent;
[0014] The parsing module is used to parse the target domain name of the cloud service according to the configuration file for any available zone, so that the cloud service to be deployed can correctly access the IP address corresponding to the target domain name when deployed in the available zone.
[0015] In a third aspect, an embodiment of the present application discloses an electronic device, comprising a processor and a memory, wherein the memory stores programs or instructions that can be executed on the processor, and when the program or instructions are executed by the processor, the steps of the method described in the first aspect are implemented.
[0016] In a fourth aspect, an embodiment of the present application discloses a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0017] In an embodiment of the present application, a private DNS server is deployed in each availability zone of the cloud service to be deployed; the configuration file of the private DNS server includes the correspondence between the domain name and the IP address of the availability zone; the cloud service to be deployed is obtained; the target domain name of the cloud service is declared in the cloud service, and the target domain name is declared in a preset format, and for the same cloud service, the target domain name is consistent when deployed in different availability zones; for any availability zone, the target domain name of the cloud service is parsed according to the configuration file, so that the IP address corresponding to the target domain name can be correctly accessed when the cloud service to be deployed is deployed in the availability zone. When the method of the present application is used for large-scale cloud service deployment, the same software configuration can be used for deployment in different availability zones, and the differences in deployment environments in different availability zones are shielded by the private DNS server, that is, the cloud service does not need to modify its own configuration information when it is deployed, and only needs to replace the IP address corresponding to the domain name in the configuration file corresponding to the private DNS server in the different availability zones to be deployed with the IP address in the availability zone, so that there is no need to modify the configuration file of the cloud service itself every time it is deployed, which greatly simplifies the management of development, testing and deployment of large-scale cloud services, and largely avoids the situation where a lot of manpower and material resources are needed to be spent on troubleshooting configuration problems when configuration errors are caused by environmental differences. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 It is a flowchart of the steps of a cloud service deployment method provided by an embodiment of the present invention;
[0019] Figure 2 is a schematic diagram of a method for developing an automobile cloud service in a development and testing environment provided by an embodiment of the present invention;
[0020] Figure 3 This is a configuration example of a private DNS server in a development and testing environment provided by an embodiment of the present invention;
[0021] Figure 4 It is a software configuration example of an automobile cloud service provided by an embodiment of the present invention;
[0022] Figure 5 It is a schematic diagram of a deployment embodiment of a large-scale automobile cloud service site in a regional production environment provided by an embodiment of the present invention;
[0023] Figure 6 It is a schematic diagram of an embodiment of regional site deployment of a large-scale automobile cloud service site in various overseas regions provided by an embodiment of the present invention;
[0024] Figure 7 is a block diagram of a cloud service deployment device 20 provided in an embodiment of the present invention;
[0025] Figure 8is a block diagram of an electronic device provided in an embodiment of the present application;
[0026] Fig. 9 This is a block diagram of another electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0027] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0028] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally a class, and the number of objects is not limited. For example, the first object can be one or more. In addition, the term "and / or" in the specification and claims is used to describe the association relationship of associated objects, indicating that three kinds of relationships can exist, for example, A and / or B can be represented: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the front and back associated objects are a kind of "or" relationship. In the embodiment of the present application, the term "multiple" refers to two or more, and other quantifiers are similar.
[0029] The concepts involved in this application are explained below.
[0030] DNS (Domain Name System) is a service of the Internet. It maps domain names and IP addresses to each other, allowing clients to easily access the Internet through domain names.
[0031] A software development and testing environment refers to a server environment that programmers use specifically for software development and testing, allowing programmers to more conveniently develop, test, and debug software during the development process.
[0032] The software production environment refers to the server environment that is officially available to users. After the software is developed and tested, it will be deployed to the production environment for users to use.
[0033] Multi-AZ deployment refers to deploying a software system to computers or cloud servers in multiple geographic regions. This deployment method distributes users to different AZs for access, which can improve the overall availability, stability, and throughput of the software system (that is, it can serve a larger number of users).
[0034] Automotive cloud services refer to the application of cloud computing technology to the automotive field, providing intelligent, interconnected, and data-based services for vehicles to improve vehicle performance, safety, and comfort. Automotive cloud services are usually provided by automakers or service providers commissioned by automakers to provide cloud services for vehicles produced and sold by automakers. The services provided include smart cockpit cloud services, voice interaction services, vehicle remote control and remote diagnosis, and various surrounding ecological services for vehicles, which are characterized by complex functions and diverse services. In view of this feature, automotive cloud services are usually developed in a microservices manner from a software engineering perspective, which means that hundreds or thousands of microservice software projects need to be developed. These software projects need to access different databases, distributed caches (such as redis), ecological services on the Internet, and software projects also need to access each other. To achieve these accesses, when developing in a development environment, the IP address of the access target in the development environment is usually configured in the configuration file of the software project. When these software developments are completed and tested, when deployed in the production environment, the access targets in these projects need to be modified to the IP addresses in the production environment so that the services can be carried out normally.
[0035] Due to the automotive cloud service, the number of vehicles served may reach millions or even tens of millions. In order to ensure the overall availability, stability and throughput of the automotive cloud service, it is necessary to deploy the production environment in multiple availability zones. In different availability zones, the access target address of all deployed software projects needs to be configured as the IP address in the availability zone. This situation further aggravates the reduction in the efficiency of production environment deployment and the increase in errors and omissions. In some cases, car companies also need to deploy automotive cloud service sites in different overseas regions. When deploying overseas, all deployed software projects also need to be adjusted and configured to the target IP address of the overseas region; in addition, when deploying overseas, it may also involve collaboration with teams at different overseas sites, and language differences may further aggravate the reduction in the efficiency of production environment deployment and the increase in errors and omissions. At this time, the complexity and time consumption of troubleshooting and solving configuration factors may increase exponentially. In order to solve the above problems, a cloud service deployment method of the present application is proposed, as follows.
[0036] Reference Figure 1 , which shows a step flow chart of a cloud service deployment method provided in an embodiment of the present application.
[0037] Step 101, deploy a private DNS server in each availability zone where the cloud service is to be deployed; the configuration file of the private DNS server includes the correspondence between the domain name and the IP address of the availability zone.
[0038] In the embodiment of the present invention, a private DNS server can provide a DNS resolution service. Building a private DNS server locally or within an enterprise can protect the data security and privacy of users. A private DNS server can customize domain name resolution rules and map domain names to corresponding IP addresses. Private DNS server resolution can avoid problems such as DNS hijacking and DNS pollution, protect user data security and privacy, and improve the speed and reliability of domain name resolution, reducing access delays and packet loss rates.
[0039] Furthermore, when deploying cloud services, the same cloud service can be deployed to different availability zones to divert users to different availability zones for access, thereby improving the overall availability, stability, and throughput of the software system. A private DNS server can be deployed in each availability zone where the cloud service is to be deployed. The service scope of the private DNS server only includes the corresponding availability zone, that is, the availability zones are isolated from each other.
[0040] The configuration file of the private DNS server is used to define the correspondence between the domain name and the IP address, so as to resolve the target domain name to be accessed by the cloud service in the availability zone through the private DNS server. In order to avoid the need to modify the configuration information of the cloud service itself to adapt to each availability zone every time when the cloud service is deployed in different availability zones. The configuration file of the private DNS server in this application includes the correspondence between the domain name and the IP address of the availability zone. For the same cloud service, when it is deployed in different availability zones, the domain name does not need to be changed. Only the IP address in the configuration file of the private DNS server needs to be changed to the IP address of the availability zone.
[0041] Optionally, step 101 includes:
[0042] Sub-step 1011, configuring the configuration files of each private DNS server;
[0043] The domain names contained in the configuration files of the private DNS servers are the same, and the IP addresses in the configuration files of the private DNS servers are the IP addresses of the available zones served by the private DNS servers.
[0044] In an embodiment of the present invention, the domain names contained in the configuration files of each private DNS server are the same, and the IP addresses in the configuration files of each private DNS server are the IP addresses of the availability zones served by each of the private DNS servers. For example, cloud service 1 declares the domain name of MySQL as: db.url=jdbc:mysql: / / mysql-1.zone.local:3306 / ... When deployed to availability zone 1, the private DNS server of availability zone 1 resolves the domain name address of MySQL to IP-1, and when deployed to availability zone 2, the private DNS server of availability zone 2 resolves the domain name address of MySQL to IP-2. That is, the domain name of the service declared in the cloud service's own configuration does not need to be changed. When resolving, the private DNS server in each availability zone can resolve it to the address of the availability zone according to the configuration file, thereby realizing efficient deployment of cloud services in multiple availability zones.
[0045] Optionally, sub-step 1011 includes:
[0046] Sub-step 10111, configuring the correspondence between the IP address and the domain name of the reverse proxy middleware in the configuration file; the reverse proxy middleware is used to proxy Internet services.
[0047] In the embodiment of the present invention, the automotive cloud service in the development and testing environment is usually deployed in the enterprise intranet environment, and it is often impossible to directly access Internet services for security reasons. In this case, Haproxy or Nginx and other reverse proxy middleware can be deployed to proxy external Internet services, and the service address after the proxy is also mapped to a custom domain name in the configuration file of the private DNS server, so that the automotive cloud service developed by the developer and the automotive cloud service in the development and testing environment can still declare the address and port of the access target in the form of a domain name in the software configuration.
[0048] Optionally, step 101 includes:
[0049] Sub-step 1012, deploying a k8s container cluster in each availability zone;
[0050] Sub-step 1013, deploying the private DNS server in each of the k8s container clusters.
[0051] In an embodiment of the present invention, for a production environment, each availability zone can be deployed using an independent Kubernetes container cluster. In the Kubernetes container cluster of each availability zone in the production environment, a private DNS server with a deployment scope of the availability zone is set to DNS_PROD_ZONE, and its domain name resolution range can only include the availability zone to improve security.
[0052] Furthermore, in each availability zone of the production environment, the corresponding middleware and service agents can be deployed according to the domain name and related annotation information defined by the private DNS server used during development, and the IP of these middleware or service agents in the availability zone can be recorded. In this way, in the DNS_PROD_ZONE of each availability zone in the production environment, all domain name configurations in the private DNS server during development are copied to the DNS_PROD_ZONE, and then in the DNS_PROD_ZONE, the IP pointed to by each domain name is modified to the IP of the corresponding middleware or service agent in the availability zone, thereby completing the DNS_PROD_ZONE configuration in each availability zone. At this point, the DNS_PROD_ZONE in each availability zone can perform domain name resolution for the relevant middleware or service agent in the availability zone, and the DNS_PROD_ZONEs in different availability zones do not interfere with each other.
[0053] Step 102, obtaining the cloud service to be deployed; the cloud service declares the target domain name of the cloud service, the target domain name is declared in a preset format, and for the same cloud service, when deployed in different availability zones, the target domain name is consistent.
[0054] In an embodiment of the present invention, for example, when cloud service 1 is deployed in a production environment, the software configuration remains unchanged, such as the MySQL configuration remains unchanged: "db.url=jdbc:mysql: / / mysql-1.zone.local:3306 / ...". Take deployment in production environment availability zone 1 as an example, and other availability zones are analogous. The "mysql-1.zone.local" domain name in the private DNS server in availability zone 1 of the production environment is the same as the "mysql-1.zone.local" domain name in the private DNS server in availability zone 2, but in availability zone 2, "mysql-1.zone.local" points to "MySQL instance 0-1", whose IP is "IP0-1"; while "mysql-1.zone.local" in availability zone 1 of the production environment points to "MySQL instance 1-1" in availability zone 1, whose IP is "IP1-1". That is, for the same cloud service, when deployed in different availability zones, the target domain name is consistent, so that when deployed in different availability zones, there is no need to repeatedly modify the IP address in the configuration information of the cloud service, thereby improving the configuration efficiency of the cloud service.
[0055] Step 103: for any available zone, resolve the target domain name of the cloud service according to the configuration file, so that the cloud service to be deployed can correctly access the IP address corresponding to the target domain name when deployed in the available zone.
[0056] In the embodiment of the present invention, for any availability zone, the target domain name of the cloud service can be resolved according to the configuration file, so that the cloud service to be deployed can correctly access the IP address corresponding to the target domain name when it is deployed in the availability zone. That is, the private DNS server corresponding to each availability zone needs to be configured with an IP address to ensure that the IP address is the address of the availability zone, so that when the cloud service is deployed to the availability zone, the domain name requested by the cloud service can be correctly resolved.
[0057] Optionally, the private DNS server includes multiple DNS nodes, and step 103 includes:
[0058] Sub-step 1031, obtaining the operating status of each DNS node;
[0059] Sub-step 1032, determining a target DNS node from a plurality of DNS nodes according to the running status to resolve a target domain name of the cloud service.
[0060] Optionally, sub-step 1032 includes:
[0061] Sub-step 10321, according to the running status, selecting a DNS node with the longest idle time from each DNS node as a target DNS node to resolve the target domain name of the cloud service; or,
[0062] Sub-step 10322, according to the running status, select the DNS node with the smallest load from each DNS node as the target DNS node to resolve the target domain name of the cloud service.
[0063] In an embodiment of the present invention, a private DNS server includes multiple DNS nodes, each of which can provide domain name resolution services independently. Multiple DNS nodes provide the same DNS resolution service to the outside through load balancing to achieve high availability. The operating status of a DNS node can reflect the current load of the DNS node or whether it is idle and other information. For example, when determining the DNS node for resolving a domain name, it can be determined based on the load status of each DNS node, and sorted according to the load status of each DNS node. The DNS node with the smallest load is selected to resolve the target domain name of the cloud service, or the DNS node with the longest space time is selected to resolve the target domain name of the cloud service. The embodiments of the present application are not limited here.
[0064] Optionally, the method further comprises:
[0065] Step 104: In the test environment for the cloud service, configure the DNS of the test device to point to the private DNS server in the availability zone where the test device is located, and the private DNS server points to the public DNS server.
[0066] In an embodiment of the present invention, before a cloud service is deployed to each availability zone of a production environment, it needs to be developed and verified in a development and testing environment. When developing a testing environment, the definition of the domain name can be directly used in the production environment to reduce the workload of domain name configuration, so that the developed cloud service can be directly deployed in each availability zone.
[0067] Specifically, in the development and testing environment of the automotive cloud service, a private DNS server with a scope of application for the development and testing environment can be deployed. The private DNS server of the development and testing environment is defined as DNS_DEV, for example. On the personal computer used for the development of the automotive cloud service, the developer can configure the DNS server to point to DNS_DEV. At this time, since DNS_DEV points to the DNS of the enterprise, the personal computer's network access within the enterprise will not be affected. When the developer develops the automotive cloud service, it involves the automotive cloud service's access to middleware or external services. The domain name of each corresponding middleware or service can be defined in DNS_DEV first, and the domain name resolution can be performed in DNS_DEV. Then, the address and port of the access target can be declared in the form of a domain name in the software configuration of the automotive cloud service. For example, the access address and port of MySQL declared in the automotive cloud service are: db.url=jdbc:mysql: / / mysql-1.zone.local:3306 / ...
[0068] In addition, the domain name definition can use a custom domain name suffix, such as defining the suffix as .zone.local, to avoid conflicts with other domain name addresses of the enterprise or the Internet. In addition, to facilitate the subsequent deployment of the production environment, each domain name declaration will be annotated. The annotation specification is agreed to be: business domain-middleware type-purpose. An example of annotation is: vehicle access service domain-mysql-vehicle information database, which facilitates deployment collaboration between various teams when deployed in various availability zones.
[0069] Furthermore, the container cluster of the development and testing environment needs to configure DNS to point to DNS_DEV. The software configuration of the automotive cloud service in the container also declares the address and port of the access target in the form of a domain name, thereby realizing the development and test deployment of the automotive cloud service. The same method can be used to access related middleware or services.
[0070] The private DNS server of the development and testing environment can also point to the public DNS server, or the private DNS server can first point to the enterprise DNS server and then to the public DNS server, which can ensure that the developer's personal computer can access the enterprise intranet or the Internet normally without being affected by the development process.
[0071] refer to Figure 2 , Figure 2A schematic diagram of a method for developing automotive cloud services in a development and testing environment is shown. First, a DNS instance, i.e., a private DNS server, is deployed in the development and testing environment. The private DNS server is set to DNS_DEV. Furthermore, the parent DNS of DNS_DEV is set to the DNS of the enterprise. Since the parent DNS of the enterprise DNS is the DNS of the Internet, DNS_DEV has the ability to resolve the internal domain names of the enterprise and the Internet domain names. On the personal computer used for the development of automotive cloud services, the developer changes the default configured enterprise DNS server to DNS_DEV. At this point, the developer can access the internal website of the enterprise and the Internet website normally.
[0072] When a developer develops an automotive cloud service (such as cloud service 1), it involves the access of the automotive cloud service to middleware or external services. First, the middleware or service to be accessed is defined in DNS_DEV for domain name resolution, and a standard comment is added for each domain name resolution. In this embodiment, for example, the custom domain name suffix can be agreed to be zone.local; the agreed standard comment format is: business domain-middleware type-purpose, which is convenient for subsequent modification of the content in the configuration file.
[0073] like Figure 3 As shown, Figure 3 is a configuration example of DNS_DEV. Figure 3 The configuration example "IP0-1 mysql-1.zone.local" domain name resolution configuration is used to illustrate. Among them, in this embodiment, the business database that "Cloud Service 1" needs to access is defined as "mysql-1.zone.local", and the IP address of the database is "IP0-1". Thus, the domain name resolution configuration obtained is "IP0-1 mysql-1.zone.local". Furthermore, the domain name resolution configuration is annotated in the standard comment format as "#Vehicle Access Service Domain-mysql-Vehicle Information Database". When developers develop automotive cloud services, they declare the address and port of the access target in the form of a domain name in the software configuration of the automotive cloud service. For example Figure 4 As shown, it is an example of software configuration of automobile cloud service. In this embodiment, when developing "cloud service 1", the access address and port of the business database MySQL that needs to be accessed are declared in the software configuration of "cloud service 1" as: db.url=jdbc:mysql: / / mysql-1.zone.local:3306 / ...
[0074] Therefore, the automotive cloud service 1 developed by the developer can access the corresponding middleware or service in the development and testing environment through the domain name resolution provided by DNS_DEV configured on the personal computer, which facilitates its development and debugging.
[0075] For the container cluster in the development and testing environment, you need to configure the DNS of the container cluster to point to DNS_DEV. In this way, the automotive cloud service developed by the developer can be directly deployed in the container cluster in the development and testing environment without modifying the software configuration. Figure 2 As shown, in this embodiment, the "Cloud Service 1" deployed in the "Development and Testing Environment Container Cluster 0" uses exactly the same software configuration as the "Cloud Service 1" during personal computer development. Both can correctly access the corresponding middleware or service in the development and testing environment through the domain name resolution provided by DNS_DEV.
[0076] The automotive cloud services in the development and testing environment are usually deployed in the enterprise intranet environment, and cannot directly access Internet services for security reasons. In this case, by deploying reverse proxy middleware such as Haproxy or Nginx, external Internet services are proxied, and the service address after the proxy is also mapped to a custom domain name in DNS_DEV. In this way, the automotive cloud services developed by developers and the automotive cloud services in the development and testing environment can access Internet services in the form of custom domain names in the enterprise intranet.
[0077] In this embodiment, Figure 2 As shown in the figure, in the middleware cluster of the development and test environment, Haproxy is deployed and its network with the Internet is connected, and Haproxy provides Internet proxy services for the development and test environment; at the same time, Figure 3 As shown, configure the domain name internet.zone.local in DNS_DEV to point to the Haproxy; further, as Figure 4 As shown, in the software configuration of the automobile cloud service, taking access to the Internet SMS service as an example, the software configuration in the cloud service 1 is sms.url=http: / / internet.zone.local / sms / api / ... At this time, the cloud service 1 accesses http: / / internet.zone.local / sms / api / ..., which is equivalent to accessing Haproxy. Through the proxy provided by Haproxy, the SMS service on the Internet can be accessed.
[0078] Furthermore, in terms of the deployment of the production environment in the local area of the automotive cloud service:
[0079] like Figure 5 The figure shows a schematic diagram of a large-scale automotive cloud service site deployment in a regional production environment. In this embodiment, a large-scale automotive cloud service site serving millions of vehicles can be deployed in a production environment in a multi-availability zone manner. The deployment steps are:
[0080] Each availability zone in the production environment is deployed using an independent Kubernetes container cluster.
[0081] In the Kubernetes container cluster in each availability zone of the production environment, deploy a DNS instance with a scope of that availability zone, and set the DNS instance to DNS_PROD_ZONE. In each availability zone of the production environment, deploy the corresponding middleware and service agents according to the domain name and related annotation information defined by DNS_DEV during development, and record the IP addresses of these middleware or service agents in the availability zone.
[0082] In the DNS_PROD_ZONE of each availability zone in the production environment, copy all domain name configurations in DNS_DEV to DNS_PROD_ZONE, and then modify the IP pointed to by each domain name in DNS_PROD_ZONE to the IP of the corresponding middleware or service agent in the availability zone, so as to complete the DNS_PROD_ZONE configuration in each availability zone. At this point, the DNS_PROD_ZONE in each availability zone can perform domain name resolution for the relevant middleware or service agent in the availability zone, and the DNS_PROD_ZONEs in different availability zones do not interfere with each other.
[0083] In this embodiment, Figure 4 As shown, when cloud service 1 is deployed in a production environment, the software configuration remains unchanged, such as the MySQL configuration remains unchanged: "db.url = jdbc:mysql: / / mysql-1.zone.local:3306 / ...". Figure 5 As shown in the figure, we take the production environment availability zone 1 as an example, and other availability zones are analogous. The "mysql-1.zone.local" domain name in DNS instance 1 (DNS_PROD_ZONE in the availability zone) in the production environment availability zone 1 is the same as Figure 3 The domain name "mysql-1.zone.local" shown in the figure is the same. The difference is that in Figure 3, "mysql-1.zone.local" points to "MySQL Instance 0-1" in the development and test environment, and its IP is "IP0-1"; while in Figure 5, "mysql-1.zone.local" in the production environment Availability Zone 1 points to "MySQL Instance 1-1" in Availability Zone 1, and its IP is "IP1-1".
[0084] Through the above steps, hundreds of automotive cloud services can be directly deployed in each availability zone of the production environment without modifying the software configuration after development. The automotive cloud services in each availability zone can automatically complete the addressing connection or access of the middleware or proxy services in the availability zone in combination with the DNS_PROD_ZONE in the availability zone, so that each availability zone can provide external services correctly.
[0085] In terms of overseas regional production environment deployment of automotive cloud services:
[0086] like Figure 6 As shown, it is a schematic diagram of an embodiment of regional site deployment of a large-scale automotive cloud service site in various overseas regions. When the automotive cloud service is deployed in regional sites in multiple overseas regions, each overseas regional site can be independently deployed according to the deployment method and steps of the production environment site in the local area.
[0087] In this embodiment, one availability zone is deployed at each overseas regional site for illustration, and the deployment steps are as follows:
[0088] Each overseas site is a geographically and physically independent cloud environment. It can use public cloud environments such as AWS, Microsoft Cloud, or Google Cloud in combination with the regulations and local conditions of different overseas regions. Use an independent Kubernetes container cluster for deployment in each availability zone of the production environment of each overseas site. In the Kubernetes container cluster of each availability zone of the production environment of each overseas site, a DNS instance with a scope of deployment for the availability zone is set to DNS_OVERSEA. DNS_OVERSEA does not set its parent DNS to point to the Internet DNS, and its domain name resolution range is limited to the availability zone of the overseas site, which has high security. In each availability zone of the production environment of each overseas site, the corresponding middleware and service agents are deployed according to the domain name and related annotation information defined by DNS_DEV during development, as in the local regional production environment, and the IP addresses of these middleware or service agents in the availability zone are recorded.
[0089] Similar to the deployment method of the local regional production environment, the developed automotive cloud service does not require modification of the software configuration and can be directly deployed in each availability zone of the production environment of each overseas regional site. The automotive cloud service in each availability zone, combined with the DNS_OVERSEA in the availability zone, can automatically complete the addressing connection or access of the middleware or proxy service in the availability zone, so that each availability zone in the production environment of each overseas site can provide services to the outside world correctly.
[0090] To adapt to the characteristics of different regions, overseas regional sites can adapt existing automotive cloud services or customize and develop new automotive cloud services. At this time, a unique automotive cloud service development and testing environment can be built at overseas regional sites in accordance with the method mentioned in the development and testing of the automotive cloud service of the present invention, and overseas localized development and deployment testing can be performed. After the test passes, it is deployed in the overseas production environment deployment method of the automotive cloud service of the present invention.
[0091] Optionally, the method further comprises:
[0092] Step 105, compare the configuration files of the corresponding private DNS servers in the test environment with the configuration files of the private DNS servers in each availability zone in the production environment to verify whether the configuration files of the private DNS servers in each availability zone in the production environment are complete.
[0093] Optionally, step 105 includes:
[0094] Sub-step 1051, comparing the first domain name in the configuration file of the corresponding private DNS server in the test environment with the second domain name in the configuration file of the private DNS server corresponding to each availability zone in the production environment, to determine whether the IP addresses corresponding to the first domain name and the second domain name are the same; the first domain name and the second domain name are the same domain name;
[0095] Sub-step 1052, if the IP addresses corresponding to the first domain name and the second domain name are different, then the configuration files of the DNS servers in each availability zone in the production environment are configured;
[0096] Sub-step 1053, if the IP addresses corresponding to the first domain name and the second domain name are the same, then the configuration files of the DNS servers in each availability zone in the production environment are not completed.
[0097] In the embodiment of the present invention, hundreds of thousands of large-scale automotive cloud services developed in the form of microservices use the same software configuration from the beginning of development to the final deployment of the application, and the differences in the deployment environment are shielded by private DNS; and the configuration of private DNS can be compared and replaced by mapping IP in combination with the deployment environment. Thus, the management of the development, testing and deployment of large-scale automotive cloud services is greatly simplified, and the same method and steps can be used to deploy the local production environment and the overseas site production environment. For the software of the automotive cloud service, it is equivalent to no environmental difference, and the automotive cloud service function can be fully debugged and verified in the development and testing stage; after changing the environment, it is only necessary to check the configuration of the private DNS in the two environments to see whether the corresponding environment replacement is completed one by one, and then perform a simple regression verification. For example, for the same domain name, it is determined whether the corresponding IP address in the production environment has been modified to the IP address of the available zone in the production environment. If it has been modified, it indicates that the production environment has been replaced. If it has not been modified, it indicates that the production environment has not been completely replaced.
[0098] Thus, the deployment and release efficiency of large-scale automotive cloud service production environments is greatly improved, and the abnormal access of real customers to automotive cloud services due to configuration errors and omissions can be minimized, and the potential security risks caused by this can be avoided. In particular, the development and deployment of cloud services in different regions can be carried out in accordance with the methods and steps of the present invention, which can greatly simplify the communication between teams in each region in terms of deployment, and to a large extent avoid the situation in the past when configuration errors and omissions caused by environmental differences require a lot of manpower and material resources to be spent on troubleshooting configuration problems.
[0099] In summary, in the embodiments of the present application, a private DNS server is deployed in each availability zone of the cloud service to be deployed; the configuration file of the private DNS server includes the correspondence between the domain name and the IP address of the availability zone; the cloud service to be deployed is obtained; the target domain name of the cloud service is declared in the cloud service, and the target domain name is declared in a preset format, and for the same cloud service, the target domain name is consistent when deployed in different availability zones; for any availability zone, the target domain name of the cloud service is parsed according to the configuration file, so that the IP address corresponding to the target domain name can be correctly accessed when the cloud service to be deployed is deployed in the availability zone. When the method of the present application is used for large-scale cloud service deployment, the same software configuration can be used for deployment in different availability zones, and the differences in deployment environments in different availability zones are shielded by the private DNS server, that is, the cloud service does not need to modify its own configuration information when it is deployed, and only needs to replace the IP address corresponding to the domain name in the configuration file corresponding to the private DNS server in the different availability zones to be deployed with the IP address in the availability zone, so that there is no need to modify the configuration file of the cloud service itself every time it is deployed, which greatly simplifies the management of development, testing and deployment of large-scale cloud services, and largely avoids the situation where a lot of manpower and material resources are needed to be spent on troubleshooting configuration problems when configuration errors are caused by environmental differences.
[0100] refer to Figure 7 , which shows a block diagram of a cloud service deployment device 20 provided in an embodiment of the present application, the device comprising:
[0101] A deployment module 201 is used to deploy a private DNS server in each availability zone of the cloud service to be deployed; the configuration file of the private DNS server includes a correspondence between a domain name and an IP address of the availability zone;
[0102] The acquisition module 202 is used to acquire the cloud service to be deployed; the cloud service declares the target domain name of the cloud service, the target domain name is declared in a preset format, and for the same cloud service, when deployed in different availability zones, the target domain name is consistent;
[0103] The parsing module 203 is used to parse the target domain name of the cloud service according to the configuration file for any available zone, so that the cloud service to be deployed can correctly access the IP address corresponding to the target domain name when deployed in the available zone.
[0104] Optionally, the deployment module includes:
[0105] Configuration submodule, used to configure the configuration files of each private DNS server;
[0106] The domain names contained in the configuration files of the private DNS servers are the same, and the IP addresses in the configuration files of the private DNS servers are the IP addresses of the available zones served by the private DNS servers.
[0107] Optionally, the configuration module includes:
[0108] A mapping submodule is used to configure the corresponding relationship between the IP address and the domain name of the reverse proxy middleware in the configuration file; the reverse proxy middleware is used to proxy Internet services.
[0109] Optionally, the deployment module includes:
[0110] The first submodule is used to deploy a k8s container cluster in each availability zone.
[0111] The second submodule is used to deploy the private DNS server in each of the k8s container clusters.
[0112] Optionally, the private DNS server includes multiple DNS nodes, and the resolution module includes:
[0113] The acquisition submodule is used to obtain the operating status of each DNS node;
[0114] The judgment submodule is used to determine a target DNS node from multiple DNS nodes to resolve the target domain name of the cloud service according to the running status.
[0115] Optionally, the judgment submodule includes:
[0116] A first judgment unit is configured to select, according to the running status, a DNS node with the longest idle time from each DNS node as a target DNS node to resolve a target domain name of the cloud service; or
[0117] The second judgment unit is used to select the DNS node with the smallest load from each DNS node as the target DNS node to resolve the target domain name of the cloud service according to the operating status.
[0118] Optionally, the device further comprises:
[0119] The test environment configuration module is used to configure the DNS of the test device to point to the private DNS server in the availability zone where the test device is located, and the private DNS server points to the public DNS server in the test environment for the cloud service.
[0120] Optionally, the device further comprises:
[0121] The verification module is used to compare the configuration files of the corresponding private DNS servers in the test environment with the configuration files of the private DNS servers in each availability zone in the production environment to verify whether the configuration files of the private DNS servers in each availability zone in the production environment are complete.
[0122] Optionally, the verification module includes:
[0123] A comparison submodule, used to compare the first domain name in the configuration file of the corresponding private DNS server in the test environment with the second domain name in the configuration file of the private DNS server corresponding to each available zone in the production environment, to determine whether the IP addresses corresponding to the first domain name and the second domain name are the same; the first domain name and the second domain name are the same domain name;
[0124] A first verification submodule, configured to complete configuration of the configuration files of the DNS servers in each available zone in the production environment if the IP addresses corresponding to the first domain name and the second domain name are different;
[0125] The first verification submodule: if the IP addresses corresponding to the first domain name and the second domain name are the same, then the configuration files of the DNS servers in each available zone in the production environment are not completed.
[0126] In summary, in the embodiments of the present application, a private DNS server is deployed in each availability zone of the cloud service to be deployed; the configuration file of the private DNS server includes the correspondence between the domain name and the IP address of the availability zone; the cloud service to be deployed is obtained; the target domain name of the cloud service is declared in the cloud service, and the target domain name is declared in a preset format, and for the same cloud service, the target domain name is consistent when deployed in different availability zones; for any availability zone, the target domain name of the cloud service is parsed according to the configuration file, so that the IP address corresponding to the target domain name can be correctly accessed when the cloud service to be deployed is deployed in the availability zone. When the method of the present application is used for large-scale cloud service deployment, the same software configuration can be used for deployment in different availability zones, and the differences in deployment environments in different availability zones are shielded by the private DNS server, that is, the cloud service does not need to modify its own configuration information when it is deployed, and only needs to replace the IP address corresponding to the domain name in the configuration file corresponding to the private DNS server in the different availability zones to be deployed with the IP address in the availability zone, so that there is no need to modify the configuration file of the cloud service itself every time it is deployed, which greatly simplifies the management of development, testing and deployment of large-scale cloud services, and largely avoids the situation where a lot of manpower and material resources are needed to be spent on troubleshooting configuration problems when configuration errors are caused by environmental differences.
[0127] Figure 8is a block diagram of an electronic device 600 according to an exemplary embodiment. For example, the electronic device 600 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0128] Reference Figure 8 , the electronic device 600 may include one or more of the following components: a processing component 602 , a memory 604 , a power component 606 , a multimedia component 608 , an audio component 610 , an input / output (I / O) interface 612 , a sensor component 614 , and a communication component 616 .
[0129] The processing component 602 generally controls the overall operation of the electronic device 600, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 602 may include one or more processors 620 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 602 may include one or more modules to facilitate the interaction between the processing component 602 and other components. For example, the processing component 602 may include a multimedia module to facilitate the interaction between the multimedia component 608 and the processing component 602.
[0130] The memory 604 is used to store various types of data to support the operation of the electronic device 600. Examples of such data include instructions for any application or method operating on the electronic device 600, contact data, phone book data, messages, pictures, multimedia, etc. The memory 604 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0131] The power supply component 606 provides power to the various components of the electronic device 600. The power supply component 606 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 600.
[0132] The multimedia component 608 includes a screen that provides an output interface between the electronic device 600 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 608 includes a front camera and / or a rear camera. When the electronic device 600 is in an operating mode, such as a shooting mode or a multimedia mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and the rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0133] The audio component 610 is used to output and / or input audio signals. For example, the audio component 610 includes a microphone (MIC), and when the electronic device 600 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is used to receive an external audio signal. The received audio signal can be further stored in the memory 604 or sent via the communication component 616. In some embodiments, the audio component 610 also includes a speaker for outputting audio signals.
[0134] I / O interface 612 provides an interface between processing component 602 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0135] The sensor assembly 614 includes one or more sensors for providing various aspects of status assessment for the electronic device 600. For example, the sensor assembly 614 can detect the open / closed state of the electronic device 600, the relative positioning of the components, such as the display and keypad of the electronic device 600, and the sensor assembly 614 can also detect the position change of the electronic device 600 or a component of the electronic device 600, the presence or absence of contact between the user and the electronic device 600, the orientation or acceleration / deceleration of the electronic device 600, and the temperature change of the electronic device 600. The sensor assembly 614 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 614 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 614 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0136] The communication component 616 is used to facilitate wired or wireless communication between the electronic device 600 and other devices. The electronic device 600 can access a wireless network based on a communication standard, such as WiFi, a carrier network (such as 2G, 3G, 4G or 5G), or a combination thereof. In an exemplary embodiment, the communication component 616 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 616 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0137] In an exemplary embodiment, the electronic device 600 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to implement a cloud service deployment method provided in an embodiment of the present application.
[0138] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 604 including instructions, and the instructions can be executed by a processor 620 of an electronic device 600 to perform the above method. For example, the non-transitory storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0139] Fig. 9 is a block diagram of an electronic device 700 according to an exemplary embodiment. For example, the electronic device 700 may be provided as a server. Fig. 9 , the electronic device 700 includes a processing component 722, which further includes one or more processors, and a memory resource represented by a memory 732, for storing instructions that can be executed by the processing component 722, such as an application. The application stored in the memory 732 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 722 is configured to execute instructions to perform a cloud service deployment method provided in an embodiment of the present application.
[0140] The electronic device 700 may also include a power supply component 726 configured to perform power management of the electronic device 700, a wired or wireless network interface 750 configured to connect the electronic device 700 to a network, and an input / output (I / O) interface 758. The electronic device 700 may operate based on an operating system stored in the memory 732, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™ or the like.
[0141] An embodiment of the present application also provides a computer program product, including a computer program, which implements the cloud service deployment method when executed by a processor.
[0142] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the application disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0143] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A cloud service deployment method, It is characterized in that The method comprises: Deploy a private DNS server in each availability zone of the cloud service to be deployed; the configuration file of the private DNS server includes the correspondence between the domain name and the IP address of the availability zone; Obtaining a cloud service to be deployed; the cloud service declares a target domain name of the cloud service, the target domain name is declared in a preset format, and for the same cloud service, when deployed in different availability zones, the target domain name is consistent; For any available zone, the target domain name of the cloud service is parsed according to the configuration file, so that the cloud service to be deployed can correctly access the IP address corresponding to the target domain name when deployed in the available zone.
2. The method according to claim 1, It is characterized in that Deploying a private DNS server in each availability zone of the cloud service to be deployed includes: Configure the configuration files of each private DNS server; The domain names contained in the configuration files of the private DNS servers are the same, and the IP addresses in the configuration files of the private DNS servers are the IP addresses of the available zones served by the private DNS servers.
3. The method according to claim 2, It is characterized in that The configuration files for configuring each private DNS server include: The corresponding relationship between the IP address and the domain name of the reverse proxy middleware is configured in the configuration file; the reverse proxy middleware is used to proxy Internet services.
4. The method according to claim 1, It is characterized in that Deploying a private DNS server in each availability zone of the cloud service to be deployed includes: Deploy a k8s container cluster in each availability zone; The private DNS server is deployed in each of the k8s container clusters.
5. The method according to claim 1, It is characterized in that The private DNS server includes a plurality of DNS nodes, and the step of resolving the target domain name of the cloud service according to the configuration file includes: Get the running status of each DNS node; A target DNS node is determined from a plurality of DNS nodes according to the running status to resolve a target domain name of the cloud service.
6. The method according to claim 5, It is characterized in that The step of determining a target DNS node from a plurality of DNS nodes according to the running state to resolve a target domain name of the cloud service includes: According to the running status, a DNS node with the longest idle time is selected from each DNS node as a target DNS node to resolve a target domain name of the cloud service; or, According to the running status, a DNS node with the smallest load is selected from each DNS node as a target DNS node to resolve the target domain name of the cloud service.
7. The method according to claim 1, It is characterized in that The method further comprises: In the test environment for the cloud service, the DNS of the test device is configured to point to a private DNS server in the availability zone where the test device is located, and the private DNS server points to a public DNS server.
8. The method according to claim 1, It is characterized in that The method further comprises: Compare the configuration files of the corresponding private DNS servers in the test environment with the configuration files of the private DNS servers in each availability zone in the production environment to verify whether the configuration files of the private DNS servers in each availability zone in the production environment are complete.
9. The method according to claim 7, It is characterized in that The configuration file of the private DNS server corresponding to the test environment is compared with the configuration files of the private DNS servers corresponding to each availability zone in the production environment to verify whether the configuration files of the private DNS servers corresponding to each availability zone in the production environment are complete, including: Compare the first domain name in the configuration file of the corresponding private DNS server in the test environment with the second domain name in the configuration file of the private DNS server corresponding to each availability zone in the production environment to determine whether the IP addresses corresponding to the first domain name and the second domain name are the same; the first domain name and the second domain name are the same domain name; If the IP addresses corresponding to the first domain name and the second domain name are different, the configuration files of the DNS servers in each availability zone in the production environment are configured; If the IP addresses corresponding to the first domain name and the second domain name are the same, the configuration files of the DNS servers in each availability zone in the production environment are not fully configured.
10. A cloud service deployment device, It is characterized in that The device comprises: A deployment module, used to deploy a private DNS server in each availability zone of the cloud service to be deployed; the configuration file of the private DNS server includes a correspondence between the domain name and the IP address of the availability zone; An acquisition module is used to acquire a cloud service to be deployed; the cloud service declares a target domain name of the cloud service, the target domain name is declared in a preset format, and for the same cloud service, when deployed in different availability zones, the target domain name is consistent; The parsing module is used to parse the target domain name of the cloud service according to the configuration file for any available zone, so that the cloud service to be deployed can correctly access the IP address corresponding to the target domain name when deployed in the available zone.
11. An electronic device, It is characterized in that The method comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the method according to any one of claims 1 to 9 are implemented.
12. A readable storage medium, It is characterized in that The readable storage medium stores a program or an instruction, and when the program or the instruction is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.
Citation Information
Cited By
Domain name resolution method and device, domain name server and computer program product
CN119484478A
Virtual cloud simulation within public cloud network
US20260180868A1
