WO2022199136A1 - 应用改造方法、系统、集群、介质及程序产品 - Google Patents

应用改造方法、系统、集群、介质及程序产品 Download PDF

Info

Publication number
WO2022199136A1
WO2022199136A1 PCT/CN2021/137543 CN2021137543W WO2022199136A1 WO 2022199136 A1 WO2022199136 A1 WO 2022199136A1 CN 2021137543 W CN2021137543 W CN 2021137543W WO 2022199136 A1 WO2022199136 A1 WO 2022199136A1
Authority
WO
WIPO (PCT)
Prior art keywords
application
configuration information
image
environment
package
Prior art date
Application number
PCT/CN2021/137543
Other languages
English (en)
French (fr)
Inventor
王新宇
吴堃
王弘
刘双春
Original Assignee
华为云计算技术有限公司
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 华为云计算技术有限公司 filed Critical 华为云计算技术有限公司
Priority to EP21932743.4A priority Critical patent/EP4293498A1/en
Publication of WO2022199136A1 publication Critical patent/WO2022199136A1/zh
Priority to US18/464,250 priority patent/US20230418623A1/en

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/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • 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
    • 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/45504Abstract machines for programme code execution, e.g. Java virtual machine [JVM], interpreters, emulators
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/43Checking; Contextual analysis
    • G06F8/433Dependency analysis; Data or control flow analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/63Image based installation; Cloning; Build to order
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • 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/45591Monitoring or debugging support
    • 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

