CN114020285A - Industrial APP operation method and device - Google Patents

Industrial APP operation method and device Download PDF

Info

Publication number
CN114020285A
CN114020285A CN202111289778.5A CN202111289778A CN114020285A CN 114020285 A CN114020285 A CN 114020285A CN 202111289778 A CN202111289778 A CN 202111289778A CN 114020285 A CN114020285 A CN 114020285A
Authority
CN
China
Prior art keywords
file
target
installation package
app
declarative
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111289778.5A
Other languages
Chinese (zh)
Inventor
谭彰
徐慧
杨明明
黄建波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Lanzhuo Industrial Internet Information Technology Co ltd
Original Assignee
Zhejiang Lanzhuo Industrial Internet Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Lanzhuo Industrial Internet Information Technology Co ltd filed Critical Zhejiang Lanzhuo Industrial Internet Information Technology Co ltd
Priority to CN202111289778.5A priority Critical patent/CN114020285A/en
Publication of CN114020285A publication Critical patent/CN114020285A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/63Image based installation; Cloning; Build to order
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/52Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems during program execution, e.g. stack integrity ; Preventing unwanted data erasure; Buffer overflow
    • G06F21/53Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems during program execution, e.g. stack integrity ; Preventing unwanted data erasure; Buffer overflow by executing in a restricted environment, e.g. sandbox or secure virtual machine
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses an industrial APP operation method and device, which are used for receiving an installation package of a target industrial APP; analyzing the installation package to obtain a target industrial APP descriptive file, a resource declarative file, a mirror image construction descriptive file, a dependency declarative file, an arrangement file and a configuration file; packaging a target industrial APP descriptive file, a resource declarative file, a mirror image construction descriptive file, a dependency declaration file, an arrangement file and a configuration file based on a preset packaging rule to obtain a target installation package, wherein the preset packaging rule comprises the dependency relationship of each file; and placing the target installation package in a container, and operating the target installation package in the container. Above-mentioned process packs the installation package based on predetermineeing the rule, obtains the target installation package, operates the target installation package in the container, has realized the isolation of different industry APPs, has avoided the installation of industry internet platform for industry APP design complicacy, upgrade flow, has improved the holistic management and control ability of platform.

Description

