CN115525396A - Application management method and device based on cloud protogenesis - Google Patents

Application management method and device based on cloud protogenesis Download PDF

Info

Publication number
CN115525396A
CN115525396A CN202211240245.2A CN202211240245A CN115525396A CN 115525396 A CN115525396 A CN 115525396A CN 202211240245 A CN202211240245 A CN 202211240245A CN 115525396 A CN115525396 A CN 115525396A
Authority
CN
China
Prior art keywords
container
application
target
target application
event
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
CN202211240245.2A
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.)
Hundsun Technologies Inc
Original Assignee
Hundsun Technologies Inc
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 Hundsun Technologies Inc filed Critical Hundsun Technologies Inc
Priority to CN202211240245.2A priority Critical patent/CN115525396A/en
Publication of CN115525396A publication Critical patent/CN115525396A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/4557Distribution of virtual machine instances; Migration and load balancing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45595Network integration; Enabling network access in virtual machine instances

Landscapes

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

Abstract

The present specification provides a cloud-based native application management method and apparatus, wherein the cloud-based native application management method includes: acquiring a target application of a running environment associated terminal system; creating an initial application container associated with the target application at a cloud native deployment platform; determining a basic mirror image corresponding to the initial application container according to a preset mirror image command file and the target application, and performing application configuration aiming at the basic mirror image; and generating a target application container according to an application configuration result, and running the target application on the cloud native deployment platform by running the target application container.

Description

