Industrial APP operating environment deployment method based on wooden furniture industrial Internet platform
By building a K8s cluster deployment environment on the wooden furniture industrial Internet platform, it solves the problems of complex industrial APP deployment and management, frequent updates and difficult configuration adjustments, realizes fast loading of APP configuration information and multi-language deployment, and simplifies near-field Scheduling ensures the continuity and availability of APP services.
Patent Information
- Application Number
- CN202410905933.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-08
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2044-07-08
AI Technical Summary
In the existing technology, the deployment and management of industrial APPs are complex, frequent updates and configuration adjustments are difficult, and edge computing capabilities cannot be effectively utilized, resulting in resource waste and high maintenance costs, and it is difficult to achieve multi-copy load balancing and disaster backup.
On the wooden furniture industrial Internet platform, by building a K8s cluster deployment environment, using data persistence nodes and main control nodes for tagging, deploying APP product image warehouses and running caches, creating container images and dispatching them to the production workshop, realizing APP configuration Fast loading and flexible adjustment of information, shielding the diversity of operating environments, and supporting multi-language APP deployment and quick rollback.
It achieves fast and flexible loading and adjustment of APP configuration information, reduces the impact of frequent updates, shields the diversity of operating environments, simplifies near-field scheduling, ensures the continuity and availability of APP services, and reduces deployment and maintenance costs. .
Smart Images