Definitions

  • the present application relates to the technical field of cloud computing, and in particular, to an application transformation method, an application management system, a computer cluster, a computer-readable storage medium, and a computer program product.
  • Cloud computing also known as network computing, is a computing method based on the Internet. Through this computing method, shared software and hardware resources can be provided to users on demand. Deploying an application in a cloud environment can, on the one hand, obtain resources on demand for flexible deployment according to the application load, and improve resource utilization. On the other hand, it can save the cost of building a data center by itself, as well as the cost of maintaining a data center, thereby reducing costs.
  • containerization transformation refers to transforming applications into containers for easy migration to the cloud.
  • IT information technology
  • containerization transformation refers to transforming applications into containers for easy migration to the cloud.
  • the mainstream transformation solution in the industry is that developers manually transform applications based on their own experience and capabilities. Specifically, the developer transforms the installation package of the application into a format suitable for deployment in a cloud environment, such as an image format. The file in this image format is the image of the application.
  • Application-based images can create application containers in a cloud environment, enabling application migration.
  • the present application provides an application transformation method, which realizes automatic application transformation based on the environment variables of the application in the running environment and the code package of the application, reduces manual intervention, improves the efficiency of application transformation, and avoids relying on development The experience of the user leads to the problem that the reliability is difficult to be guaranteed.
  • the method transforms the application to obtain an image set including multiple images, which can realize the microservice of the application, prevent the application from being unable to provide services due to a single point of failure, and improve the quality and reliability of the service.
  • the present application also provides an application management system, a computing device cluster, a computer-readable storage medium, and a computer program product corresponding to the above method.
  • the present application provides an application modification method.
  • the method may be performed by an application management system.
  • the application management system includes a processor and memory.
  • the processor is configured to execute the instructions stored in the memory to execute the application modification method of the present application.
  • the application transformation method will be described below.
  • the application management system can obtain the environment variables of the application in the running environment and the code package of the application, wherein the environment variable refers to an object with a specific name in the operating system, and the environment variable includes information used by one or more applications, Used to specify the runtime environment of the application in the operating system. Then, the application management system can obtain the transformation result of the application according to the above-mentioned environment variables and code packages.
  • the transformation result includes an image set of the application, the image set includes multiple images, and the container created according to each image can be used to execute some modules of the application.
  • this method realizes automatic application transformation based on environment variables and code packages, reduces manual intervention by users, improves the efficiency of application transformation, and avoids the problem of difficulty in ensuring reliability due to relying on developer experience; on the other hand , the method transforms the application to obtain a mirror set including multiple mirrors, and then realizes the microservice of the application, which can avoid the application from being unable to provide services due to a single point of failure, and improve the quality and stability of the service.
  • the code package of the application may be a source code package, where the source code package indicates a code package that has not been compiled.
  • the application management system is directly based on the source code package for containerization transformation. By analyzing the source code package, multiple images of the image set can be accurately obtained to ensure the availability and reliability of the image.
  • the application management system may analyze the environment variable to obtain static environment configuration information, and analyze the source code package to obtain container configuration information.
  • the container configuration information includes block information of the source code package, and the block information is used to divide the source code package into multiple code blocks.
  • the block information may include line identifiers of the respective code blocks, such as start line numbers and end line numbers.
  • the application management system may obtain the image set of the application according to the static environment configuration information and the container configuration information. Each image in the image set is determined according to the static environment configuration information and at least one code block of the plurality of code blocks.
  • the application management system can identify the code in the source code package through artificial intelligence technology, such as natural language processing, based on the code development logic, so as to obtain the block information of the source code package. For example, the application management system can identify the semantics of each function in the code through natural language processing, so as to divide the source code package into blocks, and obtain the block information of the source code package.
  • artificial intelligence technology such as natural language processing
  • the application management system can obtain multiple images by dividing the source code package into blocks, thereby realizing the micro-service of the application, avoiding the failure to provide external services due to a single point of failure, and on the other hand, it can achieve accurate segmentation Blocks, the multiple mirrors obtained by splitting in this way are more reasonable and have higher availability.
  • At least one image in the image set is obtained by searching from an image library according to the static environment configuration information and the block information.
  • the image library includes image sets of multiple applications, and each application image set includes at least one image.
  • the application management system may search the image library according to the static environment configuration information and at least one code block determined by the block information, and obtain at least one image of the found application.
  • the application management system can directly obtain the image set of the application from the image library.
  • the application management system can also generate a corresponding image according to the static environment configuration information and the block information.
  • the resources needed to generate the image are reduced, and the time for obtaining the image is reduced, thus improving the efficiency of application transformation.
  • the application may also reference external components, which refer to third-party components.
  • the application management system may analyze the source code package to obtain external component configuration information, wherein the external component configuration information is used to obtain external components.
  • the external component configuration information may be, for example, a network address or a storage address of the external component.
  • the application management system can acquire the external component according to the external component configuration information.
  • the application management system may call or access the external component based on the network address or storage address of the external component, thereby realizing the acquisition of the external component.
  • the external component is associated with at least one mirror in the mirror set.
  • the transformation result of the application may further include an association relationship between the external component and at least one image in the image set.
  • the method obtains the configuration information of external components by analyzing the source code package, can realize the automatic transformation of the application that references the external components, and has high usability.
  • the application management system may determine the association between the container carrying each image and the external component according to the association between the external component and at least one image in the image set. This can provide assistance for subsequent application migration to the cloud environment.
  • the application management system may also obtain the running code of the application when it runs in the running environment, and obtain the configuration information of the running environment.
  • the runtime environment configuration information includes a basic association package associated with the application running in the runtime environment.
  • the basic associated package can be one or more of basic dependency packages (such as tomcat, Java, mvn), compilation-related packages (such as gcc, glib or make), and installation-related packages (such as expect components, py reference libraries) indivual.
  • the application management system may obtain the image set of the application according to the static environment configuration information, the runtime environment configuration information and the container configuration information.
  • at least one image in the image set may be determined according to the static environment configuration information, at least one code block in the plurality of code blocks, and the basic associated package.
  • the method obtains the configuration information of the runtime environment by analyzing the runtime code when the application is running in the runtime environment. Obtaining the image of the application in combination with the configuration information of the runtime environment can improve the accuracy of the obtained image of the application and meet business requirements.
  • the container configuration information further includes the calling relationship between the code blocks
  • the transformation result further includes the calling relationship between the code blocks.
  • the calling relationship between the code blocks can indicate the calling relationship between the images corresponding to the code blocks, and further indicate the calling relationship between the containers that carry the images, which can help the application migrate to the cloud environment.
  • the application management system may present a configuration interface to the user, the configuration interface provides a variety of source code package names, and the application management system may receive the source code package of the application selected by the user on the configuration interface name, and then obtain the source code package corresponding to the selected source code package name of the application from the software warehouse, where the software warehouse includes multiple source code packages.
  • the method supports the user to choose the source code package for application transformation by himself, so that the individual needs of the user can be met.
  • the application management system may also receive the source code package of the application uploaded by the user.
  • the source code package of the application uploaded by the user can be the source code package of the user's self-developed application or the source code package of other non-open source applications, so that the transformation of the self-developed application or the non-open source application can be realized.
  • the present application provides an application management system.
  • the system includes:
  • an application-aware subsystem used to obtain the environment variables of the application in the running environment and the source code package of the application
  • an image management subsystem configured to obtain a transformation result of the application according to the environment variable and the code package, where the transformation result includes an image set of the application, and the image set includes a plurality of images, wherein according to The containers created by each image are used to execute some modules of the application.
  • the code package is a source code package
  • the source code package indicates a code package that has not been compiled.
  • system further includes:
  • the analysis subsystem is configured to analyze the environment variables to obtain static environment configuration information, and analyze the source code package to obtain container configuration information, wherein the container configuration information includes the block information of the source code package, and the block information is used for dividing the source code package into a plurality of code blocks;
  • the image management subsystem is configured to obtain an image set of the application according to the static environment configuration information and the container configuration information, and each image in the image set is based on the static environment configuration information and the multiple image sets. determined by at least one of the code blocks.
  • At least one image in the image set is obtained by searching from an image library according to the static environment configuration information and the block information.
  • system further includes:
  • an analysis subsystem for analyzing the source code package to obtain configuration information of external components
  • a container management subsystem configured to acquire an external component according to the external component configuration information, where the external component is associated with at least one image in the image set, wherein the transformation result further includes the external component and the image set in the image set The relationship of at least one mirror of .
  • the analysis subsystem is further configured to obtain the running code when the application runs in the running environment, and obtain the configuration information of the running environment, where the configuration information of the running environment includes the a basic association package associated with the application when it runs in the runtime environment;
  • the image management subsystem is configured to obtain an image set of the application according to the static environment configuration information, the runtime environment configuration information and the container configuration information, wherein at least one image in the image set is based on the image set.
  • the static environment configuration information, at least one code block in the plurality of code blocks, and the basic associated package are determined.
  • the container configuration information further includes the calling relationship between the code blocks
  • the transformation result further includes the calling relationship between the code blocks
  • the present application provides a computing device cluster.
  • the computing device cluster includes at least one computing device.
  • Each computing device includes a processor and memory.
  • the processor and the memory communicate with each other.
  • the processor is configured to execute the instructions stored in the memory, so that the computing device cluster executes the application transformation method according to the first aspect or any one of the implementation manners of the first aspect.
  • the present application provides a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and the instructions instruct a device to execute the first aspect or any implementation manner of the first aspect. Apply the retrofit method.
  • the present application provides a computer program product containing instructions, which, when running on a device, enable the device to execute the application transformation method described in the first aspect or any implementation manner of the first aspect.
  • the present application may further combine to provide more implementation manners.
  • FIG. 1 is a system architecture diagram of a method for application transformation provided by an embodiment of the present application
  • FIG. 2 is a schematic diagram of a configuration interface provided by an embodiment of the present application.
  • FIG. 3 is a flowchart of an application transformation method provided by an embodiment of the present application.
  • FIG. 4 is a schematic diagram of a dependency graph of an application provided by an embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of a computing device cluster according to an embodiment of the present application.
  • first and second in the embodiments of the present application are only used for the purpose of description, and cannot be understood as indicating or implying relative importance or implying the number of indicated technical features. Thus, a feature defined as “first” or “second” may expressly or implicitly include one or more of that feature.
  • An application refers to a computer program written for a specific application purpose of a user.
  • Applications can be divided into different types according to application purposes or functions. For example, applications can include e-commerce applications, social applications, office applications, leisure and entertainment applications, and the like.
  • An image is a union file system that includes multiple read-only layers.
  • the joint file system can integrate different read-only layers into a single file system, providing a unified view for these read-only layers, thus hiding the existence of multiple layers. From the user's point of view, the image has a read-only file system.
  • An image provides a lightweight package of elements needed to run an application.
  • An image can be understood as an installation package in a specific format that needs to be obtained when using an application.
  • the specific format may be, for example, an optical disc image file (IsoBuster, ISO) format.
  • a container is a running instance created from an image.
  • the running instance may be a union file system including at least one read-only layer and one read-write layer.
  • the joint file system can integrate the above at least one read-only layer and one read-write layer into one file system, thereby providing a unified view for these read-only layers, thus hiding the existence of multiple layers, from the user's point of view , the container has a readable and writable filesystem.
  • the lightweight code package of the elements required by the container to run the application to realize the virtualization of the operating system, so that the application runs in a relatively independent and isolated environment, which simplifies the application deployment process and enhances the portability and security of the application. sex.
  • Applications can be divided into containerized applications and non-containerized applications according to whether they are containerized. Many traditional applications (such as attendance management systems, production management systems) are non-containerized applications. With the continuous development of cloud computing technology, more and more developers choose to remodel non-containerized applications into containerized applications to migrate applications to the cloud environment, thereby improving fault tolerance and reducing management. cost.
  • the mainstream transformation solution in the industry is that developers, based on their own experience and capabilities, transform the installation package of the above non-containerized application into a format suitable for deployment in the cloud environment, so as to deploy the transformed installation package in the cloud environment, thereby Enables migration of applications to the cloud environment.
  • this transformation scheme relies on the developer's own experience and capabilities, resulting in low migration efficiency and difficulty in ensuring reliability.
  • the embodiments of the present application provide an application modification method.
  • the method may be performed by an application management system.
  • the application management system may be a system with an application management function (for example, an application modification function), the system includes a processor and a memory, wherein the processor is configured to execute the instructions stored in the memory to execute the application modification method.
  • the application management system obtains the environment variables corresponding to the running environment of the application and the code package of the application, and then obtains the transformation result of the application according to the environment variables and the code package.
  • the transformation result includes an image set of the application, the image set includes multiple images, and the container created according to each image is used to execute some modules of the application.
  • this method realizes automatic application transformation based on environment variables and code packages, reduces manual intervention by users, improves the efficiency of application transformation, and avoids the problem of difficulty in ensuring reliability due to relying on developer experience; on the other hand , the method transforms the application to obtain a mirror set including multiple mirrors, and then realizes the microservice of the application, which can avoid the application from being unable to provide services due to a single point of failure, and improve the quality and stability of the service.
  • the application when it is containerized, it can also be directly containerized based on the source code package and environment variables.
  • the source code package indicates the code package that has not been compiled.
  • this method directly performs containerization transformation based on the source code package and environment variables of the application. reliability.
  • the application management system of the embodiment of the present application can be used to carry out containerization transformation for different types of applications, so as to realize application migration.
  • the application management system can transform the e-commerce platform and obtain an image set including multiple images, so that multiple containers can be created from multiple images, so as to realize the migration of the e-commerce platform from the local server to the cloud environment, and realize the Microservices provide external services.
  • the local server may be a private server of the application owner (for example, the developer).
  • a cloud environment indicates a cluster of cloud computing devices owned by a cloud service provider and used to provide computing, storage, and communication resources.
  • the cloud computing device cluster includes at least one cloud computing device, and the cloud computing device includes a cloud server.
  • the application management system can transform the production management system, obtain a mirror set of the production management system, and migrate the production management system to the cloud environment through multiple mirrors in the mirror set.
  • the application management system can also transform the game, obtain the image set of the game, and migrate the game to the cloud environment through multiple images in the image set.
  • Applications migrated to the cloud environment can provide corresponding services to users in the form of cloud services.
  • the application management system 100 is deployed in a cloud environment, and the cloud environment indicates a cloud computing device cluster owned by a cloud service provider and used to provide computing, storage, and communication resources.
  • the cloud computing device cluster includes at least one cloud server.
  • the application management system 100 may be centrally deployed in one cloud server, or distributed in multiple cloud servers.
  • Application 200 is deployed in a local server.
  • the cloud server where the application management system 100 is deployed may establish a communication connection with the local server where the application 200 is deployed.
  • the application 200 may also be deployed in a cloud server. The following description will take the deployment of the application 200 on a local server as an example.
  • the application management system 100 is used to transform the application 200 to be deployed in the local server, so as to migrate the application 200 to the cloud environment.
  • the application management system 100 can interact with the application 200, so as to realize the transformation of the application 200.
  • the application management system 100 may also interact with the software repository 300 and the image repository 400 to realize the modification of the application 200 .
  • the software repository 300 is used to provide code packages of at least one application.
  • the code package may be a source code package.
  • the source package indicates an uncompiled code package.
  • the image library 400 is used to provide an image set of at least one application.
  • the mirror set includes multiple mirrors.
  • the container created from each image is used to execute some modules of the application.
  • FIG. 1 illustrates an example where the software repository 300 and the image repository 400 are deployed in different cloud computing device clusters.
  • the software repository 300 and the image repository 400 may also be deployed in the same cloud computing device.
  • the application management system 100 obtains the environment variables of the application 200 in the running environment and the code package of the application 200.
  • the application management system 100 can access the running environment of the application 200, obtain the environment variables of the application 200 in the running environment, and
  • the code package of the application 200 is obtained from the software repository 300, and the code package may be a source code package.
  • the application management system 100 obtains the transformation result of the application 200 according to the above-mentioned environment variables and code packages.
  • the retrofit result includes an image set of application 200 .
  • the container created according to each image in the image set is used to execute some modules of the application.
  • the application management system 100 may also not obtain the code package of the application 200 through the software repository 300, but directly receive the code package of the application 200 uploaded by the user. Similarly, the application management system 100 may not obtain the image through the image repository 400, but directly generate the image according to the environment variables and the source code package.
  • the application management system 100 includes multiple parts, for example, the application management system 100 may include multiple subsystems. Further, a subsystem may include multiple modules. The subsystems and modules within the application management system 100 may be divided in various manners, which are not limited in this application.
  • FIG. 1 is an exemplary division manner.
  • the application management system 100 includes an application awareness subsystem 102 and an image management subsystem 108 .
  • the application management system 100 further includes one or more of the analysis subsystem 104 , the configuration subsystem 106 , and the container management subsystem 110 . Each subsystem is described in detail below.
  • the application awareness subsystem 102 is used to obtain environment variables and source code packages of the application 200 in the running environment.
  • An environment variable refers to an object with a specific name in an operating system (operation system, OS), and the environment variable includes information used by one or more applications, and is used to specify a running environment of the application 200 in the operating system.
  • the environment variables include one or more of PATH, JAVA HOME, or CLASS PATH.
  • JAVA HOME is used to indicate the path of the executable file corresponding to the JAVA command.
  • PATH is used to indicate the search scope for executable files. After configuring the PATH, no matter in which directory the JAVA command is executed, the executable file of the JAVA command can be searched based on the above search range.
  • CLASS PATH is used to specify the directory where JAVA classes are located.
  • the environment variable may also include an operating system type, an operating system version, a kernel version, a basic operating system dependency package, or operating system operating parameters, and the like.
  • the operating system running parameter is a parameter when the operating system is running, for example, a semaphore inside the OS kernel.
  • the application awareness subsystem 102 may include a context awareness module and a software awareness module.
  • the environment perception module is used to access the running environment of the application 200 and obtain the environment variables of the application 200 in the running environment.
  • the software perception module is used for acquiring the code package of the application 200 , for example, acquiring the source code package of the application 200 from the software repository 300 .
  • the environment perception module can obtain the access information of the application 200, for example, obtain the network address (Internet Protocol address, IP) of the application 200 to access the application 200, and then scan the local server where the application 200 is located to obtain the environment variables. Further, the application 200 can also authenticate the access request. Based on this, the access information may further include identity information, the identity information may include a user name and a password, and in some embodiments, the identity information may also include one or more of fingerprints, voiceprints, or irises.
  • the application 200 performs authentication based on the above-mentioned identity information, and when the authentication is passed, the application management system 100 (for example, the environment awareness module of the application awareness subsystem 102 in the application management system 100 ) is allowed to access the application 200 .
  • the software-aware module can provide a configuration interface.
  • the configuration interface can be either a graphical user interface (GUI) or a command user interface.
  • GUI graphical user interface
  • the configuration interface may present various code package identifiers to the user, wherein the code package identifier may be a code package name.
  • the software perception module may receive the code package name of the application 200 selected by the user through the above configuration interface, and obtain the code package corresponding to the code package name of the application 200 selected by the user from the software repository 300 .
  • the software repository 300 includes multiple source code packages, and the code acquired by the software perception module may include one of the multiple source code packages.
  • the software perception module obtains the source code package of the application 200 through the GUI as an example for description.
  • the configuration interface 20 presents attribute information 202 of source code packages of multiple applications in the software repository 300 , and the attribute information 202 includes source code package names, applicable operating systems and source code package versions.
  • Configuration interface 20 also includes selection controls 204 for source packages. The user can select one or more source code packages through the selection control 204 based on the property information 202 of the source code packages.
  • the software perception module can generate a source code package acquisition request in response to the operation, and the request is specifically used to request to acquire the source code package selected by the user from the software repository 300 .
  • the software awareness module may abandon the operation of obtaining the source code package of the application 200 .
  • the image management subsystem 108 is configured to obtain the modification result of the application 200 according to the environment variables and the source code package, and the modification result includes the image set of the application 200 .
  • the mirror set includes multiple mirrors.
  • a container created from each image is used to execute some modules of the application 200 .
  • the containers created according to the images in the transformed image set are respectively used to execute the user management module, evaluation management module, order management module and commodity management module of the e-commerce platform.
  • the image management subsystem 108 may support obtaining the image of the application 200 by searching the image repository 400 . For the images not found in the image library 400, the image management subsystem 108 regenerates the corresponding images. In this way, unnecessary image generation operations can be reduced.
  • the application management system 100 also includes at least one of the analysis subsystem 104 , the configuration subsystem 106 , and the container management subsystem 110 .
  • the analysis subsystem 104 is configured to analyze environment variables to obtain static environment configuration information, and analyze source packages to obtain container configuration information.
  • the static environment configuration information may be the environment configuration information when the application 200 is not running.
  • the environment configuration information is used to describe the requirements of the application 200 for the environment.
  • the static environment configuration information may include one or more of the operating system type, operating system version, or PATH.
  • the source code package of the application 200 may also include information such as the operating system type, and the application management system 100 may perform verification according to the operating system type in the static environment configuration information and the operating system type obtained from the source code package, thereby Guaranteed reliability.
  • the container configuration information may be configuration information of a container used to generate the application 200 .
  • the container is generated based on the image.
  • the container configuration information may include information for generating images.
  • the container configuration information may include block information for the source package.
  • the chunking information is used to divide the source package into multiple code chunks.
  • the block information may include line identifiers of the respective code blocks, such as start line numbers and end line numbers. Taking the e-commerce platform as an example, the block information may be the starting line number and the ending line number of the code blocks corresponding to the user management module, the evaluation management module, the order management module, and the commodity management module. At least one code block of the plurality of code blocks may be used to generate an image of the application 200 .
  • the analysis subsystem 104 can identify the code in the source code package through artificial intelligence (artificial intelligence, AI) technology, such as natural language processing (NLP), based on the code development logic, so as to obtain the blocks of the source code package information.
  • AI artificial intelligence
  • NLP natural language processing
  • the analysis subsystem 104 can identify the semantics of each function in the code through NLP, so as to divide the source code package into blocks, and obtain the block information of the source code package.
  • the image management subsystem 108 may obtain the image set of the application according to the static environment configuration information and the container configuration information. Wherein, each image in the image set is determined according to static environment configuration information and at least one code block in the plurality of code blocks. Specifically, the image management subsystem 108 may search the image library 400 according to the static environment configuration information and at least one code block to obtain at least one image in the image set. For an image that is not found, the image management subsystem 108 may generate a corresponding image according to the static environment configuration information and at least one code block. For example, the image management subsystem 108 may acquire a base image according to the static environment configuration information, and the base image may be, for example, an operating system image.
  • the image management subsystem 108 then compiles at least one code block, and installs the compiled code block into the operating system image, thereby obtaining a corresponding image.
  • the image management subsystem 108 may also publish the generated image to the image repository 400 for subsequent use.
  • the container configuration information may also include the calling relationship between the code blocks.
  • the evaluation management module can call the order management module to realize order evaluation.
  • the container configuration information may include the calling relationship between the code block corresponding to the evaluation management module and the code block corresponding to the order management module.
  • the transformation result also includes the calling relationship between the code blocks.
  • the calling relationship between the code blocks and the corresponding relationship between the code block and the image can be used to determine the calling relationship between the images. In this way, when the container that carries the image is running, it can implement the call between the container and the container based on the calling relationship between the images.
  • the analysis subsystem 104 is further configured to obtain the runtime code when the application 200 is running in the runtime environment, and the runtime environment configuration information can be obtained by analyzing the runtime code.
  • the runtime environment configuration information includes basic association packages associated with the application 200 when it runs in the runtime environment.
  • the basic associated package can be one or more of basic dependency packages (such as tomcat, Java, mvn), compilation-related packages (such as gcc, glib or make), and installation-related packages (such as expect components, py reference libraries) indivual.
  • the image management subsystem 108 may determine the image of the application 200 according to the static environment configuration information, at least one code block in the plurality of code blocks, and the basic associated package.
  • the runtime environment configuration information may also include operating system environment variables (such as sysctl for kernel configuration, PATH for indicating the search range, and dynamically loadable verification modules for verifying identity or status) that depend on running the application 200.
  • operating system environment variables such as sysctl for kernel configuration, PATH for indicating the search range, and dynamically loadable verification modules for verifying identity or status
  • the image management subsystem 108 can also configure information and The runtime environment configuration information is verified, for example, the operating system environment variables in the static environment configuration information and the operating system environment variables in the runtime environment configuration information are verified. When the verification is passed, the image of the application 200 is determined again. .
  • the configuration subsystem 106 is used for assembling static environment configuration information, runtime environment configuration information and container configuration information to generate an image configuration file.
  • the image configuration file is used to describe the data or resources required to generate the image.
  • the image management subsystem 108 can obtain the image set of the application 200 according to the image configuration file assembled from the static environment configuration information, the runtime environment configuration information and the container configuration information.
  • the analysis subsystem 104 can also be used to analyze the source code package to obtain configuration information of the external components.
  • the external component refers to a component other than the own component, and the external component may be, for example, an external database, that is, a third-party database.
  • the container management subsystem 110 is configured to acquire an external component according to the external component configuration information, where the external component is associated with at least one of the image sets. Based on this, the transformation result may further include an association relationship between the external component and at least one image in the image set.
  • the container management subsystem 110 is configured to create containers according to multiple images in the image set. For example, based on a creation script, containers can be created by using multiple images in the image set, and then based on the association relationship between external components and at least one image in the image set, The migration application 200 is implemented by associating the external components with the corresponding containers.
  • the container management subsystem 110 may create a container of the application 200 through a container platform when creating a container.
  • a container platform is a tool that deploys applications to the cloud environment and provides full-stack IT automated operation and maintenance capabilities.
  • FIG. 1 illustrates that the application management system 100 is deployed in a cloud environment.
  • the application management system 100 may also be deployed in an edge environment.
  • the edge computing devices may be servers, computing boxes, and the like.
  • the application management system 100 may also be deployed in a terminal device.
  • the terminal device includes but is not limited to a desktop computer, a laptop computer, a smart phone or a local server.
  • the application management system 100 is deployed in the local server, it can be deployed in the same local server as the application 200 or in a different local server.
  • Various parts of the application management system 100 may also be deployed in different environments in a distributed manner.
  • a part of the application management system 100 may be deployed in three environments of cloud environment, edge environment, terminal device, or any two of the environments.
  • the system architecture of the application management system 100 is described in detail above. Next, the application transformation method provided by the embodiment of the present application is described in detail from the perspective of the application management system 100 .
  • the method includes:
  • the application management system 100 acquires the environment variables of the application 200 in the running environment and the source code package of the application 200.
  • the application management system 100 may access the running environment of the application 200 to obtain environment variables of the application 200 in the running environment.
  • the environment variable is an object with a specific name in the OS, such as an object named PATH, JAVA HOME or CLASS PATH, and these objects include information used by one or more applications to specify the running environment of the application in the OS .
  • the environment variable may also include an operating system type, an operating system version, a kernel version, a basic operating system dependency package, or operating system operating parameters, and the like.
  • the operating system running parameter is a parameter when the operating system is running, for example, a semaphore inside the OS kernel.
  • the source code package is a code package formed by the application developer according to the source code written by any one or more programming languages in computer languages such as C language, JAVA language, and Python language.
  • the source code package is a code package that has not been compiled, and can reflect the development logic of the application 200 .
  • the application management system 100 may obtain the source code package from the software repository 300 . Specifically, the application management system 100 may search the software repository 300 according to the source code package identifier of the application 200 to obtain a source code package matching the source code package identifier of the application 200 .
  • the source code package identifier may be a source code package name.
  • the application management system 100 may present a configuration interface to the user, and then receive the source code package identifier selected by the user through the configuration interface, so as to search the software repository 300 according to the source code package identifier to obtain the corresponding source code package.
  • S304 The application management system 100 analyzes the environment variables to obtain static environment configuration information.
  • the static environment configuration information may be the environment configuration information when the application 200 is not running.
  • the environment configuration information is used to describe the requirements of the application 200 for the environment.
  • the static environment configuration information may include one or more of the operating system type, operating system version, or PATH.
  • the application management system 100 can extract the environment requirements of the application 200 from the environment variables, which can be the requirements of the application 200 for the operating system and computing resources, and then the application management system 100 can obtain static environment configuration information according to the requirements.
  • S306 The application management system 100 analyzes the source code package to obtain container configuration information.
  • the container configuration information may be configuration information for generating the container.
  • the container is a running instance generated based on the image. Therefore, the container configuration information includes the information used to generate the image.
  • the container configuration information may include block information for the source package.
  • the chunking information is used to divide the source package into multiple code chunks.
  • the block information may include line identifiers of the respective code blocks, such as start line numbers and end line numbers.
  • the application management system 100 can identify the code in the source code package through AI technology, such as NLP, based on the code development logic, so as to obtain the block information of the source code package.
  • AI technology such as NLP
  • the analysis subsystem 104 in the application management system 100 can identify the semantics of each function in the code through NLP, so as to divide the source code package into blocks, and obtain the block information of the source code package.
  • the application management system 100 analyzes the calling relationship between the functions in the source code package, so as to obtain the calling relationship between each code block.
  • the container configuration information may further include the calling relationship between the code blocks.
  • the container configuration information may further include the calling relationship between the code blocks corresponding to the user management module, the evaluation management module, the order management module, and the commodity management module.
  • the calling relationship can reflect the upstream and downstream dependencies of the application 200 .
  • the container configuration information may also include service configuration information and/or basic association packages.
  • the service configuration information includes one or more of external service IPs and IPs of peripheral components (such as databases, caches, and message queues).
  • Basic related packages can include one or more of basic dependency packages (such as tomcat, Java, mvn), compilation-related packages (such as gcc, glib, or make), and installation-related packages (such as expect components, py reference libraries) .
  • the container configuration information can be expressed through a relational graph.
  • the present application refers to the relationship graph corresponding to the container configuration information as the application dependency graph.
  • the application management system 100 may use the configuration file recording the block information, the service configuration information, the basic dependency package, etc. as nodes to construct the application dependency graph.
  • the application management system 100 obtains the running code when the application 200 runs in the running environment, and obtains the running environment configuration information.
  • the runtime environment configuration information includes a basic associated package associated with the application 200 when it runs in the runtime environment.
  • the basic associated package can be one or more of basic dependency packages (such as tomcat, Java, mvn), compilation-related packages (such as gcc, glib or make), and installation-related packages (such as expect components, py reference libraries) indivual.
  • runtime environment configuration information also includes operating system environment variables (such as sysctl for kernel configuration, PATH for indicating the search scope, and dynamically loadable verification modules for verifying identity or status)
  • operating system environment variables such as sysctl for kernel configuration, PATH for indicating the search scope, and dynamically loadable verification modules for verifying identity or status
  • pluggable authentication modules PAM
  • external resources such as IP resources, computing resources, memory resources, etc.
  • the application management system 100 first obtains the running code when the application 200 is running in the running environment, and then analyzes the running code, for example, by analyzing the running code through AI technology, so as to obtain the configuration information of the running environment.
  • the application management system 100 can also perform secondary verification on the information including the operating system environment variables according to the runtime environment configuration information and the static environment configuration information , and after the verification is successful, execute S312.
  • the runtime environment configuration information includes basic associated packages (eg, basic dependency packages) when the application 200 is running.
  • the application management system 100 may further perform secondary verification on the basic association package and the like according to the runtime environment configuration information and the container configuration information, and then execute S312 after the verification is successful.
  • the runtime environment configuration information can be represented by a relational graph.
  • the relationship graph corresponding to the runtime environment configuration information can be called an environment dependency graph.
  • the application management system 100 may use environment variables as nodes to construct an environment dependency graph.
  • the application management system 100 may also generate the dependency graph of the application 200 according to the application dependency graph and the environment dependency graph.
  • the graph generated based on the static environment and the runtime environment is the environment dependency graph
  • the graph generated based on the source code package is the application dependency graph.
  • the environment dependency graph describes the application's requirements for a static environment, such as kernel requirements, file system requirements, etc.
  • the kernel requirements include kernel parameters sysctrl, environment variables Path, semaphores, ports or LD links, and file system requirements include the type of file system , size (not shown in the figure), etc.
  • An application's requirements for a static environment can also include system configuration.
  • the system configuration includes the domain name of the application, system requirements, and Network Time Protocol (NTP) requirements.
  • NTP Network Time Protocol
  • the environment dependency graph also describes the requirements of the application on the runtime environment.
  • the requirements of the application on the runtime environment include dependencies on peripheral components.
  • the peripheral components may specifically include a message queue (message queue, MQ), a cache (for example, Redis), a database, and the like.
  • the application dependency graph describes the framework, application commands, and software dependencies determined by analyzing the source code package of the application.
  • the framework can include SpringCloud, Dubbo, etc.
  • Software dependencies can include dependent modules (such as base dependent libraries), configuration files, and so on.
  • the application management system 100 can obtain a relatively complete dependency graph by splicing the above application dependency graph and the above environment dependency graph.
  • S310 The application management system 100 analyzes the source code package to obtain configuration information of external components.
  • External components i.e. third-party components.
  • the application management system 100 can analyze the source code in the source code package based on the development logic of the application, determine the external components referenced in the source code package, and obtain the external component configuration information according to the information of the referenced external components, such as the identifier of the external component.
  • External component configuration information is used to obtain external components.
  • the external component configuration information may be, for example, the IP of the external component or the storage address of the external component.
  • the configuration information of the external component may be the IP of the external database.
  • the external component configuration information may be a storage address of the external operating component.
  • S304 to S310 are optional steps of the embodiments of the present application.
  • the application management system 100 may not execute S304 to S310, or execute S304 to S310. one or more steps.
  • S312 The application management system 100 assembles the static environment configuration information, the runtime environment configuration information and the container configuration information to obtain an image configuration file.
  • Image configuration files are used to instruct image generation.
  • the application management system 100 may fill in the static environment configuration information, runtime environment configuration information, and container configuration information according to the template of the image configuration file, so as to obtain the image configuration file.
  • the application management system 100 may not perform the steps of obtaining configuration information of external components and obtaining corresponding external components in S310 and S312.
  • the application management system 100 can obtain an image configuration file by assembling according to the static environment configuration information and the container configuration information.
  • S314 The application management system 100 obtains the image set of the application 200 according to the image configuration file.
  • a mirror set includes multiple mirrors.
  • Each image can be determined according to the static environment configuration information, runtime environment configuration information and container configuration information in the image configuration file.
  • the application management system 100 may search the image repository 400 to obtain at least one image according to static environment configuration information, runtime environment configuration information and container configuration information (eg, block information in the container configuration information).
  • the application management system 100 can obtain the image set of the application 200 .
  • the application management system 100 may, according to the static environment configuration information, the runtime environment configuration information, and the at least one code block Generate the corresponding image.
  • the application management system 100 may obtain a basic image, that is, an operating system image, according to information related to the operating system in the environment configuration information, such as the operating system name, operating system version, and the like.
  • the environment configuration information may be at least one of static environment configuration information or runtime environment configuration information.
  • the application management system 100 may further verify the static environment configuration information and the runtime environment configuration information, for example, the application management system 100 may compare the operating system-related information and the runtime environment configuration information in the static environment configuration information When the comparison result is consistent, the verification is passed, and the operating system image can be obtained according to the operating system related information.
  • the application management system 100 may compile at least one code block among the plurality of code blocks divided by the block information in the container configuration information, and then install the compiled code block into the corresponding operating system image, thereby obtaining the image of the application 200 .
  • S314 is a specific implementation of the application management system 100 obtaining the image of the application 200 according to the environment variables and the source code package, and the image set of the application 200 may also be obtained in other ways by executing the application transformation method of the embodiment of the present application.
  • S316 The application management system 100 acquires an external component according to the external component configuration information.
  • the application management system 100 may acquire the external components according to the external component configuration information.
  • the external component configuration information may include the IP or storage address of the external component, and the application management system 100 may acquire the external component according to the IP or storage address of the external component.
  • the application management system 100 can access the external database through the IP of the external database.
  • the external component is associated with at least one image in the image set of the application 200 .
  • the transformation result of the application 200 further includes an association relationship between the external component and at least one image in the image set.
  • the application management system 100 creates multiple containers according to the image set of the application 200, and associates the external component with at least one of the multiple containers.
  • the application management system 100 can be connected with a container platform, and then, with the help of the container platform, the operation of creating a container is performed on each image in the image set of the application 200 to obtain a container corresponding to each image.
  • the application management system 100 may associate the external components with the at least one container, thereby enabling the migration of the application 200 to the cloud environment.
  • at least one container associated with the external component is a container created based on an image corresponding to a code block that references the external component.
  • the application management system 100 may determine the relationship between the external component and the container based on the relationship between the external component and at least one image and the corresponding relationship between the image and the container, and then associate the external component with the corresponding container.
  • S316 to S318 are specific implementations of migrating the application 200 in the embodiment of the present application.
  • the application management system 100 may not execute the above S316 to S318, for example, the application management system 100 can directly create containers according to the images in the image set, thereby implementing the migration application 200 .
  • the application 200 is modified based on the source code package of the application 200 for illustration.
  • the application management system 100 may also transform the application 200 based on other code packages of the application 200, such as an installation package.
  • the implementation of the present application provides an application modification method.
  • the method performs automatic application transformation based on the source code package of the application 200 and the environment variables of the application 200 in the running environment, which reduces the manual intervention of the user and improves the efficiency of the application transformation.
  • the method transforms the application to obtain a mirror set including multiple mirrors, thereby realizing the microservice of the application, so that the application can be prevented from being unable to provide services due to a single point of failure, and the quality and stability of the service are improved.
  • the system 100 includes:
  • the application perception subsystem 102 is used to obtain the environment variables of the application in the running environment and the source code package of the application;
  • the image management subsystem 108 is configured to obtain a transformation result of the application according to the environment variable and the code package, where the transformation result includes an image set of the application, and the image set includes multiple images, wherein, The container created according to each image is used to execute some modules of the application.
  • the code package is a source code package
  • the source code package indicates a code package that has not been compiled.
  • system 100 further includes:
  • the analysis subsystem 104 is configured to analyze the environment variable to obtain static environment configuration information, and analyze the source code package to obtain container configuration information, wherein the container configuration information includes block information of the source code package, and the block information for dividing the source code package into a plurality of code blocks;
  • the image management subsystem 108 is configured to obtain an image set of the application according to the static environment configuration information and the container configuration information, and each image in the image set is based on the static environment configuration information and the container configuration information. At least one code block of the plurality of code blocks is determined.
  • At least one image in the image set is obtained by searching from an image library according to the static environment configuration information and the block information.
  • system 100 further includes:
  • An analysis subsystem 104 configured to analyze the source code package to obtain external component configuration information
  • the container management subsystem 110 is configured to acquire an external component according to the external component configuration information, where the external component is associated with at least one image in the image set, wherein the transformation result further includes the external component and the image The association of at least one mirror in the set.
  • the analysis subsystem 104 is further configured to obtain the running code when the application runs in the running environment, and obtain the configuration information of the runtime environment, where the configuration information of the runtime environment includes all a basic association package associated with the application when it runs in the runtime environment;
  • the image management subsystem 108 is configured to obtain an image set of the application according to the static environment configuration information, the runtime environment configuration information and the container configuration information, wherein at least one image in the image set is based on The static environment configuration information, at least one code block in the plurality of code blocks, and the basic associated package are determined.
  • the container configuration information further includes the calling relationship between the code blocks
  • the transformation result further includes the calling relationship between the code blocks
  • the application management system 100 may correspond to executing the methods described in the embodiments of the present application, and the above and other operations and/or functions of the respective subsystems or modules in the subsystems of the application management system 100 are for the purpose of realizing For the sake of brevity, the corresponding processes of each method in the embodiment shown in FIG. 3 will not be repeated here.
  • Embodiments of the present application further provide a computing device cluster.
  • the computing device cluster includes at least one computing device.
  • the computing device may be a server, such as a central server, an edge server, or a local server in a local data center.
  • the computing device may also be a terminal device such as a desktop computer, a notebook computer, or a smart phone.
  • the computing device cluster is specifically used to implement the functions of the application management system 100 shown in FIG. 1 .
  • the hardware structure of the computing device cluster is introduced below.
  • FIG. 5 provides a schematic structural diagram of a computing device cluster.
  • the computing device cluster 50 includes at least one computing device 500 , and each computing device 500 includes a bus 501 , a processor 502 , a communication interface 503 and a memory 504 .
  • the processor 502 , the memory 504 and the communication interface 503 communicate through the bus 501 .
  • the bus 501 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus or the like.
  • PCI peripheral component interconnect
  • EISA extended industry standard architecture
  • the bus can be divided into address bus, data bus, control bus and so on. For ease of presentation, only one thick line is used in FIG. 5, but it does not mean that there is only one bus or one type of bus.
  • the processor 502 may be a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP), etc. any one or more of the devices.
  • CPU central processing unit
  • GPU graphics processing unit
  • MP microprocessor
  • DSP digital signal processor
  • the communication interface 503 is used for external communication.
  • the communication interface 503 can be used to obtain and obtain the environment variables of the application in the running environment, the source code package of the application, and so on.
  • Memory 504 may include volatile memory, such as random access memory (RAM).
  • RAM random access memory
  • the memory 504 may also include non-volatile memory (non-volatile memory), such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (solid state drive) , SSD).
  • non-volatile memory such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (solid state drive) , SSD).
  • Executable code is stored in the memory 504, and the processor 502 executes the executable code to execute the aforementioned application modification method.
  • Embodiments of the present application also provide a computer-readable storage medium.
  • the computer-readable storage medium may be any available medium that a computing device can store, or a data storage device such as a data center that contains one or more available media.
  • the usable media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media (eg, DVDs), or semiconductor media (eg, solid state drives), and the like.
  • the computer-readable storage medium includes instructions that instruct a computing device to perform the above-described application transformation method.
  • the embodiments of the present application also provide a computer program product.
  • the computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on the computing device, all or part of the processes or functions described in the embodiments of the present application are generated.
  • the computer instructions may be stored in or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions may be transmitted over a wire from a website site, computer or data center. (eg coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (eg infrared, wireless, microwave, etc.) to another website site, computer or data center.
  • a website site e.g coaxial cable, fiber optic, digital subscriber line (DSL)
  • wireless eg infrared, wireless, microwave, etc.
  • the computer program product may be a software installation package, and when any of the aforementioned application transformation methods needs to be used, the computer program product may be downloaded and executed on a computing device.

Abstract

一种应用改造方法,由应用管理系统执行,该系统包括处理器和存储器,处理器用于执行存储器中存储的指令,以执行如下方法:获取应用在运行环境中的环境变量和应用的代码包,根据环境变量和代码包,获得应用的改造结果,该改造结果包括应用的镜像集。镜像集包括多个镜像,根据各镜像创建的容器用于执行应用的部分模块。该方法基于环境变量和应用的代码包实现了自动化的应用改造,减少了人工介入,提高了应用改造的效率,避免了依赖于开发者经验导致可靠性难以得到保障的问题。

Description

应用改造方法、系统、集群、介质及程序产品
本申请要求于2021年07月28日提交中国国家知识产权局、申请号为202110859637.6、发明名称为“应用改造方法、系统、集群、介质及程序产品”的中国专利申请的优先权,前述发明要求2021年03月23日提交中国国家知识产权局、申请号为202110307720.2、发明名称为“一种容器化改造的方法、系统及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及云计算技术领域,尤其涉及一种应用改造方法、应用管理系统以及计算机集群、计算机可读存储介质、计算机程序产品。
背景技术
云计算(cloud computing)也称作网络计算,是一种基于互联网的计算方式。通过该计算方式,可以将共享的软硬件资源按需提供给用户。将应用部署在云环境,一方面可以根据应用的负载按需获取资源进行灵活部署,提升资源利用率,另一方面可以节省自行构建数据中心的开销,以及维护数据中心的开销,降低成本。
考虑到云环境部署灵活、成本低的优势,越来越多的应用尤其是大型的信息技术(information technology,IT)应用(例如各种功能的信息管理系统)在进行容器化改造,从而实现向云环境迁移。其中,容器化改造是指将应用改造成容器,以便于迁移上云。目前,业界主流的改造方案是开发者基于自身经验和能力手动对应用进行改造。具体地,开发者将应用的安装包改造为适合在云环境部署的格式,例如是镜像格式。该镜像格式的文件即为应用的镜像。基于应用的镜像可以在云环境中创建应用的容器,从而实现应用迁移。
然而,上述改造方案依赖于开发者自身的经验和能力,导致改造效率不高,而且难以保证可靠性。如何提供一种可靠的、自动化的应用改造方法成为亟待解决的问题。
发明内容
本申请提供了一种应用改造方法,该方法基于应用在运行环境中的环境变量以及应用的代码包实现了自动化的应用改造,减少了人工介入,提高了应用改造的效率,避免了依赖于开发者经验导致可靠性难以得到保障的问题。此外,该方法改造应用获得包括多个镜像的镜像集,可以实现应用的微服务化,避免了应用因单点故障而无法提供服务,提升了服务的质量和可靠性。本申请还提供了上述方法对应的应用管理系统、计算设备集群、计算机可读存储介质以及计算机程序产品。
第一方面,本申请提供了一种应用改造方法。该方法可以由应用管理系统执行。 应用管理系统包括处理器和存储器。处理器用于执行存储器中存储的指令,以执行本申请的应用改造方法。下面对应用改造方法进行说明。
具体地,应用管理系统可以获取应用在运行环境中的环境变量和应用的代码包,其中,环境变量是指操作系统中具有特定名字的对象,环境变量包括一个或多个应用所使用的信息,用于在操作系统中指定应用的运行环境。然后应用管理系统可以根据上述环境变量和代码包,获得应用的改造结果。该改造结果包括应用的镜像集,镜像集包括多个镜像,根据各镜像创建的容器可以用于执行应用的部分模块。
一方面,该方法基于环境变量和代码包实现了自动化的应用改造,减少了用户手动介入,提高了应用改造的效率,避免了依赖于开发者经验导致可靠性难以得到保障的问题;另一方面,该方法对应用进行改造获得包括多个镜像的镜像集,进而实现应用的微服务化,如此可以避免应用因单点故障而无法提供服务,提高了服务的质量和稳定性。
在一些可能的实现方式中,应用的代码包可以为源码包,该源码包指示未经过编译处理的代码包。应用管理系统直接基于源码包进行容器化改造,通过对源码包进行分析,可以精准地获得镜像集的多个镜像,保障镜像的可用性和可靠性。
在一些可能的实现方式中,应用管理系统可以分析所述环境变量获得静态环境配置信息,以及分析所述源码包获得容器配置信息。其中,所述容器配置信息包括所述源码包的分块信息,所述分块信息用于将所述源码包分为多个代码块。该分块信息可以包括各个代码块的行标识,如起始行号和终止行号。相应地,应用管理系统可以根据所述静态环境配置信息和所述容器配置信息,获得所述应用的镜像集。该镜像集中每一镜像是根据所述静态环境配置信息和所述多个代码块中的至少一个代码块确定的。
其中,应用管理系统可以基于代码开发逻辑,通过人工智能技术,例如是自然语言处理对源码包中的代码进行识别,从而获得源码包的分块信息。例如,应用管理系统可以通过自然语言处理识别代码中各函数的语义,从而对源码包分块,获得源码包的分块信息。
该方法中,应用管理系统通过对源码包进行分块,一方面可以获得多个镜像,由此可以实现应用的微服务化,避免单点故障导致无法对外提供服务,另一方面可以实现精准分块,如此拆分得到的多个镜像更合理,具有较高可用性。
在一些可能的实现方式中,所述镜像集中的至少一个镜像是根据所述静态环境配置信息和所述分块信息,从镜像库中查找得到。具体地,镜像库中包括多个应用的镜像集,每个应用的镜像集包括至少一个镜像。应用管理系统可以根据静态环境配置信息和由分块信息确定的至少一个代码块,查找镜像库,获得查找到的应用的至少一个镜像。
其中,应用的镜像集中的各个镜像在镜像库中命中时,应用管理系统可以直接从镜像库获得应用的镜像集。当根据静态环境配置信息和由分块信息确定的至少一个代码块查找镜像库,存在未查找到的镜像时,应用管理系统还可以根据静态环境配置信息和由分块信息生成相应的镜像。
由于至少一个镜像可以从镜像库中获得,减少了生成该镜像所需要消耗的资源,以及减少了获取该镜像的时间,如此提高了应用改造的效率。
在一些可能的实现方式中,应用还可以引用外部组件,该外部组件是指第三方组件。应用管理系统可以分析所述源码包获得外部组件配置信息,其中,外部组件配置信息用于获得外部组件。该外部组件配置信息例如可以是外部组件的网络地址或存储地址。然后应用管理系统可以根据所述外部组件配置信息获取外部组件。例如,应用管理系统可以基于外部组件的网络地址或存储地址,调用或访问外部组件,从而实现获取外部组件。该外部组件与镜像集中的至少一个镜像关联。对应地,应用的改造结果还可以包括所述外部组件与所述镜像集中的至少一个镜像的关联关系。
该方法通过分析源码包获得外部组件配置信息,可以实现对引用外部组件的应用进行自动化改造,具有较高可用性。
在一些可能的实现方式中,镜像集中的镜像与承载镜像的容器通常是一一对应的。基于此,应用管理系统可以根据外部组件与所述镜像集中的至少一个镜像的关联关系,确定承载各镜像的容器与所述外部组件的关联关系。如此可以为后续应用迁移到云环境提供帮助。
在一些可能的实现方式中,应用管理系统还可以获取所述应用在所述运行环境中运行时的运行代码,获得运行时环境配置信息。所述运行时环境配置信息包括所述应用在所述运行环境中运行时所关联的基础关联包。该基础关联包可以是基础依赖包(如tomcat、Java、mvn)、编译相关的包(如gcc、glib或者make)、安装相关的包(如expect组件、py的引用库)中的一个或多个。
相应地,应用管理系统可以根据所述静态环境配置信息、所述运行时环境配置信息和所述容器配置信息获得所述应用的镜像集。其中,镜像集中至少一个镜像可以是根据所述静态环境配置信息、所述多个代码块中的至少一个代码块以及所述基础关联包确定。
该方法通过对应用在运行环境中运行时的运行代码进行分析,获得运行时环境配置信息。结合该运行时环境配置信息获得应用的镜像,可以提高获得的应用的镜像的准确度,满足了业务需求。
在一些可能的实现方式中,容器配置信息还包括各代码块之间的调用关系,所述改造结果还包括所述各代码块之间的调用关系。各代码块之间的调用关系可以指示各代码块对应的镜像之间的调用关系,进而指示承载镜像的容器之间的调用关系,如此可以为应用迁移到云环境提供帮助。
在一些可能的实现方式中,应用管理系统可以向用户呈现配置界面,该配置界面提供了多种源码包名称,应用管理系统可以接收所述用户在所述配置界面选择的所述应用的源码包名称,然后从软件仓库获取所述选择的所述应用的源码包名称对应的源码包,其中,软件仓库包括多个源码包。
该方法支持用户自行选择用于应用改造的源码包,如此,可以满足用户的个性化需求。
在一些可能的实现方式中,应用管理系统还可以接收用户上传的所述应用的源码包。用户上传的应用的源码包可以是用户自研应用的源码包或者是其他非开源应用的源码包,如此可以实现对自研应用或非开源应用的改造。
第二方面,本申请提供了一种应用管理系统。所述系统包括:
应用感知子系统,用于获取应用在运行环境中的环境变量和所述应用的源码包;
镜像管理子系统,用于根据所述环境变量和所述代码包,获得所述应用的改造结果,所述改造结果包括所述应用的镜像集,所述镜像集包括多个镜像,其中,根据各镜像创建的容器用于执行所述应用的部分模块。
在一些可能的实现方式中,所述代码包为源码包,所述源码包指示未经过编译处理的代码包。
在一些可能的实现方式中,所述系统还包括:
分析子系统,用于分析所述环境变量获得静态环境配置信息,分析所述源码包获得容器配置信息,其中,所述容器配置信息包括所述源码包的分块信息,所述分块信息用于将所述源码包分为多个代码块;
所述镜像管理子系统,用于根据所述静态环境配置信息和所述容器配置信息,获得所述应用的镜像集,所述镜像集中每一镜像是根据所述静态环境配置信息和所述多个代码块中的至少一个代码块确定的。
在一些可能的实现方式中,所述镜像集中的至少一个镜像是根据所述静态环境配置信息和所述分块信息,从镜像库中查找得到。
在一些可能的实现方式中,所述系统还包括:
分析子系统,用于分析所述源码包获得外部组件配置信息;
容器管理子系统,用于根据所述外部组件配置信息获取外部组件,所述外部组件与所述镜像集中的至少一个镜像关联,其中,所述改造结果还包括所述外部组件与所述镜像集中的至少一个镜像的关联关系。
在一些可能的实现方式中,所述分析子系统,还用于获取所述应用在所述运行环境中运行时的运行代码,获得运行时环境配置信息,所述运行时环境配置信息包括所述应用在所述运行环境中运行时所关联的基础关联包;
所述镜像管理子系统,用于根据所述静态环境配置信息、所述运行时环境配置信息和所述容器配置信息获得所述应用的镜像集,其中,所述镜像集中至少一个镜像是根据所述静态环境配置信息、所述多个代码块中的至少一个代码块以及所述基础关联包确定。
在一些可能的实现方式中,所述容器配置信息还包括各代码块之间的调用关系,所述改造结果还包括所述各代码块之间的调用关系。
第三方面,本申请提供一种计算设备集群。该计算设备集群包括至少一台计算设备。每台计算设备包括处理器和存储器。所述处理器、所述存储器进行相互的通信。所述处理器用于执行所述存储器中存储的指令,以使得计算设备集群执行如第一方面或第一方面的任一种实现方式中的应用改造方法。
第四方面,本申请提供一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,所述指令指示设备执行上述第一方面或第一方面的任一种实现方式所述的应用改造方法。
第五方面,本申请提供了一种包含指令的计算机程序产品,当其在设备上运行时,使得设备执行上述第一方面或第一方面的任一种实现方式所述的应用改造方法。
本申请在上述各方面提供的实现方式的基础上,还可以进行进一步组合以提供更 多实现方式。
附图说明
为了更清楚地说明本申请实施例的技术方法,下面将对实施例中所需使用的附图作以简单地介绍。
图1为本申请实施例提供的一种应用改造方法的系统架构图;
图2为本申请实施例提供的一种配置界面的示意图;
图3为本申请实施例提供的一种应用改造方法的流程图;
图4为本申请实施例提供的一种应用的依赖图谱的示意图;
图5为本申请实施例提供的一种计算设备集群的结构示意图。
具体实施方式
本申请实施例中的术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。
为了便于理解本申请实施例,首先,对本申请涉及的部分术语进行解释说明。
应用(application,APP),是指针对用户的某种特殊应用目的所撰写的计算机程序。应用可以按照应用目的或功能划分为不同类型,例如应用可以包括电子商务应用、社交应用、办公应用、休闲娱乐应用等类型。
镜像(image),是指包括多个只读层(read-only layer)的联合文件系统(union file system)。该联合文件系统能够将不同的只读层整合成一个文件系统,为这些只读层提供一个统一的视角,这样就隐藏了多层的存在,从用户的角度看来,镜像存在一个只读文件系统。镜像提供运行应用所需元素的轻量级代码包。镜像可以理解为使用应用时需要获得的一种特定格式的安装包。其中,特定格式例如可以是光盘镜像文件(IsoBuster,ISO)格式。
容器(container),是指通过镜像创建的运行实例。该运行实例可以是包括至少一个只读层和一个读写层(read-write layer)的联合文件系统。该联合文件系统能够将上述至少一个只读层和一个读写层整合成一个文件系统,从而为这些只读层提供一个统一的视角,这样就隐藏了多层的存在,从用户的角度看来,容器存在一个可读写的文件系统。容器运行应用所需元素的轻量级代码包,以实现操作系统级别的虚拟化,从而使得应用运行于相对独立和隔离的环境,简化了应用的部署流程,增强了应用的可移植性和安全性。
应用可以根据是否进行容器化分为容器化的应用和非容器化的应用。很多传统应用(例如考勤管理系统、生产管理系统)属于非容器化的应用。随着云计算技术的不断发展,越来越多的开发者选择将非容器化的应用改造(remodel)为容器化的应用,以实现将应用迁移到云环境中,从而提升容错性以及降低管理成本。
目前,业界主流的改造方案是,开发者基于自身经验和能力,将上述非容器化的应用的安装包改造为适合在云环境部署的格式,以在云环境中部署改造后的安装包,从而实现将应用迁移到云环境。然而,这种改造方案依赖于开发者自身的经验和能力,导致迁移效率不高,而且可靠性难以得到保障。
有鉴于此,本申请实施例提供了一种应用改造方法。该方法可以由应用管理系统执行。其中,应用管理系统可以是具有应用管理功能(例如是应用改造功能)的系统,该系统包括处理器和存储器,其中,处理器用于执行存储器中存储的指令,以执行应用改造方法。
具体地,应用管理系统获取应用在运行环境对应的环境变量和应用的代码包,然后根据所述环境变量和所述代码包获得应用的改造结果。该改造结果包括应用的镜像集,镜像集包括多个镜像,根据各镜像创建的容器用于执行应用的部分模块。
一方面,该方法基于环境变量和代码包实现了自动化的应用改造,减少了用户手动介入,提高了应用改造的效率,避免了依赖于开发者经验导致可靠性难以得到保障的问题;另一方面,该方法对应用进行改造获得包括多个镜像的镜像集,进而实现应用的微服务化,如此可以避免应用因单点故障而无法提供服务,提高了服务的质量和稳定性。
进一步地,在对应用进行容器化改造时,还可以基于源码包和环境变量直接进行容器化改造。其中,源码包指示未经过编译处理的代码包。与基于应用的安装包进行改造相比,该方法直接基于应用的源码包和环境变量进行容器化改造,通过对源码包进行分析,可以精准地获得镜像集的多个镜像,保障镜像的可用性和可靠性。
本申请实施例的应用管理系统可以用于对不同类型的应用进行容器化改造,以实现应用迁移。例如,应用管理系统可以改造电子商务平台,获得包括多个镜像的镜像集,如此可以通过多个镜像创建多个容器,从而实现将电子商务平台由本地服务器迁移到云环境中,并且能够实现以微服务的方式对外提供服务。其中,本地服务器可以是应用所有者(例如是开发者)私有的服务器。云环境指示云服务提供商拥有的,用于提供计算、存储、通信资源的云计算设备集群。该云计算设备集群中包括至少一个云计算设备,云计算设备包括云服务器。
又例如,应用管理系统可以改造生产管理系统,获得生产管理系统的镜像集,通过镜像集中的多个镜像可以实现将生产管理系统迁移到云环境中。类似地,应用管理系统还可以改造游戏,获得游戏的镜像集,通过镜像集中的多个镜像可以实现将游戏迁移到云环境中。迁移到云环境中的应用可以通过云服务的形式向用户提供对应的服务。
为了使得本申请的技术方案更加清楚、易于理解,接下来将对本申请实施例的系统架构进行介绍。
参见图1所示的应用改造方法的系统架构图,应用管理系统100部署在云环境中,云环境指示云服务提供商拥有的,用于提供计算、存储、通信资源的云计算设备集群。该云计算设备集群包括至少一个云服务器。应用管理系统100可以集中部署在一个云服务器中,或者分布式地部署在多个云服务器中。应用200部署在本地服务器中。部署应用管理系统100的云服务器可以与部署应用200的本地服务器建立有通信连接。应用200还可以部署在云服务器中,下面以应用200部署在本地服务器为例进行介绍。
应用管理系统100用于对将部署在本地服务器中的应用200进行改造,以便将应用200迁移到云环境中。其中,应用管理系统100可以与应用200交互,从而实现对应用200的改造。在一些可能的实现方式中,应用管理系统100还可以与软件仓库300、镜像库400交互,以实现对应用200的改造。
软件仓库300用于提供至少一种应用的代码包。其中,代码包可以是源码包。该源码包指示未经过编译处理的代码包。
镜像库400用于提供至少一种应用的镜像集。其中,镜像集包括多个镜像。根据各镜像创建的容器用于执行应用的部分模块。
图1是以软件仓库300、镜像库400部署在不同的云计算设备集群中进行示例说明,在本申请实施例其他可能的实现方式中,软件仓库300、镜像库400也可以部署在同一云计算设备集群,或者是部署在本地服务器。
具体地,应用管理系统100获取应用200在运行环境中的环境变量和应用200的代码包,例如应用管理系统100可以接入应用200的运行环境,获得应用200在运行环境中的环境变量,并从软件仓库300获取应用200的代码包,该代码包可以是源码包。应用管理系统100根据上述环境变量和代码包获得应用200的改造结果。该改造结果包括应用200的镜像集。其中,根据镜像集中的各镜像创建的容器用于执行应用的部分模块。
需要说明的是,应用管理系统100也可以不通过软件仓库300获取应用200的代码包,而是直接接收用户上传的应用200的代码包。类似地,应用管理系统100也可以不通过镜像仓库400获取镜像,而是直接根据环境变量和源码包生成镜像。
以上对应用管理系统100与应用200、软件仓库300、代码仓库400的交互过程进行了详细说明,接下来对应用管理系统100内部结构以及交互过程进行介绍。
具体地,应用管理系统100包括多个部分,例如应用管理系统100可以包括多个子系统。进一步地,子系统可以包括多个模块。应用管理系统100内部的子系统和模块可以有多种划分方式,本申请不对其进行限制。
图1为一种示例性的划分方式,如图1所示,应用管理系统100包括应用感知子系统102和镜像管理子系统108。在一些可能的实现方式中,应用管理系统100还包括分析子系统104、配置子系统106、容器管理子系统110中的一个或多个。下面对各个子系统进行详细介绍。
应用感知子系统102用于获取应用200在运行环境中的环境变量和源码包。环境变量是指操作系统(operation system,OS)中具有特定名字的对象,环境变量包括一个或多个应用所使用的信息,用于在操作系统中指定应用200的运行环境。在一些实施例中,环境变量包括PATH、JAVA HOME或CLASS PATH中的一种或多种。其中,JAVA HOME用于指示JAVA命令对应的可执行文件的路径。PATH用于指示可执行文件的搜索范围。在配置PATH之后,无论在哪个目录下执行JAVA命令,均可以基于上述搜索范围搜索JAVA命令的可执行文件。CLASS PATH用于指定JAVA类所在的目录。环境变量还可以包括操作系统类型、操作系统版本、内核版本、操作系统基础依赖包或者操作系统运行参数等。操作系统运行参数为操作系统运行时的参数,例如为OS内核内部的信号量等。
在一些可能的实现方式中,应用感知子系统102可以包括环境感知模块和软件感知模块。环境感知模块用于接入应用200的运行环境,获取应用200在运行环境中的环境变量。软件感知模块用于获取应用200的代码包,例如是从软件仓库300获取应用200的源码包。
环境感知模块可以获取应用200的接入信息,例如获取应用200的网络地址(Internet Protocol address,IP),以接入应用200,然后扫描应用200所在的本地服务器,获得环境变量。进一步地,应用200还可以对接入请求进行鉴权。基于此,该接入信息还可以包括身份信息,该身份信息可以包括用户名和密码,在一些实施例中,身份信息还可以包括指纹、声纹或者是虹膜等中的一种或多种。应用200基于上述身份信息进行鉴权,当鉴权 通过时,允许应用管理系统100(例如是应用管理系统100中应用感知子系统102的环境感知模块)接入应用200。
软件感知模块可以提供配置界面。配置界面可以是图形用户界面(graphical user interface,GUI),也可以是命令用户界面(command user interface)。该配置界面可以向用户呈现多种代码包标识,其中,代码包标识可以是代码包名称。软件感知模块可以接收用户通过上述配置界面选择的应用200的代码包名称,从软件仓库300中获取用户选择的应用200的代码包名称对应的代码包。其中,软件仓库300中包括多个源码包,软件感知模块获取的代码包括可以是多个源码包中的一个。
下面以软件感知模块通过GUI获取应用200的源码包进行示例说明。
参见图2所示的配置界面的示意图,配置界面20呈现有软件仓库300中多个应用的源码包的属性信息202,该属性信息202包括源码包名称、适用操作系统以及源码包版本。配置界面20还包括源码包的选择控件204。用户可以基于源码包的属性信息202,通过该选择控件204选中一个或多个源码包。
当用户触发配置界面20上承载的确认控件206时,软件感知模块可以响应于该操作,生成源码包获取请求,该请求具体用于请求从软件仓库300获取用户选中的源码包。在一些实施例中,当用户触发配置界面20上承载的取消控件208时,则软件感知模块可以放弃执行获取应用200的源码包的操作。
镜像管理子系统108用于根据环境变量和源码包获得应用200的改造结果,该改造结果包括应用200的镜像集。该镜像集中包括多个镜像。根据各镜像创建的容器用于执行应用200的部分模块。例如,对于电子商务平台这一应用,根据改造所得的镜像集中各镜像创建的容器分别用于执行电子商务平台的用户管理模块、评价管理模块、订单管理模块、商品管理模块。
需要说明的是,镜像管理子系统108可以支持查找镜像库400的方式获得应用200的镜像。针对镜像库400中未查找到的镜像,镜像管理子系统108再生成相应的镜像。如此,可以减少不必要的镜像生成操作。
在一些可能的实现方式中,应用管理系统100还包括分析子系统104、配置子系统106和容器管理子系统110中的至少一个。该分析子系统104用于分析环境变量获得静态环境配置信息,以及分析源码包获得容器配置信息。
静态环境配置信息可以是应用200未运行情况下的环境配置信息。环境配置信息用于描述应用200对环境的需求。静态环境配置信息可以包括操作系统类型、操作系统版本或者PATH等中的一种或多种。需要说明的是,应用200的源码包中也可以包括操作系统类型等信息,应用管理系统100可以根据静态环境配置信息中的操作系统类型和从源码包中获得的操作系统类型进行校验,从而保障可靠性。
容器配置信息可以是用于生成应用200的容器的配置信息。其中,容器是基于镜像生成的。基于此,容器配置信息可以包括用于生成镜像的信息。在一些实施例中,容器配置信息可以包括源码包的分块信息。该分块信息用于将源码包分为多个代码块。该分块信息可以包括各个代码块的行标识,如起始行号和终止行号。以电子商务平台为例,分块信息可以是用户管理模块、评价管理模块、订单管理模块、商品管理模块对应的代码块的起始行号和终止行号。多个代码块中的至少一个代码块可以用于生成应用200的一个镜像。
分析子系统104可以基于代码开发逻辑,通过人工智能(artificial intelligence,AI)技术,例如是自然语言处理(natural language processing,NLP),对源码包中的代码进行识别,从而获得源码包的分块信息。例如,分析子系统104可以通过NLP识别代码中各函数的语义,从而对源码包分块,获得源码包的分块信息。
相应地,镜像管理子系统108可以根据所述静态环境配置信息和所述容器配置信息,获得所述应用的镜像集。其中,镜像集中每一镜像是根据静态环境配置信息和多个代码块中的至少一个代码块确定的。具体地,镜像管理子系统108可以根据静态环境配置信息和至少一个代码块查找镜像库400,获得镜像集中的至少一个镜像。针对未查找到的镜像,镜像管理子系统108可以根据静态环境配置信息和至少一个代码块生成相应的镜像。例如,镜像管理子系统108可以根据静态环境配置信息获取基础镜像,该基础镜像例如可以是操作系统镜像。然后镜像管理子系统108编译至少一个代码块,并将编译后的代码块安装到操作系统镜像,从而获得相应的镜像。在一些实施例中,镜像管理子系统108还可以将生成的镜像发布至镜像库400,以便后续使用。
进一步地,容器配置信息还可以包括各代码块之间的调用关系。仍以电子商务平台为例,评价管理模块可以调用订单管理模块,从而实现订单评价。基于此,容器配置信息可以包括评价管理模块对应的代码块和订单管理模块对应的代码块之前的调用关系。相应地,改造结果还包括各代码块之间的调用关系。其中,代码块之间的调用关系以及代码块和镜像之间的对应关系可以用于确定镜像之间的调用关系。如此,承载镜像的容器运行时,可以基于镜像之间的调用关系,实现容器与容器之间的调用。
在一些可能的实现方式中,分析子系统104还用于获取应用200在运行环境中运行时的运行代码,通过分析该运行代码可以获得运行时环境配置信息。运行时环境配置信息包括应用200在所述运行环境中运行时所关联的基础关联包。该基础关联包可以是基础依赖包(如tomcat、Java、mvn)、编译相关的包(如gcc、glib或者make)、安装相关的包(如expect组件、py的引用库)中的一个或多个。基于此,镜像管理子系统108可以根据所述静态环境配置信息、所述多个代码块中的至少一个代码块以及所述基础关联包确定应用200的镜像。
进一步地,运行时环境配置信息还可以包括运行应用200时依赖的操作系统环境变量(如用于内核配置的sysctl、用于指示搜索范围的PATH,用于验证身份或状态的可动态加载验证模块(pluggable authentication modules,PAM)、外部资源(如IP资源、计算资源、内存资源等)中的一种或多种。其中,在确定镜像之前,镜像管理子系统108还可以对静态环境配置信息和运行时环境配置信息进行校验,例如是对静态环境配置信息中的操作系统环境变量和运行时环境配置信息中的操作系统环境变量进行校验。当校验通过时,再确定应用200的镜像。
配置子系统106用于组装静态环境配置信息、运行时环境配置信息和容器配置信息生成镜像配置文件。该镜像配置文件用于描述生成镜像所需要的数据或资源。相应地,镜像管理子系统108可以根据由静态环境配置信息、运行时环境配置信息和容器配置信息组装的镜像配置文件,获得应用200的镜像集。
考虑到应用200引用外部组件(也可以称作第三方组件)的情况,分析子系统104还可以用于分析源码包,获得外部组件配置信息。其中,外部组件是指自有组件之外的组件, 外部组件例如可以是外部数据库,即第三方数据库。容器管理子系统110用于根据外部组件配置信息获取外部组件,该外部组件与镜像集中的至少一个关联。基于此,改造结果还可以包括外部组件与镜像集中的至少一个镜像的关联关系。
容器管理子系统110用于根据镜像集中的多个镜像分别创建容器,例如可以基于创建脚本,通过镜像集中的多个镜像分别创建容器,然后基于外部组件与镜像集中的至少一个镜像的关联关系,将外部组件与相应的容器关联,从而实现迁移应用200。其中,容器管理子系统110在创建容器时,可以通过容器平台创建应用200的容器。容器平台具体是一种将应用部署至云环境,并提供全栈的IT自动化运维能力的工具。
需要说明的是,图1是以应用管理系统100部署在云环境中进行示例说明,在本申请实施例其他可能的实现方式中,应用管理系统100也可以部署在边缘环境中。例如部署在边缘环境中的一个或多个计算设备(即边缘计算设备)上,边缘计算设备可以为服务器、计算盒子等。该应用管理系统100还可以部署在端设备中。其中,端设备包括但不限于台式机、笔记本电脑、智能手机或者本地服务器。应用管理系统100部署在本地服务器中时,可以与应用200部署在同一本地服务器或者部署在不同的本地服务器。
应用管理系统100的各个部分也可以分布式地部署在不同环境中。例如,可以在云环境、边缘环境、端设备中的三个环境,或其中任意两个环境上分别部署应用管理系统100的一部分。
上文对应用管理系统100的系统架构进行了详细说明,接下来,从应用管理系统100的角度对本申请实施例提供的应用改造方法进行详细说明。
参见图3所示的应用改造方法的流程图,该方法包括:
S302:应用管理系统100获取应用200在运行环境中的环境变量和应用200的源码包。
具体地,应用管理系统100可以接入应用200的运行环境,以获取应用200在运行环境中的环境变量。其中,环境变量为OS中具有特定名字的对象,例如是名字为PATH、JAVA HOME或CLASS PATH的对象,这些对象包括一个或多个应用所使用的信息,用于在OS中指定应用的运行环境。环境变量还可以包括操作系统类型、操作系统版本、内核版本、操作系统基础依赖包或者操作系统运行参数等。操作系统运行参数为操作系统运行时的参数,例如为OS内核内部的信号量等。
源码包是应用开发人员按照计算机语言如C语言、JAVA语言、Python语言等中的任意一种或多种程序设计语言编写的源代码形成的代码包。源码包是未经过编译处理的代码包,能够体现应用200的开发逻辑。应用管理系统100可以从软件仓库300获取源码包。具体地,应用管理系统100可以根据应用200的源码包标识查找软件仓库300,以获得与应用200的源码包标识匹配的源码包。其中,源码包标识可以是源码包名称。应用管理系统100可以向用户呈现配置界面,然后接收用户通过配置界面选择的源码包标识,从而根据该源码包标识查找软件仓库300,获得相应的源码包。
S304:应用管理系统100分析环境变量,获得静态环境配置信息。
静态环境配置信息可以是应用200未运行情况下的环境配置信息。环境配置信息用于描述应用200对环境的需求。静态环境配置信息可以包括操作系统类型、操作系统版本或者PATH等中的一种或多种。
应用管理系统100可以从环境变量中提取应用200对环境的需求,该需求可以是应用200对操作系统、计算资源的需求,然后应用管理系统100可以根据该需求,获得静态环境配置信息。
S306:应用管理系统100分析源码包,获得容器配置信息。
容器配置信息可以是用于生成容器的配置信息。其中,容器是基于镜像生成的运行实例。因此,容器配置信息包括用于生成镜像的信息。在一些实施例中,容器配置信息可以包括源码包的分块信息。该分块信息用于将源码包分为多个代码块。该分块信息可以包括各个代码块的行标识,如起始行号和终止行号。
具体实现时,应用管理系统100可以基于代码开发逻辑,通过AI技术,例如是NLP对源码包中的代码进行识别,从而获得源码包的分块信息。例如,应用管理系统100中的分析子系统104可以通过NLP识别代码中各函数的语义,从而对源码包分块,获得源码包的分块信息。
进一步地,应用管理系统100分析源码包中函数之间的调用关系,从而获得各代码块之间的调用关系。相应地,容器配置信息还可以包括各代码块之间的调用关系。以电子商务平台为例,容器配置信息还可以包括用户管理模块、评价管理模块、订单管理模块、商品管理模块对应的代码块之间的调用关系。该调用关系可以反映应用200的上下游依赖关系。
此外,容器配置信息还可以包括服务配置信息和/或基础关联包。该服务配置信息包括对外服务IP、周边组件(如数据库、缓存、消息队列)的IP中的一种或多种。基础关联包可以包括基础依赖包(如tomcat、Java、mvn)、编译相关的包(如gcc、glib或者make)、安装相关的包(如expect组件、py的引用库)中的一个或多个。
其中,容器配置信息可以通过关系图谱进行表达。为了便于区分,本申请将容器配置信息对应的关系图谱称作应用依赖图谱。其中,应用管理系统100可以以记录有分块信息、服务配置信息的配置文件以及基础依赖包等为节点,构建应用依赖图谱。
S308:应用管理系统100获取应用200在所述运行环境中运行时的运行代码,获得运行时环境配置信息。
具体地,运行时环境配置信息包括应用200在所述运行环境中运行时所关联的基础关联包。该基础关联包可以是基础依赖包(如tomcat、Java、mvn)、编译相关的包(如gcc、glib或者make)、安装相关的包(如expect组件、py的引用库)中的一个或多个。
进一步地,运行时环境配置信息还包括运行应用200时依赖的操作系统环境变量(如用于内核配置的sysctl、用于指示搜索范围的PATH,用于验证身份或状态的可动态加载验证模块(pluggable authentication modules,PAM)、外部资源(如IP资源、计算资源、内存资源等)中的一种或多种。
应用管理系统100先获取应用200在运行环境中运行时的运行代码,然后对运行代码进行分析,例如通过AI技术对运行代码进行分析,从而获得运行时环境配置信息。
由于运行时环境配置信息中包括操作系统环境变量等信息,基于此,应用管理系统100还可以根据运行时环境配置信息和静态环境配置信息对包括操作系统环境变量在内的信息进行二次校验,校验成功后,再执行S312。
类似地,运行时环境配置信息中包括应用200运行时的基础关联包(例如基础依赖包)。 基于此,应用管理系统100还可以根据运行时环境配置信息和容器配置信息对基础关联包等进行二次校验,校验成功后,再执行S312。
其中,运行时环境配置信息可以通过关系图谱表征。为了便于区分,运行时环境配置信息对应的关系图谱可以称作环境依赖图谱。具体地,应用管理系统100可以以环境变量为节点,构建环境依赖图谱。
需要说明的是,应用管理系统100还可以根据应用依赖图谱和环境依赖图谱,生成应用200的依赖图谱。参见图4所示的依赖图谱的示意图,对于待进行容器化改造的应用,基于静态环境和运行时环境生成的图谱为环境依赖图谱,基于源码包生成的图谱为应用依赖图谱。
环境依赖图谱描述了应用对静态环境的要求,例如内核要求、文件系统要求等,其中,内核要求包括内核参数sysctrl、环境变量Path、信号量、端口或者LD链接,文件系统要求包括文件系统的类型、大小(图中未示出)等等。应用对静态环境的要求还可以包括系统配置。该系统配置包括应用的域名、系统要求、网络世界协议(Network Time Protocol,NTP)要求。
环境依赖图谱还描述了应用对运行时环境的要求。其中,应用对运行时环境的要求包括对周边组件的依赖。该周边组件具体可以包括消息队列(message queue,MQ)、缓存(例如Redis)、数据库等。
应用依赖图谱描述了通过对应用的源码包分析所确定的框架、应用命令以及软件依赖。其中,框架可以包括SpringCloud、Dubbo等。软件依赖可以包括依赖模块(如基础依赖库)、配置文件等。
应用管理系统100通过将上述应用依赖图谱和上述环境依赖图谱进行拼接,可以得到相对完整的依赖图谱。
S310:应用管理系统100分析源码包,获得外部组件配置信息。
外部组件,即第三方组件。应用管理系统100可以基于应用的开发逻辑,分析源码包中的源代码,确定源码包中引用的外部组件,根据引用的外部组件的信息,如外部组件的标识,获得外部组件配置信息。外部组件配置信息用于获得外部组件。基于此,外部组件配置信息例如可以是外部组件的IP或外部组件的存储地址。例如,外部组件为外部数据库时,外部组件配置信息可以是外部数据库的IP。又例如,外部组件为外部操作组件时,外部组件配置信息可以是外部操作组件的存储地址。
需要说明的是,上述S304至S310为本申请实施例的可选步骤,在本申请实施例其他可能的实现方式中,应用管理系统100也可以不执行S304至S310,或者是执行S304至S310中的一个或多个步骤。
S312:应用管理系统100组装静态环境配置信息、运行时环境配置信息和容器配置信息,获得镜像配置文件。
镜像配置文件用于指示生成镜像。具体地,应用管理系统100可以根据镜像配置文件的模板,填充静态环境配置信息、运行时环境配置信息以及容器配置信息,从而获得镜像配置文件。
需要说明的是,上述S310、S312为本申请实施例的可选步骤,应用管理系统100也可以不执行S310、S312中对获得外部组件配置信息以及获得相应外部组件的步骤。应用 管理系统100可以根据静态环境配置信息和容器配置信息进行组装获得镜像配置文件。
S314:应用管理系统100根据镜像配置文件,获得应用200的镜像集。
镜像集中包括多个镜像。每个镜像可以根据镜像配置文件中的静态环境配置信息、运行时环境配置信息和容器配置信息确定。具体地,应用管理系统100可以根据静态环境配置信息、运行时环境配置信息和容器配置信息(例如是容器配置信息中的分块信息),查找镜像库400,获得至少一个镜像。
当基于分块信息确定的各个代码块对应的镜像在镜像库400中命中时,应用管理系统100可以获得应用200的镜像集。当基于分块信息确定的多个代码块中至少有一个代码块对应的镜像未在镜像库400中命中时,应用管理系统100可以根据静态环境配置信息、运行时环境配置信息和至少一个代码块生成相应的镜像。
下面对应用管理系统100生成镜像的过程进行详细说明。
首先,应用管理系统100可以根据环境配置信息中与操作系统相关的信息,如操作系统名称、操作系统版本等,获取基础镜像,也即操作系统镜像。其中,环境配置信息可以是静态环境配置信息或运行时环境配置信息中的至少一个。在一些实施例中,应用管理系统100还可以对静态环境配置信息和运行时环境配置信息进行校验,例如应用管理系统100可以比较静态环境配置信息中的操作系统相关信息和运行时环境配置信息中的操作系统相关信息,当比较结果为一致时,则校验通过,可以根据该操作系统相关信息获得操作系统镜像。接着应用管理系统100可以编译由容器配置信息中的分块信息划分的多个代码块中的至少一个代码块,然后将编译后的代码块安装至相应的操作系统镜像,从而获得应用200的镜像。
需要说明的是,上述S314为应用管理系统100根据环境变量和源码包获得应用200的镜像的一种具体实现,执行本申请实施例的应用改造方法也可以通过其他方式获得应用200的镜像集。
S316:应用管理系统100根据外部组件配置信息获取外部组件。
考虑到应用200引用外部组件的情况,应用管理系统100可以根据外部组件配置信息获取外部组件。其中,外部组件配置信息可以包括外部组件的IP或者存储地址,应用管理系统100可以根据外部组件的IP或存储地址等,获取外部组件。例如,外部组件为外部数据库时,应用管理系统100可以通过外部数据库的IP,访问该外部数据库。
其中,外部组件与应用200的镜像集中的至少一个镜像关联。应用200的改造结果还包括外部组件与所述镜像集中的至少一个镜像的关联关系。
S318:应用管理系统100根据应用200的镜像集创建多个容器,并将外部组件与多个容器中的至少一个容器关联。
具体地,应用管理系统100可以和容器平台对接,然后借助该容器平台,对应用200的镜像集中的各镜像分别执行创建容器的操作,获得与各镜像对应的容器。接着,应用管理系统100可以将外部组件与至少一个容器关联,从而实现将应用200迁移到云环境。其中,与外部组件关联的至少一个容器是基于引用该外部组件的代码块对应的镜像创建的容器。应用管理系统100可以基于外部组件与至少一个镜像之间的关联关系以及镜像和容器之间的对应关系,确定外部组件和容器之间的关联关系,进而将外部组件与相应的容器关联。
上述S316至S318为本申请实施例中对应用200进行迁移的一种具体实现,在本申请实施例其他可能的实现方式中,应用管理系统100也可以不执行上述S316至S318,例如应用管理系统100可以直接根据镜像集中的镜像分别创建容器,从而实现迁移应用200。
需要说明的是,图3所示实施例是以基于应用200的源码包改造应用200进行示例说明。在本申请实施例其他可能的实现方式中,应用管理系统100也可以基于应用200的其他代码包,如安装包等对应用200进行改造。
基于上述内容描述,本申请实施提供了一种应用改造方法。该方法基于应用200的源码包和应用200在运行环境中的环境变量进行自动化的应用改造,减少了用户手动介入,提高了应用改造的效率。并且,该方法对应用进行改造获得包括多个镜像的镜像集,进而实现应用的微服务化,如此可以避免应用因单点故障而无法提供服务,提高了服务的质量和稳定性。
上文结合图1至图4对本申请实施例提供的应用改造方法进行了详细介绍,下面将结合附图对本申请实施例提供的应用管理系统进行介绍。
参见图1所示的应用管理系统100的结构示意图,该系统100包括:
应用感知子系统102,用于获取应用在运行环境中的环境变量和所述应用的源码包;
镜像管理子系统108,用于根据所述环境变量和所述代码包,获得所述应用的改造结果,所述改造结果包括所述应用的镜像集,所述镜像集包括多个镜像,其中,根据各镜像创建的容器用于执行所述应用的部分模块。
在一些可能的实现方式中,所述代码包为源码包,所述源码包指示未经过编译处理的代码包。
在一些可能的实现方式中,所述系统100还包括:
分析子系统104,用于分析所述环境变量获得静态环境配置信息,分析所述源码包获得容器配置信息,其中,所述容器配置信息包括所述源码包的分块信息,所述分块信息用于将所述源码包分为多个代码块;
所述镜像管理子系统108,用于根据所述静态环境配置信息和所述容器配置信息,获得所述应用的镜像集,所述镜像集中每一镜像是根据所述静态环境配置信息和所述多个代码块中的至少一个代码块确定的。
在一些可能的实现方式中,所述镜像集中的至少一个镜像是根据所述静态环境配置信息和所述分块信息,从镜像库中查找得到。
在一些可能的实现方式中,所述系统100还包括:
分析子系统104,用于分析所述源码包获得外部组件配置信息;
容器管理子系统110,用于根据所述外部组件配置信息获取外部组件,所述外部组件与所述镜像集中的至少一个镜像关联,其中,所述改造结果还包括所述外部组件与所述镜像集中的至少一个镜像的关联关系。
在一些可能的实现方式中,所述分析子系统104,还用于获取所述应用在所述运行环境中运行时的运行代码,获得运行时环境配置信息,所述运行时环境配置信息包括所述应用在所述运行环境中运行时所关联的基础关联包;
所述镜像管理子系统108,用于根据所述静态环境配置信息、所述运行时环境配置信 息和所述容器配置信息获得所述应用的镜像集,其中,所述镜像集中至少一个镜像是根据所述静态环境配置信息、所述多个代码块中的至少一个代码块以及所述基础关联包确定。
在一些可能的实现方式中,所述容器配置信息还包括各代码块之间的调用关系,所述改造结果还包括所述各代码块之间的调用关系。
根据本申请实施例的应用管理系统100可对应于执行本申请实施例中描述的方法,并且应用管理系统100的各个子系统或子系统中的模块的上述和其它操作和/或功能分别为了实现图3所示实施例中的各个方法的相应流程,为了简洁,在此不再赘述。
本申请实施例还提供了一种计算设备集群。该计算设备集群包括至少一台计算设备。该计算设备可以是服务器,例如是中心服务器、边缘服务器,或者是本地数据中心中的本地服务器。在一些实施例中,计算设备也可以是台式机、笔记本电脑或者智能手机等终端设备。计算设备集群具体用于实现如图1所示的应用管理系统100的功能。下面对计算设备集群的硬件结构进行介绍。
图5提供了一种计算设备集群的结构示意图,如图5所示,计算设备集群50包括至少一台计算设备500,每台计算设备500包括总线501、处理器502、通信接口503和存储器504。处理器502、存储器504和通信接口503之间通过总线501通信。
总线501可以是外设部件互连标准(peripheral component interconnect,PCI)总线或扩展工业标准结构(extended industry standard architecture,EISA)总线等。总线可以分为地址总线、数据总线、控制总线等。为便于表示,图5中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
处理器502可以为中央处理器(central processing unit,CPU)、图形处理器(graphics processing unit,GPU)、微处理器(micro processor,MP)或者数字信号处理器(digital signal processor,DSP)等处理器中的任意一种或多种。
通信接口503用于与外部通信。例如,通信接口503可以用于和获取应用在运行环境中的环境变量和所述应用的源码包等等。
存储器504可以包括易失性存储器(volatile memory),例如随机存取存储器(random access memory,RAM)。存储器504还可以包括非易失性存储器(non-volatile memory),例如只读存储器(read-only memory,ROM),快闪存储器,硬盘驱动器(hard disk drive,HDD)或固态驱动器(solid state drive,SSD)。
存储器504中存储有可执行代码,处理器502执行该可执行代码以执行前述应用改造方法。
本申请实施例还提供了一种计算机可读存储介质。所述计算机可读存储介质可以是计算设备能够存储的任何可用介质或者是包含一个或多个可用介质的数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘)等。该计算机可读存储介质包括指令,所述指令指示计算设备执行上述应用改造方法。
本申请实施例还提供了一种计算机程序产品。所述计算机程序产品包括一个或多个计算机指令。在计算设备上加载和执行所述计算机指令时,全部或部分地产生按照本申请实施例所述的流程或功能。
所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机或数据中心进行传输。
所述计算机程序产品可以为一个软件安装包,在需要使用前述应用改造方法的任一方法的情况下,可以下载该计算机程序产品并在计算设备上执行该计算机程序产品。
上述各个附图对应的流程或结构的描述各有侧重,某个流程或结构中没有详述的部分,可以参见其他流程或结构的相关描述。

Claims (17)

  1. 一种应用改造方法,其特征在于,应用于应用管理系统,所述应用管理系统包括处理器和存储器,所述处理器用于执行所述存储器中存储的指令,以执行所述方法:
    获取应用在运行环境中的环境变量和所述应用的代码包;
    根据所述环境变量和所述代码包,获得所述应用的改造结果,所述改造结果包括所述应用的镜像集,所述镜像集包括多个镜像,其中,根据各镜像创建的容器用于执行所述应用的部分模块。
  2. 根据权利要求1所述的方法,其特征在于,所述代码包为源码包,所述源码包指示未经过编译处理的代码包。
  3. 根据权利要求2所述的方法,其特征在于,所述根据所述环境变量和所述代码包,获得所述应用的镜像集,包括:
    分析所述环境变量获得静态环境配置信息;
    分析所述源码包获得容器配置信息,其中,所述容器配置信息包括所述源码包的分块信息,所述分块信息用于将所述源码包分为多个代码块;
    根据所述静态环境配置信息和所述容器配置信息,获得所述应用的镜像集,所述镜像集中每一镜像是根据所述静态环境配置信息和所述多个代码块中的至少一个代码块确定的。
  4. 根据权利要求3所述的方法,其特征在于,所述镜像集中的至少一个镜像是根据所述静态环境配置信息和所述分块信息,从镜像库中查找得到。
  5. 根据权利要求2至4中任一所述的方法,其特征在于,所述方法还包括:
    分析所述源码包获得外部组件配置信息;
    根据所述外部组件配置信息获取外部组件,所述外部组件与所述镜像集中的至少一个镜像关联,其中,所述改造结果还包括所述外部组件与所述镜像集中的至少一个镜像的关联关系。
  6. 根据权利要求3至5中任一项所述的方法,其特征在于,所述方法还包括:
    获取所述应用在所述运行环境中运行时的运行代码,获得运行时环境配置信息,所述运行时环境配置信息包括所述应用在所述运行环境中运行时所关联的基础关联包;
    所述根据所述静态环境配置信息和所述容器配置信息,获得所述应用的镜像集,包括:
    根据所述静态环境配置信息、所述运行时环境配置信息和所述容器配置信息获得所述应用的镜像集,其中,所述镜像集中至少一个镜像是根据所述静态环境配置信息、所述多个代码块中的至少一个代码块以及所述基础关联包确定。
  7. 根据权利要求3至6中任一项所述的方法,其特征在于,所述容器配置信息还包括各代码块之间的调用关系,所述改造结果还包括所述各代码块之间的调用关系。
  8. 一种应用管理系统,其特征在于,所述系统包括:
    应用感知子系统,用于获取应用在运行环境中的环境变量和所述应用的代码包;
    镜像管理子系统,用于根据所述环境变量和所述代码包,获得所述应用的改造结果,所述改造结果包括所述应用的镜像集,所述镜像集包括多个镜像,其中,根据各镜像创建的容器用于执行所述应用的部分模块。
  9. 根据权利要求8所述的系统,其特征在于,所述代码包为源码包,所述源码包指示未经过编译处理的代码包。
  10. 根据权利要求9所述的系统,其特征在于,所述系统还包括:
    分析子系统,用于分析所述环境变量获得静态环境配置信息,分析所述源码包获得容器配置信息,其中,所述容器配置信息包括所述源码包的分块信息,所述分块信息用于将所述源码包分为多个代码块;
    所述镜像管理子系统,用于根据所述静态环境配置信息和所述容器配置信息,获得所述应用的镜像集,所述镜像集中每一镜像是根据所述静态环境配置信息和所述多个代码块中的至少一个代码块确定的。
  11. 根据权利要求10所述的系统,其特征在于,所述镜像集中的至少一个镜像是根据所述静态环境配置信息和所述分块信息,从镜像库中查找得到。
  12. 根据权利要求9至11中任一所述的系统,其特征在于,所述系统还包括:
    分析子系统,用于分析所述源码包获得外部组件配置信息;
    容器管理子系统,用于根据所述外部组件配置信息获取外部组件,所述外部组件与所述镜像集中的至少一个镜像关联,其中,所述改造结果还包括所述外部组件与所述镜像集中的至少一个镜像的关联关系。
  13. 根据权利要求10至12中任一所述的系统,其特征在于,所述分析子系统,还用于获取所述应用在所述运行环境中运行时的运行代码,获得运行时环境配置信息,所述运行时环境配置信息包括所述应用在所述运行环境中运行时所关联的基础关联包;
    所述镜像管理子系统,用于根据所述静态环境配置信息、所述运行时环境配置信息和所述容器配置信息获得所述应用的镜像集,其中,所述镜像集中至少一个镜像是根据所述静态环境配置信息、所述多个代码块中的至少一个代码块以及所述基础关联包确定。
  14. 根据权利要求10至13中任一所述的系统,其特征在于,所述容器配置信息还包括各代码块之间的调用关系,所述改造结果还包括所述各代码块之间的调用关系。
  15. 一种计算设备集群,其特征在于,包括至少一个计算设备,每个计算设备包括处理器和存储器;
    所述至少一个计算设备的处理器用于执行所述至少一个计算设备的存储器中存储的指令,以使得所述计算设备集群执行如权利要求1至7中任一所述的方法。
  16. 一种包含指令的计算机程序产品,其特征在于,当所述指令被计算机设备集群运行时,使得所述计算机设备集群执行如权利要求的1至7中任一所述的方法。
  17. 一种计算机可读存储介质,其特征在于,包括计算机程序指令,当所述计算机程序指令由计算设备集群执行时,所述计算设备集群执行如权利要求1至7中任一所述的方法。
PCT/CN2021/137543 2021-03-23 2021-12-13 应用改造方法、系统、集群、介质及程序产品 WO2022199136A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP21932743.4A EP4293498A1 (en) 2021-03-23 2021-12-13 Application modification method, and system, cluster, medium and program product
US18/464,250 US20230418623A1 (en) 2021-03-23 2023-09-10 Application remodeling method, system, cluster, medium, and program product

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN202110307720 2021-03-23
CN202110307720.2 2021-03-23
CN202110859637.6 2021-07-28
CN202110859637.6A CN115113972A (zh) 2021-03-23 2021-07-28 应用改造方法、系统、集群、介质及程序产品

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US18/464,250 Continuation US20230418623A1 (en) 2021-03-23 2023-09-10 Application remodeling method, system, cluster, medium, and program product

Publications (1)

Publication Number Publication Date
WO2022199136A1 true WO2022199136A1 (zh) 2022-09-29

Family

ID=83324806

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/137543 WO2022199136A1 (zh) 2021-03-23 2021-12-13 应用改造方法、系统、集群、介质及程序产品

Country Status (4)

Country Link
US (1) US20230418623A1 (zh)
EP (1) EP4293498A1 (zh)
CN (1) CN115113972A (zh)
WO (1) WO2022199136A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115904855A (zh) * 2023-03-02 2023-04-04 上海合见工业软件集团有限公司 基于信号动态追踪确定目标驱动源码的系统

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108279892A (zh) * 2018-02-27 2018-07-13 郑州云海信息技术有限公司 一种拆分大型应用服务为微服务的方法、装置及设备
CN108415795A (zh) * 2018-02-12 2018-08-17 人和未来生物科技(长沙)有限公司 一种容器Dockerfile、容器镜像快速生成方法及系统
US20190324786A1 (en) * 2018-04-23 2019-10-24 Hewlett Packard Enterprise Development Lp Containerized application deployment
CN111338641A (zh) * 2020-02-11 2020-06-26 腾讯云计算(北京)有限责任公司 一种应用发布方法及装置
CN111831269A (zh) * 2020-07-21 2020-10-27 腾讯科技(深圳)有限公司 一种应用开发系统、运行方法、设备及存储介质
CN112181588A (zh) * 2020-09-18 2021-01-05 济南浪潮数据技术有限公司 一种应用容器化方法、装置及电子设备和存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108415795A (zh) * 2018-02-12 2018-08-17 人和未来生物科技(长沙)有限公司 一种容器Dockerfile、容器镜像快速生成方法及系统
CN108279892A (zh) * 2018-02-27 2018-07-13 郑州云海信息技术有限公司 一种拆分大型应用服务为微服务的方法、装置及设备
US20190324786A1 (en) * 2018-04-23 2019-10-24 Hewlett Packard Enterprise Development Lp Containerized application deployment
CN111338641A (zh) * 2020-02-11 2020-06-26 腾讯云计算(北京)有限责任公司 一种应用发布方法及装置
CN111831269A (zh) * 2020-07-21 2020-10-27 腾讯科技(深圳)有限公司 一种应用开发系统、运行方法、设备及存储介质
CN112181588A (zh) * 2020-09-18 2021-01-05 济南浪潮数据技术有限公司 一种应用容器化方法、装置及电子设备和存储介质

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115904855A (zh) * 2023-03-02 2023-04-04 上海合见工业软件集团有限公司 基于信号动态追踪确定目标驱动源码的系统
CN115904855B (zh) * 2023-03-02 2023-07-07 上海合见工业软件集团有限公司 基于信号动态追踪确定目标驱动源码的系统

Also Published As

Publication number Publication date
CN115113972A (zh) 2022-09-27
EP4293498A1 (en) 2023-12-20
US20230418623A1 (en) 2023-12-28

Similar Documents

Publication Publication Date Title
US11178207B2 (en) Software version control without affecting a deployed container
US10831474B2 (en) ISA-ported container images
US10942724B2 (en) Release lifecycle management system for multi-node application
US11941452B2 (en) System to generate a deployment plan for a cloud infrastructure according to logical, multi-tier application blueprint
US9720668B2 (en) Creating and maintaining multi-tenant applications in a platform-as-a-service (PaaS) environment of a cloud computing system
US20100205604A1 (en) Systems and methods for efficiently running multiple instances of multiple applications
US9053236B1 (en) Automated directory services test setup utility
US10411961B2 (en) Image management in cloud environments
US20130227635A1 (en) Mechanism for Applying Security Category Labels to Multi-Tenant Applications of a Node in a Platform-as-a-Service (PaaS) Environment
US11467826B1 (en) Automated extraction of isolated nodes during source code refactoring
US11327750B1 (en) Domain-driven application breakout
US11500628B1 (en) Isolated code detection from application code analysis
CN113885849B (zh) 基于工业互联网平台的应用开发方法、装置及终端设备
US11650810B1 (en) Annotation based automated containerization
US10540452B1 (en) Automated translation of applications
US8904346B1 (en) Method and system for automated load testing of web applications
US20230418623A1 (en) Application remodeling method, system, cluster, medium, and program product
US10514940B2 (en) Virtual application package reconstruction
US20210064573A1 (en) Database deployment objects and deterministic locking models
US11960918B2 (en) Creating product orchestration engines
US9350596B2 (en) On-demand tethered greedy virtual application appliance
US11010149B2 (en) Shared middleware layer containers
US11593103B1 (en) Anti-pattern detection in extraction and deployment of a microservice
US11960861B1 (en) System and method for code development tools existing within code container
US20230259347A1 (en) Container based generation of inputs for generic functions

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21932743

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2021932743

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 2021932743

Country of ref document: EP

Effective date: 20230914

NENP Non-entry into the national phase

Ref country code: DE