Application management method and device based on cloud protogenesis
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a cloud-native-based application management method and apparatus.
Background
With the development of internet technology, cloud native is used as an application deployment platform which is more convenient to use and higher in expansibility, and the characteristics of automatic deployment and rollback, automatic completion of boxing calculation, self repair and the like can be achieved. Although the cloud native system has a great number of advantages, in a traditional application migration scenario, if the cloud native system is used for operation, the traditional application needs to be converted into the cloud native application, but the conversion process is complex, a great amount of manpower and material resources are consumed, and operation holes are also caused in the transfer process; therefore, an effective solution is needed to solve the above problems.
Disclosure of Invention
In view of this, the embodiments of the present specification provide two cloud-based application management methods. The present specification relates to two cloud-native based application management apparatuses, a computing device, and a computer-readable storage medium, so as to solve the technical defects in the prior art.
According to a first aspect of embodiments of the present specification, there is provided a cloud-native-based application management method, including:
acquiring a target application of a running environment associated terminal system;
creating an initial application container associated with the target application at a cloud native deployment platform;
determining a basic mirror image corresponding to the initial application container according to a preset mirror image command file and the target application, and performing application configuration aiming at the basic mirror image;
and generating a target application container according to an application configuration result, and operating the target application on the cloud native deployment platform by operating the target application container.
Optionally, before the step of determining, according to the preset image command file and the target application, the basic image corresponding to the initial application container is executed, the method further includes:
acquiring the mirror image command file preset by the cloud native deployment platform and a target application package corresponding to the target application; writing the mirror image command file and the target application package into a working directory of the cloud native deployment platform, determining the basic mirror image corresponding to the initial application container according to the writing result, and pushing the basic mirror image to a mirror image library.
Optionally, the performing application configuration for the base image includes:
determining a configuration file associated with the cloud native deployment platform; wherein the configuration file is composed of sub-configuration files containing configuration parameters; and mounting the configuration file to the working directory to be used as the application configuration of the basic mirror image.
Optionally, the creating, at the cloud native deployment platform, an initial application container associated with the target application includes:
calling an application container template at the cloud native deployment platform, and transmitting container creation parameters into the application container template; converting the file address associated with the container creation parameter into an absolute address, and loading a container file; generating a container creation request based on the container file, the absolute address and the container creation parameter, and sending the container creation request to a container object generator in the cloud native deployment platform; creating the initial application container at the cloud-native deployment platform in response to a result of the container object generator requesting feedback for the container creation.
Optionally, the performing application configuration for the base image includes:
sending a primary container creation request to a primary container generator according to the base image; carrying out catalog mounting and parameter configuration aiming at the original container creation request through the original container generator to obtain an original container; and performing application configuration on the base image based on the container state of the original container.
Optionally, the generating a target application container according to an application configuration result includes:
sending a target container creation request to a target container generator according to the application configuration result; creating, by the target container generator, the target application container for the target container creation request.
Optionally, the creating, by the target container generator, the target application container for the target container creation request includes:
creating an initial container catalog if the target container generator determines that the target container creation request is associated with a target container label; setting a management authority for the initial container directory, and mounting a target container item in the initial container directory after the management authority is set, so as to obtain a target container directory; and determining a container creation event associated with the target container directory, and generating the target application container by executing the container creation event.
Optionally, the determining a container creation event associated with the target container directory includes:
generating an environment setting sub-event, an interface setting sub-event, an authority setting sub-event and a resource management sub-event according to a preset container creation rule; and generating the container creation event based on the environment setting sub-event, the interface setting sub-event, the permission setting sub-event and the resource management sub-event.
Optionally, the generating the target application container by executing the container creation event includes:
acquiring environment setting information, interface setting information, authority setting information and resource management information by executing the container creation event including the environment setting sub-event, the interface setting sub-event, the authority setting sub-event and the resource management sub-event; setting process association parameters according to the environment setting information, the interface setting information, the authority setting information and the resource management information; and creating the target application container according to the setting result of the process association parameters.
Optionally, obtaining environment setting information by executing the environment setting sub-event includes:
reading an environment variable parameter by executing the environment setting sub-event, modifying a parameter path of the environment variable parameter, setting an environment working directory, and determining the environment setting information according to a parameter path modification result and an environment working directory setting result; correspondingly, the interface setting information is obtained by executing the interface setting sub-event, and the method comprises the following steps: and searching an interface file descriptor by executing the interface setting sub-event, calling an interface setting process to process the interface file descriptor, and obtaining the interface setting information according to a processing result.
Optionally, the obtaining the permission setting information by executing the permission setting sub-event includes:
reading container configuration information by executing the authority setting sub-event, setting container association authority according to the container configuration information, and obtaining the authority setting information according to a setting result; correspondingly, the obtaining resource management information by executing the resource management sub-event includes: and determining resource management parameters by executing the resource management sub-event, and processing the resource management parameters to obtain the resource management information.
According to a second aspect of embodiments of the present specification, there is provided a cloud-native-based application management apparatus, including:
the acquisition module is configured to acquire a target application of the operation environment associated terminal system;
a creation module configured to create an initial application container associated with the target application at a cloud native deployment platform;
the determining module is configured to determine a basic mirror image corresponding to the initial application container according to a preset mirror image command file and the target application, and perform application configuration on the basic mirror image;
the running module is configured to generate a target application container according to an application configuration result, and run the target application on the cloud native deployment platform by running the target application container.
According to a third aspect of embodiments of the present specification, there is provided another cloud-native-based application management method, including:
acquiring a target application of a running environment associated terminal system;
determining a basic mirror image corresponding to the target application according to a preset mirror image command file and an application file of the target application, and performing application configuration aiming at the basic mirror image;
and generating a target application container according to an application configuration result, and running the target application on the cloud native deployment platform by running the target application container.
According to a fourth aspect of embodiments of the present specification, there is provided another cloud-native-based application management apparatus, including:
the acquisition application module is configured to acquire a target application of the operation environment associated terminal system;
the application configuration module is configured to determine a basic mirror image corresponding to the target application according to a preset mirror image command file and an application file of the target application, and perform application configuration aiming at the basic mirror image;
and the running application module is configured to generate a target application container according to an application configuration result, and run the target application on the cloud native deployment platform by running the target application container.
According to a fifth aspect of embodiments herein, there is provided a computing device comprising:
a memory and a processor;
the memory is configured to store computer-executable instructions that when executed by the processor implement the steps of the cloud-native based application management method.
According to a sixth aspect of embodiments herein, there is provided a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the cloud-native based application management method.
In the cloud-native-based application management method provided by this embodiment, in order to enable a traditional application to run in a cloud-native system without consuming excessive manpower and material resources, a target application of a running environment associated with a terminal system may be obtained, an initial application container associated with the target application is then created on a cloud-native deployment platform, a base image corresponding to the initial application container is determined according to a preset image command file and the target application, application configuration is performed on the base image to generate a target application container according to an application configuration result, finally, running the target application on the cloud-native deployment platform is achieved by running the target application container, a way of creating a container on the cloud-native deployment platform is achieved, a running environment is created for the traditional application, running under the cloud-native system is completed without modifying the traditional application, a server side manages a containerized target application and a non-containerized application through the cloud-native deployment platform, and overhead of the server side is saved.
Drawings
Fig. 1 is a flowchart of a cloud-based native application management method according to an embodiment of the present specification;
fig. 2 is a schematic diagram of an application management method based on cloud-native according to an embodiment of the present specification;
FIG. 3 is a flow chart of a first container creation process provided by an embodiment of the present specification;
FIG. 4 is a flow chart of a second container creation process provided by an embodiment of the present specification;
FIG. 5 is a flow diagram of a third container creation process provided by an embodiment of the present description;
fig. 6 is a process flow diagram of a cloud-based native application management method according to an embodiment of the present specification;
fig. 7 is a schematic structural diagram of an application management apparatus based on cloud-native according to an embodiment of the present specification;
FIG. 8 is a flowchart of another cloud-based native application management method provided by an embodiment of the present specification;
fig. 9 is a schematic structural diagram of another cloud-based native application management apparatus provided in an embodiment of the present specification;
fig. 10 is a block diagram of a computing device according to an embodiment of the present disclosure.
Detailed Description
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present description. This description may be embodied in many different forms and should not be construed as limited to the embodiments set forth herein, as those skilled in the art will be able to make and use the present disclosure without departing from the spirit and scope of the present disclosure.
The terminology used in the description of the one or more embodiments is for the purpose of describing the particular embodiments only and is not intended to be limiting of the description of the one or more embodiments. As used in one or more embodiments of the present specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used in one or more embodiments of the present specification refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, etc. may be used herein in one or more embodiments to describe various information, these information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, a first can also be referred to as a second and, similarly, a second can also be referred to as a first without departing from the scope of one or more embodiments of the present description. The word "if," as used herein, may be interpreted as "at … …" or "at … …" or "in response to a determination," depending on the context.
In the present specification, an application management method based on cloud-native is provided, and the present specification relates to an application management method and apparatus based on cloud-native, a computing device, and a computer-readable storage medium, which are described in detail in the following embodiments one by one.
In practical application, the cloud native architecture of Kubernetes has the following advantages of (1) automatic deployment and rollback: kubernets may be used to describe the required state of a deployed container, which may change the actual state to a desired state at a controlled rate. (2) automatically completing boxing calculation: kubernets allows the CPU and memory (RAM) required for each container to be specified. When a container specifies a resource request, kubernets can make a better decision to manage the resources of the container. (3) self-repair: kubernets restart failed containers, replace containers, kill containers that do not respond to user-defined health checks, and do not advertise them to clients before they are ready for service.
Although a convenient service can be provided for a server in an application deployment scene, for example, some directories of a host need to be read and written, or some drivers of the host need to be relied on, or other applications need to be matched, and the like after a traditional application is migrated to a cloud native system, if the part is not configured, the traditional application cannot be supported to run under the cloud native system; therefore, if the cloud native system is used for the traditional application, the traditional application needs to be converted into the cloud native application, but the conversion process has a plurality of problems; traditional application developers need to learn a large amount of cloud-native knowledge to say that the traditional application concept is combined with the cloud-native concept, and a large amount of manpower and material resources need to be consumed. And the traditional application originally running in windows is difficult to access the cloud native system.
That is, cloud-native has a significant learning cost for legacy application developers; the investment problem of manpower and material resource cost of traditional application transformation is greatly improved, in addition, a large number of stably-running programs which are not continuously developed are involved, only a small number of or even no continuous maintainers exist in the programs, and cloud primary transformation is difficult to perform.
In the cloud-native-based application management method provided by this embodiment, in order to enable a traditional application to run in a cloud-native system without consuming excessive manpower and material resources, a target application of a running environment associated with a terminal system may be obtained, an initial application container associated with the target application is then created on a cloud-native deployment platform, a base image corresponding to the initial application container is determined according to a preset image command file and the target application, application configuration is performed on the base image to generate a target application container according to an application configuration result, finally, running the target application on the cloud-native deployment platform is achieved by running the target application container, a way of creating a container on the cloud-native deployment platform is achieved, a running environment is created for the traditional application, running under the cloud-native system is completed without modifying the traditional application, a server side manages a containerized target application and a non-containerized application through the cloud-native deployment platform, and overhead of the server side is saved.
Fig. 1 shows a flowchart of a method for cloud-based application management according to an embodiment of the present specification, which specifically includes the following steps:
and step S102, acquiring a target application of the operation environment associated terminal system.
Specifically, the running environment specifically refers to a running system of the target application on the local client, such as a windows running environment, a linux running environment, and the like, and correspondingly, the target application specifically refers to an application running on the local client, and the application may be a service application, a play application, a transaction application, and the like, which is not limited in this embodiment. Correspondingly, the terminal system is a client system corresponding to the operating environment, such as a windows system or a linux system.
Based on this, when the target application of the associated terminal system, namely the traditional application, needs to be migrated to the cloud native system, in order to achieve the purpose of consuming less manpower and material resources under the cloud native system and support normal operation of the traditional application after crossing the operation environment, the target application can be obtained first, and then subsequent processing such as container creation is performed. The cloud native architecture that the target application needs to migrate is Kubernets.
Step S104, an initial application container associated with the target application is created on a cloud native deployment platform.
Specifically, after the target application of the operation environment of the associated terminal system is obtained, further, in order to support the target application to operate in a cloud native system, an initial application container of the associated target application may be determined on a cloud native deployment platform; the cloud native deployment platform is a Kubernetes deployment platform, a cloud native architecture is provided, correspondingly, the initial application container specifically refers to a container for creating an operating environment for the target application, and the container is not subjected to parameter setting, permission setting, application loading and other processing, that is, the initial application container can be understood as a carrier which is created for the target application and supports the target application to operate in a cloud native system, and the carrier does not meet the operating requirements of the cloud native deployment platform.
Further, in the process of creating the initial application container, considering that the initial application container serves the target application, in order to support that the target application can operate on the cloud native deployment platform quickly and with better compatibility, the operation can be completed by combining the container object generator, and in this embodiment, the specific implementation manner is as follows:
calling an application container template at the cloud native deployment platform, and transmitting container creation parameters into the application container template; converting the file address associated with the container creation parameter into an absolute address, and loading a container file; generating a container creation request based on the container file, the absolute address and the container creation parameter, and sending the container creation request to a container object generator in the cloud native deployment platform; creating the initial application container at the cloud-native deployment platform in response to a result of the container object generator requesting feedback for the container creation.
Specifically, the application container template specifically refers to a container template used for creating an implantation cloud native deployment platform, and may be modified differently for target applications in different operating environments to generate an initial application container for use. Correspondingly, the container creation parameter is specifically a parameter for implanting a relevant operation environment into the application container template, and is used for supporting the operation of the target application; correspondingly, the file address specifically refers to an address corresponding to the operating environment, and is used for accessing the cloud native deployment platform; correspondingly, the absolute address specifically refers to an address obtained by converting a file address, and is used for a cloud native deployment platform. Correspondingly, the container file specifically refers to a file for configuring the relevant parameters. Accordingly, the container creation request is specifically a request sent to the container object generator of the cloud native deployment platform, so that the container creation process can be performed by the container object generator of the cloud native deployment platform.
Based on this, when the initial application container is created, in order to ensure that the target application can run on the cloud native deployment platform, the application container template may be called on the cloud native deployment platform, and the container creation parameters are transmitted into the application container template to obtain the application container template with the container creation parameters, and then the file address associated with the container creation parameters is converted into an absolute address, and the container file is loaded at the same time; generating a container creation request based on a container file, an absolute address and an application container template carrying container creation parameters, and then sending the container creation request to a container object generator in a cloud native deployment platform; in response to the result of the container object generator requesting feedback for container creation, an initial application container may be created at the cloud native deployment platform.
In summary, by combining the application container template, the container file and the related parameter creation request, and completing the creation of the initial application container for the container creation request by the container object generator, the cloud native deployment platform can be prepared with pertinence, so as to ensure that the target application can successfully access the cloud native deployment platform.
And S106, determining a basic mirror image corresponding to the initial application container according to a preset mirror image command file and the target application, and performing application configuration aiming at the basic mirror image.
Specifically, after the initial application container is created, in order to provide a container that can be used on the cloud native deployment platform for the target application on the basis of the initial application container, a base image corresponding to the initial application container may be determined according to a preset image command file and the target application, and application configuration is performed on the base image, so that parameter setting, file creation, authority management, and resource management are achieved, and it is ensured that the target application container can be generated after application configuration is completed, so that resources outside the container and the like can be accessed through the target application container, operation of the target application on the cloud native deployment platform is supported, the target application is not modified, and additional manpower and material resources are not required to adjust the cloud native deployment platform.
The mirror image command file is specifically a command file preset by a cloud native deployment platform and used for constructing and distributing a mirror image; correspondingly, the application configuration specifically refers to the processing of parameter configuration, file directory configuration, authority configuration, resource management and the like for the basic image.
Furthermore, before application configuration, considering that the basic mirror image is a basis for generating a target application container, the basic mirror image needs to be fully combined with the attributes of the cloud native deployment platform and the application attributes to realize that the basic mirror image is constructed and stored in the mirror image library first, so that when an application side uses the basic mirror image, the application configuration can be performed by directly reading the basic mirror image from the mirror image library, that is, a service side constructs the basic mirror image and pushes the basic mirror image to the mirror image library,
the method provides a reuse template for an application party to be more convenient for the application party to use, and in the embodiment, the specific implementation mode is as follows:
acquiring the mirror image command file preset by the cloud native deployment platform and a target application package corresponding to the target application; writing the mirror image command file and the target application package into a working directory of the cloud native deployment platform, determining the basic mirror image corresponding to the initial application container according to a writing result, and pushing the basic mirror image to a mirror image library.
Specifically, the target application package is an application program package corresponding to the target application, and is used for determining a basic mirror image corresponding to the initial application container together with the mirror image command file, so as to implement parameter configuration and complete operation of the target application on the cloud native deployment platform. The working directory of the cloud native deployment platform specifically refers to a directory for setting a basic mirror image and storing a set file and an application package, and correspondingly, the mirror image library specifically refers to a database for storing the basic mirror image and is used for directly reading the mirror image library in an application stage to obtain the basic mirror image, and then configuring the basic mirror image aiming at a target application to obtain a target application container, so that the target application can be operated on the cloud native deployment platform.
Based on this, in order to support the target application to run on the cloud native deployment platform, a mirror image command file preset by the cloud native deployment platform and a target application package corresponding to the target application may be obtained first; and then writing the mirror image command file and the target application package into a working directory of the cloud native deployment platform, determining a basic mirror image corresponding to the initial application container according to the writing result, and pushing the basic mirror image to a mirror image library.
Referring to the schematic diagram shown in fig. 2 (a), the command file may include four steps, which are installation of the application install, start of the application, stop of the application stop, and deletion of the application delete, it should be noted that the legacy application package may have a plurality of files or folders, which is not limited herein, and both the command file and the legacy application package are provided by the application development end. The application can be constructed by using Dockerfile, and in the working directory, the pod environment variable can be set as OS _ CONTAINER _ WORK _ DIR; the generated mirror image meets the OCI mirror image standard, can be compatible with mirror image warehouses such as a harbor and a registry, and provides a basic mirror image for the application which needs to run on the cloud native deployment platform, so that the application stage can be directly reused conveniently, and the distribution function of the cloud native system on the traditional application is realized.
In summary, by determining the mirror image for the target application in combination with the content in the cloud native system, the target application can be distributed by using the cloud native system, so that the target application can be supported to run on the cloud native deployment platform.
After the basic mirror image is determined, further, when the application configuration is performed, the file is mounted to the set directory to support the corresponding function, in this embodiment, the specific implementation manner is as follows:
determining a configuration file associated with the cloud native deployment platform; wherein the configuration file is composed of sub-configuration files containing configuration parameters; and mounting the configuration file to the working directory to be used as the application configuration of the basic mirror image.
Specifically, the configuration file specifically refers to a collection file for storing different configuration subfiles, where the configuration subfiles are included to support that a target application in a running environment can access to a cloud-native deployment platform.
Based on the method, firstly, determining a configuration file of a correlation cloud native deployment platform; the configuration file consists of sub configuration files containing configuration parameters; and then mounting the configuration file to a working directory, and taking the configuration file as application configuration of the basic mirror image.
Referring to fig. 2 (b), under the cloud-native system, the traditional application is configured in a cloud-native manner instead. The method specifically comprises the following steps: the program defaults to/opt relative to the working directory of the container, and can also subsequently specify the working directory. The working directory can then be set for the application by setting the pod environment variable OS _ contact _ WORK _ DIR. And in the cloud native system, a configmap is used as a configuration file, each key in the configmap corresponds to a file name, and the content is a value corresponding to the key. At this time, the function of program reading configuration can be realized by mounting the configmap to the working directory. Meanwhile, the cloud-native secret is used for guaranteeing the safety of configurations such as cipher keys. In addition, the application program also supports resources option in the cloud native system, and the CPU and the memory of the program can be easily reserved or limited by the option. Referring to fig. 2 (b), setting of the standard mirror image can be completed by writing the environment variable and the configmap into the basic mirror image, so as to facilitate subsequent application configuration, and after the application configuration is completed, the conventional application is completed to run on the cloud native deployment platform.
In specific implementation, the containment container engine supports different runtime extensions, and the developed runtime can be accessed to the cloud native system by using shim and runtime.
When the cloud native application is operated, runtime can be designated as runh, and at the moment, the traditional application program can be operated by using a cloud native method. In a specific runtime implementation, a pause sandbox, namely runpause container and runpause container, is constructed by using an open source runc. And at the moment, runcondainer is in an empty running state, and the running code is tail-f/dev/null. Whereas legacy applications are run by runhcontainer. The runh container can be isolated from the host without implementing a directory, a pid, a network and the like so as to ensure the normal operation of the traditional program. Runh implements create, delete, exec, init, kill, list, ps, run, select, start, state, etc. commands. The create command is used for creating a container, and can be used for creating run container and run container.
In conclusion, by performing application configuration on the basic mirror image, operations such as parameter configuration can be completed, so that the cloud native deployment platform can have an environment for running the target application, and excessive human and material resources do not need to be consumed after the traditional application is migrated to the cloud native deployment platform.
Further, when application configuration is performed, because the cloud-native deployment platform is a platform for providing containers and managing, in order to support that a traditional application can run on the cloud-native deployment platform, an original container generator of the cloud-native deployment platform can be first used for creation, and then automatic transformation is performed, in this embodiment, a specific implementation manner is as follows:
sending a primary container creation request to a primary container generator according to the base image; carrying out catalog mounting and parameter configuration aiming at the original container creation request through the original container generator to obtain an original container; and performing application configuration on the base image based on the container state of the original container.
Specifically, the original container generator specifically refers to a container generator carried by the cloud native deployment platform, and all containers that can be generated are containers used by applications that are completed on the cloud native deployment platform from a development stage; correspondingly, the target mount specifically refers to mount a file support container to be used on a specified directory to create and run an application; correspondingly, the parameter configuration specifically refers to relevant parameters set for a container to be created; correspondingly, the primitive container specifically refers to a container capable of container state transition, and the primitive container is a container that can be directly created by the cloud native deployment platform.
Based on this, when the application configuration is carried out, the original container creation request is sent to the original container generator according to the basic mirror image; carrying out catalog mounting and parameter configuration aiming at an original container creating request through an original container generator so as to obtain an original container; and finally, performing application configuration on the basic mirror image based on the container state of the original container.
In conclusion, by combining the original container generator to perform application configuration, the original mechanism of the cloud native deployment platform can be fully utilized to complete the application, so that the efficiency of environment deployment is improved, the labor consumption of developers is reduced, and the running environment is provided for the target application.
And S108, generating a target application container according to an application configuration result, and operating the target application on the cloud native deployment platform by operating the target application container.
Specifically, after the application configuration is completed, the target application container can be generated according to the configuration result, and the target application container is completely associated with the target application, that is, the target application can be run on the cloud native deployment platform, and meanwhile, the target application can be supported to be connected with the outside, and operations such as access and call of resources are realized.
Based on the method, after the target application container is created, the target application can be operated on the cloud native deployment platform by operating the target application container. The traditional application can be operated depending on the cloud native deployment platform, the cloud native deployment platform can be directly accessed after the development of other operation environments is completed, and the expenditure of manpower and material resources is saved.
It should be noted that, when performing application configuration and generating a target application container according to an application configuration result, parameters set by a user are received through kubernets, so that the parameters set by the user are transmitted to a bottom layer through the kubernets, and specific configuration parameters and generation operations are implemented by the bottom layer, so that running a target application on a cloud native deployment platform can be implemented by running the target application container. Wherein kubernets is composed of multiple components, and kubelelet is the interactive component of the front end and the bottom layer. The operation of running the target application container is realized by runh in the scheme.
On this basis, when the target application container is created, the creation is actually completed by combining the container generator in the cloud native deployment platform, and in this embodiment, the specific implementation manner is as in step S1082 to step S1084.
Step S1082, sending a target container creation request to the target container generator according to the application configuration result.
Step S1084, creating, by the target container generator, the target application container for the target container creation request.
Specifically, the target container generator specifically refers to a container generator preset for an external target application in a cloud native deployment platform. Based on this, a target container creation request may be first sent to the target container generator according to the application configuration result, and then a target application container may be created for the target container creation request by the target container generator.
Referring to fig. 3, in creating the target application Container, the creation may be completed by cooperation of the Create, container, runcontainer and runhContainer modules in the cloud native deployment platform. The concrete implementation is as follows:
301, create checks the validity of the parameters. Considering Runh as a binary file, runh-shim calls Runh by command and passes in the relevant parameters. The input parameters can be checked by Runh to ensure the correctness of the command invocation. Wherein, the relevant parameters include but are not limited to the root default of the bundle directory being the parameters of the current directory, the container-socket: AF _ UNIX socket address, pid-file: write a file of process id, etc.
302, create looks up the settings PID file. And checking whether the pid-file is set in the context or not through the parameters, and if so, converting the file address in the context into an absolute address. The subsequent run will execute chdir and the relative address cannot find the file. If not, no processing is performed.
303, create loads the OCI configuration file. An OCI configuration file is loaded that describes how an OCI container should run, including information such as environment variables, work directories, process commands, etc.
304, create sends a create Container configuration object request to the Container. At this time, information such as the configuration object, the current context, and the container ID is sent to the container object generator to request generation of the container object.
305, container will generate a profile object from the OCI profile. At this point, the container object generator parses the incoming content, with most of the content passed to the runc's container object generator parsing. And setting a container object working directory according to the environment variable working directory, and trying to set a default working directory if the container object working directory is not set. And finally serializing the storage container object.
306, container returns the container configuration object to Create. I.e. return the generated container object.
307, create sends a generate run container request to the run container. Create sends a generate container request to run based on the container object. Shim sends a request to this flow, which may be creating a sandbox container or a service container, to be established by run.
308,runcontainer runs the runc container as requested. run builds a run container according to the request. The method relates to container directory mounting, namspice configuration, cgroup configuration, stdin generation, stdout generation and the like.
309,runcontainer returns the runcontainer state to Create. run returns create run container results. If the creation fails, the Create command returns an error.
310, create sends a generate runh container request to runhContainer.
311, runhContainer runs the runh container on request. After the preparation is complete, runhContainer is instructed to generate and run runh containers as requested.
312, runhContainer returns the runh container status to Create.
313, create returns the state of the runh container to complete the construction of the target container, and provides a running environment of the cloud native deployment platform for the traditional application.
That is, when runpcuusecondainer is transmitted, creation of a runc container can be realized by the above-described 307 to 309, and at this time 310 to 313 are not associated with creation of a runc container and thus may not be executed. When runcon tainer is sent, not only execution 307 to 309 needs to be performed, but also joining 310 to 313 is needed for creating a runh container.
Further, a target application container is created for the target container creation request by the target container generator, as embodied in steps S10842 to S10846.
Step S10842, in case that the target container generator determines that the target container creation request is associated with a target container label, creating an initial container directory;
step S10844, setting management authority for the initial container directory, and mounting a target container item in the initial container directory after the management authority is set, so as to obtain a target container directory;
step S10846, determining a container creation event associated with the target container directory, and generating the target application container by executing the container creation event.
Specifically, the target container label specifically refers to a label corresponding to a request for creating different containers, and the type of the container to be created can be determined through the label, so that the cloud native deployment platform can confirm the container before creating the container; correspondingly, the initial container directory specifically refers to a directory created for a target application container to be created, and is used for mounting a corresponding file and an application package. Correspondingly, the management authority specifically refers to setting access and access authority. The target container item specifically refers to an item that needs to be mounted in the directory. Correspondingly, the container creation event specifically refers to an event created after the container creation preparation phase is completed, and is used for executing the event completion container creation.
Based on this, when the target application container is created, the initial container directory may be created in a case where the target container generator determines that the target container creation request is associated with the target container label; then, setting a management authority for the initial container directory, and mounting a target container item in the initial container directory after the management authority is set, so as to obtain a target container directory; and finally, determining a container creation event associated with the target container directory, and generating the target application container by executing the container creation event.
Referring to fig. 4, the creation of the target application container may be completed by cooperation of the runhContainer, dirPrepaper and runhRunner modules, which are specifically implemented as follows:
314,runhcontainer determines if a runh container should be created. At this time, whether the container creation is creating a sandbox or a service container is judged according to a tag io, kubernets, cri, container-type in the configuration file, if the tag value is the sandbox, the container is the sandbox container, and if the tag value is the service container, the runh container is created. In case a runh container is created, 315 is performed.
315, runhContainer sends a prepare catalog request to DirPrepaper. If a runh container needs to be established, a runh container directory needs to be prepared first, and a prepare directory request is sent to DirPreparer. The Runh container directory is in one place with the runc container directory on the host, but many mounts of runc belong to namespace mounts and therefore cannot be viewed in the Runh container.
316, dirprepaper checks the working directory. In order to ensure that the target application container can be used normally after being created, the working directory can be checked at this time, and the target application container is created if the working directory does not exist.
317, dirPrepaper sets the work directory rights. In order to ensure the accuracy of access, the user declared in the OCI file can be ensured to have the authority declared in the file for the working directory, and the runh script file can be ensured to be executable.
318, dirPrepaper mounts configmap, secret, etc. Mounts declared as rprivate types in the OCI file may be filtered out at this point, and these mounts run may be treated as namespacementount, not visible on the runh container or on the host. These filtered mount items are mounted according to the configuration, but parameters related to namespace are ignored when mounted.
319, dirPrepaper returns the working catalog to runhContainer.
320,runhcontainer sends a request to runhRunner to execute the runh create command.
321, runhranner configure the commands that need to be executed. The RunhRunner assembles the commands that the configuration needs to execute according to the configuration.
322, runhRunner executes the runh install script command. Executing the runh install command, it should be noted that the installation process of the application program is usually performed here.
323, runhranner waits for or processes the command results. And waiting for the result of the command execution, if the execution is overtime, sending a SIGKILL 'install process group' signal, and executing a runh delete command to ensure that no residual of installation failure exists, and killing the process group to ensure that no zombie process exists. If the instruction execution of the install command is finished, whether the install command succeeds or not is judged according to the return code, and run delete is executed if the install command does not succeed.
324, runhrunner returns the execution command results to runhContainer.
In conclusion, the target application container is created in a manner of matching the three, and the application environment corresponding to the target application is provided on the cloud native deployment platform, so that the target application can be ensured to successfully operate on the cloud native deployment platform.
Further, in the process of implementing step S10846 to determine the container creation event associated with the target container directory, different sub-events are actually executed, in this embodiment, the specific implementation manner is as follows:
generating an environment setting sub-event, an interface setting sub-event, an authority setting sub-event and a resource management sub-event according to a preset container creation rule; and generating the container creation event based on the environment setting sub-event, the interface setting sub-event, the permission setting sub-event and the resource management sub-event.
Specifically, the environment setting sub-event specifically refers to a sub-event for setting environment parameters for a target application container to be created; correspondingly, the interface setting sub-event specifically refers to a sub-event for setting interface parameters for a target application container to be created; correspondingly, the permission setting sub-event specifically refers to a sub-event for setting access permission for a target application container to be created; correspondingly, the resource management sub-event specifically refers to a sub-event for setting resource calling for a target application container to be created.
Based on this, considering that the creation of the target application container can be completed only by executing the container creation event, the environment setting sub-event, the interface setting sub-event, the authority setting sub-event and the resource management sub-event can be generated according to the preset container creation rule; and then generating a container creation event based on the environment setting sub-event, the interface setting sub-event, the authority setting sub-event and the resource management sub-event, and completing the creation of the target application container by executing each sub-event contained in the container creation event.
In summary, container creation events are formed by multiple types of events, and creation of a container for a target application can be completed in each dimension, so that relevant parameter setting, permission setting and the like can meet the requirement of running the target application, and a good running environment is provided for the target application.
Further, in the process of executing step S10846 to generate the target application container, it is actually the integration after the execution of different events, and in this embodiment, the specific implementation manner is as follows:
acquiring environment setting information, interface setting information, authority setting information and resource management information by executing the container creation event including the environment setting sub-event, the interface setting sub-event, the authority setting sub-event and the resource management sub-event; setting process association parameters according to the environment setting information, the interface setting information, the authority setting information and the resource management information; and creating the target application container according to the setting result of the process association parameters.
Specifically, the environment setting information is information obtained after setting environment parameters for the target application to run, and specifically is a target application container to be created by the pointer; correspondingly, the interface setting information is specifically a target application container to be created by the pointer, and information for the target application to call the interface is set; correspondingly, the authority setting information is specifically a target application container to be created by the pointer, and information for the target application to access the authority is set; the resource management information is specifically a target application container to be created by a pointer, and information for the target application to call the external resource is set. Correspondingly, the association parameters specifically refer to parameters for creating the target application container for association.
Based on this, considering that the container creation event includes multiple sub-events, corresponding information can be obtained by executing different sub-events for completing creation of the target application container, that is, environment setting information, interface setting information, authority setting information and resource management information are obtained by executing the container creation event including an environment setting sub-event, an interface setting sub-event, an authority setting sub-event and a resource management sub-event; setting process association parameters according to the environment setting information, the interface setting information, the authority setting information and the resource management information; and creating a target application container according to the setting result of the process association parameters.
The execution process of different sub-events is as follows:
(1) Obtaining environment setting information by executing the environment setting sub-event, including: and reading an environment variable parameter by executing the environment setting sub-event, modifying a parameter path of the environment variable parameter, setting an environment working directory, and determining the environment setting information according to a parameter path modification result and an environment working directory setting result.
Specifically, the environment variable parameter refers to an environment parameter to be adjusted in an environment setting sub-event, and the parameter path refers to a modification path corresponding to the parameter; correspondingly, the environment work catalog is specifically a catalog related to providing the operation change.
Based on the method, the environment variable parameters are read through the execution environment setting sub-event, then the parameter paths of the environment variable parameters are modified, the environment working directory is set, and the environment setting information is determined according to the parameter path modification result and the environment working directory setting result.
(2) Obtaining interface setting information by executing the interface setting sub-event, including: and searching an interface file descriptor by executing the interface setting sub-event, calling an interface setting process to process the interface file descriptor, and obtaining the interface setting information according to a processing result.
Specifically, the interface file descriptor specifically refers to a descriptor corresponding to the interface setting sub-event, and the descriptor has uniqueness and is strongly associated with the interface setting sub-event. Correspondingly, the interface setting process specifically refers to a process for performing interface setting processing independently.
Based on the method, the interface file descriptor can be searched by executing the interface setting sub-event, the interface file descriptor can be processed by calling the interface setting process, and the interface setting information can be obtained according to the processing result.
(3) The obtaining of the permission setting information by executing the permission setting sub-event includes: reading container configuration information by executing the authority setting sub-event, setting container association authority according to the container configuration information, and obtaining the authority setting information according to a setting result.
Specifically, the container configuration information specifically refers to information for performing parameter configuration on the target container, and the information is set by a specific service, which is not limited in this embodiment. Correspondingly, the container association authority specifically refers to the authority of the association authority setting sub-event.
Based on the method, the container configuration information is read through the execution authority setting sub-event, the container association authority is set according to the container configuration information, and the authority setting information is obtained according to the setting result.
(4) The obtaining resource management information by executing the resource management sub-event includes: and determining resource management parameters by executing the resource management sub-event, and processing the resource management parameters to obtain the resource management information.
Specifically, the resource management parameter refers to a relevant parameter for the target application to access the external resource when the target application container is created.
Based on the resource management information, the resource management parameters are determined by executing the resource management sub-event, and are processed to obtain the resource management information.
Referring to fig. 5, in a specific implementation, the method can be implemented by runhranner, envSetter, ioSetter, permissionsetter, and cgroupSetter, which are as follows:
325, runhranner sends a set environment variable request to envSetter. And sending the install process object and the container object to an envSetter, and sending an environment variable setting request.
326, envSetter modifies the environment variable PATH. Reading an environment variable PATH in the container object, and modifying the PATH in the container object from an original PATH relative to rootfs to a PATH relative to a host root. The install process PATH is set as the present process PATH and the PATH modified by the container object is supplemented to the end.
327, envSetter modifies the environment variable HOME. The HOME of the install object is modified to a working directory in the container object.
328, envSetter returns a set environment variable request to the runhRunner. Returning the request for setting the environment variable, and only returning the modified install process object at this time.
329,runhranner sends a set IO request to ioSetter. And sending the install process object and the container object to an ioSetter, and sending an IO setting request.
330, iosetter looks up run container IO devices. And searching stdin, stdout and stderror file descriptors of the runc container through the container object.
331, iosetter sets the install process IO device. Install process file input output descriptors are copied into the runc container by a syscall.
332, iosetter returns a set IO request to runhRunner.
333,runhranner sends a permission setting request to the permissionsetter. And sending the install process object and the container object to a permissionSetter, and sending a permission setting request.
334,permissionsetter sets the install process user. And configuring an install process user according to the configuration in the container object.
335,335,permissionsetter sets the install process Seccomp. According to the configuration in the container object, seccomp is configured. The system interface that a process can call can be restricted by using Seccomp. If Seccompname is set: mkdir, actionSCMP _ ACT _ ERRNO, execution of the mkdir command in the install process is exited upon receipt of the SIGKILL signal.
336,336,permissionsetter sets the install process aparnor. According to the configuration in the container object, appAArmor is configured. AppAArmor is an enhanced tool for kernels that can limit programs to a limited set of resources. A process may be set to perform access control or the like for a certain file or a certain directory.
337, permassionsetter sets instance procedures capabilites. The capabilities are configured according to the configuration in the container object. Capabilities limits a total of 39 system Capabilities, such as CAP _ KILL. If CAP _ KILL is not set, the KILL request cannot be sent.
338, permissionsetter returns a permission setting request to the runhranner.
339, runhranner sends a set cgroup request to cgroupSetter. And sending the install process object and the container object to a cgroupSetter, and sending a cgroup setting request.
340, permissionsetter looks up the run process cgroupPath. Finding cgrouppath of the runc container through the container object.
341, permissionsetter adds the current process to cgroup. The current process is added to the cgroup of the runc container. Since the install process is a child of the current process, the install process will also be in the cgroup limit.
342,permissionsetter returns a set cgroup request to runhRunner.
343, runhranner sets the install process group. The sysprocattr setpgid of the install process is set to true, so that the install process is in a new process group.
344, runhranner sets the install process Pdeathsig. Setting pdeatsig of install process to SIGKILL. Thus, by matching with the KILL in step 323, the child process of the install process can be guaranteed not to become a zombie process.
345, runhranner sets the install process Dir. The setup process Dir may configure the process execution directory.
346, runhRunner sets the process namespace. Looking up the namespace used by the runc container, and adding namespaces except mount according to the configuration.
In addition, other command implementations in Runh are similar to create and are not listed.
In the cloud-native-based application management method provided by this embodiment, in order to enable a traditional application to run in a cloud-native system without consuming excessive manpower and material resources, a target application of a running environment associated with a terminal system may be obtained, an initial application container associated with the target application is then created on a cloud-native deployment platform, a base image corresponding to the initial application container is determined according to a preset image command file and the target application, application configuration is performed on the base image to generate a target application container according to an application configuration result, finally, running the target application on the cloud-native deployment platform is achieved by running the target application container, a way of creating a container on the cloud-native deployment platform is achieved, a running environment is created for the traditional application, running under the cloud-native system is completed without modifying the traditional application, a server side manages a containerized target application and a non-containerized application through the cloud-native deployment platform, and overhead of the server side is saved.
In the following, with reference to fig. 6, the cloud-based application management method provided in this specification is taken as an example in an actual application scenario to further explain the cloud-based application management method. Fig. 6 shows a processing flow chart of an application management method based on cloud-based persistence provided in an embodiment of the present specification, and specifically includes the following steps:
step S602, a target application of the operation environment associated terminal system and a basic mirror image of the associated cloud native deployment platform are obtained.
The basic mirror image is pre-constructed by acquiring a mirror image command file preset by the cloud native deployment platform and a target application package corresponding to a target application, writing the mirror image command file and the target application package into a working directory of the cloud native deployment platform, and generating a basic mirror image corresponding to the initial application container according to a writing result.
Step S604, calling an application container template at the cloud native deployment platform, and transmitting container creation parameters into the application container template.
Step S606, converting the file address associated with the container creation parameter into an absolute address, and loading the container file.
Step S608, a container creation request is generated based on the container file, the absolute address and the container creation parameter, and sent to the container object generator in the cloud native deployment platform.
Step S610, in response to the result fed back by the container object generator with respect to the container creation request, creating an initial application container in the cloud native deployment platform.
Step S612, determining a configuration file of the associated cloud native deployment platform; wherein the configuration file is composed of sub-configuration files containing configuration parameters.
And step S614, mounting the configuration file to a working directory of the initial application container to serve as application configuration of the basic mirror image.
Step S616, sending a target container creation request to the target container generator according to the application configuration result.
In step S618, a target application container is created for the target container creation request by the target container generator.
And S620, running the target application on the cloud native deployment platform by running the target application container.
In the cloud-native-based application management method provided by this embodiment, in order to enable a traditional application to run in a cloud-native system without consuming excessive manpower and material resources, a target application of a running environment associated with a terminal system may be obtained, an initial application container associated with the target application is then created on a cloud-native deployment platform, a base image corresponding to the initial application container is determined according to a preset image command file and the target application, application configuration is performed on the base image to generate a target application container according to an application configuration result, finally, running the target application on the cloud-native deployment platform is achieved by running the target application container, a way of creating a container on the cloud-native deployment platform is achieved, a running environment is created for the traditional application, running under the cloud-native system is completed without modifying the traditional application, a server side manages a containerized target application and a non-containerized application through the cloud-native deployment platform, and overhead of the server side is saved.
Corresponding to the above method embodiment, the present specification further provides an embodiment of an application management device based on cloud-native, and fig. 7 illustrates a schematic structural diagram of an application management device based on cloud-native provided in an embodiment of the present specification. As shown in fig. 7, the apparatus includes:
an obtaining module 702 configured to obtain a target application of the operation environment-associated terminal system;
a creation module 704 configured to create an initial application container associated with the target application at a cloud-native deployment platform;
a determining module 706 configured to determine a base image corresponding to the initial application container according to a preset image command file and the target application, and perform application configuration for the base image;
a running module 708 configured to generate a target application container according to the application configuration result, and run the target application on the cloud native deployment platform by running the target application container.
In an optional embodiment, the determining module 706 is further configured to:
acquiring the mirror image command file preset by the cloud native deployment platform and a target application package corresponding to the target application; writing the mirror image command file and the target application package into a working directory of the cloud native deployment platform, determining the basic mirror image corresponding to the initial application container according to the writing result, and pushing the basic mirror image to a mirror image library.
In an optional embodiment, the determining module 706 is further configured to:
determining a configuration file associated with the cloud native deployment platform; wherein the configuration file is composed of sub-configuration files containing configuration parameters; and mounting the configuration file to the working directory to be used as the application configuration of the basic mirror image.
In an optional embodiment, the creating module 704 is further configured to:
calling an application container template at the cloud native deployment platform, and transmitting container creation parameters into the application container template; converting the file address associated with the container creation parameter into an absolute address, and loading a container file; generating a container creation request based on the container file, the absolute address and the container creation parameter, and sending the container creation request to a container object generator in the cloud native deployment platform; creating the initial application container at the cloud-native deployment platform in response to a result of the container object generator requesting feedback for the container creation.
In an optional embodiment, the execution module 708 is further configured to:
sending a primary container creation request to a primary container generator according to the base image; carrying out catalog mounting and parameter configuration aiming at the original container creation request through the original container generator to obtain an original container; and performing application configuration on the base image based on the container state of the original container.
In an optional embodiment, the execution module 708 is further configured to:
sending a target container creation request to a target container generator according to the application configuration result; creating, by the target container generator, the target application container for the target container creation request.
In an optional embodiment, the execution module 708 is further configured to:
creating an initial container catalog if the target container generator determines that the target container creation request is associated with a target container label; setting a management authority for the initial container directory, and mounting a target container item in the initial container directory after the management authority is set, so as to obtain a target container directory; and determining a container creation event associated with the target container directory, and generating the target application container by executing the container creation event.
In an optional embodiment, the execution module 708 is further configured to:
generating an environment setting sub-event, an interface setting sub-event, an authority setting sub-event and a resource management sub-event according to a preset container creation rule; and generating the container creation event based on the environment setting sub-event, the interface setting sub-event, the permission setting sub-event and the resource management sub-event.
In an optional embodiment, the execution module 708 is further configured to:
acquiring environment setting information, interface setting information, authority setting information and resource management information by executing the container creation event including the environment setting sub-event, the interface setting sub-event, the authority setting sub-event and the resource management sub-event; setting process association parameters according to the environment setting information, the interface setting information, the authority setting information and the resource management information; and creating the target application container according to the setting result of the process association parameters.
In an optional embodiment, the execution module 708 is further configured to:
reading an environment variable parameter by executing the environment setting sub-event, modifying a parameter path of the environment variable parameter, setting an environment working directory, and determining the environment setting information according to a parameter path modification result and an environment working directory setting result; correspondingly, the interface setting information is obtained by executing the interface setting sub-event, and the method comprises the following steps: and searching an interface file descriptor by executing the interface setting sub-event, calling an interface setting process to process the interface file descriptor, and obtaining the interface setting information according to a processing result.
In an optional embodiment, the execution module 708 is further configured to:
reading container configuration information by executing the authority setting sub-event, setting container association authority according to the container configuration information, and obtaining the authority setting information according to a setting result; correspondingly, the obtaining resource management information by executing the resource management sub-event includes: and determining resource management parameters by executing the resource management sub-event, and processing the resource management parameters to obtain the resource management information.
In order to enable a traditional application to run in a cloud-native system without consuming excessive manpower and material resources, the cloud-native-based application management device provided in this embodiment may obtain a target application of a running environment associated with a terminal system, then create an initial application container associated with the target application on a cloud-native deployment platform, then determine a base image corresponding to the initial application container according to a preset image command file and the target application, and perform application configuration for the base image, so as to generate a target application container according to an application configuration result, and finally run the target application on the cloud-native deployment platform by running the target application container, so that a way of creating a container on the cloud-native deployment platform is implemented, a running environment is created for the traditional application, the running under the cloud-native system is completed without modifying the traditional application, so that a server manages a containerized target application and a non-containerized application through the cloud-native deployment platform, and overhead of the server is saved.
The foregoing is an exemplary scheme of the cloud-based native application management apparatus according to this embodiment. It should be noted that the technical solution of the application management apparatus based on the cloud-native environment is the same as the technical solution of the application management method based on the cloud-native environment, and for details that are not described in detail in the technical solution of the application management apparatus based on the cloud-native environment, reference may be made to the description of the technical solution of the application management method based on the cloud-native environment.
Corresponding to the above method embodiment, the present specification further provides another cloud-native based application management method embodiment, and fig. 8 shows a flowchart of a cloud-native based application management method provided in an embodiment of the present specification. As shown in fig. 8, the method includes:
step S802, acquiring a target application of the operation environment associated terminal system;
step S804, according to a preset mirror image command file and an application file of the target application, determining a basic mirror image corresponding to the target application, and performing application configuration aiming at the basic mirror image;
step S806, generating a target application container according to an application configuration result, and running the target application on the cloud native deployment platform by running the target application container. The application file specifically refers to a target application package of the target application.
The above is an illustrative scheme of another cloud-based application management method of the embodiment. It should be noted that the technical solution of the other cloud-based application management method belongs to the same concept as the technical solution of the cloud-based application management method, and details of the technical solution of the other cloud-based application management method, which are not described in detail, can be referred to the description of the technical solution of the cloud-based application management method.
Corresponding to the above method embodiment, the present specification further provides an embodiment of an application management device based on cloud-native, and fig. 9 shows a schematic structural diagram of another application management device based on cloud-native that is provided in an embodiment of the present specification. As shown in fig. 9, the apparatus includes:
an obtaining application module 902 configured to obtain a target application of the operation environment-associated terminal system;
an application configuration module 904, configured to determine a basic image corresponding to the target application according to a preset image command file and an application file of the target application, and perform application configuration for the basic image;
the running application module 906 is configured to generate a target application container according to an application configuration result, and run the target application on the cloud native deployment platform by running the target application container.
The foregoing is an illustrative solution of another cloud-native-based application management apparatus of this embodiment. It should be noted that the technical solution of the cloud-based application management apparatus and the technical solution of the cloud-based application management method belong to the same concept, and details of the technical solution of the cloud-based application management apparatus, which are not described in detail, can be referred to the description of the technical solution of the cloud-based application management method.
Fig. 10 shows a block diagram of a computing device 1000 provided according to an embodiment of the present description. The components of the computing device 1000 include, but are not limited to, a memory 1010 and a processor 1020. The processor 1020 is coupled to the memory 1010 via a bus 1030 and the database 1050 is used to store data.
Computing device 1000 also includes access device 1040, access device 1040 enabling computing device 1000 to communicate via one or more networks 1060. Examples of such networks include the Public Switched Telephone Network (PSTN), a Local Area Network (LAN), a Wide Area Network (WAN), a Personal Area Network (PAN), or a combination of communication networks such as the internet. Access device 1040 may include one or more of any type of network interface, e.g., a Network Interface Card (NIC), wired or wireless, such as an IEEE802.11 Wireless Local Area Network (WLAN) wireless interface, a worldwide interoperability for microwave access (Wi-MAX) interface, an ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a bluetooth interface, a Near Field Communication (NFC) interface, and so forth.
In one embodiment of the present description, the above components of the computing device 1000 and other components not shown in fig. 10 may also be connected to each other, for example, through a bus. It should be understood that the block diagram of the computing device architecture shown in FIG. 10 is for purposes of example only and is not limiting as to the scope of the present description. Those skilled in the art may add or replace other components as desired.
Computing device 1000 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., tablet, personal digital assistant, laptop, notebook, netbook, etc.), a mobile phone (e.g., smartphone), a wearable computing device (e.g., smartwatch, smartglasses, etc.), or other type of mobile device, or a stationary computing device such as a desktop computer or PC. Computing device 1000 may also be a mobile or stationary server.
Wherein, the processor 1020 is configured to execute the following computer-executable instructions:
acquiring a target application of a running environment associated terminal system;
creating an initial application container associated with the target application at a cloud native deployment platform;
constructing a basic mirror image corresponding to the initial application container according to a preset mirror image command file and the target application, and performing application configuration aiming at the basic mirror image;
and generating a target application container according to an application configuration result, and running the target application on the cloud native deployment platform based on the target application container.
The above is an illustrative scheme of a computing device of the present embodiment. It should be noted that the technical solution of the computing device and the technical solution of the cloud-based application management method belong to the same concept, and details that are not described in detail in the technical solution of the computing device can be referred to the description of the technical solution of the cloud-based application management method.
An embodiment of the present specification also provides a computer readable storage medium storing computer instructions that, when executed by a processor, are operable to:
acquiring a target application of a running environment associated terminal system;
creating an initial application container associated with the target application at a cloud native deployment platform;
constructing a basic mirror image corresponding to the initial application container according to a preset mirror image command file and the target application, and performing application configuration aiming at the basic mirror image;
and generating a target application container according to an application configuration result, and running the target application on the cloud native deployment platform based on the target application container.
The above is an illustrative scheme of a computer-readable storage medium of the present embodiment. It should be noted that the technical solution of the storage medium belongs to the same concept as that of the above-mentioned cloud-based application management method, and details that are not described in detail in the technical solution of the storage medium can be referred to the description of the technical solution of the above-mentioned cloud-based application management method.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The computer instructions comprise computer program code which may be in the form of source code, object code, an executable file or some intermediate form, or the like. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, read-Only Memory (ROM), random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer-readable medium may contain suitable additions or subtractions depending on the requirements of legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer-readable media may not include electrical carrier signals or telecommunication signals in accordance with legislation and patent practice.
It should be noted that, for the sake of simplicity, the foregoing method embodiments are described as a series of acts or combinations, but those skilled in the art should understand that the present disclosure is not limited by the described order of acts, as some steps may be performed in other orders or simultaneously according to the present disclosure. Further, those skilled in the art should also appreciate that the embodiments described in this specification are preferred embodiments and that acts and modules referred to are not necessarily required for this description.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
The preferred embodiments of the present specification disclosed above are intended only to aid in the description of the specification. Alternative embodiments are not exhaustive and do not limit the invention to the precise embodiments described. Obviously, many modifications and variations are possible in light of the above teaching. The embodiments were chosen and described in order to best explain the principles of the specification and its practical application, to thereby enable others skilled in the art to best understand the specification and utilize the specification. The specification is limited only by the claims and their full scope and equivalents.

