Application program configuration method based on container cloud, electronic equipment and storage medium
By obtaining the target business specifications of the application and generating configuration resources, automated configuration processing on the container cloud is realized, solving the user's need for professional knowledge when configuring a multi-container system, and improving the automation level and user experience.
Patent Information
- Application Number
- CN202411200799.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-29
- Publication Date
- 2024-09-27
- Estimated Expiration
- Not applicable · inactive patent
Smart Images

Figure CN118708236A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of cloud computing technology, and in particular to an application configuration method based on a container cloud, an electronic device, and a computer-readable storage medium. Background Art
[0002] In the cloud native of communication network infrastructure, containerization technology is a lightweight, portable virtualization solution used to package and run applications and their dependencies. Compared with traditional virtualization technologies (such as virtual machines), it is lighter and faster to start and run.
[0003] The current container management and orchestration solutions based on the Kubernetes (K8S) system have simplified the operational steps of container deployment, but still require users to have a lot of knowledge in related fields to build a system with multiple containers and complex dependencies, resulting in poor container management automation and user experience. Summary of the invention
[0004] The main technical problem solved by the present application is to provide an application configuration method, an electronic device and a computer-readable storage medium based on a container cloud, which can improve the automation level of application configuration.
[0005] To solve the above technical problems, a technical solution adopted in the present application is: to provide an application configuration method based on a container cloud, comprising: obtaining the pending business information of the application, the pending business information including the target business specifications of the application; generating configuration resources for deploying the application according to the target business specifications; and calling the configuration resources corresponding to the application from the container cloud for configuration processing.
[0006] To solve the above technical problems, another technical solution adopted in the present application is: to provide an electronic device, including a memory and a processor, wherein the memory stores program instructions, and the processor retrieves the program instructions from the memory to execute the above application configuration method.
[0007] In order to solve the above technical problems, another technical solution adopted by the present application is: providing a computer-readable storage medium including program data stored therein, wherein the program data is used to implement the above application configuration method when executed by a processor.
[0008] Beneficial effects of the present application: The application configuration method of the present application obtains the pending business information of the application, which includes the target business specifications of the application; generates configuration resources for deploying the application according to the target business specifications; and calls the configuration resources corresponding to the application from the container cloud for configuration processing. Thus, only the target business specifications of the application are needed to generate the configuration resources of the application, and the configuration processing of the application is realized, thereby simplifying the operation process and improving the automation level of the configuration of the application on the container cloud. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work, among which: Figure 1 is a flowchart of an exemplary embodiment of an application configuration method shown in the present application; Figure 2 yes Figure 1 A flowchart of an exemplary embodiment of step S110 in the application configuration method is shown; Figure 3 yes Figure 1 A flowchart of another exemplary embodiment of step S110 in the application configuration method is shown; Figure 4 It is a specific flow chart of an exemplary embodiment of the present application showing the expansion process of an application program; Figure 5 yes Figure 1 A flowchart of an exemplary embodiment of step S120 in the application configuration method is shown; Figure 6 yes Figure 1 A specific flow chart of an exemplary embodiment of step S120 in the application configuration method is shown; Figure 7 yes Figure 1 A flowchart of an exemplary embodiment of an upgrade process in an application configuration method is shown; Figure 8 yes Figure 1 A specific flow chart of an exemplary embodiment of an upgrade process in an application configuration method is shown; Fig. 9 It is a specific flow chart of an exemplary embodiment of the application configuration method shown in the present application; Fig.10is a structural diagram of an exemplary embodiment of an application configuration device shown in the present application; Fig.11 It is a structural schematic diagram of an embodiment of an electronic device provided by the present application; Fig.12 It is a structural schematic diagram of an embodiment of a computer-readable storage medium provided by the present application. DETAILED DESCRIPTION
[0010] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It will be appreciated that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for ease of description, only some but not all structures related to the present application are shown in the drawings. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the art without making creative work are within the scope of protection of the present application.
[0011] In order to facilitate understanding of the technical solutions of the embodiments of the present application, a brief introduction to the related technologies of the present application is first given as follows.
[0012] Container cloud refers to a cloud computing service platform built on container technology (such as Docker) and container orchestration platforms (such as Kubernetes). It provides an environment for container-based application deployment, management, and expansion, providing development teams with more efficient and flexible deployment and operation solutions.
[0013] Cloud-native: Cloud-native is a new system implementation paradigm for building, running, and managing software in a cloud environment. It is also an architectural practice that makes full use of cloud infrastructure and platform services, adapts to the cloud environment, and has key features such as (micro)services, elastic scaling, distribution, high availability, multi-tenancy, and automation.
[0014] Containerization technology: As a lightweight operating system-level virtualization technology, containerization technology isolates different processes through operating system isolation technology. Exemplarily, operating system isolation technology may include control groups (Linux control group, CGroup) and namespaces (namespace) under Linux. Containerization technology is different from hardware virtualization (hypervisor) technology. Containerization technology has no virtual hardware, and there is no operating system inside its container, only processes. Therefore, compared with virtual machines, containers are lighter and easier to manage. In addition, in the running state of the container, a set of common management operations are also defined for unified life cycle management of containers. Exemplarily, the management operations may include start, stop, pause, and delete.
[0015] The introduction of containerization technology in the evolution of telecom networks to cloud native has brought about an agile transformation in the development and operation (DevOps) of the telecom industry. Based on containerization technology, traditional large-grained single-body network functions are gradually deconstructed into services, and even further deconstructed into microservices. Each service-based function can be independently developed, delivered, and maintained, making version upgrades more frequent. In addition, the stable application programming interface (API) definition ensures the consistency and reliability of interface function calls, so that while the number of containerized network functions has increased dramatically, it will not bring an exponential increase in the workload of interoperability testing.
[0016] K8S: K8S is responsible for managing and orchestrating container objects in the container cloud. Container objects can be understood as instances of containers. The core idea of K8S is "everything is service-centric and everything revolves around services"; following this idea, the container application system it builds can not only run independently on physical machines, virtual machines or enterprise private clouds, but can also be hosted on public clouds.
[0017] Cloud-native applications usually use container technology (such as Docker) to package the application and its dependencies into lightweight, independent containers. This allows the application to run in a consistent manner in different environments and can be quickly deployed and expanded. Currently, the K8S system is widely used for container management and orchestration.
[0018] Currently, when implementing application containerization based on the K8S system, users are required to have a lot of relevant knowledge in professional technical fields. However, in actual applications, users often do not have professional knowledge in this field, so it is difficult for users to determine the corresponding configuration resources based on the pending business information of the application.
[0019] Based on this, this application proposes a container cloud-based application configuration method, electronic device, and computer-readable storage medium, which can simplify the configuration operation of the application. Figure 1 , Figure 1 It is a flowchart of an exemplary embodiment of the application configuration method shown in the present application.
[0020] The execution subject of the application configuration method may be a terminal device or a server or other processing device, wherein the terminal device may be a user equipment (UE), a computer, a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, etc. The execution subject of the application configuration method may also be an application configuration device. In some possible implementations, the application configuration method may be implemented by a processor calling a computer-readable instruction stored in a memory.
[0021] Specifically, the application configuration method of this embodiment includes the following steps: S110: Acquire the pending business information of the application, where the pending business information includes the target business specification of the application.
[0022] An application, also known as a software product, can refer to a computer software program used to complete a specific task or function. For example, an application can be designed as a big data processing program, such as license plate number clustering, license plate number recognition, etc. Application containerization refers to packaging an application and all its dependencies, configurations, and runtime environments into an independent container so that it can be easily deployed and run in different computing environments.
[0023] The business information to be processed includes information such as the target business specifications of the application and the operating environment of the application. Exemplarily, the target business specifications of the application refer to the definition and description of the application's needs and expectations in terms of functionality, performance, and operation, including the application's data processing volume, model calculation parameter volume, camera number, etc. In some embodiments, the target business specifications can be obtained by direct user input. In other embodiments, the user's input can also be converted to obtain the target business specifications. In other embodiments, the target business specifications can also be business specifications after expansion processing. In other embodiments, the target business specifications can also be business specifications of the upgraded application.
[0024] The application's operating environment includes the application's operating server, which can be a server automatically selected in the container cloud based on the application's characteristics, or a third-party server provided by the user. If the user provides a third-party server, the user is required to enter relevant information about the third-party server, including CPU, memory, etc.
[0025] The application configuration device receives the target business specification of the application input by the operation end, and determines the server of the application and other business information to be processed according to the application.
[0026] S120: Generate configuration resources for deploying the application program according to the target business specification.
[0027] Configuring resources means allocating and setting the required computer resources and services for applications to ensure that applications can run normally and perform tasks efficiently. Exemplarily, configuring resources includes chart packages, reserved resources, and resource files. A chart package is a Helm package that contains all resource definitions required to run applications, tools, or services in a Kubernetes cluster, and records information such as software versions and image information. Based on this package, the corresponding software installation package can be obtained. Chart packages can be used to deploy simple or complex applications, such as databases, message queues, web services, etc. Reserved resources refer to the corresponding usage resources that applications apply to the container cloud for the required components, including computing resources and storage resources. Resource files include user resources, database resources, queue resources, and other resources that each application applies to components for initialization. Components provide services for applications. Components include basic components, storage components, and computing scheduling components. Basic components are a series of big data basic services such as big data storage and distributed computing provided by the Hadoop ecosystem. The basic component tool is used to calculate the container description list (values file) of the basic components, resource files (initialization files of resources that the application depends on), reserved resources (storage resources and computing resources reserved by the container cloud, etc.), adjust the number of running instances based on information such as the number of servers, and output software lists, hardware resource lists and other information.
[0028] The application configuration device can generate configuration resources for deploying the application according to the target business specifications using the resource generation tool corresponding to the application, including the chart package, computing resources, storage resources, and queue resources of the application. The chart package also includes a values file (a container description list of a component collection).
[0029] S130: Calling configuration resources corresponding to the application from the container cloud to perform configuration processing.
[0030] After the application configuration device generates the configuration resources required for the deployment of the application according to the target business specifications of the application, it can apply to the container cloud for the corresponding configuration resources to configure the application. The application configuration device can also continuously maintain the configuration resources required by the application according to the configuration resources. Specifically, it continuously detects whether the configuration resources required by the application are running normally. If they fail to run normally, the application configuration device corrects the resources that are not running normally to make them run normally.
[0031] It can be seen that the application configuration method of the embodiment of the present application obtains the pending business information of the application, which includes the target business specifications of the application; generates the configuration resources for deploying the application according to the target business specifications; and calls the configuration resources corresponding to the application from the container cloud for configuration processing. Therefore, only the target business specifications of the application are needed to generate the configuration resources of the application, and the configuration processing of the application is realized, thereby simplifying the operation process and improving the automation level of the configuration of the application on the container cloud.
[0032] Based on the above embodiments, the embodiments of the present application adopt Figure 2 The flowchart details how to obtain the target business specifications of the application. Figure 2 , Figure 2 yes Figure 1 The flowchart of an exemplary embodiment of step S110 in the application configuration method is shown. Specifically, the process of obtaining the pending business information of the application in step S110 specifically includes the following steps: S210: Acquire other applications associated with the application from the container cloud.
[0033] The association relationship may refer to the existence of a dependency relationship between an application and other applications, including the application relying on other applications and the application being relied on by other applications. Exemplarily, when the input data of the application is the output data of other applications, it indicates that the application depends on other applications. For example, if the application is a license plate number recognition processing program and the other application is a license plate number clustering processing program, then the application depends on the license plate number clustering results of other applications when performing license plate number recognition.
[0034] The application and other applications can be configured in the container cloud at the same time, or in a sequential configuration order. The application and other applications can be different applications designed by the same user.
[0035] S220: Determine a target business specification of the application program according to the initial business specification of the application program and business specifications of other applications.
[0036] In this embodiment, the target business specification refers to the business specification obtained after converting the business specifications of each application program input by the user. Therefore, the business specification input by the user can be determined as the initial business specification, and the target business specification of the application program can be determined based on the initial business specification of the application program and the initial business specifications of other applications. Specifically, the initial business specification of the application program and the initial business specifications of other applications can be summed to obtain the target business specification of the application program. In other embodiments, the product of the initial business specification of the application program and the initial business specifications of other applications can also be determined as the target business specification of the application program.
[0037] Applications usually do not run in isolation during actual execution, but need to interact and collaborate with other applications to achieve the functional requirements of the application. Therefore, it is necessary to consider not only the business specifications handled by the application itself, but also the initial business specifications of other applications that are associated with the application, thereby improving the accuracy of the target business specifications of the application.
[0038] Based on the above embodiments, the embodiments of the present application adopt Figure 3 The flowchart details how to obtain the target business specifications of the application after expansion. Figure 3 , Figure 3 yes Figure 1 The flowchart of another exemplary embodiment of step S110 in the application configuration method is shown. Specifically, the process of obtaining the to-be-processed business information of the application in step S110 specifically includes the following steps: S310: In response to receiving the expansion instruction, the initial business specification of the application is expanded according to the expansion instruction to obtain the initial business specification after the expansion.
[0039] The expansion instruction is issued when the initial business specifications of the application need to be expanded. The expansion instruction includes expansion data, and the initial business specifications of the application are expanded through the expansion data to obtain the initial business specifications after expansion. It should be noted that the expansion instruction can be issued at any time, for example, before the initial business specifications are entered; or after the initial business specifications are entered and before the system backend is configured; or after the system backend configures the application and before the application is implemented; or during the implementation of the application, the expansion instruction can be issued to expand the business specifications of the application.
[0040] After receiving the expansion instruction, the application configuration device expands the initial business specifications of the application according to the expansion data in the expansion instruction to obtain the initial business specifications after expansion. The initial business specifications refer to the business specifications that need to be expanded and can be determined according to the issuance time of the expansion instruction.
[0041] S320: Determine the initial business specification after the expansion process as the target business specification of the application program.
[0042] After the application configuration device performs capacity expansion processing on the initial service, the initial service specification after the capacity expansion processing is obtained, and the initial service specification is determined as the target service specification of the application.
[0043] After obtaining the target business specifications, you also need to regenerate the configuration resources for deploying the application. For details, see Figure 4 First, input the resource tool of the capacity expansion business, including inputting business specification indicators, hardware information and the core deployment file (values file) before the application is expanded; obtain the core deployment file of the basic component before the expansion from the core deployment file before the application is expanded; determine the incremental information and full information according to the business specification indicators, hardware information and the core deployment file before the expansion of the basic component. The incremental information includes the business specifications and the number of running instances increased by the target business specifications relative to the initial business specifications, and the full information includes the target business specifications obtained by adding the initial business specifications to the expanded business specifications, as well as the number of running instances required to run the target business specifications; determine whether to cross gears according to the incremental information and full information, and the gears are from Low to high represents the number of servers from few to many. The information in the values file is different for different gears. If you need to cross gears, get the values file and the number of running instances of the new gear, and return the steps for calculating the incremental information and the full information for calculation; if you do not need to cross gears, get the gear after the expansion process, the number of running instances before the expansion process, and the number of running instances after the expansion process; generate the full values file and the incremental values file according to the gear after the expansion process, the number of running instances before the expansion process, and the number of running instances after the expansion process; generate the chart package information according to the full values file and the incremental values file, and finally perform the resource tool output for the expansion business.
[0044] In addition, after entering the business specification indicators, hardware information, and the values file before the application is expanded, the computing resources, storage resources, and queue resources of the application can be calculated based on the business specification indicators and hardware information, and the computing resources and storage resources can be integrated to obtain reserved resources; based on the queue resources of the application, the initialization resource files such as the user, queue, and database of the application are generated. The number of incremental servers is calculated based on the incremental values file and the reserved resources, and the full values file and resource file are used to generate the implementation plan package of the application.
[0045] Finally, the chart package information, computing resources, storage resources, and resource files are integrated to obtain the configuration resources of the expanded business specifications, and the configuration resources corresponding to the application are called from the container cloud for configuration processing.
[0046] Based on the above embodiments, the embodiments of the present application adopt Figure 5 The flowchart details how to determine the required servers based on the target business specifications of the application. Figure 5 , Figure 5 yes Figure 1 The flowchart of an exemplary embodiment of step S120 in the application configuration method is shown. Specifically, the process of step S120 generating configuration resources for deploying the application according to the target business specification specifically includes the following steps: S510: Match a target server type for configuring the application program from the container cloud according to the program type of the application program.
[0047] Program types are classified according to the functions and designs of the application programs. For example, the program types include the types of business and data processed by the application programs. Different program types have different requirements. For example, when processing highly confidential data, a server with high reliability can be selected.
[0048] The target server type is the matching server for the application. Exemplarily, the target server type can be matched from the container cloud according to the program type of the application. The container cloud can pre-store server types corresponding to different program types. After the application is entered, the target server type can be directly matched by the program type of the application. In other embodiments, when the target business specifications of the application are entered, the third-party server running the application is entered, and the server type of the input third-party server is used as the target server type of the application. The target server type can be one or more, and can be selected according to the functional modules of the application.
[0049] After determining the program type of the application, the application configuration device selects a corresponding target server type from the server types pre-stored in the container cloud according to the program type of the application.
[0050] S520: Determine the target server and the number of target servers for deploying the application program from the servers belonging to the target server type according to the target business specification.
[0051] The target server is the server that runs the application. The number of target servers can be one or more.
[0052] The application configuration device selects a target server from the target server type, and determines the number of target servers required to run the application according to the processing capacity and target business specifications of the target server. In other embodiments, after determining the target server of the application, the resource generation tool first generates the values file, chart package, and reserved resources of the application according to the target business specifications of the application, and then the container cloud tool calculates the number of target servers according to the values file, chart package, and reserved resources. Thus, the target server and the number of target servers are determined by the program type and target business specifications of the application, which greatly reduces the operation process of application deployment.
[0053] Configuration resources also include storage resources for storing applications. Exemplarily, the process of determining the storage resources for an application may include the following steps: determining the number of running instances of each component in the application based on the target business specifications of the application; determining the storage resources required to store the application based on the number of running instances of each component.
[0054] Storage resources refer to the memory information required when running an application. Components are independent parts or modules in an application. Components can represent the functional modules of an application. Applications usually rely on multiple components to complete their functions. Components provide services for applications. Components include basic components, storage components, computing scheduling components, etc. Basic components are a series of big data basic services provided by the Hadoop ecosystem, such as big data storage and distributed computing. In a cloud-native environment, container technology (such as Docker) can be used to package each component into an independent container for easier management and expansion.
[0055] A running instance can also be called a replica, which is used to run each component in an application. For example, a component can have multiple running instances, and multiple running instances can run on different computing nodes at the same time. Multiple running instances have the same code and configuration, but may be distributed on different physical or virtual machines to improve the fault tolerance and availability of the system.
[0056] When determining the number of running instances of each component, the application configuration device needs to consider not only the target business specifications of the application but also the hardware information of the target server. The number of running instances of each component is determined according to the target business specifications of the application and the hardware information of the target server. In other embodiments, the gear of each component needs to be determined according to the target business specifications of the application and the hardware information of the target server. The gears from low to high represent the number of target servers from small to large. At the same time, the higher the target business specifications, the higher the number of target servers required. The gears generally include low gears and high gears. The low gear generally includes 3 servers, and the high gear generally includes more than 3 servers. The number of running instances represents the number of multiple identical running instances of the same component running in parallel at the same time, which is also a horizontal expansion of the container. Exemplarily, the gears and the number of running instances of each component can be converted according to the calculation formula of the gear and the number of running instances of each component. The same application includes one gear, and the memory and CPU (Central Processing Unit) of each running instance in the component are configured the same. Then, the storage resources of each component are determined according to the number of running instances of each component, and the sum of the storage resources of each component is used as the storage resources of the application.
[0057] Configuration resources also include computing resources for running applications. Exemplarily, the process of determining computing resources for an application may include the following steps: determining the number of running instances of each component in the application based on the target business specifications of the application; determining the computing resources required to run the application based on the number of running instances of each component.
[0058] Computing resources are hardware and software resources used to execute applications. Computing resources include CPU resources and hardware resources. For example, the number of running instances can be obtained through component tools.
[0059] When determining the number of running instances of each component, the application configuration device needs to consider not only the target business specifications of the application but also the hardware information of the target server. The number of running instances of each component is determined according to the target business specifications of the application and the hardware information of the target server. In other embodiments, the gear of each component needs to be determined according to the target business specifications of the application and the hardware information of the target server. The gear from low to high represents the number of target servers from small to large. At the same time, the higher the target business specifications, the higher the number of target servers required. The number of running instances represents the number of multiple identical running instances of the same component running in parallel at the same time, which is also a horizontal expansion of the container. Exemplarily, the gear and the number of running instances of each component can be converted according to the calculation formula of the gear and the number of running instances of each component. The same application includes one gear, and the memory and CPU (Central Processing Unit) configuration of each running instance in the component are the same. Then, the computing resources of the application are determined according to the number of running instances and the gear of each component.
[0060] Configuration resources also include queue resources of the application. Exemplarily, the process of determining the queue resources of the application may include the following steps: obtaining the running queues for running the application; allocating resources to each running queue based on computing resources, and determining the queue resources of each running queue for running the application.
[0061] Among them, the run queue is a common data structure that follows the First-In-First-Out (FIFO) principle and can effectively manage and optimize the execution order and resource utilization of each task in the application. The queue resources of each queue are independent of each other, and each queue can set a certain proportion of resource minimum guarantee and usage limit. Each queue has strict access control. Users can only submit tasks to their own queues and cannot modify or access tasks in other queues. The execution process of an application can include one queue or multiple queues.
[0062] The application configuration device allocates computing resources to each running queue in the application, determines the queue resources of each running queue, and the queue resources of each running queue are independent of each other. For example, if there are queues A and B in the application, 30% of computing resources can be allocated to queue A and 70% of computing resources can be allocated to queue B. The queue resources obtained by queues A and B are isolated from each other. However, when there are surplus queue resources in one queue, the remaining queue resources can be temporarily shared with other queues.
[0063] Combined with the above embodiments, the generation of configuration resources is comprehensively described, which can be found in Figure 6, first input the resource tool of the deployment business, where the deployment business refers to the application to be deployed, and the resource tool includes the target business specifications of the application, the server information of the target server, and the values file; determine the number of running instances of the application (horizontal expansion of the container) and the gear (the same application and the same gear, the memory and CPU configuration of each running instance in the component are the same); then calculate the computing resources of the application and the storage resources of each component according to the gear and the number of running instances of each component; integrate the computing resources of the application and the storage resources of each component to obtain the reserved resources of the application, and pass them to the container cloud to apply for reserved resources; calculate the queue resources of the application according to the computing resources, and the users, queues and databases of the application can also be determined through the queue resources. The users, queues and databases of the application are determined as resource files for initialization; update the core deployment file based on the number and gear of the running instances of each component, the current application, the running instance, and the hardware information, so as to obtain the chart package information; finally, generate the implementation plan package of the application based on the resource file, the reserved resources and the chart package information, and obtain the output parameters of the resource tool of the deployment business.
[0064] Based on the above embodiments, the embodiments of the present application adopt Figure 7 The flowchart details how to upgrade the application. Figure 7 , Figure 7 yes Figure 1 The flowchart of an exemplary embodiment of the upgrade process in the application configuration method shown in FIG. Specifically, the following steps are included: S710: In response to receiving an upgrade instruction, acquiring upgrade data in the upgrade instruction.
[0065] The upgrade instruction can be triggered by the user. Application upgrade refers to updating, improving and repairing the existing application. Application upgrade can be planned, responsive or to adapt to new requirements and technical environment. The upgrade instruction includes upgrade data, which includes update data, improvement data and repair data of the initial application.
[0066] S720: If it is detected that data corresponding to the upgrade data exists in the core deployment file of the initial application, upgrade processing is performed on the corresponding data in the core deployment file according to the upgrade data to obtain first data.
[0067] The initial application refers to the application before the upgrade. Exemplarily, the upgrade can be issued at any time, for example, before the initial business specifications are input; or after the initial business specifications are input and before the system backend is configured; or after the system backend configures the application and before the application is implemented; or during the implementation of the application, the upgrade instruction can be issued to upgrade the application.
[0068] The core deployment file refers to the values file. After the initial application is upgraded, the core deployment file of the application will also be upgraded accordingly. The application configuration device parses the core deployment file of the initial application. If there is data corresponding to the upgrade data, it indicates that the corresponding data needs to be upgraded through the upgrade data, so that the corresponding data is upgraded according to the upgrade data to obtain the first data. The first data includes the upgraded data in the core deployment file of the initial application. Exemplarily, the corresponding data in the core deployment file can be directly updated to the upgrade data to obtain the first data.
[0069] S730: Retain the other data in the core deployment file except the data corresponding to the upgrade data to obtain second data.
[0070] The application configuration device parses the core deployment file of the initial application, obtains other data in the core deployment file that does not need to be upgraded, and retains the other data in the upgraded core deployment file, specifically, directly overwriting the other data in the upgraded core deployment file to obtain second data. The second data refers to the data in the upgraded core deployment file that is retained by the core deployment file before the upgrade.
[0071] S740: Determine configuration resources of the application program according to the first data and the second data.
[0072] Configuration resources are resources generated by reconfiguring the upgraded application in the container cloud. The first data and the second data are data in the core deployment file of the upgraded application. The configuration resources of the application can be obtained through the first data and the second data. The application is the application obtained through the upgrade process.
[0073] For details, please refer to Figure 8After receiving the upgrade instruction, the resource tool for upgrading the service is input, including inputting the core deployment files of each component in the initial application; parsing the core deployment files of each component in the initial application to obtain the gear, hardware disk information and data to be retained of each component in the initial application; determining the new gear of each component and the core deployment files corresponding to the new gear according to the upgraded application; updating the data of the core deployment files of each component in the initial application according to the core deployment files corresponding to the new gear based on certain specifications; overwriting the data to be retained into the core deployment files corresponding to the new gear; in actual applications, it can also be determined whether it is a pure solid-state drive (SSD) scenario. If not, the pure SSD scenario is enabled. Thus, the target core deployment file of the new gear is obtained, and the chart package information is generated according to the target core deployment file of the new gear, and finally the implementation plan package of the application is generated.
[0074] From this, we can see that this solution can automatically generate corresponding implementation plans regardless of the deployment, expansion or upgrade of the application. Users do not need to pay attention to the resource adjustment and quantity adjustment process of the container, but only need to focus on the application itself.
[0075] In order to elaborate on the application configuration method of the present application, Fig. 9 The flowchart shown further illustrates it, and the details are as follows: The application configuration process includes order matching and implementation. The order matching process allows pre-sales personnel to obtain software lists and hardware lists to facilitate ordering; through the implementation process, based on the existing hardware environment, the corresponding application implementation plan package is obtained for on-site implementation. When matching an order, the user first enters the business specifications (initial business specifications) of the application and the core deployment files of the application on the order matching page. If necessary, the user can also enter the third-party server information. The core deployment file refers to the container description list of each component in the application, which is used to describe the configuration and metadata files and specifications required for the application to run in the container; when generating an implementation plan, the user enters the business specifications (initial business specifications) of the application, the server information and quantity of the application, and the core deployment files. After the system backend receives the business specifications (initial business specifications) of the application, the core deployment files of the application, and the third-party server information, it generates an order or implementation plan based on the business specifications (initial business specifications), the core deployment files of the application, and the third-party server information. The specific process is as follows: Step ①: Select the server to be used based on the product (application) selected on the order page. You can select it through the product server selection tool of each product. For example, product A is selected through the product A server selection tool. Specifically, you can select the corresponding target server type based on the program type of the application; Step ②: Add disk usage policies to various server data structures based on disk planning information. Determine the computing node disk policy for each product based on the target server type corresponding to the product, including how much disk memory to allocate to each product; Step ③: Call the business specification generation tool of each product to return the business specification (initial business specification) of the dependent business. That is, the business specification generation tool is used to generate the business specifications (initial business specifications) of other products that are associated with the product. For example, product A uses the product A dependent business generation tool to return the business specifications (initial business specifications) of other products that product A depends on. Step ④: Add the business specifications entered on the page (initial business specifications) and the business specifications returned by the business specifications generation tool to obtain the target business specifications of each product; Step ⑤: Generate configuration resources according to the target business specifications of each product, including the core deployment files of the application, chart packages, reserved resources (CPU, memory and disk resources reserved by the container cloud) and resource files (initialization of user, database, queue and other information). This can be generated through the product resource generation tool corresponding to each product. In this way, the dependent applications (user, database, queue resources, etc.) are initialized through resource files, and no additional manual initialization configuration is required after deployment, with a high degree of automation; Step ⑥: Calculate the number of servers based on the core deployment files, chart packages, reserved resources, etc., and generate an implementation plan. Determine the number of servers required based on the reserved resources, core deployment files, and chart packages for running the corresponding products, that is, the number of target servers for deploying the application. Exemplarily, the number of servers can be calculated by the container cloud tool based on the information that the container cloud tool relies on; Step ⑦: Adjust the number of application copies (number of running instances) according to the number of servers. If the number of copies of a component in the application is less than the number of servers, increase the number of copies of the corresponding component to make full use of the server, improve resource utilization and program reliability. For example, the number of copies of each component can be adjusted through the copy number adjustment tool. If the return information after calling the tool is not empty, it means that the core deployment file has changed. Repeat the call until the return information is empty, and then generate the final implementation plan based on the last result returned; Step ⑧: Generate a product delivery list based on the product's target server type, target server quantity, target business specifications, and core deployment files. Exemplarily, it can be generated through a product list tool for each product; Step 9: Adjust the product delivery list, display it on the page, and export relevant content, including target server type, target server quantity, target business specifications, and core deployment files. The delivery list also includes authorization files for application authorization; the hardware list allows pre-sales personnel to place orders directly based on the list. The hardware list includes the resource usage of each application, which is convenient for users to evaluate the resource consumption of each software product and the total resource usage rate.
[0076] The above solution directly converts the user's target business specifications into an implementation plan package for the software system, decoupling software from hardware, and decoupling software business functions from K8S cluster orchestration, simplifying the operation process. After the user enters the target business specifications of the application in the visual interface, they can directly obtain the final implementation plan, software and hardware list, with a low learning cost (only front-end page operations), and there is no need to worry about the underlying K8S and docker container technology.
[0077] See also Fig.10 , Fig.10 It is a structural diagram of an exemplary embodiment of an application configuration device shown in the present application. The training sample determination device 1000 includes an acquisition module 1001, a generation module 1002 and a configuration module 1003. The acquisition module 1001 is used to obtain the business information to be processed of the application; the generation module 1002 is used to generate the configuration resources for deploying the application according to the target business specifications; the configuration module 1003 is used to call the configuration resources corresponding to the application from the container cloud for configuration processing.
[0078] In the above scheme, the application configuration device obtains the pending business information of the application, which includes the target business specifications of the application; generates configuration resources for deploying the application according to the target business specifications; and calls the configuration resources corresponding to the application from the container cloud for configuration processing. Therefore, only the target business specifications of the application are needed to generate the configuration resources of the application, and the configuration processing of the application is realized, thereby simplifying the operation process and improving the automation level of the configuration of the application on the container cloud.
[0079] Among them, the functions of each module can be found in the application configuration method embodiment, which will not be repeated here.
[0080] To implement the application configuration method of the above embodiment, the present application proposes another electronic device, for details, please refer to Fig.11 , Fig.11 It is a structural schematic diagram of an embodiment of an electronic device provided by the present application.
[0081] The electronic device 1100 includes a memory 1101 and a processor 1102 , wherein the memory 1101 and the processor 1102 are coupled.
[0082] The memory 1101 is used to store program data, and the processor 1102 is used to execute the program data to implement the application configuration method of the above embodiment.
[0083] In this embodiment, the processor 1102 may also be referred to as a CPU (Central Processing Unit). The processor 1102 may be an integrated circuit chip having signal processing capabilities. The processor 1102 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. A general-purpose processor may be a microprocessor or the processor 1102 may also be any conventional processor, etc.
[0084] The present application also provides a computer-readable storage medium, such as Fig.12 As shown, the computer-readable storage medium 1200 is used to store program data 1201. When the program data 1201 is executed by the processor, it is used to implement the application configuration method in the method embodiment of the present application.
[0085] The method involved in the embodiment of the application configuration method of the present application, when implemented in the form of a software functional unit and sold or used as an independent product, can be stored in a device, such as a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or part of the contribution to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.
[0086] The above description is only an implementation method of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly used in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A container cloud-based application configuration method, It is characterized in that The application configuration method comprises: Acquire the pending business information of the application, wherein the pending business information includes the target business specification of the application; Generate configuration resources for deploying the application according to the target business specifications; The configuration resources corresponding to the application are called from the container cloud to perform configuration processing.
2. The application configuration method according to claim 1, It is characterized in that The step of obtaining the pending business information of the application comprises: Acquire other applications associated with the application from the container cloud; The target business specification of the application is determined according to the initial business specification of the application and the business specifications of the other applications.
3. The application configuration method according to claim 1, It is characterized in that The step of obtaining the pending business information of the application comprises: In response to receiving the expansion instruction, the initial service specification of the application is expanded according to the expansion instruction to obtain the initial service specification after the expansion; The initial business specification after the expansion process is determined as the target business specification of the application program.
4. The application configuration method according to claim 1, It is characterized in that The service information to be processed includes the program type of the application program, the configuration resource includes a server, and the step of generating the configuration resource for deploying the application program according to the target service specification includes: According to the program type of the application, a target server type for configuring the application is matched from the container cloud; The target server and the number of target servers for deploying the application are determined from the servers belonging to the target server type according to the target business specification.
5. The application configuration method according to claim 1, It is characterized in that The configuration resources include storage resources required to store the application program. The step of generating the configuration resources for deploying the application program according to the target business specification includes: Determining the number of running instances of each component in the application according to the target business specification of the application, the component representing the functional module of the application; The storage resources required to store the application are determined according to the number of running instances of each component.
6. The application configuration method according to claim 1, It is characterized in that The configuration resources include computing resources required to run the application program, and the step of generating the configuration resources for deploying the application program according to the target business specification includes: Determining the number of running instances of each component in the application according to the target business specifications of the application; The computing resources required to run the application are determined based on the number of running instances of each component.
7. The application configuration method according to claim 6, It is characterized in that The configuration resource includes a queue resource of the application program, and the method further includes: Obtaining a run queue for running the application; Resources are allocated to each running queue according to the computing resources to determine queue resources of each running queue running the application program.
8. The application configuration method according to any one of claims 1 to 7, It is characterized in that The method further comprises: In response to receiving the upgrade instruction, acquiring the upgrade data in the upgrade instruction; If it is detected that data corresponding to the upgrade data exists in the core deployment file of the initial application, upgrade the corresponding data in the core deployment file according to the upgrade data to obtain first data; Retaining other data in the core deployment file except the data corresponding to the upgrade data to obtain second data; Configuration resources of the application are determined according to the first data and the second data.
9. An electronic device, It is characterized in that include: A memory and a processor, wherein the memory stores program instructions, and the processor retrieves the program instructions from the memory to execute the application configuration method according to any one of claims 1-8.
10. A computer-readable storage medium, It is characterized in that include: Program data is stored, and when the program data is executed by a processor, it is used to implement the application configuration method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Mycat system deployment operation and maintenance method, apparatus and device, and storage medium
CN114647501A
Software deployment method based on cloud platform, computer equipment and readable storage medium
CN115857958A
Cloud application deployment method and device, equipment and storage medium
CN116743575A
Resource calculation method, resource calculation device and computer storage medium
CN117539611A
