Application deployment method and device based on cloud control basic platform, equipment and medium
By dismantling the cloud control basic platform into independent functional units and combining it, lightweight component fusion and container orchestration technology, the complexity of maintenance and upgrade of traditional cloud control platforms and the complexity of front-end integration are solved, and the flexibility of the platform is improved and scalability.
Patent Information
- Application Number
- CN202411199144.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-29
- Publication Date
- 2024-12-31
- Estimated Expiration
- 2044-08-29
AI Technical Summary
The traditional cloud control basic platform has huge projects, many development collaboration teams, and the subsystems are interdependent and coupled in business, resulting in difficulty in maintenance and upgrading. The front-end integration process is complex and cumbersome, which is not conducive to the construction and management of the platform.
The original cloud control basic platform is disassembled into multiple independent functional units, and combined from high to low according to the functional level to form a cloud control basic platform model, adopt lightweight component fusion method for front-end application deployment, and the back-end adopts container orchestration Component fusion is carried out to avoid the introduction of micro front-end frameworks.
It realizes business decoupling of different functional units, simplifies the front-end application convergence process, improves the flexibility and scalability of the cloud control basic platform, and reduces the difficulty of maintenance and operation.
Smart Images

Figure CN119232755A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of intelligent transportation technology, and specifically, to an application deployment method, device, equipment and medium based on a cloud control basic platform. Background Art
[0002] The cloud control basic platform is an important component of the vehicle-road-cloud integrated system. It integrates the physical space and information space of people, vehicles, roads and clouds through the new generation of information and communication technologies, and provides basic data, hierarchical sharing services and collaborative computing environment for the intelligent connected vehicle industry. The cloud control basic platform consists of three levels of cloud: edge cloud, regional cloud and central cloud, forming a logically coordinated and physically dispersed cloud computing center.
[0003] Traditional cloud control infrastructure platforms are huge projects with many development and collaboration teams. The subsystems are interdependent and coupled in business. Operation and maintenance personnel need to log in to multiple systems to configure business, which is time-consuming and labor-intensive, making the maintenance and upgrade of the entire platform more difficult. In addition, traditional cloud control technology platforms need to introduce micro-frontend frameworks during the front-end integration process, which is relatively complex and cumbersome, and is not conducive to the construction and management of the platform. Summary of the invention
[0004] The embodiments of the present invention provide an application deployment method, device, equipment and medium based on a cloud control basic platform, which realizes the business decoupling of different functional units, simplifies the process of front-end application integration, and improves the flexibility of the cloud control basic platform.
[0005] The specific technical solutions are as follows:
[0006] In a first aspect, an embodiment of the present invention provides an application deployment method based on a cloud control basic platform, wherein the cloud control basic platform is composed of three-level platforms: edge cloud, regional cloud and central cloud, and the method includes:
[0007] According to business needs, the cloud platforms at all levels in the original cloud control basic platform are disassembled into multiple independent functional units, wherein each functional unit includes components, modules, sub-modules and function points in descending order of functional level, wherein each functional unit establishes a relationship with each other through interface functions;
[0008] Combine the functional units of each level of cloud platform in order from high to low functional levels to form a cloud control basic platform model, wherein the applications of the cloud control basic platform model include front-end applications and back-end applications. The front-end application is implemented through front-end application resources. The front-end application resources include application interfaces, application menus, images, and executable execution packages. The back-end application includes at least one application corresponding to a functional unit and its operating environment.
[0009] Create an integrated base, where the integrated base includes a front-end service base and a back-end service base. The front-end service base is a container that integrates application pages corresponding to components at all levels and is used to manage front-end application resources. The back-end service base is the infrastructure that carries the operation of the cloud control basic platform application and is used to manage various functional units of the cloud control basic platform model.
[0010] The front-end application resources are loaded based on the front-end service base, and the back-end application is deployed to the cloud platforms at all levels of the cloud control basic platform model according to the functional levels of its corresponding functional units based on the back-end service base.
[0011] Optionally, load front-end application resources based on the front-end service base, including:
[0012] Create a new node for mounting components;
[0013] Determine the corresponding target front-end application resources based on user permissions;
[0014] For each level of cloud platform, the target front-end application resources are loaded based on the front-end service base, and the base global routing variables are registered. The base global routing variables are used to switch different front-end pages.
[0015] Accordingly, after loading the front-end application resources based on the front-end service base, the method provided by the embodiment of the present invention further includes:
[0016] Based on the node, the front-end application corresponding to the target front-end application resource is started in the front-end service base.
[0017] Optionally, based on the backend service base, the backend application is deployed to the cloud platforms at all levels of the cloud control basic platform model according to the functional level of its corresponding functional unit, including:
[0018] Package the application corresponding to each component and the current running environment into an image file as a backend application, wherein, for a component of a certain level, the application corresponding to the component includes the application of the component itself and the applications of the modules, submodules and function points that have a hierarchical relationship with the component at the functional level of the component;
[0019] Configure the configuration information of each image file, wherein the configuration information includes the name and version number of each image file and the components at each level corresponding to the image file;
[0020] Upload the image file to the backend service base according to the configuration information;
[0021] Allocate operating resources for the cloud platforms at all levels of the created cloud control basic platform model, where the operating resources include the target cloud platform to be deployed, the number of CPU cores, memory, and hard disk to be used when the target cloud platform is running;
[0022] Install the backend application corresponding to the image file to the target cloud platform.
[0023] Optionally, after the target backend application corresponding to the target image file is installed on the cloud platform, the method provided by the embodiment of the present invention further includes:
[0024] Map the port corresponding to the target backend application to the port of other backend applications so that other backend applications can access the port corresponding to the target backend application.
[0025] In a second aspect, an embodiment of the present invention further provides an application deployment device based on a cloud control basic platform, comprising:
[0026] The disassembly module is configured to disassemble the cloud platforms at all levels in the original cloud control basic platform into multiple independent functional units according to business requirements, wherein each functional unit includes components, modules, submodules and function points in descending order of functional level, wherein each functional unit establishes a mutual association relationship through an interface function;
[0027] A combination module is configured to combine the components of each level of cloud platform in descending order of functional level to form a cloud control basic platform model, wherein the application of the cloud control basic platform model includes front-end application and back-end application, the front-end application is implemented by front-end application resources, the front-end application resources include application interface, application menu, picture and executable execution package, and the back-end application includes at least one application corresponding to a functional unit and its operating environment;
[0028] The base creation module is configured to create an integrated base, wherein the integrated base includes a front-end service base and a back-end service base. The front-end service base is a container that integrates application pages corresponding to components at all levels and is used to manage front-end application resources; the back-end service base is an infrastructure that carries the operation of cloud control basic platform applications and is used to manage various functional units of the cloud control basic platform model;
[0029] The application deployment module is configured to load front-end application resources based on the front-end service base, and deploy the back-end application to each level of the cloud platform of the cloud control basic platform model according to the functional level of its corresponding functional unit based on the back-end service base.
[0030] Optionally, the application deployment module includes: a front-end application deployment unit, the front-end application deployment unit being configured as a node for creating a new mounting component;
[0031] Determine the corresponding target front-end application resources based on user permissions;
[0032] For each level of cloud platform, target front-end application resources are loaded based on the front-end service base, and base global routing variables are registered, wherein the base global routing variables are used to switch different front-end pages;
[0033] Accordingly, the device provided by the embodiment of the present invention further includes:
[0034] The front-end application startup module is configured to start the front-end application corresponding to the target front-end application resource in the front-end service base based on the node after loading the front-end application resource based on the front-end service base.
[0035] Optionally, the application deployment module includes: a backend application deployment unit, wherein the backend application deployment unit is configured to:
[0036] Package the application corresponding to each component and the current running environment into an image file as a backend application, wherein, for a component of a certain level, the application corresponding to the component includes the application of the component itself and the applications of the modules, submodules and function points that have a hierarchical relationship with the component at the functional level of the component;
[0037] Configure the configuration information of each image file, wherein the configuration information includes the name and version number of each image file and the components at each level corresponding to the image file;
[0038] Upload the image file to the backend service base according to the configuration information;
[0039] Allocate operating resources for the cloud platforms at all levels of the created cloud control basic platform model, where the operating resources include the target cloud platform to be deployed, the number of CPU cores, memory, and hard disk to be used when the target cloud platform is running;
[0040] Install the backend application corresponding to the image file to the target cloud platform.
[0041] Optionally, the device provided by the embodiment of the present invention further includes:
[0042] The port mapping module is configured to map the port corresponding to the target backend application to the port of other backend applications after the target backend application corresponding to the target image file is installed on the cloud platform, so that other backend applications can access the port corresponding to the target backend application.
[0043] In a third aspect, an embodiment of the present invention provides a computer device, the computer device comprising:
[0044] At least one processor is coupled to a memory, and the memory stores programs or instructions running on the processor. When the programs or instructions are executed by the processor, an application deployment method based on a cloud control basic platform as provided in any embodiment of the present invention is implemented.
[0045] In a fourth aspect, an embodiment of the present invention provides a readable storage medium on which a program or instruction is stored. When the program or instruction is executed by a processor, an application deployment method based on a cloud control basic platform as provided in any embodiment of the present invention is implemented.
[0046] In a fifth aspect, an embodiment of the present invention provides a computer program, which includes program instructions, and when the program instructions are executed by a computer, an application deployment method based on a cloud control basic platform as provided in any embodiment of the present invention is implemented.
[0047] By disassembling the cloud platforms at all levels in the original cloud control basic platform into multiple independent functional units according to business needs, and combining the functional units of each level of cloud platform in order from high to low functional levels, a cloud control basic platform model is formed, which realizes the decoupling of different functional units in business, thereby being more conducive to the maintenance and operation of the cloud control basic platform. After the cloud control basic platform model is established, when the components of the model are integrated to deploy the application to the cloud platforms at all levels, the front end adopts a lightweight component integration method, and there is no need to introduce a micro front-end framework. Compared with the front-end integration method in the related technology, the integration process provided by this embodiment is simple and easy to operate. The back end adopts the container orchestration method to integrate components. By treating the application of each component as a service, there is no need to care about the development language and operating environment of the components at all levels. It only needs to package the application and the environment together into a container material, that is, an image file, and upload it to the back-end service base. When deploying the application to a specific cloud, just select the corresponding container material. The process is simple and easy to operate, which realizes the dynamic increase and expansion of the back-end application of the cloud control basic platform, and improves the flexibility and scalability of the cloud control basic platform. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0049] Figure 1a A flowchart of an application deployment method based on a cloud control basic platform provided in the first embodiment of the present invention;
[0050] Figure 1bA schematic diagram of the hierarchical structure of the cloud control basic platform model provided in the first embodiment of the present invention;
[0051] Figure 1c A schematic diagram of the deployment process of a backend application provided in the first embodiment of the present invention;
[0052] Figure 2 A structural block diagram of an application deployment device based on a cloud control basic platform provided in Embodiment 2 of the present invention;
[0053] Figure 3 This is a structural block diagram of a computer device provided in Embodiment 3 of the present invention. DETAILED DESCRIPTION
[0054] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0055] It should be noted that the terms "including" and "having" and any variations thereof in the embodiments of the present invention and the accompanying drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products or devices.
[0056] The embodiments of the present invention disclose an application deployment method, device, equipment and medium based on a cloud control basic platform, which are described in detail below.
[0057] Embodiment 1
[0058] Figure 1a The flowchart of a method for deploying an application based on a cloud control basic platform provided in the first embodiment of the present invention is applicable to the server side of the cloud control basic platform. The method provided in this embodiment can be executed by an application deployment device based on a cloud control basic platform model, which can be implemented in software and / or hardware. Figure 1a As shown, the method provided in this embodiment specifically includes:
[0059] S110. Decompose the cloud platforms at all levels in the original cloud control basic platform into multiple independent functional units according to business needs.
[0060] The cloud control basic platform consists of three levels of clouds: edge cloud, regional cloud and central cloud. The edge cloud is close to the vehicle and road end, and is used to provide services with high reliability and low latency fusion perception, collaborative decision-making and collaborative control capabilities. It is mainly responsible for processing real-time vehicle data and edge computing tasks to ensure the real-time and accuracy of data. The regional cloud belongs to the upper layer of the edge cloud, which is used to collect data from multiple edge clouds and perform more complex data processing and analysis. It supports regional-level traffic fusion perception, collaborative decision-making, collaborative control and traffic control service needs. The central cloud is the core and highest-level cloud computing resource concentration of the entire intelligent connected vehicle cloud control platform. It is responsible for collecting data from various regional clouds and edge clouds, and performing global data analysis, modeling and decision-making. It gathers traffic-related data from various regional clouds, aggregates, stores and manages the data, and realizes efficient interaction of business data and hierarchical sharing of common basic capabilities.
[0061] In the related art, the functional modules of the cloud platforms at all levels of the cloud control basic platform are interdependent and coupled in the business positions, which causes the operation and maintenance personnel to log in to multiple subsystems through multiple accounts when configuring the business. This will cause the maintenance and upgrade of the entire cloud control basic platform to be time-consuming and labor-intensive, and the efficiency is extremely low. In this embodiment, the cloud platforms at all levels in the original cloud control basic platform can be disassembled into multiple independent functional units according to business needs, and each functional unit includes components, modules, sub-modules and functional points in order from high to low functional levels. Among them, the business needs of the cloud control basic platform model can be proposed by the operation and maintenance party of the cloud control basic platform. The operation and maintenance party can propose its business needs based on the functions to be achieved by the cloud control basic platform in its application scenario.
[0062] Specifically, Figure 1b This is a schematic diagram of the hierarchical structure of the cloud control basic platform model provided in the first embodiment of the present invention. Figure 1bAs shown in the figure, the cloud control basic platform includes three levels of cloud: edge cloud, regional cloud and central cloud. The independent functional units after each level of cloud split include components, modules, submodules and functional points in the order of functional level from high to low. Among them, each functional unit establishes a mutual relationship through the interface function. For any level of functional unit, there may be multiple actual functional units belonging to this level according to business needs. For example, the components belonging to the edge cloud platform include: collaborative decision-making components, fusion perception components, collaborative control components, standardized hierarchical shared interface components and operation and maintenance components; the components belonging to the regional cloud platform include: fusion perception components, collaborative decision-making components, collaborative control components, traffic control components, standardized hierarchical shared interface components, operation and maintenance components, operation components, etc.; the components belonging to the central cloud platform include: domain big data analysis components and standardized hierarchical shared interface components, etc. For another example, the next level module of the collaborative control component includes: vehicle control module and dynamic lane control module, the next level submodule of the vehicle control module includes: vehicle lateral control submodule and vehicle longitudinal control submodule, and the next level functional points of the vehicle lateral control submodule and vehicle longitudinal control submodule include specific control methods for the vehicle lateral and longitudinal directions.
[0063] In this embodiment, each functional unit of each level of cloud platform can be managed by establishing a front-end configuration interface for the platform model. Among them, the front-end configuration interface can set a button for adding or deleting components, and the super administrator can edit or delete a component according to actual business needs to create a cloud control basic platform model. Among them, functional units of different levels can be represented by different identifiers. Functional units belonging to the same level can be represented by Arabic numerals in ascending order to indicate the number of functional units actually included. For example, the functional units of the edge cloud are represented by a combination of the letter A and Arabic numerals. For example, the component 1 of the edge cloud is identified as A01, the component 2 is identified as A02, and the component 3 is represented as A03. By analogy, the identification method of modules, sub-modules and functional points is similar to the identification method of the above-mentioned components, which will not be repeated here. The identification method of each functional unit in other cloud platforms can also refer to the above-mentioned identification method.
[0064] S120. Combine the functional units of each level of cloud platform in descending order of functional level to form a cloud control basic platform model.
[0065] In this embodiment, for each level of cloud platform, its various functional units are combined in order of functional level from high to low, and a cloud control basic platform model with a hierarchical structure is obtained. The various functional units in this model are independent of each other in terms of business and function, and modifying one of the functional units will not affect other components coupled with it. Moreover, when a functional unit fails, it will not affect other functional units coupled with it. Each functional unit can be developed by different teams and then integrated on the base. Compared with the technical solution in which the various functional units in the cloud control basic platform in the related art are coupled with each other in business, the cloud control basic platform model provided in this embodiment realizes the decoupling of different functional units in business, which is more conducive to the maintenance and operation of the cloud control basic platform.
[0066] In this embodiment, the application of the cloud control basic platform model includes front-end applications and back-end applications, wherein the front-end application is implemented through the front-end application resources, which include application interfaces, application menus, pictures, and executable execution packages; the back-end application includes at least one application corresponding to a functional unit and its operating environment. Exemplarily, the R&D personnel can set corresponding user permissions for each component, and set the corresponding front-end application interface respectively, and can set the login account of the front-end application interface of different components to a unified account of the cloud control basic platform account. The user can log in to the front-end application interface corresponding to his authority through the account, and view or modify the configuration information of the component with a certain permission. Compared with the different subsystems of the traditional cloud control basic platform that require different account passwords for login access, this embodiment integrates the common parts of the various components of the cloud control basic platform, and defines the entire platform account and permission system. In addition, each subcomponent can implement interface functions in accordance with the UI (User Interface) interaction of a unified interface style to enhance the user experience.
[0067] S130. Create an integrated base.
[0068] In this embodiment, the business of the cloud control basic platform needs to be completed through the combination of front-end applications and back-end applications. Among them, the front-end application and the back-end application can be implemented through an integrated base. Among them, the base refers to the software base, which refers to the container that carries the operation of various applications of the cloud control basic platform, providing basic support and services for the application. Among them, the integrated base includes the front-end service base and the back-end service base. The front-end service base is a container that integrates the application pages corresponding to the functional units at all levels, and is used to manage the front-end application resources; the back-end service base is the infrastructure that carries the operation of the cloud control basic platform application, mainly including the container orchestration system and the underlying environment, network, storage, etc. on which the container orchestration system depends.
[0069] Specifically, the functions of the integrated base in this embodiment include front-end application relationship, back-end application relationship and system management. Among them, the front-end application relationship includes front-end menu management and resource management. The back-end application management includes: application material management and application monitoring, among which the application material refers to the image file packaged with the application corresponding to the component and the current operating environment.
[0070] S140. Load the front-end application resources based on the front-end service base, and deploy the back-end application to the cloud platforms at all levels of the cloud control basic platform model according to the functional levels of the corresponding functional units based on the back-end service base.
[0071] Those skilled in the art can understand that the deployment process of the front-end application and the back-end application is the integration process of the functional units (such as various components) of the cloud control basic platform in the cloud control basic platform model. Exemplarily, the front-end integration can adopt a lightweight integration method, and its integration process may include obtaining the front-end application, loading the front-end application resources, loading the application menu that the user has permission to, and rendering the page. The back-end can adopt a container orchestration method, and its process may include uploading application image files, deploying the cloud platform, and installing application services. After the front-end application and the back-end application are deployed, they can be integrated into a cloud control basic platform.
[0072] In this embodiment, loading the front-end application resources based on the front-end service base can be achieved through the following steps a1 to a3:
[0073] a1. Create a new node for mounting components.
[0074] Among them, the operation and maintenance personnel, that is, the users of the cloud control basic platform, need to log in to the cloud control basic platform before creating a node for mounting components. After logging in to the cloud control basic platform, the current front-end application can be hosted by the node for mounting components, which can be achieved through the following code:
[0075] <div id="subapp-container">
[0076]
[0077] a2. Determine the corresponding target front-end application resources based on user permissions.
[0078] Among them, the target front-end application resources include application interface, application menu, pictures and executable execution packages, etc.
[0079] a3. For each level of cloud platform, load the target front-end application resources based on the front-end service base and register the base global routing variables.
[0080] Specifically, the target front-end application resources can be loaded through the following code:
[0081] / / Create a new div element
[0082] var div=document.createElement('div');
[0083] / / Set the ID of this newly created div element to 'subapp-container'
[0084] div.id='subapp-container'
[0085] / / Add the newly created div element to the first element with class name 'body' on the page
[0086] document.getElementsByClassName('body')[0].appendChild(div)
[0087] / / Use querySelector to find the first page whose src attribute matches the variable url <script>元素
[0088] var oldScript=document.querySelector('script[src="'+url+'"]');
[0089] / / 如果找到了匹配的<script>元素,那么就移除这个元素
[0090] if(oldScript){
[0091] oldScript.parentNode.removeChild(oldScript);
[0092] }
[0093] / / 创建一个新的<script>元素
[0094] var script=document.createElement('script');
[0095] / / 设置这个<script>元素的类型为'module'
[0096] script.type='module'
[0097] / / 设置这个<script>元素的src属性为变量url的值,即要加载的模块的URL
[0098] cript.src=url;
[0099] / / 将这个新的<script>元素添加到<body>标签的末尾
[0100] document.body.appendChild(script);
[0101] / / 为这个<script>元素设置一个onload事件监听器
[0102] / / 当脚本加载完成时,这个监听器会被触发,并在控制台打印出'加载完成'和事件对象e
[0103] script.onload=(e)=>{
[0104] console.log('加载完成',e)
[0105] }
[0106] 此外,还可通过注册底座全局路由变量来实现前端不同页面之间的切换。
[0107] 进一步的,在加载完成前端应用资源后,基于预先新建的节点在前端服务底座启动目标前端应用资源对应的前端应用,该过程可包括渲染前端应用界面。
[0108] 本实施例中,基于后端服务底座将后端应用按照其对应功能单元的功能级别部署到云控基础平台模型的各级云平台中,可通过如下步骤b1~b4来实现:
[0109] b1、将各个组件对应的应用程序和当前运行环境打包为镜像文件,作为后端应用。
[0110] 本实施例中,后端将各个组件的应用当成服务,无需关心各级组件的开发语言和运行环境,只需要将应用程序和环境一起打包成容器物料,即镜像文件,上传到后端服务底座中。在将应用部署到具体云的时候,选择相应的容器物料即可。其中,对于某个级别的组件,该组件对应的应用程序包括该组件本身的应用程序及在该组件的功能级别下与该组件具有层级关系的模块、子模块和功能点的应用程序。
[0111] b2、配置各镜像文件的配置信息,并将镜像文件按照配置信息上传到后端服务底座。
[0112] 其中,配置信息包括各镜像文件的名称、版本号以及镜像文件分别对应的各级组件。在上次镜像文件时,需选择该镜像文件属于云控基础平台模型例的哪个组件、哪个模块、哪个子模块和哪个功能点。本实施例中,在将镜像文件按照配置信息上传到后端服务底座后,可根据实际业务需求将后端应用部署到目标云平台,或者在目标云平台现有应用的基础上添加新的应用。
[0113] b3、为已创建的云控基础平台模型的各级云平台分配运行资源。
[0114] 其中,运行资源包括待部署的目标云平台、在该目标云平台运行时的中央处理器(Central Processing Unit,CPU)核的数量、内存和硬盘。该目标云平台可以为边缘云、区域云或者中心云中的任意一级云平台。
[0115] 具体的,对于需要部署的云,可在创建具体云的命名空间时配置镜像文件的运行资源,例如,在新建云的操作过程中选择云所属层级(边缘云,区域云,中心云中的一种),并分配资源(CPU,内存,硬盘等)。
[0116] b4、将镜像文件对应的后端应用安装到目标云平台。
[0117] 本实施例中,用户在上传镜像文件、分配运行资源后,可在通过点击确定按键进入下一步流程。在下一步流程中,后端会对应用进行冲突校验,校验的判断条件是在同一个云平台下,同一个组件、同一个模块是否对应一个应用。如果对应一个应用,则校验成功,此时,可创建Deployment(一种资源类型)用于管理底层节点pod的部署、更新和扩展,具体可通过如下代码实现:
[0118] apiVersion:apps / v1
[0119] kind:Deployment
[0120] metadata:
[0121] name:deployment-appname
[0122] namespace:namespace-cloud-basis-platform
[0123] spec:
[0124] replicas:3
[0125] selector: / / 定义选择Pod的标签选择器
[0126] matchLabels: / / 选择具有特定标签的Pod
[0127] app:appname / / 标签选择器,选择所有标签为app:appname的Podtemplate: / / 定义Pod的模板
[0128] metadata: / / Pod模板的元数据
[0129] labels: / / Pod模板的标签
[0130] app:appname / / 给Pod模板添加一个标签app:appname
[0131] spec: / / Pod模板的规格说明
[0132] containers: / / 定义Pod模板中的容器列表
[0133] name:container-appname / / 容器的名称为container-appname
[0134] image:image-appname / / 容器使用的镜像mage-appname
[0135] ports: / / 定义容器需要暴露的端口列表
[0136] containerPort:3000
[0137] 通过执行上述代码,可将后端应用安装完成,并将后端应用程序启动。对于目标云平台之外其他云平台中后端应用的部署方案,与上述目标云平台中后端应用的部署方式相同,具体可参照上述步骤的说明,此处不再赘述。本实施例中,在完成各级云平台的前端应用和后端应用的部署之后,即可得到各组件融合后的云控基础平台。
[0138] 本实施例中,前端应用和后端应用的部署可以顺序执行,也可以同步执行,本实施例对此不作具体限定。
[0139] 进一步的,在将目标镜像文件对应的目标后端应用安装到目标云平台之后,本发明实施例提供的方法还包括:
[0140] 将目标后端应用对应的端口映射到其他后端应用的端口上,这样可暴露目标后端应用的端口给外部其他应用,以使其他后端应用能够访问目标后端应用对应的端口,即将内部应用和外部应用桥接起来。
[0141] 下面通过图1c对添加后端应用的过程进行详细介绍:
[0142] 在运维人员新增后端应用的过程中,需要运维人员输入云基础信息。云管理服务模块和物料服务管理模块可对该基础信息进行校验,其中,校验可通过模块的管理人员人工进行校验,或者也可采用自动校验的方式。信息合法性校验主要是校验用户输入的信息是否符合信息的输入规则,比如用户输入CPU核数应当为数字,但用户却输入字符,则说明不合法。在用户输入的云基础信息校验不合法的情况下,需要用户重新输入云基础信息;在校验合法的情况下,创建云命名空间,即在后端服务底座新建待部署后端应用的云,并反馈创建结果给运维人员,运维人员可查看云信息,并在该云平台上创建后端应用。在创建后端应用时,需要查询该后端应用对应的应用物料,即镜像文件(由组件的应用程序和对应的运行环境打包后得到的文件包),运维人员可输入应用信息,即可为已创建的云控基础平台模型的各级云平台分配运行资源,其中,运行资源包括待部署的目标云平台、在目标云平台运行时所要用到的中央处理器CPU核的数量、内存和硬盘。应用管理模块校验该应用信息的合法性,该合法性表示的是数据是否有效,如果有效则合法,如果无效则不合法,例如,信息有效性校验是对用户输入的信息是否能够被使用和处理这两个方面进行校验,比如如果当前待部署的目标云平台只有20个CPU核可以使用,而用户分配了25个,超出了范围,则说明应用信息不合法。在应用信息合法的情况下,可创建服务,即将已上传的镜像文件对应的后端应用安装到目标云平台。在后端应用安装成功后,应用管理模块可反馈创建结果,运营人员根据该创建结果即可查看已安装的应用。
[0143] 本实施例中,通过根据业务需求将原始云控基础平台中的各级云平台拆解为多个独立的功能单元,并按照功能级别从高到低的顺序将每级云平台的各个功能单元进行组合,形成云控基础平台模型,实现了不同功能单元在业务上的解耦,从而更加有利于云控基础平台的维护和运营。在建立云控基础平台模型后,在融合该模型的各组件以将应用部署到各级云平台时,前端采用轻量级的组件融合方式,无需引入微前端框架,相对于相关技术中的前端集成方式,本实施例提供的融合过程简单易操作。后端采用容器编排的方式进行组件融合,通过将各个组件的应用当成服务,而无需关心各级组件的开发语言和运行环境,只需要将应用程序和环境一起打包成容器物料,即镜像文件,上传到后端服务底座中。在将应用部署到具体云的时候,选择相应的容器物料即可,其过程简单、易操作,实现了云控基础平台后端应用的动态增加和扩展,提高了云控基础平台的灵活性和可拓展性。
[0144] 实施例二
[0145] 图2为本发明实施例二提供的一种基于云控基础平台的应用部署装置的结构框图,如图2所示,该装置包括:拆解模块210、组合模块220、底座创建模块230和应用部署模块240,其中,
[0146] 拆解模块210,被配置为根据业务需求将原始云控基础平台中的各级云平台拆解为多个独立的功能单元,其中,各个功能单元按照功能级别从高到低的顺序依次包括组件、模块、子模块和功能点,其中,各个功能单元通过接口函数建立相互之间的关联关系;
[0147] 组合模块220,被配置为按照功能级别从高到低的顺序将每级云平台的各个组件进行组合,形成云控基础平台模型,其中,云控基础平台模型的应用包括前端应用和后端应用,前端应用通过前端应用资源实现,前端应用资源包括应用界面、应用菜单、图片和可运行的执行包,后端应用包括至少一个功能单元对应的应用程序及其运行环境;
[0148] 底座创建模块230,被配置为创建集成底座,其中,集成底座包括前端服务底座和后端服务底座,前端服务底座是集成各级组件对应的应用页面的容器,用于管理前端应用资源;后端服务底座是承载云控基础平台应用运行的基础设施,用于管理云控基础平台模型的各个功能单元;
[0149] 应用部署模块240,被配置为基于前端服务底座加载前端应用资源,并且,基于后端服务底座将后端应用按照其对应功能单元的功能级别部署到云控基础平台模型的各级云平台中。
[0150] 可选的,应用部署模块240,包括:前端应用部署单元,该前端应用部署单元被配置为新建挂载组件的节点;
[0151] 根据用户权限确定对应的目标前端应用资源;
[0152] 对于每一级云平台,基于所述前端服务底座加载目标前端应用资源,并注册底座全局路由变量,其中,底座全局路由变量用于将前端不同页面进行切换;
[0153] 相应的,本发明实施例提供的装置还包括:
[0154] 前端应用启动模块,被配置为在基于前端服务底座加载前端应用资源之后,基于节点在前端服务底座启动目标前端应用资源对应的前端应用。
[0155] 可选的,应用部署模块240,包括:后端应用部署单元,该后端应用部署单元被配置为:
[0156] 将各个组件对应的应用程序和当前运行环境打包为镜像文件,作为后端应用,其中,对于某个级别的组件,该组件对应的应用程序包括该组件本身的应用程序及在该组件的功能级别下与该组件具有层级关系的模块、子模块和功能点的应用程序;
[0157] 配置各镜像文件的配置信息,其中,配置信息包括各镜像文件的名称、版本号以及镜像文件分别对应的各级组件;
[0158] 将镜像文件按照所述配置信息上传到所述后端服务底座;
[0159] 为已创建的云控基础平台模型的各级云平台分配运行资源,其中,运行资源包括待部署的目标云平台、在目标云平台运行时所要用到的中央处理器CPU核的数量、内存和硬盘;
[0160] 将镜像文件对应的后端应用安装到所述目标云平台。
[0161] 可选的,本发明实施例提供的装置还包括:
[0162] 端口映射模块,被配置为在将所述目标镜像文件对应的目标后端应用安装到该云平台之后,将目标后端应用对应的端口映射到其他后端应用的端口上,以使其他后端应用能够访问所述目标后端应用对应的端口。
[0163] 本发明实施例所提供的基于云控基础平台的应用部署装置可执行本发明任意实施例所提供的基于云控基础平台的应用部署方法,具备执行方法相应的功能模块和有益效果。未在上述实施例中详尽描述的技术细节,可参见本发明任意实施例所提供的基于云控基础平台的应用部署方法。
[0164] 实施例三
[0165] 图3为本发明实施例三提供的一种计算机设备的结构框图,如图3所示,该计算机设备包括:
[0166] 至少一个处理器(图3中示出了一个处理器520),
[0167] 处理器520和存储器510耦合,存储器510存储有在处理器520上运行的程序或指令,该程序或指令被处理器520执行时实现本发明任意实施例所提供的基于云控基础平台的应用部署方法。
[0168] 基于上述方法实施例,本发明的另一实施例提供了一种可读存储介质,其上存储有程序或指令,该程序或指令被处理器执行时使处理器实现如上任一实施方式所述的基于云控基础平台的应用部署方法。
[0169] 本领域普通技术人员可以理解:附图只是一个实施例的示意图,附图中的模块或流程并不一定是实施本发明所必须的。
[0170] 本领域普通技术人员可以理解:实施例中的装置中的模块可以按照实施例描述分布于实施例的装置中,也可以进行相应变化位于不同于本实施例的一个或多个装置中。上述实施例的模块可以合并为一个模块,也可以进一步拆分成多个子模块。
[0171] 最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明实施例技术方案的精神和范围。< / script>
Claims
1. A method for deploying an application based on a cloud control basic platform, wherein: The cloud control basic platform is composed of three-level platforms: edge cloud, regional cloud and central cloud, and is characterized in that the method includes: According to business needs, the cloud platforms at all levels in the original cloud control basic platform are disassembled into multiple independent functional units, wherein each functional unit includes components, modules, sub-modules and function points in descending order of functional level, wherein each functional unit establishes a relationship with each other through interface functions; Combining the functional units of each level of the cloud platform in order from high to low functional levels to form a cloud control basic platform model, wherein the application of the cloud control basic platform model includes a front-end application and a back-end application, the front-end application is implemented by front-end application resources, the front-end application resources include an application interface, an application menu, a picture and an executable execution package, and the back-end application includes an application corresponding to at least one functional unit and its operating environment; Create an integrated base, wherein the integrated base includes a front-end service base and a back-end service base. The front-end service base is a container that integrates application pages corresponding to functional units at all levels and is used to manage the front-end application resources; the back-end service base is an infrastructure that carries the operation of the cloud control basic platform application and is used to manage the various functional units of the cloud control basic platform model; The front-end application resources are loaded based on the front-end service base, and the back-end applications are deployed to the cloud platforms at all levels of the cloud control basic platform model according to the functional levels of their corresponding functional units based on the back-end service base.
2. The method according to claim 1, characterized in that The loading of the front-end application resources based on the front-end service base includes: Create a new node for mounting components; Determine the corresponding target front-end application resources based on user permissions; For each level of cloud platform, the target front-end application resources are loaded based on the front-end service base, and the base global routing variables are registered, wherein the base global routing variables are used to switch different pages of the front end; Correspondingly, after loading the front-end application resources based on the front-end service base, the method further includes: Based on the node, the front-end application corresponding to the target front-end application resource is started in the front-end service base.
3. The method according to claim 1, characterized in that The backend application is deployed to the cloud platforms at all levels of the cloud control basic platform model based on the backend service base according to the functional level of its corresponding functional unit, including: Package the application corresponding to each component and the current running environment into an image file as a backend application, wherein, for a component of a certain level, the application corresponding to the component includes the application of the component itself and the applications of the modules, submodules and function points that have a hierarchical relationship with the component at the functional level of the component; Configuring configuration information of each image file, wherein the configuration information includes the name and version number of each image file and the components at each level corresponding to the image files; Upload the image file to the backend service base according to the configuration information; Allocate operating resources for the cloud platforms at all levels of the created cloud control basic platform model, wherein the operating resources include the target cloud platform to be deployed, the number of CPU cores, memory and hard disk to be used when the target cloud platform is running; Install the backend application corresponding to the image file to the target cloud platform.
4. The method according to claim 3, characterized in that After installing the target backend application corresponding to the target image file on the cloud platform, the method further includes: The port corresponding to the target backend application is mapped to the port of other backend applications, so that other backend applications can access the port corresponding to the target backend application.
5. An application deployment device based on a cloud control basic platform, characterized in that: include: The disassembly module is configured to disassemble the cloud platforms at all levels in the original cloud control basic platform into multiple independent functional units according to business requirements, wherein each functional unit includes components, modules, submodules and function points in descending order of functional level, wherein each functional unit establishes a mutual association relationship through an interface function; A combination module is configured to combine the functional units of each level of the cloud platform in order from high to low functional levels to form a cloud control basic platform model, wherein the application of the cloud control basic platform model includes a front-end application and a back-end application, the front-end application is implemented by front-end application resources, the front-end application resources include an application interface, an application menu, a picture and an executable execution package, and the back-end application includes an application corresponding to at least one functional unit and its operating environment; A base creation module is configured to create an integrated base, wherein the integrated base includes a front-end service base and a back-end service base, wherein the front-end service base is a container that integrates application pages corresponding to components at all levels and is used to manage the front-end application resources; the back-end service base is an infrastructure that carries the operation of the cloud control basic platform application and is used to manage various functional units of the cloud control basic platform model; The application deployment module is configured to load the front-end application resources based on the front-end service base, and to deploy the back-end application to each level of the cloud platform of the cloud control basic platform model according to the functional level of its corresponding functional unit based on the back-end service base.
6. The device according to claim 5, characterized in that The application deployment module includes: a front-end application deployment unit, and the front-end application deployment unit is configured to: Create a new node for mounting components; Determine the corresponding target front-end application resources based on user permissions; For each level of cloud platform, the target front-end application resources are loaded based on the front-end service base, and the base global routing variables are registered, wherein the base global routing variables are used to switch different pages of the front end; Accordingly, the device further comprises: The front-end application startup module is configured to start the front-end application corresponding to the target front-end application resource in the front-end service base based on the node after the front-end application resource is loaded based on the front-end service base.
7. The device according to claim 5, characterized in that The application deployment module includes: a backend application deployment unit, and the backend application deployment unit is configured to: Package the application corresponding to each component and the current running environment into an image file as a backend application, wherein, for a component of a certain level, the application corresponding to the component includes the application of the component itself and the applications of modules, submodules and function points that have a hierarchical relationship with the component at the functional level of the component; Configuring configuration information of each image file, wherein the configuration information includes the name and version number of each image file and the components at each level corresponding to the image files; Upload the image file to the backend service base according to the configuration information; Allocate operating resources for the cloud platforms at all levels of the created cloud control basic platform model, wherein the operating resources include the target cloud platform to be deployed, the number of CPU cores, memory and hard disk to be used when the target cloud platform is running; Install the backend application corresponding to the image file to the target cloud platform.
8. The device according to claim 7, characterized in that The device also includes: The port mapping module is configured to map the port corresponding to the target backend application to the port of other backend applications after the target backend application corresponding to the target image file is installed on the cloud platform, so that other backend applications can access the port corresponding to the target backend application.
9. A computer device, characterized in that: It includes at least one processor, the processor is coupled to a memory, the memory stores a program or instruction running on the processor, and when the program or instruction is executed by the processor, the steps of the application deployment method based on the cloud control basic platform as described in any one of claims 1 to 4 are implemented.
10. A readable storage medium having a program or instruction stored thereon, characterized in that: When the program or instruction is executed by the processor, the steps of the application deployment method based on the cloud control basic platform as described in any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Decoupling method based on power dispatching management cloud platform
CN110069263A
Low-code configuration access method based on multi-cloud platform
CN113885892A
Resource management system based on cloud native platform technology and elastic construction method thereof
CN115733754A
Application method of cloud native network function
CN116260820A
Cloud-agnostic code analysis
US20240054231A1