Claims (15)

1. A cloud-native-based application management method is characterized by comprising the following steps:
acquiring a target application of a running environment associated terminal system;
creating an initial application container associated with the target application at a cloud native deployment platform;
determining a basic mirror image corresponding to the initial application container according to a preset mirror image command file and the target application, and performing application configuration aiming at the basic mirror image;
and generating a target application container according to an application configuration result, and running the target application on the cloud native deployment platform by running the target application container.
2. The method according to claim 1, wherein before the step of determining the base image corresponding to the initial application container according to the preset image command file and the target application is executed, the method further comprises:
acquiring the mirror image command file preset by the cloud native deployment platform and a target application package corresponding to the target application;
writing the mirror image command file and the target application package into a working directory of the cloud native deployment platform, determining the basic mirror image corresponding to the initial application container according to the writing result, and pushing the basic mirror image to a mirror image library.
3. The method of claim 2, wherein the configuring the application for the base image comprises:
determining a configuration file associated with the cloud native deployment platform; wherein the configuration file is composed of sub-configuration files containing configuration parameters;
and mounting the configuration file to the working directory to be used as the application configuration of the basic mirror image.
4. The method of claim 1, wherein creating an initial application container associated with the target application at the cloud-native deployment platform comprises:
calling an application container template at the cloud native deployment platform, and transmitting container creation parameters into the application container template;
converting the file address associated with the container creation parameter into an absolute address, and loading a container file;
generating a container creation request based on the container file, the absolute address and the container creation parameter, and sending the container creation request to a container object generator in the cloud native deployment platform;
creating the initial application container at the cloud-native deployment platform in response to a result of the container object generator requesting feedback for the container creation.
5. The method of claim 1, wherein the configuring the application for the base image comprises:
sending a primary container creation request to a primary container generator according to the base image;
carrying out catalog mounting and parameter configuration aiming at the original container creation request through the original container generator to obtain an original container;
and performing application configuration on the base image based on the container state of the original container.
6. The method of claim 5, wherein generating the target application container according to the application configuration result comprises:
sending a target container creation request to a target container generator according to the application configuration result;
creating, by the target container generator, the target application container for the target container creation request.
7. The method of claim 6, wherein the creating, by the target container generator, the target application container for the target container creation request comprises:
creating an initial container catalog if the target container generator determines that the target container creation request is associated with a target container label;
setting a management authority for the initial container directory, and mounting a target container item in the initial container directory after the management authority is set, so as to obtain a target container directory;
and determining a container creation event associated with the target container directory, and generating the target application container by executing the container creation event.
8. The method of claim 7, wherein determining the container creation event associated with the target container directory comprises:
generating an environment setting sub-event, an interface setting sub-event, an authority setting sub-event and a resource management sub-event according to a preset container creation rule;
and generating the container creation event based on the environment setting sub-event, the interface setting sub-event, the permission setting sub-event and the resource management sub-event.
9. The method of claim 8, wherein generating the target application container by executing the container creation event comprises:
acquiring environment setting information, interface setting information, authority setting information and resource management information by executing the container creation event including the environment setting sub-event, the interface setting sub-event, the authority setting sub-event and the resource management sub-event;
setting process association parameters according to the environment setting information, the interface setting information, the authority setting information and the resource management information;
and creating the target application container according to the setting result of the process association parameters.
10. The method of claim 9, wherein obtaining environment setting information by executing the environment setting sub-event comprises:
reading an environment variable parameter by executing the environment setting sub-event, modifying a parameter path of the environment variable parameter, setting an environment working directory, and determining the environment setting information according to a parameter path modification result and an environment working directory setting result;
correspondingly, the interface setting information is obtained by executing the interface setting sub-event, and the method comprises the following steps:
and searching an interface file descriptor by executing the interface setting sub-event, calling an interface setting process to process the interface file descriptor, and obtaining the interface setting information according to a processing result.
11. The method according to claim 9, wherein the obtaining of the permission setting information by executing the permission setting sub-event comprises:
reading container configuration information by executing the authority setting sub-event, setting container association authority according to the container configuration information, and obtaining the authority setting information according to a setting result;
correspondingly, the obtaining resource management information by executing the resource management sub-event includes:
and determining resource management parameters by executing the resource management sub-event, and processing the resource management parameters to obtain the resource management information.
12. An application management device based on cloud-native, comprising:
the acquisition module is configured to acquire a target application of the operation environment associated terminal system;
a creation module configured to create an initial application container associated with the target application at a cloud native deployment platform;
the determining module is configured to determine a basic mirror image corresponding to the initial application container according to a preset mirror image command file and the target application, and perform application configuration on the basic mirror image;
the running module is configured to generate a target application container according to an application configuration result, and run the target application on the cloud native deployment platform by running the target application container.
13. A cloud-native-based application management method is characterized by comprising the following steps:
acquiring a target application of a running environment associated terminal system;
determining a basic mirror image corresponding to the target application according to a preset mirror image command file and an application file of the target application, and performing application configuration aiming at the basic mirror image;
and generating a target application container according to an application configuration result, and operating the target application on the cloud native deployment platform by operating the target application container.
14. A computing device comprising a memory and a processor; the memory is for storing computer-executable instructions, and the processor is for executing the computer-executable instructions to implement the steps of the method of any one of claims 1 to 11 or 13.
15. A computer-readable storage medium storing computer instructions, which when executed by a processor, perform the steps of the method of any one of claims 1 to 11 or 13.
CN202211240245.2A 2022-10-11 2022-10-11 Application management method and device based on cloud protogenesis Pending CN115525396A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211240245.2A CN115525396A (en) 2022-10-11 2022-10-11 Application management method and device based on cloud protogenesis

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211240245.2A CN115525396A (en) 2022-10-11 2022-10-11 Application management method and device based on cloud protogenesis