Industrial APP operation method and device
Technical Field
The invention relates to the technical field of industrial internet, in particular to an industrial APP operation method and device.
Background
With the ecological development of the industrial internet, more and more industrial APPs are developed and project application is performed. How to effectively release management, installation and deployment and controllable operation is a difficult problem in front of the people. Existing industrial APPs all reside in the operating system in the form of processes, all of which share operating system resources.
When a plurality of industrial APPs are installed on a certain machine, resources such as a storage space, port mapping, memory occupation, and the like need to be strictly divided for the industrial APPs. Moreover, in order to deal with industrial APPs developed by different development languages, a plurality of compiling and running environments, such as JRE,. NET Framework, etc., need to be configured for the industrial APPs, and in some special cases, a plurality of versions of compiling and running environments, such as Java 8, Java 11, etc., need to be configured for the same machine. Above various circumstances forces industry internet platform for the complicated installation of industry APP design, upgrading flow, has increased the cost to the operation maintenance of industry APP, has improved user's the use degree of difficulty, has reduced the management and control ability of whole platform.
Disclosure of Invention
In view of this, the present invention provides an industrial APP operating method and apparatus, which are used to solve the problem that when a plurality of industrial APPs are installed on a certain machine, resources such as a storage space, port mapping, memory occupation, and the like need to be strictly divided for the industrial APPs. Moreover, in order to deal with industrial APPs developed by different development languages, a plurality of compiling and running environments, such as JRE,. NET Framework, etc., need to be configured for the industrial APPs, and in some special cases, a plurality of versions of compiling and running environments, such as Java 8, Java 11, etc., need to be configured for the same machine. Above various circumstances forces industry internet platform for the complicated installation of industry APP design, upgrading flow, has increased the cost to the operation maintenance of industry APP, has improved user's the use degree of difficulty, has reduced the problem of the management and control ability of whole platform, and concrete scheme is as follows:
an industrial APP operation method comprising:
receiving an installation package of a target industrial APP;
analyzing the installation package to obtain a target industrial APP descriptive file, a resource declarative file, a mirror image construction descriptive file, a dependence declarative file, an arrangement file and a configuration file;
packaging the target industrial APP descriptive file, the resource declarative file, the mirror image construction descriptive file, the dependency declaration file and the layout file based on a preset packaging rule to obtain a target installation package, wherein the preset packaging rule comprises the dependency relationship of each file;
and placing the target installation package in a container, and operating the target installation package in the container.
Optionally, the method for packaging the target industry APP descriptive file, the resource declarative file, the image construction descriptive file, the dependency declarative file and the layout file based on a preset packaging rule includes:
acquiring file identifications of the target industrial APP descriptive file, the resource declarative file, the mirror image construction descriptive file, the dependency declarative file, the layout file and the configuration file, wherein the file identifications are used for identifying different files;
and acquiring the subordination relation in the preset packaging rule, and adding the corresponding file to the corresponding position according to the file identification based on the subordination relation to obtain the target installation package.
Optionally, the method may analyze the installation package to obtain a target industrial APP descriptive file, a resource declarative file, a mirror image construction descriptive file, a dependency declarative file, an arrangement file, and a configuration file, and includes:
acquiring each preset analysis keyword;
traversing the installation package, and searching a target industrial APP descriptive file, a resource declarative file, a mirror image construction descriptive file, a dependency declarative file, an arrangement file and a configuration file based on each preset analysis keyword.
The method described above, optionally, running the target installation package in the container includes:
analyzing the target installation package to acquire the arrangement definition content;
mirroring the target installation package;
under the condition that the mirror image is successful, performing dependence analysis and resource application to obtain a resource statement result;
generating an arrangement file based on the arrangement definition content and the resource declaration result, and starting the target industry APP based on the arrangement file.
The above method, optionally, further includes:
obtaining each brother APP within the preset range of the target industrial APP;
obtaining the operation parameters of all brother APPs;
and correcting the target industrial APP based on the operation parameters.
An industrial APP operation device comprising:
the receiving module is used for receiving an installation package of the target industrial APP;
the analysis module is used for analyzing the installation package to obtain a target industrial APP descriptive file, a resource declarative file, a mirror image construction descriptive file, a dependency declarative file, an arrangement file and a configuration file;
the packaging module is used for packaging the target industrial APP descriptive file, the resource declarative file, the mirror image construction descriptive file, the dependency declarative file and the layout file based on a preset packaging rule to obtain a target installation package, wherein the preset packaging rule comprises the dependency relationship of each file;
and the operation module is used for placing the target installation package in a container and operating the target installation package in the container.
The above apparatus, optionally, the packing module includes:
a first obtaining unit, configured to obtain file identifiers of the target industrial APP descriptive file, the resource declarative file, the image construction descriptive file, the dependency declaration file, the layout file, and the configuration file, where the file identifiers are used to identify different files;
and the second obtaining unit is used for obtaining the subordination relation in the preset packaging rule, and adding the corresponding file to the corresponding position according to the file identification based on the subordination relation to obtain the target installation package.
The above apparatus, optionally, the parsing module includes:
a third obtaining unit, configured to obtain each preset parsing keyword;
and the searching unit is used for searching the target industrial APP descriptive file, the resource declarative file, the mirror image construction descriptive file, the dependency declarative file, the layout file and the configuration file based on each preset analysis keyword through traversing the installation package.
The above apparatus, optionally, the operation module includes:
the analysis unit is used for analyzing the target installation package to acquire the arrangement definition content;
the mirror image unit is used for carrying out mirror image on the target installation package;
the analysis and application unit is used for performing dependence analysis and resource application under the condition of successful mirroring to obtain a resource statement result;
and the starting unit is used for generating a layout file based on the layout definition content and the resource declaration result and starting the target industrial APP based on the layout file.
The above apparatus, optionally, further comprises:
the first obtaining module is used for obtaining all brother APPs within the preset range of the target industrial APP;
the second obtaining module is used for obtaining the operating parameters of all brother APPs;
and the correction module is used for correcting the target industrial APP based on the operation parameters.
Compared with the prior art, the invention has the following advantages:
the invention discloses an industrial APP operation method and device, wherein the method comprises the following steps: receiving an installation package of a target industrial APP; analyzing the installation package to obtain a target industrial APP descriptive file, a resource declarative file, a mirror image construction descriptive file, a dependency declarative file, an arrangement file and a configuration file; packaging a target industrial APP descriptive file, a resource declarative file, a mirror image construction descriptive file, a dependency declarative file, an arrangement file and a configuration file based on a preset packaging rule to obtain a target installation package, wherein the preset packaging rule comprises the dependency relationship of each file; and placing the target installation package in a container, and operating the target installation package in the container. Above-mentioned process packs the installation package based on predetermineeing the rule, obtains the target installation package, operates the target installation package in the container, has realized the isolation of different industry APPs, has avoided the installation of industry internet platform for industry APP design complicacy, upgrade flow, has improved the holistic management and control ability of platform.
Of course, it is not necessary for any product in which the invention is practiced to achieve all of the above-described advantages at the same time.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow chart of a prior art industrial APP operation;
FIG. 2 is a schematic diagram of a conventional installation package structure;
FIG. 3 is a schematic diagram of an industrial APP operation process disclosed in an embodiment of the present application;
FIG. 4 is a schematic diagram of a transformation of a layout file according to an embodiment of the present disclosure;
fig. 5 is a block diagram of an industrial APP running device disclosed in the embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
The invention discloses an industrial APP operation method and device, which are applied to the operation process of industrial APP, and along with the ecological development of industrial internet, more and more industrial APPs are developed and project application is carried out. How to effectively release management, installation and deployment and controllable operation is a difficult problem in front of the people. In the prior art, industrial APPs all reside in an operating system in the form of processes, and all the processes share operating system resources. When a plurality of industrial APPs are installed on a certain machine, resources such as storage space, port mapping, memory occupation and the like need to be strictly divided for the industrial APPs. Moreover, in order to deal with industrial APPs developed by different development languages, a plurality of compiling and running environments, such as JRE,. NET Framework, etc., need to be configured for the industrial APPs, and in some special cases, a plurality of versions of compiling and running environments, such as Java 8, Java 11, etc., need to be configured for the same machine. Above various circumstances forces industry internet platform for the complicated installation of industry APP design, upgrading flow, has increased the cost to the operation maintenance of industry APP, has improved user's the use degree of difficulty, has reduced the management and control ability of whole platform. Based on the above problem, an embodiment of the present invention provides an industrial APP operating method, where an execution flow of the method is shown in fig. 1, and the method includes the steps of:
s101, receiving an installation package of a target industrial APP;
in the embodiment of the present invention, the installation package is constructed based on an agreement, and the installation package includes: the executable file and each file constructed based on the convention, wherein the convention can be agreed based on experience or specific conditions, the content of the convention is not limited in the embodiment of the invention, different corresponding files are agreed to be different, and the file is sent to the embodiment of buying, and the installation package comprises the following steps: target industry APP descriptive files, resource declarative files, image construction descriptive files, dependency declarative files, layout files, and configuration files are exemplified.
S102, analyzing the installation package to obtain a target industrial APP descriptive file, a resource declarative file, a mirror image construction descriptive file, a dependency declarative file, an arrangement file and a configuration file;
in the embodiment of the invention, the installation package can exist in a compressed package form, if the installation package exists in the compressed package form, the installation package is preferentially decompressed, and after decompression is successful, preset analysis keywords are obtained, wherein each preset analysis keyword is determined based on convention, each analysis keyword corresponds to one file in the installation package, each preset analysis keyword can be set based on experience or specific conditions, the installation package is traversed based on each preset analysis keyword, and a target industrial APP descriptive file, a resource declarative file, a mirror image construction descriptive file, a dependency declaration file, an arrangement file and a configuration file are searched.
In the embodiment of the invention, the target industry APP descriptive file mainly comprises app.yaml and vendor.yaml. Its main role is to describe the basic information of industrial APP, such as name, code, developer information, etc. Yaml, APP information is defined as follows:
# install package version. And (6) filling. Fixed value
apiVersion:v1alpha1
# app name. And (6) filling. The english lowercase name. Length limit 5-10
name demo # app display name. And (6) filling.
showName device management
# app developer name. And (6) filling. The english lowercase name. Length limit 5-10
vendorName:demo
Version # app. And (6) filling. The format needs to conform to the [ SemVer 2] (https:// SemVer. org /) specification.
Such as 1.0.0
appVersion:1.0.0
# app short description. And (6) filling. The function of the app is described in a sentence.
description this is an app
# app describes the document in detail. And (4) unnecessary filling. Such as: help manual
doc:/static/help.doc
The # app icon. And (4) unnecessary filling.
icon:/static/icon.png
# app Master Access Address. And (4) unnecessary filling.
Yanml, developer information is defined as follows:
apiVersion:v1alpha1
# developer name. And (6) filling. Consistent with vendorName in app.yaml.
name:demo
The # developer shows the name. And (6) filling.
showName blue apple
Account ID of # app operation platform (BOSS). And (4) unnecessary filling.
bluetronId:
# developer organizes names. And (4) unnecessary filling.
organization:
# web site of developer organization. And (4) unnecessary filling.
url:
# rights statement. And (4) unnecessary filling.
copyright:
# address of developer organization. And (4) unnecessary filling.
address:
# mailbox addresses of developer organization. And (6) filling. And problem feedback is facilitated.
email:
The resource declarative file mainly comprises requisition.yaml and data/resource.yaml. The method mainly has the functions of describing relevant resources required by the industrial APP during operation, describing resources such as databases, storage volumes and the like externally provided by the industrial APP, and describing interfaces or pages externally provided by the industrial APP.
Yaml resource declaration is defined as follows:
apiVersion:v1alpha1
requirements:
# database name. And (6) filling.
-name:xyz
# resource type. And (6) filling. Currently, it supports: maridb, tsdb
resourceType:mariadb
resource. yaml menu resources are as follows:
apiVersion:v1alpha1
resources:
the # menu code. And (6) filling.
-code:xxx
The # menu parent code. And (4) unnecessary filling. And representing the root node when empty.
parentCode:yyy
# menu name. And (6) filling.
name test
The # menu type. And (6) filling. Taking values: FOLDER, PAGE, FLOW, OPERATION and OPERATION, FOLDER, PAGE, FLOW, and OPERATION, OPERATION and OPERATION are defined as 0
type:0
# open type. And (6) filling. Taking values: SELF, NEW, and pop-up windows
openType:0
# access address. And (4) unnecessary filling, namely filling when the type is 1.
url:/xxx/yyy/zzz
The # ordering code. And (6) filling.
sort:10000
# description. And (4) unnecessary filling.
desc:xxx
The image construction descriptive file mainly comprises build. The method is mainly used for describing mirror image construction description information of the industrial APP and comprises a mirror image description file Dockerfile, a mirror image name, a mirror image version and the like.
The build.yaml mirror image construction is defined as follows:
apiVersion:v1alpha1
images:
# mirror name. And (6) filling. The characters are required to be written in small, and the length is controlled to be 5-10 characters.
-name:backend
The # mirror version number. And (6) filling. Such as: 1.0.0.
tag:1.0.0
dockerfile path built by # mirror. And (6) filling.
dockerfile:/bin/backend/Dockerfile
The dependency declaration document mainly contains dependencies. Its main role is to describe the dependency statements of industrial APPs on platform, environment and sibling APPs. When the platform deploys the industrial APP, verification and verification can be carried out through the declared dependence of the industrial APP to judge whether the industrial APP can run or not or if the running parameters are adjusted.
Yaml dependence is defined as follows:
Figure BDA0003334258610000101
the layout file mainly comprises compound. Its main role is to define the ingress endpoint for external access, the network structure of internal data flows, and volume mount policy, etc. With these definitions, the platform can build a sandbox model for it and deploy resources. In the embodiment of the invention, the target industrial APP developer defines the storage volume resource of the APP in advance through requirement. And executing different storage volume mounting strategies according to different resource types. Roughly classified into three types: first, a temporary storage volume that is created as an application is created and messages are mounted as application messages; secondly, the data can be permanently stored in a local path mount on a fixed machine hard disk; thirdly, the network disk can be mounted in a network hard disk mode, and the network disk can not disappear due to application drift.
In the embodiment of the invention, the form of the sandbox is defined on the concept of a hard disk-based virtual machine. However, with the development of container technology, the container defines resources such as cpu, memory, file system, network, process, etc. for the "application", and these resources are relatively isolated from other containers and do not interfere with each other. Such an operating system based, resource isolated application (pod) we can also define a "sandbox".
Yaml container layout is defined as follows:
Figure BDA0003334258610000111
Figure BDA0003334258610000121
the configuration file mainly comprises config. The main function of the system is to provide a door interface of personalized configuration for the industrial APP, and the personalized configuration information can be conveniently provided for the industrial APP in a man-machine interaction mode during installation.
S103, packing the target industrial APP descriptive file, the resource declarative file, the mirror image construction descriptive file, the dependency declarative file, the layout file and the configuration file based on a preset packing rule to obtain a target installation package, wherein the preset packing rule comprises the dependency relationship of each file;
in the embodiment of the present invention, the target industrial APP descriptive file, the resource declarative file, the image construction descriptive file, the dependency declarative file, the arrangement file, and the configuration file are packaged based on a preset packaging rule to obtain a target installation package, where the preset packaging rule includes a dependency relationship of each file, and the preset packaging rule is used to package the target industrial APP descriptive file, the resource declarative file, the image construction descriptive file, the dependency declarative file, the arrangement file, and the configuration file into a target installation package structure as shown in fig. 2 based on the dependency relationship, and a first-level folder of the target installation package in fig. 2 includes: yaml, vendor. yaml, dependencies. yaml, compound. yaml, requirement. yaml, data/, bulid. yaml, bin/and config. ini, wherein data/contains the secondary folder resource. yaml, bin/contains the secondary folder Dockerfile and the executable program.
S104, placing the target installation package in a container, and operating the target installation package in the container.
In the embodiment of the invention, the target installation package is placed in the container, the container provides a sandbox environment for the target industrial APP, the resources are effectively isolated, and the resources of the industrial APPs are not conflicted with each other and are not influenced with each other. As shown in fig. 3, the schematic diagram of operating the target installation package in the container is applied to a user side, an Installer instaler, an execution side Executer, a mirror Image warehouse Image report, a kubermeters side, and a platform side, and includes the steps of:
1. uploading and installing the APP to an installer, and uploading an installation package of the APP;
2. the installer parses the installation package structure, and the specific parsing process is as in S102;
3. initiating a mirror build to the execution side,
4. the execution end constructs a mirror image, and the specific mirror image process is as follows:
yaml of APP installation package defines building application image description. The content of yaml is as follows:
Figure BDA0003334258610000131
the APP analyzes the file and calls an interface of the execution device to send a construction task. After receiving the construction task, the Executor creates a Job task of Kubernetes, and the Job task is responsible for constructing the application image. If the build is successful, Job task state is indicated as "Completed," whereas a non-Completed task state is a build failure. After sending the construction task, the APP installer starts a monitoring thread to describe the state of constructing Job, and records the result.
5. If the construction is successful, uploading the mirror image to the mirror image warehouse;
6. the mirror image warehouse feeds back the result of successful uploading to the execution end;
7. the execution end feeds back a message of successful construction to the installer;
8. the execution terminal orders the platform terminal to analyze the dependency relationship according to a dependency convention, wherein the dependency convention refers to a file description of dependencies. The role of this yaml file is to define the dependencies of this APP. The content of yaml is as follows:
Figure BDA0003334258610000141
after receiving the request, the platform end analyzes relevant dependence content of the industrial APP, such as platform interface compatibility analysis, platform resource compatibility analysis, platform environment compatibility analysis, third-party dependence APP compatibility analysis and other operations, and obtains a dependence result;
wherein the analysis process is as follows: the matching is done by means of a version number. The version number rule is: < major version > < minor version > < corrected version >, composed of three-bit versions. The verified matching rule comprises the following key points: 1. incompatible when the master version is inconsistent with the yaml declaration master version; 2. the minor version is incompatible with the yaml declaration minor version by a difference greater than 1; 3. minor version is incompatible if less than yaml declaration minor version; 4. the revised version does not participate in the verification. The dependency result is of the coolean type: true, false.
9. The platform feeds back the dependency result to the installer,
10. the installer applies for running resources to the platform end, and in the process, the installer requests for allocating resources, such as storage resources, database resources, network resources and the like, to the platform according to the convention of the resource statement to obtain an application result;
11. the platform end feeds the application result back to the installer;
12. the installer generates a scheduling scheme to a Kubermeters terminal and requests scheduling;
13. and scheduling resources and deploying and starting by the Kubermetes terminal, wherein the process generates an arrangement file of kubernets according to the arrangement definition and the resource declaration result and requests for scheduling from the kubernets. After the kubernets receive the request, the yaml parser parses the industrial APP layout definition file uniformly, and the parsing result is submitted to the industrial APP deployer for deployment. The industrial APP deployer uses the kubernets interface to realize the deployment of the application. The APP installer generates an arrangement file recognizable by k8s according to the resource description and the application arrangement file, as shown in fig. 4: the APP definition file comprises: yaml and requisition.yaml, converting the APP definition file into a K8S layout file, the K8S layout file including: pvc.yaml, configmap.yaml, deployment.yaml, service.yaml and ingress.yaml.
And the kubernets can perform operations such as node selection, copy creation, network environment construction, mirror image pulling and the like according to the definition of the layout file, complete layout and start the industrial APP.
14. And returning the installation result.
After successful installation, the industrial APP is run in a sandbox. The installation and operation processes can be realized in the corresponding sandbox aiming at each industrial APP, and the deployment and operation of the industrial APPs are uniformly arranged, scheduled and controlled.
In the process, based on the mirror image construction and container arrangement technology of docker + kubernets, the APP installation package is compiled into the executable mirror image, and the dispatch and deployment of the docker container are realized through the arrangement capacity of the kubernets.
The invention discloses an industrial APP operation method, which comprises the following steps: receiving an installation package of a target industrial APP; analyzing the installation package to obtain a target industrial APP descriptive file, a resource declarative file, a mirror image construction descriptive file, a dependency declarative file, an arrangement file and a configuration file; packaging a target industrial APP descriptive file, a resource declarative file, a mirror image construction descriptive file, a dependency declarative file, an arrangement file and a configuration file based on a preset packaging rule to obtain a target installation package, wherein the preset packaging rule comprises the dependency relationship of each file; and placing the target installation package in a container, and operating the target installation package in the container. Above-mentioned process packs the installation package based on predetermineeing the rule, obtains the target installation package, operates the target installation package in the container, has realized the isolation of different industry APPs, has avoided the installation of industry internet platform for industry APP design complicacy, upgrade flow, has improved the holistic management and control ability of platform.
In the embodiment of the invention, in the process, the portal interface between the industrial APP developer and the industrial Internet platform is established by the definite convention of the installation package structure, and the industrial APP developer only needs to understand the convention content of the installation package structure and does not need to care about how the industrial Internet platform is controlled and managed by deployment, scheduling, starting and stopping and the like. Resources required by industrial APP are analyzed, allocated and controlled uniformly by the platform through agreed application statements. Provide the sandbox environment for industry APP, effectively carry out the resource isolation, resource each other conflict between each industry APP, each other does not influence.
Furthermore, the ability of perceiving the peripheral brother APP is given to the industrial APP, the ability of expanding and supplementing the industrial APP by depending on the existing brother APP is realized, and a certain ecological fusion effect is achieved. Based on the technology of application arrangement, the platform, the environment and the brother APP can be effectively diagnosed, the operation parameters of the industrial APP can be corrected in time, and the normal operation of the industrial APP can be guaranteed. For example, the platform provides an interface of "register APP service", and after an APP which needs to issue a service is started, the interface of "register APP service" of the platform can be called as needed to issue the service. "registering APP services" mainly does two things: firstly, registering an APP service agent rule on an entrance traffic gateway, wherein the rule is used for providing an access entrance of an APP service for the outside; and secondly, externally publishing a service list which can be accessed externally to the APP service display platform. Through the above registration, the sibling APP can access the service of this APP through the gateway. In addition to routing access traffic to the target APP, the gateway may also require the sibling APP to provide a platform-assigned key pair (AK/SK) for access to verify the validity of its identity.
In order to guarantee the capability of compiling industrial APP at one place and running everywhere, the platform compiles the industrial APP into a Docker mirror image by combining the current popular containerization technology, and uniformly arranges, schedules and controls the deployment and running of the industrial APP through kubernets.
Based on the above-mentioned industrial APP operation method, in the embodiment of the present invention, an industrial APP operation apparatus is further provided, and a structural block diagram of the operation apparatus is shown in fig. 5, where the structural block diagram includes:
a receiving module 201, a parsing module 202, a packing module 203 and an executing module 204.
Wherein the content of the first and second substances,
the receiving module 201 is configured to receive an installation package of a target industrial APP;
the analysis module 202 is configured to analyze the installation package to obtain a target industrial APP descriptive file, a resource declarative file, a mirror image construction descriptive file, a dependency declarative file, an arrangement file, and a configuration file;
the packaging module 203 is configured to package the target industrial APP descriptive file, the resource declarative file, the image construction descriptive file, the dependency declaration file, and the layout file based on a preset packaging rule to obtain a target installation package, where the preset packaging rule includes a dependency relationship of each file;
the operation module 204 is configured to place the target installation package in a container, and operate the target installation package in the container.
The invention discloses an industrial APP operation device, which comprises: receiving an installation package of a target industrial APP; analyzing the installation package to obtain a target industrial APP descriptive file, a resource declarative file, a mirror image construction descriptive file, a dependency declarative file, an arrangement file and a configuration file; packaging a target industrial APP descriptive file, a resource declarative file, a mirror image construction descriptive file, a dependency declarative file, an arrangement file and a configuration file based on a preset packaging rule to obtain a target installation package, wherein the preset packaging rule comprises the dependency relationship of each file; and placing the target installation package in a container, and operating the target installation package in the container. Above-mentioned process packs the installation package based on predetermineeing the rule, obtains the target installation package, operates the target installation package in the container, has realized the isolation of different industry APPs, has avoided the installation of industry internet platform for industry APP design complicacy, upgrade flow, has improved the holistic management and control ability of platform.
In this embodiment of the present invention, the packing module 203 includes:
a first acquisition unit 205 and a second acquisition unit 206.
Wherein the content of the first and second substances,
the first obtaining unit 205 is configured to obtain file identifiers of the target industrial APP descriptive file, the resource declarative file, the image construction descriptive file, the dependency declaration file, the layout file, and the configuration file, where the file identifiers are used to identify different files;
the second obtaining unit 206 is configured to obtain a dependency relationship in the preset packaging rule, and add a corresponding file to a corresponding position according to the file identifier based on the dependency relationship, so as to obtain a target installation package.
In this embodiment of the present invention, the parsing module 202 includes:
a third acquisition unit 207 and a lookup unit 208.
Wherein the content of the first and second substances,
the third obtaining unit 207 is configured to obtain each preset parsing keyword;
the searching unit 208 is configured to search, based on the preset parsing keywords, the target industrial APP descriptive file, the resource declarative file, the mirror image construction descriptive file, the dependency declarative file, the layout file, and the configuration file through the installation package.
In this embodiment of the present invention, the operation module 204 includes:
parsing unit 209, mirroring unit 210, analyzing and applying unit 211, and starting unit 212.
Wherein the content of the first and second substances,
the analyzing unit 209 is configured to analyze the target installation package to obtain a layout definition content;
the mirroring unit 210 is configured to mirror the target installation package;
the analysis and application unit 211 is configured to perform dependency analysis and resource application to obtain a resource declaration result when the mirroring is successful;
the starting unit 212 is configured to generate an arrangement file based on the arrangement definition content and the resource declaration result, and start the target industrial APP based on the arrangement file.
In an embodiment of the present invention, the operation apparatus further includes:
a first acquisition module 213, a second acquisition module 214, and a correction module 215.
Wherein the content of the first and second substances,
the first obtaining module 213 is configured to obtain each brother APP in the preset range of the target industrial APP;
the second obtaining module 214 is configured to obtain an operating parameter of each sibling APP;
the correcting module 215 is configured to correct the target industrial APP based on the operation parameters.
It should be noted that, in the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. For the device-like embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functions of the units may be implemented in the same software and/or hardware or in a plurality of software and/or hardware when implementing the invention.
From the above description of the embodiments, it is clear to those skilled in the art that the present invention can be implemented by software plus necessary general hardware platform. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which may be stored in a storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the embodiments or some parts of the embodiments.
The above detailed description is provided for the industrial APP operation method and apparatus provided by the present invention, and the principle and the implementation of the present invention are explained by applying specific examples, and the description of the above examples is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. An industrial APP operation method, comprising:
receiving an installation package of a target industrial APP;
analyzing the installation package to obtain a target industrial APP descriptive file, a resource declarative file, a mirror image construction descriptive file, a dependence declarative file, an arrangement file and a configuration file;
packaging the target industrial APP descriptive file, the resource declarative file, the mirror image construction descriptive file, the dependency declaration file and the layout file based on a preset packaging rule to obtain a target installation package, wherein the preset packaging rule comprises the dependency relationship of each file;
and placing the target installation package in a container, and operating the target installation package in the container.
2. The method of claim 1, wherein packaging the target industry APP descriptive file, the resource declarative file, the image build descriptive file, the dependency declarative file, and the orchestration file based on preset packaging rules comprises:
acquiring file identifications of the target industrial APP descriptive file, the resource declarative file, the mirror image construction descriptive file, the dependency declarative file, the layout file and the configuration file, wherein the file identifications are used for identifying different files;
and acquiring the subordination relation in the preset packaging rule, and adding the corresponding file to the corresponding position according to the file identification based on the subordination relation to obtain the target installation package.
3. The method of claim 1, wherein parsing the installation package to obtain a target industry APP descriptive file, a resource declarative file, an image build descriptive file, a dependency declarative file, an orchestration file, and a configuration file comprises:
acquiring each preset analysis keyword;
traversing the installation package, and searching a target industrial APP descriptive file, a resource declarative file, a mirror image construction descriptive file, a dependency declarative file, an arrangement file and a configuration file based on each preset analysis keyword.
4. The method of claim 1, wherein running the target installation package within the container comprises:
analyzing the target installation package to acquire the arrangement definition content;
mirroring the target installation package;
under the condition that the mirror image is successful, performing dependence analysis and resource application to obtain a resource statement result;
generating an arrangement file based on the arrangement definition content and the resource declaration result, and starting the target industry APP based on the arrangement file.
5. The method of claim 1, further comprising:
obtaining each brother APP within the preset range of the target industrial APP;
obtaining the operation parameters of all brother APPs;
and correcting the target industrial APP based on the operation parameters.
6. An industrial APP operation device, comprising:
the receiving module is used for receiving an installation package of the target industrial APP;
the analysis module is used for analyzing the installation package to obtain a target industrial APP descriptive file, a resource declarative file, a mirror image construction descriptive file, a dependency declarative file, an arrangement file and a configuration file;
the packaging module is used for packaging the target industrial APP descriptive file, the resource declarative file, the mirror image construction descriptive file, the dependency declarative file and the layout file based on a preset packaging rule to obtain a target installation package, wherein the preset packaging rule comprises the dependency relationship of each file;
and the operation module is used for placing the target installation package in a container and operating the target installation package in the container.
7. The apparatus of claim 6, wherein the packaging module comprises:
a first obtaining unit, configured to obtain file identifiers of the target industrial APP descriptive file, the resource declarative file, the image construction descriptive file, the dependency declaration file, the layout file, and the configuration file, where the file identifiers are used to identify different files;
and the second obtaining unit is used for obtaining the subordination relation in the preset packaging rule, and adding the corresponding file to the corresponding position according to the file identification based on the subordination relation to obtain the target installation package.
8. The apparatus of claim 6, wherein the parsing module comprises:
a third obtaining unit, configured to obtain each preset parsing keyword;
and the searching unit is used for searching the target industrial APP descriptive file, the resource declarative file, the mirror image construction descriptive file, the dependency declarative file, the layout file and the configuration file based on each preset analysis keyword through traversing the installation package.
9. The apparatus of claim 6, wherein the operation module comprises:
the analysis unit is used for analyzing the target installation package to acquire the arrangement definition content;
the mirror image unit is used for carrying out mirror image on the target installation package;
the analysis and application unit is used for performing dependence analysis and resource application under the condition of successful mirroring to obtain a resource statement result;
and the starting unit is used for generating a layout file based on the layout definition content and the resource declaration result and starting the target industrial APP based on the layout file.
10. The apparatus of claim 6, further comprising:
the first obtaining module is used for obtaining all brother APPs within the preset range of the target industrial APP;
the second obtaining module is used for obtaining the operating parameters of all brother APPs;
and the correction module is used for correcting the target industrial APP based on the operation parameters.
CN202111289778.5A 2021-11-02 2021-11-02 Industrial APP operation method and device Pending CN114020285A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111289778.5A CN114020285A (en) 2021-11-02 2021-11-02 Industrial APP operation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111289778.5A CN114020285A (en) 2021-11-02 2021-11-02 Industrial APP operation method and device