Figure CN118444934B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of wooden furniture industrial Internet, and in particular to an industrial APP operating environment deployment method based on a wooden furniture industrial Internet platform. Background Art
[0002] With the further deepening of digital transformation of traditional industries such as intelligent manufacturing and industrial Internet in my country, there are more and more industrial apps of different types and languages running in enterprises, and the deployment implementation methods are becoming more and more flexible and changeable, which makes the deployment process more complicated and difficult to manage uniformly; in addition, industrial apps need to frequently update versions, restart, adjust and replace configuration files during production practice; industrial apps are far away from the production site, and the edge computing capabilities of apps cannot be brought into play. These problems plague enterprises and require a lot of manpower and material resources to manage and deploy. Therefore, it is necessary to solve the problems of industrial app deployment management that plague enterprises, such as the deployment of diversified apps, frequent updates, configuration adjustments, and near-factory scheduling.
[0003] In the existing enterprise application deployment and update process, the deployment of APPs developed in different languages requires the preparation of multiple language operating environments and versions, such as PHP, JDK, NET, etc., as well as different operating system platforms, such as Windows and Linux. This requires enterprises to configure the corresponding operating systems and operating environments for different APPs.
[0004] Secondly, when updating, backing up, and rolling back applications deployed in traditional ways, a large number of tedious steps are required, such as: the process of updating the APP version: 1. Back up the current application version to the specified location, 2. Shut down the current APP service, 3. Replace and start the new version of the APP; the process of rolling back when an abnormality occurs in the APP deployment: 1. Stop the current version, 2. Replace and start the old version; and the APP service is unavailable during the update and rollback process;
[0005] Furthermore, due to the APP's dependence on the operating environment and operating system, enterprises need to equip each production workshop with an operating environment that meets the needs of multiple types of APPs, which results in a large waste of resources, complexity, and maintenance difficulties. Therefore, the cost for most enterprises to achieve flexible near-factory scheduling of multiple types of APPs is relatively high.
[0006] In addition, due to the existing deployment methods, it is difficult to achieve multiple copies of the same APP running and providing services at the same time, and through multi-copy load balancing and disaster backup, when problems arise in the deployment of a single copy of the APP, manual intervention is required to handle operation and maintenance operations such as load switching or restarting the APP service, which greatly limits the availability and maintainability of the APP. Summary of the invention
[0007] In order to solve the above-mentioned problems of the prior art, the present invention provides an industrial APP operating environment deployment method based on the wooden furniture industrial Internet platform, which aims to solve the problems of diversified APP deployment, frequent updates, configuration adjustments, near-factory scheduling, etc. existing in the enterprise application deployment of the industrial Internet provided by the prior art.
[0008] The present invention provides an industrial APP operating environment deployment method based on a wooden furniture industrial Internet platform, the method comprising the following steps:
[0009] Deploy data persistence nodes and master control nodes in the central computer room, deploy work nodes in the production workshop, and build a deployment environment based on the K8s cluster;
[0010] The master control node labels the data persistence nodes and working nodes;
[0011] Deploy the APP product image warehouse, APP data persistent operation warehouse and APP operation cache in the K8s cluster. The main control node dispatches the deployment content to the data persistence node according to the label marking results;
[0012] Save the configuration information of each APP in the K8s cluster and initialize the APP running data;
[0013] The main control node packages the APP products into container images and pushes them to the APP product image warehouse;
[0014] Create a deployment object for each APP in the K8s cluster, mount the configuration information of each APP to the deployment object, and the main control node dispatches the deployment object to the working node of the production workshop according to the label marking result;
[0015] Schedule the APP to the working node and start the corresponding deployment object to run the APP.
[0016] Optionally, deploy data persistence nodes and master control nodes in the central computer room, deploy working nodes in the production workshop, and build a deployment environment based on the K8s cluster, including:
[0017] Install the servers and operating systems of the data persistence node and the main control node in the central computer room, and install the servers and operating systems of the working nodes in the production workshop;
[0018] Connect the servers of the data persistence node, the main control node and the working node to the network and install the K8s cluster.
[0019] Optionally, the master control node performs label marking steps on the data persistence node and the working node, specifically including:
[0020] The main control node labels the data persistence node data_node in the central computer room with the label: Label=Data;
[0021] The main control node labels the work nodes work_node* in each production workshop: Label=work1, work2...
[0022] Optionally, deploy the APP product image repository, APP data persistent operation repository, and APP operation cache in the K8s cluster. The master control node schedules the deployment content to the data persistence node according to the label marking results, including:
[0023] Install Harbor as the APP product image repository in the K8s cluster, install the database as the APP data persistent operation repository, and install Redis as the APP operation cache;
[0024] The master control node schedules the deployment content to the data persistence node and mounts the storage to the data storage disk based on the label marking results.
[0025] Optionally, save the configuration information of each APP in the K8s cluster and initialize the APP running data steps, including:
[0026] Create a ConfigMap resource for each APP in the K8s cluster to save configuration information;
[0027] Import each APP database into the deployed APP data persistent operation warehouse to initialize the operation data of each APP.
[0028] Optionally, the main control node packages the APP product into a container image and pushes it to the APP product image warehouse, specifically including:
[0029] The main control node uses the image packaging tool to package the APP products into container images based on the different languages and operating environment images of each APP as the base package;
[0030] Push the packaged container image to the APP product image repository.
[0031] Optionally, package the APP products, including:
[0032] When packaging the APP products, the main control node uses the image packaging tool to package based on the current date, hour, minute and second as the Tag label to obtain the container image of each APP.
[0033] Optionally, create a deployment object for each APP in the K8s cluster, mount the configuration information of each APP to the deployment object, and the main control node schedules the deployment object to the work node of the production workshop according to the label marking result, including:
[0034] Create a Deployment resource for each APP in the K8s cluster for deployment;
[0035] Mount the ConfigMap that stores the configuration information of each APP to the configuration file directory of the Deployment;
[0036] The pre-assigned production workshop to which each APP belongs is obtained. The main control node dispatches the Deployment resources to the server of the work node of the corresponding label of the production workshop to which each APP belongs according to the label marking result.
[0037] Optionally, create a Deployment resource for each app in the K8s cluster and perform the deployment steps, including:
[0038] Create a Deployment resource for each APP in the K8s cluster;
[0039] The tag tag generated when packaging the APP corresponding to the Deployment resource is used as the mirror tag of the Deployment resource.
[0040] Optionally, schedule the APP to a working node and start the corresponding deployment object to run the APP, including:
[0041] Start the Deployment resource corresponding to the APP in the K8s cluster to schedule the APP to the corresponding working node and start it;
[0042] Observe the POD startup log in the Deployment resource until the POD status is Running.
[0043] The beneficial effects of the present invention are as follows: a method for deploying an industrial APP operating environment based on a wooden furniture industrial Internet platform is proposed. By building a K8s cluster deployment environment and deploying dependent components in the K8s cluster, the APP configuration information can be quickly and flexibly loaded and adjusted, reducing the impact of frequent APP updates; at the same time, by using multiple language operating environment images as different language APP base packages to make APP images, and creating tag labels based on usage time when packaging the APP, on the one hand, the diversity of APP operating environments can be shielded, and diversified, different language APP deployment can be achieved. On the other hand, the rapid rollback of APP versions can be achieved to ensure the continuity of APP services; in addition, by labeling data persistence nodes and working nodes, flexible APP deployment and operation can be achieved according to the labeling results, reducing the difficulty of near-field scheduling. The technical problems of low efficiency of traditional APP operating environment deployment, complex configuration management, inability to dynamically specify deployment locations, and difficulty in changing and rolling back APP versions are solved. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 This is a flowchart of the steps of the industrial APP operating environment deployment method based on the wooden furniture industrial Internet platform provided in this embodiment. DETAILED DESCRIPTION
[0045] 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.
[0046] like Figure 1 As shown, a method for deploying an industrial APP operating environment based on a wooden furniture industrial Internet platform comprises the following steps:
[0047] S1: Deploy data persistence nodes and main control nodes in the central computer room, deploy working nodes in the production workshop, and build a deployment environment based on the K8s cluster;
[0048] S2: The master control node labels the data persistence nodes and working nodes;
[0049] S3: Deploy the APP product image warehouse, APP data persistent operation warehouse and APP operation cache in the K8s cluster. The main control node schedules the deployment content to the data persistence node according to the label marking results;
[0050] S4: Save the configuration information of each APP in the K8s cluster and initialize the APP running data;
[0051] S5: The main control node packages the APP product into a container image and pushes it to the APP product image warehouse;
[0052] S6: Create a deployment object for each APP in the K8s cluster, mount the configuration information of each APP to the deployment object, and the main control node schedules the deployment object to the working node in the production workshop according to the label marking result;
[0053] S7: Schedule the APP to the working node and start the corresponding deployment object to run the APP.
[0054] It should be noted that in actual wooden furniture companies, multiple apps will be running at the same time in the production environment, and these apps need to have the ability to be deployed across multiple server nodes. However, the enterprise application deployment of the industrial Internet provided by the prior art has problems such as the deployment of diversified apps, frequent updates, configuration adjustments, and near-factory scheduling. In order to solve the above problems, this embodiment first deploys data persistence nodes and main control nodes in the central computer room, and deploys working nodes in the production workshop. Finally, by building a K8s cluster deployment environment, dependent components such as the APP product image warehouse, the APP data persistent operation warehouse, and the APP operation cache are deployed in the K8s cluster, and the K8s cluster is used to save the configuration information of each APP and then initialize the APP operation data, so as to realize fast and flexible loading and adjustment of APP configuration information, reducing the impact of frequent updates of APP; at the same time, by labeling the data persistence nodes and working nodes, flexible APP deployment and operation can be achieved according to the labeling results, reducing the difficulty of near-field scheduling.
[0055] In a preferred embodiment, data persistence nodes and main control nodes are deployed in the central computer room, working nodes are deployed in the production workshop, and the steps of building a deployment environment based on the K8s cluster specifically include:
[0056] S11: Install the servers and operating systems of the data persistence node and the main control node in the central computer room, and install the servers and operating systems of the working nodes in the production workshop;
[0057] S12: Connect the servers of the data persistence node, the main control node and the working node to the network and install the K8s cluster.
[0058] On this basis, the master control node performs label marking steps on the data persistence node and the working node, including:
[0059] S21: The main control node labels the data persistence node data_node in the central computer room with the label: Label=Data;
[0060] S22: The main control node labels the work nodes work_node* in each production workshop: Label=work1, work2...
[0061] On this basis, the APP product image warehouse, APP data persistent operation warehouse and APP operation cache are deployed in the K8s cluster. The main control node schedules the deployment content to the data persistence node according to the label marking results, including:
[0062] S31: Install Harbor as the APP product image repository, install the database as the APP data persistent operation repository, and install Redis as the APP operation cache in the K8s cluster;
[0063] S32: The main control node schedules the deployment content to the data persistence node according to the label marking result and mounts the storage to the data storage disk.
[0064] In this embodiment, firstly, the servers and operating systems of the main control node and the data persistence node are installed in the central computer room, the working node servers and operating systems are installed in the production workshop, and the K8s cluster is installed after ensuring that the network connection between all servers is normal. Among them, the data persistence node uses a reliable, sufficient capacity, and powerful IO performance data storage disk to provide a more stable and reliable configuration information loading and deployment object scheduling platform. After that, the data persistence node and the working node are labeled with Labels, and the APP scheduling information provided by the platform is associated with the Label to realize near-factory scheduling based on platform capabilities, realize flexible APP deployment and operation, and solve the problem that the existing enterprise application deployment needs to configure corresponding operating systems and operating environments for different APPs.
[0065] In a preferred embodiment, the configuration information of each APP is saved in the K8s cluster, and the steps of initializing the APP running data specifically include:
[0066] S41: Create a ConfigMap resource for each APP in the K8s cluster to save configuration information;
[0067] S42: Import each APP database into the deployed APP data persistent operation warehouse to initialize the operation data of each APP.
[0068] On this basis, the main control node packages the APP product into a container image and pushes it to the APP product image warehouse, which specifically includes:
[0069] S51: The main control node uses an image packaging tool to package the APP products into container images based on different languages and operating environment images of each APP as the base package;
[0070] S52: Push the packaged container image to the APP product image repository.
[0071] In this embodiment, after completing the deployment of the K8s cluster and the installation of dependent components, it is necessary to first save the configuration information of each APP in the K8s cluster and initialize the APP running data, and then use multiple language running environment images as different language APP base packages to make APP images, which can shield the diversity of APP running environments and realize the deployment of diversified and different language APPs. This solves the problem that the existing enterprise application deployment needs to prepare multiple language running environments and versions for the deployment of diversified and different development language APPs.
[0072] In a preferred embodiment, a deployment object is created for each APP in the K8s cluster, and the configuration information of each APP is mounted to the deployment object. The main control node schedules the deployment object to the working node of the production workshop according to the label marking result, which specifically includes:
[0073] S61: Create a Deployment resource for each APP in the K8s cluster for deployment;
[0074] S62: Mount the ConfigMap containing the configuration information of each APP to the configuration file directory of the Deployment;
[0075] S63: Obtain the pre-assigned production workshop to which each APP belongs, and the main control node dispatches the Deployment resources to the server of the working node of the corresponding label of the production workshop to which each APP belongs according to the label marking result.
[0076] In this embodiment, when APP is deployed and scheduled, the production workshop to which the current APP belongs or needs to be scheduled is obtained, and VolumeMount is used to schedule the Deployment to the working node of the production workshop server marked with the specified label. By labeling the data persistence node and the working node, flexible APP deployment and operation are achieved according to the label marking results, which reduces the difficulty of near-field scheduling and solves the problem that when existing enterprise applications are deployed in APP scheduling, the operating environment has a large waste of resources and high complexity and maintenance difficulty, which makes the cost of implementing near-field scheduling high.
[0077] In a preferred embodiment, packaging the APP product specifically includes:
[0078] S511: When packaging the APP products, the main control node uses the image packaging tool to package based on the current date, hour, minute and second as the Tag label to obtain the container image of each APP.
[0079] On this basis, create a Deployment resource for each APP in the K8s cluster to perform deployment steps, including:
[0080] S611: Create a Deployment resource for each app in the K8s cluster;
[0081] S612: The Tag tag generated when packaging the APP corresponding to the Deployment resource is used as the mirror Tag of the Deployment resource.
[0082] In this embodiment, a tag label is created when the APP is packaged based on the usage time (for example: 2024.03.26.10.46), and the tag label of the corresponding APP is used as the image tag when creating the Deployment resource. In this way, based on the container orchestration capability of K8S, when the APP is updated or rolled back, its container image can be adjusted to the corresponding version to achieve the APP version change, ensure the continuity of the APP service, and maintain the running state of the expected number of running copies. At the same time, this embodiment is also based on the health check characteristics of K8s for containers, including the liveness probe livenessProbe and the readiness probe readinessProbe, to achieve that when the APP version is updated or rolled back, the original version container will only be stopped after the replaced version survives and provides services normally, ensuring the continuity of the APP service. Finally, this embodiment is also based on the feature that the same APP deployment of K8s can run multiple copies at the same time, and through a front-end agent such as NGINX, multi-copy APP load balancing and APP service disaster recovery are achieved, ensuring the availability of the APP and improving the load capacity.
[0083] In this embodiment, scheduling the APP to the working node and starting the corresponding deployment object to run the APP specifically includes:
[0084] S71: Start the Deployment resource corresponding to the APP in the K8s cluster to schedule the APP to the corresponding working node and start it;
[0085] S72: Observe the POD startup log in the Deployment resource until the POD status is Running.
[0086] In this embodiment, after the scheduling of Deployment resources is completed, the Deployment resources corresponding to the APP are started in the K8s cluster to start the APP on the corresponding working node, and the APP is ensured to run according to the observed POD status. Therefore, the APP is started by scheduling and pulling the APP image, providing the APP operating environment and the complete deployment process of the APP for business services, integrating the platform APP's operating environment deployment in the cloud native environment into a simple and clear fixed process, solving the technical problems of low efficiency of traditional APP operating environment deployment, complex configuration management, inability to dynamically specify deployment locations, and difficulty in changing and rolling back APP versions.
[0087] In the description of the embodiments of the present invention, the terms "first", "second", "third", and "fourth" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first", "second", "third", and "fourth" may explicitly or implicitly include one or more of the features. In the description of the present invention, unless otherwise specified, "multiple" means two or more.
[0088] In the description of the embodiments of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "install", "connect", "connect", and "assemble" should be understood in a broad sense, for example: it can be a fixed connection, a detachable connection, or an integral connection; it can be directly connected, or indirectly connected through an intermediate medium, or it can be internal communication between two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0089] In the description of the embodiments of the present invention, specific features, structures, materials or characteristics may be combined in a suitable manner in any one or more embodiments or examples.
[0090] In the description of the embodiments of the present invention, it should be understood that "-" and "~" represent a range between two values, and the range includes the endpoints. For example, "AB" represents a range greater than or equal to A and less than or equal to B. "A~B" represents a range greater than or equal to A and less than or equal to B.
[0091] In the description of the embodiments of the present invention, the term "and / or" herein is merely a description of the association relationship of associated objects, indicating that three relationships may exist, for example: A and / or B may represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " herein generally indicates that the associated objects before and after are in an "or" relationship.
[0092] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for deploying an industrial APP operating environment based on a wooden furniture industrial Internet platform, characterized in that: The method comprises the following steps: Deploy data persistence nodes and master control nodes in the central computer room, deploy work nodes in the production workshop, and build a deployment environment based on the K8s cluster; The master control node labels the data persistence nodes and working nodes; Deploy APP product image warehouse, APP data persistent operation warehouse and APP operation cache in K8s cluster. The main control node dispatches the deployment content to the data persistence node according to the label marking results; specifically, install Harbor as APP product image warehouse, install database as APP data persistent operation warehouse, and install Redis as APP operation cache in K8s cluster; the main control node dispatches the deployment content to the data persistence node according to the label marking results and mounts the storage to the data storage disk; Save the configuration information of each APP in the K8s cluster and initialize the APP running data; specifically, create a ConfigMap resource for each APP in the K8s cluster to save the configuration information; import each APP database into the deployed APP data persistent running warehouse to initialize the running data of each APP; The main control node packages the APP products into container images and pushes them to the APP product image warehouse; specifically, the main control node uses the image packaging tool to package the APP products into container images based on different languages and operating environment images of each APP as the base package; and pushes the packaged container image to the APP product image warehouse; Packaging the APP products, specifically including: when packaging the APP products, the main control node uses the image packaging tool to package based on the current date, hour, minute and second as the Tag label to obtain the container image of each APP; Create a deployment object for each APP in the K8s cluster, mount the configuration information of each APP to the deployment object, and the main control node dispatches the deployment object to the working node of the production workshop according to the label marking result; specifically, it includes: creating a Deployment resource for each APP in the K8s cluster for deployment; mounting the ConfigMap containing the configuration information of each APP to the configuration file directory of the Deployment; obtaining the pre-assigned production workshop to which each APP belongs, and the main control node dispatches the Deployment resource to the server of the working node of the corresponding label of the production workshop to which each APP belongs according to the label marking result; Schedule the APP to the working node and start the corresponding deployment object to run the APP; specifically include: creating a Deployment resource for each APP in the K8s cluster; using the Tag label generated when packaging the APP corresponding to the Deployment resource as the mirror Tag of the Deployment resource.
2. The industrial APP operating environment deployment method based on the wooden furniture industrial Internet platform according to claim 1 is characterized in that: Deploy data persistence nodes and master control nodes in the central computer room, deploy work nodes in the production workshop, and build a deployment environment based on the K8s cluster, including: Install the servers and operating systems of the data persistence node and the main control node in the central computer room, and install the servers and operating systems of the working nodes in the production workshop; Connect the servers of the data persistence node, the main control node and the working node to the network and install the K8s cluster.
3. The industrial APP operating environment deployment method based on the wooden furniture industrial Internet platform according to claim 1 is characterized in that: The master control node performs label marking steps on the data persistence node and the working node, including: The main control node labels the data persistence node data_node in the central computer room with the label: Label=Data; The main control node labels the work nodes work_node* in each production workshop: Label=work1, work2...
4. The method for deploying an industrial APP operating environment based on a wooden furniture industrial Internet platform according to claim 1 is characterized in that: Schedule the APP to the working node and start the corresponding deployment object to run the APP, including: Start the Deployment resource corresponding to the APP in the K8s cluster to schedule the APP to the corresponding working node and start it; Observe the POD startup log in the Deployment resource until the POD status is Running.