Publications (1)

Publication Number Publication Date
CN115525396A true CN115525396A (en) 2022-12-27

Family

ID=84702268

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211240245.2A Pending CN115525396A (en) 2022-10-11 2022-10-11 Application management method and device based on cloud protogenesis

Country Status (1)

Country Link
CN (1) CN115525396A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116880863A (en) * 2023-07-19 2023-10-13 易方达基金管理有限公司 Deployment method and device of cloud native application
CN117251250A (en) * 2023-09-20 2023-12-19 北京九章云极科技有限公司 Container management method based on cloud native platform and related equipment

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116880863A (en) * 2023-07-19 2023-10-13 易方达基金管理有限公司 Deployment method and device of cloud native application
CN116880863B (en) * 2023-07-19 2024-01-26 易方达基金管理有限公司 Deployment method and device of cloud native application
CN117251250A (en) * 2023-09-20 2023-12-19 北京九章云极科技有限公司 Container management method based on cloud native platform and related equipment

Similar Documents

Publication Publication Date Title
US11303539B2 (en) Network component placement architecture
US8819672B2 (en) Multi-image migration system and method
CN115525396A (en) Application management method and device based on cloud protogenesis
CN109547509B (en) Cross-platform deployment method and system
CN105630488A (en) Docker container technology-based continuous integration realizing method
US10949271B2 (en) Enhanced copy-and-paste
US20230205569A1 (en) System and method for distributed orchestration management in network function virtualization
Munteanu et al. Multi-cloud resource management: cloud service interfacing
US10324701B1 (en) Rapid deployment of computing instances
CN111984269A (en) Method for providing application construction service and application construction platform
CN113157339B (en) Application service extension method, system, storage medium and device based on OSB
US20200241896A1 (en) Integration application creator design
CN111897623B (en) Cluster management method, device, equipment and storage medium
Hartauer et al. Cloud Function Lifecycle Considerations for Portability in Function as a Service.
CN110083366B (en) Application running environment generation method and device, computing equipment and storage medium
US11601342B1 (en) Method and system to automate device management user interface hosting of devices, assets, and appliances
US11757976B2 (en) Unified application management for heterogeneous application delivery
US11163622B1 (en) Web application implementing a shared set of identifiers for handling links to web application plugins
CN113641641A (en) Switching method, switching system, equipment and storage medium of file storage service
WO2021232860A1 (en) Communication method, apparatus and system
CN112181401A (en) Application construction method and application construction platform
CN113420306A (en) Resource sharing method and device, computing equipment and computer readable storage medium
CN112564979A (en) Execution method and device for construction task, computer equipment and storage medium
US20220330013A1 (en) Managing configurations of mobile devices across mobility configuration environments
CN116915604A (en) Cloud resource configuration method, device and system and processing equipment

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