Publications (1)

Publication Number Publication Date
CN114020285A true CN114020285A (en) 2022-02-08

Family

ID=80059851

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111289778.5A Pending CN114020285A (en) 2021-11-02 2021-11-02 Industrial APP operation method and device

Country Status (1)

Country Link
CN (1) CN114020285A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114647404A (en) * 2022-05-23 2022-06-21 深圳市华付信息技术有限公司 Method, device and medium for arranging algorithm model based on workflow

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114647404A (en) * 2022-05-23 2022-06-21 深圳市华付信息技术有限公司 Method, device and medium for arranging algorithm model based on workflow

Similar Documents

Publication Publication Date Title
US7530079B2 (en) Managing application customization
US8572566B2 (en) Systems and methods for analyzing changes in application code from a previous instance of the application code
US8549514B2 (en) Distributing customized software products
US20200167143A1 (en) Systems and methods for automated retrofitting of customized code objects
EP2270655A1 (en) Compatibility evaluation apparatus, compatibility evaluation method, and recording medium
KR20080047444A (en) Extensible meta-data
US8839223B2 (en) Validation of current states of provisioned software products in a cloud environment
US20050223101A1 (en) Computer-implemented method, system and program product for resolving prerequisites for native applications utilizing an open service gateway initiative ( OSGi) framework
US20090276770A1 (en) Systems, methods and computer program products for automating packaging and provisioning of j2ee web modules to eclipse-based rich clients
KR20220092615A (en) Just-In-Time Containers
CN112685035A (en) Project development method and device, computer-readable storage medium and electronic device
CN118202330A (en) Checking source code validity at code update
CN110895471A (en) Installation package generation method, device, medium and electronic equipment
CN112114890A (en) Method, device and equipment for processing small program and storage medium
CN115658237A (en) Container application automatic deployment method, device, apparatus, equipment and medium
KR102352265B1 (en) System and method for providing web application development platform
CN106776266B (en) Configuration method of test tool and terminal equipment
CN117693734A (en) Front-end item processing method, device, equipment, management system and storage medium
CN114020285A (en) Industrial APP operation method and device
CN112835568A (en) Project construction method and device
US20170075668A1 (en) Methods and Systems for Generating Client-Server Applications for Target Devices
CN108595656B (en) Data processing method and system
CN115113972A (en) Application transformation method, system, cluster, medium and program product
WO2014197258A1 (en) Declarative configuration elements
CN115794214A (en) Application module metadata management method, device, storage medium and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination