CN111897654B - Method and device for migrating application to cloud platform, electronic equipment and storage medium - Google Patents
Method and device for migrating application to cloud platform, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN111897654B CN111897654B CN202010757876.6A CN202010757876A CN111897654B CN 111897654 B CN111897654 B CN 111897654B CN 202010757876 A CN202010757876 A CN 202010757876A CN 111897654 B CN111897654 B CN 111897654B
- Authority
- CN
- China
- Prior art keywords
- application
- migrated
- migration
- cloud platform
- resources
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5083—Techniques for rebalancing the load in a distributed system
- G06F9/5088—Techniques for rebalancing the load in a distributed system involving task migration
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Stored Programmes (AREA)
Abstract
The application relates to the technical field of computers, in particular to a method, a device, electronic equipment and a storage medium for migrating an application to a cloud platform, which are used for improving the accuracy of resource estimation and enabling the cloud application migration process to be more convenient and efficient, wherein the method comprises the following steps: acquiring resource use information of each application to be migrated, which needs to be migrated to a cloud platform; determining the application grade of each application to be migrated according to the resource use information of each application to be migrated; acquiring the number of physical servers required for migrating each application to be migrated to the cloud platform according to the migration strategy corresponding to the application level of each application to be migrated; and after creating and reserving corresponding resources on the cloud platform according to the acquired number of physical servers, migrating each application to be migrated to the cloud platform. According to the method and the device, the application to be migrated is divided into different application grades according to the resource use information, and the resources required by the migration process are accurately estimated by adopting different migration strategies, so that the migration is more efficient.
Description
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, an electronic device, and a storage medium for migrating an application to a cloud platform.
Background
In cloud computing products, full stack cloud is a new solution, which is generally beneficial to providing virtual machines for the virtualization capability of a cloud platform, then deploying the cloud native platform on the virtual machines, and after incubating a container, modifying an application program into container service to provide services for end users, so that the application program has good isolation brought by the virtual machines and lightweight expansion capability brought by the container.
Because of the existence of the virtual machine and the container service and the relatively complex whole deployment form, the current consumption of application resources does not have global statistics, which brings great difficulty to the resource estimation in the cloud loading process of application migration. At present, after resource estimation is directly performed according to experience values, how to well estimate the service condition of resources in the process of migrating the application to the cloud platform on the whole stack cloud is a problem to be considered.
Disclosure of Invention
The embodiment of the application provides a method, a device, electronic equipment and a storage medium for migrating an application to a cloud platform, which are used for improving the accuracy of resource estimation and enabling the cloud application migration process to be more convenient and efficient.
The first method for migrating the application to the cloud platform provided by the embodiment of the application comprises the following steps:
acquiring resource use information of each application to be migrated, which needs to be migrated to a cloud platform;
determining the application grade of each application to be migrated according to the resource use information of each application to be migrated;
acquiring the number of physical servers required for migrating each application to be migrated to the cloud platform according to the migration strategy corresponding to the application level of each application to be migrated;
and after creating and reserving corresponding resources on the cloud platform according to the acquired number of physical servers, migrating each application to be migrated to the cloud platform.
The first device for migrating an application to a cloud platform provided by the embodiment of the application comprises:
the information acquisition unit is used for acquiring resource use information of each application to be migrated, which needs to be migrated to the cloud platform;
the grade dividing unit is used for determining the application grade of each application to be migrated according to the resource use information of each application to be migrated;
the estimating unit is used for acquiring the number of physical servers required by migrating each application to be migrated to the cloud platform according to the migration strategy corresponding to the application grade of each application to be migrated;
And the migration unit is used for migrating each application to be migrated to the cloud platform after the cloud platform creates and reserves the corresponding resources according to the acquired number of the physical servers.
Optionally, the resources in the migration policy include a physical server or a virtual machine; the estimating unit is specifically configured to:
if the migration position is a physical server, obtaining the number of physical servers required for migrating the application to be migrated to the cloud platform according to the number of physical servers required by each database preset in the migration strategy;
and if the migration position is a virtual machine, obtaining the number of physical servers required for migrating the application to be migrated to the cloud platform according to the number of virtual machines required by each database preset in the migration strategy and the conversion number corresponding to a first preset specification of the virtual machine, wherein the conversion number corresponding to the first preset specification is obtained according to the mapping relation between the preset virtual machine specification and the conversion number.
Optionally, the resources in the migration policy include container services, and the migration policy further includes resource consumption of the container services; the estimating unit is specifically configured to:
Estimating the resource consumption required by all the container services according to the number of the container services in the migration strategy corresponding to the application to be migrated and the resource consumption of each container service;
determining the number of virtual machines with a second preset specification required for migrating the application to be migrated to the cloud platform according to the estimated resource consumption required by all container services;
and obtaining the number of physical servers required for migrating the application to be migrated to the cloud platform according to the determined number of required virtual machines and the converted number corresponding to a second preset specification of the virtual machines, wherein the converted number corresponding to the second preset specification is obtained according to a mapping relation between the preset virtual machine specification and the converted number.
Optionally, the mapping relationship between the specification of the virtual machine and the conversion number is preconfigured according to the specification of the physical server, and the conversion number refers to the number of virtual machines with different specifications that can be supported by the physical server with the target specification.
The electronic device provided by the embodiment of the application comprises a processor and a memory, wherein the memory stores program codes, and when the program codes are executed by the processor, the processor executes any one of the steps of the method for migrating the application to the cloud platform.
An embodiment of the present application provides a computer readable storage medium including program code for causing an electronic device to perform any of the above-described steps of a method of migrating an application to a cloud platform when the program code is run on the electronic device.
Embodiments of the present application provide a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The computer instructions are read from the computer-readable storage medium by a processor of a computer device, and executed by the processor, to cause the computer device to perform any of the steps of the method of migrating an application to a cloud platform described above.
The application has the following beneficial effects:
according to the method, the device, the electronic equipment and the storage medium for migrating the application to the cloud platform, before migrating the application to be migrated to the cloud platform, the application to be migrated is divided into different application grades by analyzing the use condition of the application resources through the acquired resource use information of each application to be migrated, different migration strategies are formulated for the application to be migrated of different application grades, different resources are distributed, the use condition of the resources can be estimated in advance in the whole cloud process on migration, the resource can be estimated in advance conveniently in the whole cloud process on migration, guidance is provided for the cloud on migration of the application, the cloud process on migration of the application is more convenient and efficient, and the method can be used for the subsequent data center cluster capacity expansion.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the application. The objectives and other advantages of the application will be realized and attained by the structure particularly pointed out in the written description and claims thereof as well as the appended drawings.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute a limitation on the application. In the drawings:
FIG. 1 is an alternative schematic diagram of an application scenario in an embodiment of the present application;
FIG. 2 is a flow chart of a method of migrating an application to a cloud platform in an embodiment of the present application;
FIG. 3 is a flow chart of a method of calculating the number of physical servers in an embodiment of the application;
fig. 4 is a schematic architecture diagram of a full stack cloud platform according to an embodiment of the present application;
FIG. 5A is a schematic diagram of a Region cluster architecture according to an embodiment of the present application;
fig. 5B is a schematic diagram of a cloud native service cluster according to an embodiment of the present application;
FIG. 6 is a schematic diagram of an alternative interactive implementation timing sequence in an embodiment of the present application;
FIG. 7 is a schematic diagram of a device for migrating applications to a cloud platform according to an embodiment of the present application;
fig. 8 is a schematic diagram of a composition structure of an electronic device according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the technical solutions of the present application, but not all embodiments. All other embodiments, based on the embodiments described in the present document, which can be obtained by a person skilled in the art without any creative effort, are within the scope of protection of the technical solutions of the present application.
Some of the concepts involved in the embodiments of the present application are described below.
Virtual Machine (Virtual Machine): in the architecture of computer science, it is meant a special piece of software that creates an environment between a computer platform and an end user, who operates the software based on the environment created by the software. In computer science, a virtual machine refers to a software implementation of a computer that can run a program like a real machine. In the embodiment of the application, a virtual machine refers to a virtual device running on a physical host machine and is used for deploying a cloud native platform.
Host machine: the concept is relative to the sub-machines, for example, the computer being used by the user is the host machine, the virtual machine is installed on the host machine, the virtual machine must be run on the host machine, and the host machine is the host machine. In the embodiment of the present application, a host refers to a physical host, which may also be referred to as a physical machine or a physical server, and is used for providing a hardware environment of a virtual machine to run the virtual machine.
A container: typically within an application server, which is responsible for loading and maintenance. One container can only exist within one application server, and one application server can build and maintain multiple containers. The container generally complies with the configurable principle that a user of the container can reach his own use requirements by configuring the parameters of the container without modifying the code of the container. Briefly, a container contains a complete runtime environment: all dependencies, class libraries, other binaries, configuration files, etc. required by the application, except the application itself, are uniformly driven into a package called a container image. By containerizing the application itself, and its dependencies, differences between the release version of the operating system and other underlying environments are abstracted.
The container service: is a highly scalable high-performance container management service that can easily run applications on a hosted cloud server instance cluster. The user can split the macro application into different micro services, each providing atomic functionality, interconnected. Each microservice consists of a set of containers of the same mirror image and the same configuration. The micro service described above is a concept of a service of a container service, and one or more services constitute a concept of an application of the container service.
Resource usage information: parameters for indicating the use of application resources may be an application concurrency amount, a CPU (Central Processing Unit/Processor) use rate, a memory use rate, and the like. The concurrency means that the number of people accessing the website at the same time is larger, and the instantaneous bandwidth requirement is higher.
Cloud primordial: is a method for constructing and running application programs, and is a set of technical systems and methodologies. Cloud Native (CloudNative) is a combination word, cloud + Native. Clouds means that the application is located in the Cloud, not in a traditional data center; native means that the application program is designed for the cloud from the beginning of the design, i.e. considering the cloud environment, runs in an optimal posture on the cloud, and fully utilizes and exerts the elasticity and the distributed advantage of the cloud platform. In the embodiment of the application, the application deployed on the cloud native platform can be called as a cloud native application, and the cloud native application has three main characteristics: 1) And (5) containerized packaging: based on the container, the overall development level is improved, code and component reuse is formed, and the maintenance of the cloud native application program is simplified. And running the application program and the process in the container and realizing high-level resource isolation as an independent unit for application program deployment. 2) Dynamic management: dynamic management and scheduling is achieved through a centralized orchestration scheduling system. 3) Micro-service oriented: the dependencies between services are defined and decoupled from each other.
IaaS (Infrastructure as a Service ): meaning that consumers can obtain services from a sophisticated computing infrastructure via the Internet. The services provided to the consumer are the utilization of all computing infrastructure, including processing CPUs, memory, storage, networks, and other basic computing resources, and the user can deploy and run any software, including operating systems and application programs. The consumer does not manage or control any cloud computing infrastructure, but can control the selection of operating systems, storage space, deployed applications, and possibly limited control of network components (e.g., routers, firewalls, load balancers, etc.). In the embodiment of the application, the cloud computing platform in the IaaS service mode is called as an IaaS cloud platform for short.
And (3) middleware: the three main posts of basic software are formed together with an operating system and a database, are basic software applied to a distributed system, are positioned between an application, the operating system and the database, and provide a platform for development, operation and integration of upper-layer application software. The middleware solves the common problems of software interconnection, interoperation and the like in a heterogeneous network environment, provides a standard interface and a standard protocol, and provides a reusable standard for sharing resources among application software.
HA (High Available): by combining redundant hardware and software, fault detection and correction can be managed without human intervention. The main mode of the HA is mainly realized by configuring two identical devices at the same position of the network. The devices are divided into a primary device and a backup device. The main equipment is in an active state, forwards the message, and simultaneously transmits all network and configuration information and current session information to the backup equipment. When the main equipment fails, the backup equipment takes over the work of the main equipment and forwards the message.
JVM (Java Virtual Machine ): is a specification for a computing device that is an imaginary computer implemented by emulating various computer functions on an actual computer. After the Java language virtual machine is introduced, the Java language does not need to be recompiled when running on different platforms. The Java language uses a Java virtual machine to mask information related to a specific platform, so that a Java language compiler can run on various platforms without modification by only generating object codes (byte codes) running on the Java virtual machine.
Poll (Polling): is a way for the CPU to decide how to provide the peripheral device service, also called as "Programmed I/O". The concept of the polling method is: the CPU sends out inquiry at regular time, and inquires whether each peripheral device needs its service or not in sequence, if so, the service is given, and after the service is finished, the next peripheral is asked, and then the process is repeated.
Cloud computing (closed computing): the computing mode distributes computing tasks on a resource pool formed by a large number of computers, so that various application systems can acquire computing power, storage space and information service according to requirements. The network that provides the resources is referred to as the "cloud". Resources in the cloud are infinitely expandable in the sense of users, and can be acquired at any time, used as needed, expanded at any time and paid for use as needed.
As a basic capability provider of cloud computing, a cloud computing resource pool (cloud platform for short, generally referred to as IaaS (Infrastructure as a Service, infrastructure as a service) platform) is established, in which multiple types of virtual resources are deployed for external clients to select for use.
According to the logic function division, a PaaS (Platform as a Service ) layer can be deployed on the IaS layer, a SaaS (Software as a Service ) layer can be deployed on the PaaS layer, and the SaaS can also be directly deployed on the IaS. PaaS is a platform for software running, such as a database, web container, etc. SaaS is a wide variety of business software such as web portals, sms mass senders, etc. Generally, saaS and PaaS are upper layers relative to IaaS.
The following briefly describes the design concept of the embodiment of the present application:
the close fusion of cloud computing and 5G (5 th-Generation, fifth Generation mobile communication technology), AI (Artificial Intelligence ) technology is rapidly changing the industry patterns of various industries, pushing global digital transformation into deep water areas. An enterprise needs a brand-new cloud infrastructure, any resource is integrated transparently, and dynamic migration of workload is guaranteed, so that the enterprise is helped to release data potential, novel full-element productivity is improved, and a foundation is laid for continuous business innovation and upgrading. The full-stack cloud infrastructure enables enterprises to simply and rapidly support application development and delivery on a full-stack cloud layer through unified intelligent monitoring management of cross-cloud, core and edge frameworks, and rapidly integrates and releases cloud or edge computing resources. Based on the full stack cloud virtualization technology, a plurality of virtual machines can be created on a physical server as application servers to improve the energy efficiency problem of a data center, so that migration and cloud loading of application programs are realized, and the resource utilization rate is improved.
However, before the application is migrated to the cloud, since there is no global statistics on consumption of the application resources, this presents great difficulty in estimating resources in the process of migrating to the cloud. In the related art, after resource estimation is generally performed according to an empirical value, an application is migrated to a cloud platform, and the method can only roughly estimate resources required for cloud migration.
In view of this, the embodiments of the present application provide a method, an apparatus, an electronic device, and a storage medium for migrating applications to a cloud platform, by first analyzing the usage of resources of applications to be migrated, dividing the application classes of each application to be migrated according to the usage information of resources of each application to be migrated, and formulating different migration strategies for different application classes, so that the total consumption of server resources for migrating the applications to the cloud platform can be estimated more accurately, and the usage of resources can be estimated in advance in the whole stack cloud process. And then corresponding resources can be created and reserved in the cloud platform according to the estimated total consumption of the server resources, so that preparation is made for migration, and on the basis, each application to be migrated is more convenient and efficient when being migrated to the cloud platform.
The preferred embodiments of the present application will be described below with reference to the accompanying drawings of the specification, it being understood that the preferred embodiments described herein are for illustration and explanation only, and not for limitation of the present application, and embodiments of the present application and features of the embodiments may be combined with each other without conflict.
Fig. 1 is a schematic diagram of an application scenario in an embodiment of the present application, which includes a unified cloud pipe, a cloud native platform, an IaaS cloud platform, a virtual resource pool, and an infrastructure.
The unified cloud management is a unified portal platform and is used for simultaneously managing the IaaS cloud platform and the cloud native platform.
In the embodiment of the application, the IaaS cloud platform refers to a platform capable of providing IaaS cloud services; the cloud native platform is a PaaS platform for providing application hosting and micro-service management capabilities for enterprises, can help the enterprises simplify application lifecycle management work such as deployment, monitoring, operation and maintenance, and simultaneously provides micro-service management and operation and maintenance capabilities such as service registration, service management, service monitoring and call chains. The virtual resource pool is a pool formed by abstracting resources of a bare machine of a host machine in a cloud platform and comprises a computing resource pool, a storage resource pool, a network resource pool and the like; wherein the computing resource pool comprises the servers shown in FIG. 1, virtualization of the services may be implemented, and the storage resource pool is used to implement storage virtualization, such as the storage pool shown in FIG. 1. Furthermore, the network resource pool is used to implement network virtualization, which is not shown in fig. 1. At the bottom-most infrastructure layer of fig. 1, the mainly deployed infrastructure refers to hardware, including hardware facilities involved in machine room, refrigeration, power supply, and the like.
In the embodiment of the application, the virtual machine is provided by utilizing the virtualization capability of the cloud platform, the application program is changed into the container service by deploying the cloud native platform on the virtual machine, such as a hatching container of the cloud native platform, and the service is provided for the final user, so that the migration and the cloud loading of the application program can be realized.
It should be noted that, the application in the embodiment of the present application refers to an application located on a PC (Personal Computer ) or a mobile terminal, where the mobile terminal includes a mobile phone, a tablet computer, a notebook, an electronic book reader, and the like, and is not limited herein.
Referring to fig. 2, an implementation flow chart of a method for migrating an application to a cloud platform according to an embodiment of the present application is shown, where a specific implementation flow of the method is as follows:
s21: acquiring resource use information of each application to be migrated, which needs to be migrated to a cloud platform;
the resource usage information refers to parameters for representing the resource usage condition of the application to be migrated, such as application concurrency, CPU usage, memory usage, and the like.
S22: determining the application grade of each application to be migrated according to the resource use information of each application to be migrated;
in the embodiment of the application, the resource use information of each application to be migrated, such as the CPU use rate, the memory use rate, the application concurrency and the like of the application to be migrated, is collected in real time, and the application grade is divided for each application to be migrated according to the collected information. In the embodiment of the application, migration strategies corresponding to different application levels are different, and correspondingly, the conditions of resource allocation are different.
In an optional implementation manner, when analyzing the application level of each application to be migrated, firstly, the use interval to which the resource use information of each application to be migrated belongs needs to be analyzed; further, the application level corresponding to the use interval to which the resource use information of each application to be migrated belongs is used as the application level of each application to be migrated.
When determining a usage interval to which the resource usage information of one application to be migrated belongs, the usage interval to which the peak value of the resource usage information of each application to be migrated in the preset period belongs may be used as the usage interval to which the resource information of each application to be migrated belongs.
Taking resource usage information as an application concurrency amount as an example, it is assumed that three usage intervals regarding the application concurrency amount are divided in advance according to a preset threshold, respectively [0, 100) [100 ], 1000, (1000, +++).
Wherein, the corresponding relation between the use interval and the application level can be seen in table 1.
TABLE 1
Usage interval | Application level |
(1000,+∞) | High height |
[100,1000] | In (a) |
[0,100) | Low and low |
As shown in table 1, if the peak value of the concurrency of an application to be migrated in a preset period is more than 1000, the application class of the application is high; when the peak value of the concurrency of the application is between 100 and 1000, the application grade of the application is medium; when the peak value of the concurrency of an application is less than 100, the application class of the application is low. It should be noted that the above-listed grades are also merely examples, and are not particularly limited herein.
Taking resource usage information as an example of CPU usage, it is assumed that three usage sections regarding CPU usage are divided in advance according to a preset threshold value, respectively, [0, 10%), [10%,50% ], (50%, 100% ].
Wherein, the corresponding relation between the use interval and the application level can be seen in table 2.
TABLE 2
Usage interval | Application level |
(80%,100%] | High height |
[10%,80%] | In (a) |
[0,10%) | Low and low |
As shown in table 2, if a certain application to be migrated has a peak value of CPU usage rate of 80% or more in a preset period, the application class of the application is high; when the peak value of the CPU usage is between 10% and 80%, the application grade of the application is medium; when the peak value of the CPU usage is less than 10%, the application class of the application is low. Similarly, when the resource usage information is the memory usage rate, the ranks may be classified in a similar manner.
In addition, the resource usage information may further include a plurality of the above-listed application concurrency, CPU usage, and memory usage, in which case, when determining an application level of an application to be migrated, it is first required to determine a usage interval to which a peak value of each type of resource usage information belongs, and at this time, each application level obtained when dividing the application level according to the usage interval to which each type of resource usage information belongs is determined according to the usage interval to which the peak value of each type of resource usage information belongs, respectively. By comprehensively considering each application level, the application level with the largest occurrence number in the application levels corresponding to the use information of various resources can be used as the application level of the application to be migrated; or the highest application level in all application levels corresponding to the various resource use information can be used as the application level of the application to be migrated.
For example, for a certain application to be migrated, the peak value of the CPU usage rate in a preset period is 90%, the application belongs to a usage interval (80%, 100% ], and the corresponding application grade is high; the peak value of the memory utilization rate is 70%, belonging to the use interval [10%,80% ], the corresponding application grade is middle, the peak value of the application concurrency quantity reaches 1500, belonging to the use interval (1000, + -infinity), and the corresponding application grade is high.
Wherein, each application grade obtained according to the three kinds of resource use information is: high, medium, high, wherein the application level with the highest occurrence number is high, and therefore the application level of the application to be migrated is finally determined to be high. If the highest application level in the three application levels is used as the application level of the application to be migrated, the application level of the application to be migrated is still high.
Alternatively, the application level of the application to be migrated may also be determined by means of weighted summation or the like. Firstly, determining a use interval to which a peak value of various kinds of resource use information belongs, determining use scores corresponding to various kinds of resource use information according to the use interval to which the peak value belongs, and determining an application grade of an application to be migrated according to a final score obtained by weighting and summing the use scores. In determining the application level of the application to be migrated based on the final score, two thresholds may be set, the first threshold being 10 and the second threshold being 70. If the final score is lower than the first threshold, confirming that the application level is low; if the final score is between the first threshold value and the second threshold value, confirming that the application grade is middle; if the final score is above the second threshold, the application level is confirmed to be high.
For example, when the peak value of the CPU utilization rate of the application to be migrated in the preset period is 90%, and the application belongs to the use interval (80%, 100% ], the corresponding use score is 90, and the weight is 30%; the peak value of the memory utilization rate is 70%, when the memory utilization rate belongs to the utilization interval [10%,80% ], the corresponding utilization value is 70, and the weight is 30%; when the peak value of the application concurrency reaches 1500 and belongs to the use interval (1000, ++ infinity), the corresponding use score is 80, the weight is 40%, the three use scores are weighted and summed to obtain a final score of 80 which is higher than a second threshold, so that the final application grade of the application to be migrated is high.
It should be noted that, the above-listed ways of determining the usage interval to which the resource usage information belongs according to the peak value of the resource usage information in the preset period, and further determining the application level of the application to be migrated are only illustrative, and any way of determining the application level of the application to be migrated according to the peak value of the resource usage information in the preset period is applicable to the embodiments of the present application, which is not limited herein.
In the following, the resource usage information of the application is mainly exemplified by the concurrency of the application, and it is needless to say that the resource usage information is the same as other parameters, and the description thereof is not repeated.
S23: acquiring the number of physical servers required for migrating each application to be migrated to the cloud platform according to the migration strategy corresponding to the application level of each application to be migrated;
the migration strategies comprise resources and the quantity of the resources which are distributed to the application to be migrated, and the resources or the quantity of the resources in the migration strategies corresponding to different application grades are different.
In the embodiment of the present application, the resources included in the migration policy may be any one or more of physical servers, virtual machines, or container services, and the number of resources refers to the number of physical servers, the number of virtual machines, or the number of container services. Wherein, different application grades correspond to different migration strategies, and the resources or the quantity of the resources allocated for the application to be migrated in the different migration strategies are different.
S24: and after creating and reserving corresponding resources on the cloud platform according to the acquired number of physical servers, migrating each application to be migrated to the cloud platform.
In the embodiment of the application, before the application to be migrated is migrated to the cloud platform, firstly, the resource usage condition of the application to be migrated is analyzed through the acquired resource usage information of each application to be migrated, different application grades are divided for the application to be migrated, different migration strategies are formulated for the application to be migrated of different application grades, and different resources are allocated, so that the resource usage condition can be estimated in advance in the whole cloud process of migration, the resource can be estimated in the whole cloud process of migration conveniently, guidance is provided for the cloud of application migration, and the method can be used for the subsequent cluster expansion of the data center.
The process of obtaining the number of physical servers required for migrating each application to be migrated to the cloud platform according to the migration policy is described in detail below.
In the embodiment of the application, different application levels correspond to different migration strategies, wherein the migration strategies are mainly used for specifying resources and the number of the resources required for migrating the application to be migrated, and the number of the resources refers to the number of required physical servers, the number of virtual machines or the number of container services and the like. In addition, the establishment of the migration policy has a certain association with the splitting of the application, and in the embodiment of the application, the splitting of the application to be migrated is divided into two different modes, namely a front end, a rear end, a database, a front end, a middleware and a rear end. Applications such as office systems, mailbox systems, etc. are typically in front-end + back-end + database mode, while some notification systems, presentation class applications are typically in front-end + middleware + back-end mode.
The migration policies adopted are different for applications in different modes, and specifically, resources allocated to the applications to be migrated in the migration policies are different. For the to-be-migrated application in the front end+back end+database mode, the resources allocated in the migration policy are physical servers or virtual machines, and for the to-be-migrated application in the mode, the resources in the migration policies corresponding to different application levels can be the same or different, and in addition, the number of the resources in the migration policies corresponding to different application levels is also different, generally, the higher the application level is, the more the number of the corresponding resources is.
And aiming at the application to be migrated in the front end, middleware and back end modes, the resources distributed in the migration strategy serve the container. For the application to be migrated in the mode, resources in the migration policies corresponding to different application levels are container services, and the resource consumption of each container service can be different.
In the two modes listed above, when determining the number of physical servers required to migrate each application to be migrated to the cloud platform according to the migration policy, for any one application to be migrated, the following discussion will be made separately:
if the application to be migrated is in a front end+back end+database mode, determining the number of physical servers required for migrating the database of the application to be migrated to the cloud platform according to the migration position and the number of resources of the database in the migration strategy corresponding to the application to be migrated, wherein the migration position represents the resources occupied when the database of the application to be migrated is migrated to the cloud platform.
For the application of the mode, the migration policy is mainly used for defining what resource the database should be deployed on when the application to be migrated is migrated to the cloud platform, and since the resource in the migration policy includes a physical server or a virtual machine, the corresponding migration location refers to the physical server or the virtual machine, where the physical server is the physical machine. When different migration strategies are formulated, the preset migration positions in the migration strategies are determined according to the application grade of the application to be migrated. Specifically, when the application level is higher, the preset migration position in the migration strategy is a physical server, namely, the database of the application to be migrated is directly deployed on the physical server; when the application level is lower, the preset migration position in the migration strategy is a virtual machine, namely, the database of the application to be migrated needs to be deployed on the virtual machine.
For example, databases of high-concurrency applications are deployed directly on physical machines, while databases of low-concurrency or medium-concurrency applications are deployed on virtual machines, and the number of physical servers needed needs to be further calculated according to the number of virtual machines.
In the embodiment of the application, when the application concurrency is higher, the application grade is higher, resources are preferentially allocated to the application to be migrated of the higher grade as a physical server according to the corresponding migration strategy, and the stability of an emergency application system can be ensured. In addition, in the case that the physical server is not allocated enough, the virtual machine can be further allocated for the application to be migrated.
Optionally, if the migration position in the migration policy is a physical server, the resource data in the migration policy is the number of physical servers required by each database, so that the number of physical servers required for migrating the application to be migrated to the cloud platform can be obtained according to the number of physical servers required by each database preset in the migration policy. That is, for the highly concurrent application to be migrated, the migration policy specifies the migration location of the database as a physical server, and in addition, the migration policy also sets the number of physical servers required by each database, so that the sum of the numbers of physical servers required by all databases, that is, the number of physical servers required when the highly concurrent application to be migrated is migrated to the cloud platform.
If the migration position in the migration policy is a virtual machine, the resource data in the migration policy is the number of virtual machines required by each database, so that the number of physical servers required for migrating all the databases in the application to be migrated to the cloud platform can be obtained according to the number of virtual machines required by each database preset in the migration policy and the conversion number corresponding to the first preset specification of the virtual machines, wherein the ratio of the number of the virtual machines to the conversion number is the number of the required physical servers.
It should be noted that, in the embodiment of the present application, the conversion number corresponding to the first preset specification is obtained according to a mapping relationship between the preset virtual machine specification and the conversion number, and the embodiment of the present application needs to preset to establish a mapping relationship between the virtual machine specification and the conversion number, and further according to the preset virtual machine specification and number in the migration policy, and the mapping relationship, the number of the required physical servers can be calculated based on the number of virtual machines and the specification. The virtual machine specification preset in the migration policy is a first preset specification, and after the conversion number corresponding to the first preset specification is determined from the mapping relation, the ratio of the number of virtual machines to the conversion number is the number of physical servers required by migrating all databases in the application to be migrated to the cloud platform. In the following, taking resource usage information as an application concurrency amount as an example, migration policies corresponding to various application levels will be described and illustrated in detail under the condition of different application concurrency amounts.
If the application to be migrated is an application in a front end, middleware and back end mode, the number of the container services is the resource data in the migration policy corresponding to the application, and when the number of the physical servers is calculated, the number of the physical servers required for migrating the application to be migrated to the cloud platform is determined according to the number of the container services in the migration policy corresponding to the application to be migrated, wherein the number of the container services represents the number of the container services required when the application to be migrated is migrated to the cloud platform, and the higher the application level of the application to be migrated is, the larger the number of the container services in the migration policy corresponding to the application level is.
It should be noted that, in the case that the resources in the migration policy include container services, the migration policy may further include resource consumption required by the container services. Referring to fig. 3, which is a flowchart of a method for calculating the number of physical servers in an embodiment of the present application, when determining the number of physical servers required for migrating the application to be migrated to a cloud platform according to the number of container services in a migration policy corresponding to the application to be migrated, the method specifically includes the following steps:
in step S31, according to the number of container services in the migration policy corresponding to the application to be migrated and the resource consumption of each container service, estimating the resource consumption required by all the container services;
The number of container services is specified in the migration policy, and the number of container services specified in the migration policy corresponding to different application levels is different, for example, the higher the application level is, the higher the number of corresponding container services is. The resource consumption of the container service specifically comprises CPU consumption and JVM consumption, the resource consumption required by the container service specified in the migration policy corresponding to different application levels is different, and the higher the application level is, the higher the resource consumption required by each container service specified in the corresponding migration policy is.
For example, the number of container services specified in the migration policy corresponding to the high concurrency application level is 30, and the resource consumption is respectively: CPU is 4-8 cores, JVM size is 8G-16G; the number of container services specified in the migration policy corresponding to the concurrent application level is 24, and the resource consumption is respectively: CPU is 2-4 cores, JVM size is 4G-8G; the number of container services specified in the migration policy corresponding to the application level of low concurrency is 18, and the resource consumption is respectively: the CPU is 1-2 cores, and the JVM size is 2G-4G. In the following, the resource usage information will be taken as an example of application concurrency, and migration policies corresponding to various application levels will be described and illustrated in detail under the condition of different application concurrency.
In step S32, determining the number of virtual machines with a second preset specification required for migrating the application to be migrated to the cloud platform according to the estimated resource consumption required by all the container services;
the second preset specification is a specification of the virtual machine specified in the migration policy, specifically refers to a CPU size and a JVM size, so that the number of virtual machines of the second preset specification required for migrating the application to be migrated to the cloud platform can be determined according to a ratio of a sum of resource consumption of all container services to the second preset specification of the virtual machine.
In step S33, according to the determined number of virtual machines required and the number of conversion numbers corresponding to the second preset specification of the virtual machines, the number of physical servers required for migrating the application to be migrated to the cloud platform is obtained, wherein the number of conversion numbers corresponding to the second preset specification is obtained according to the mapping relationship between the preset virtual machine specification and the number of conversion numbers.
The mapping relationship between the virtual machine specification and the conversion number is preconfigured according to the specification of the physical server, and the conversion number refers to the number of virtual machines of each specification that can be supported by the physical server of the target specification.
The step is also similar, the conversion number corresponding to the second preset specification of the virtual machine can be determined based on the mapping relation, and then the ratio of the determined number of the required virtual machines to the conversion number is calculated, namely the number of the physical servers required for migrating the application to be migrated to the cloud platform.
In the embodiment of the present application, the specifications of the physical server may be various in practice, for example, the target specifications are: the number of CPUs of each physical server is 64 cores, and the memory assumes 256G for each physical server. Considering that the virtual machine is a process of the operating system of the physical machine, resources are robbed by the operating systems of the virtual machine and the physical machine, so that the CPU reserved for the operating system and the virtual machine needs to be 4 cores, the memory is 16G, the number of the CPU cores which can be provided is (64-4) =60 cores, and the memory is (256-16) =240G.
Assuming that the virtual machine specification is 8U16G specification (different specifications can be customized), according to CPU calculation, the number of virtual machines which can be supported by a physical server with a target specification is as follows: 60/8=7; according to memory calculation, the number of virtual machines which can be supported by a physical server with a target specification is as follows: 240/16=15. So one physical server can support 7 virtual machines of 8U16G specification. Similarly, other specifications of virtual machines may be calculated in a similar manner.
The number of virtual machines with different specifications, which can be supported by the physical server with the target specification, can be obtained through the above manner, and based on the number, a mapping relationship between the virtual machine specification and the converted number is established, which indicates how many virtual machines can be supported by one physical server for different virtual machine specifications, for example, table 3, which is a mapping relationship table listed in the embodiment of the present application:
TABLE 3 Table 3
Specification of specification | Conversion number |
4U8G | 15 |
8U16G | 7 |
16U32G | 3 |
… | … |
As shown in table 3, when the specification of the virtual machine is 4U8G, one physical server can support 15 virtual machines with the specification, and the conversion number is 15; when the specification of the virtual machine is 8U16G, one physical server can support 7 virtual machines with the specification, and the conversion number is 7; when the specification of the virtual machine is 16U32G, one physical server can support 3 virtual machines of the specification, the conversion number is 3, and so on.
The migration policies corresponding to different application classes in different modes will be described in detail below with reference to the manner of classifying application classes listed in table 1. Firstly introducing migration strategies corresponding to different application levels in a front-end + back-end + database mode, wherein for the application to be migrated in the mode, the resources in the migration strategies comprise physical servers or virtual machines, and the number of the resources is the number of the physical servers or the number of the virtual machines:
(one) high concurrency:
when the application concurrency of the application to be migrated is above 1000, the application level of the application to be migrated is high, that is, high concurrency. In this case, the migration policy specifies that the database of the application to be migrated, which is highly concurrent, is directly deployed on the physical server, which indicates that the migration location in the migration policy is the physical server, and in addition, sets the database to perform read-write separation, and each database needs 4 physical servers, and 1-write-3-read indicates that the number of resources in the migration policy is 4. The physical servers in the embodiment of the application all refer to physical servers of target specifications. When the application to be migrated has only one database, the number of physical servers required for migrating the application to be migrated to the cloud platform is 4.
Concurrence in (II):
when the application concurrency of the application to be migrated is between 100-1000, the application class of the migrated application is medium, i.e. medium concurrency. In this case, the migration policy specifies that the databases of the concurrent application to be migrated are directly deployed on the virtual machine, which means that the migration location in the migration policy is the virtual machine, and in addition, is also set to be read-write separation, each database needs 4 virtual machines of 16U32G, 1 reads 3 writes, which means that the number of resources in the migration policy is 4, where the virtual machine specification is 16U32G, that is, a first preset specification, which is determined based on the migration policy, and the specification and number of virtual machines required by one database when the databases of the concurrent application to be migrated are deployed on the virtual machine are specified in the migration policy, so that the number of required physical servers can be calculated according to the specification and number of virtual machines preset in the migration policy.
For example, when the relationship between the specification of the virtual machines and the conversion number is shown in table 3, it can be seen from table 3 that one physical server can convert 3 virtual machines with the specification of 16U32G, so that when one database needs to occupy 4 virtual machines with the specification of 16U32G, the number of the required physical servers is 2 (4/3=1.33≡2). That is, when an application to be migrated has only one database, the number of physical servers required to migrate the application to be migrated to the cloud platform is 2.
(III) low concurrency:
when the application concurrency of the application to be migrated is less than 100, the application level of the migrated application is low, that is, low concurrency. In this case, the migration policy specifies that databases used by the low-concurrency application to be migrated are deployed on the virtual machine, which indicates that the migration location in the migration policy is the virtual machine, and in addition, the virtual machine is set to be a primary HA and a secondary HA, so that each database needs 2 virtual machines of 16U32G, 1 primary and 1 secondary, which indicates that the number of resources in the migration policy is 2. Based on the specification and the number of the virtual machines preset in the migration policy, referring to the mapping relation table shown in table 3, the number of the required physical servers can be converted.
The number of physical servers required is: 2/3=0.67≡1. That is, when an application to be migrated has only one database, the number of physical servers required to migrate the application to be migrated to the cloud platform is 1.
It should be noted that, the above-listed migration policies for the application database to be migrated are also merely illustrative, and the virtual machine specification, the number of virtual machines and the like specified in the migration policies may depend on the actual situation, which is not specifically limited herein. As can be seen from the above embodiments, the higher the application level, the more physical server resources are required to be consumed when the application to be migrated is migrated to the cloud platform.
In the embodiment of the present application, application splitting needs to be performed according to application conditions, and migration policies corresponding to different application levels in a front end+middleware+back end mode are described below, where for an application to be migrated in such a mode, resources in the migration policies include container services, and the number of resources is that of container services:
(one) high concurrency:
when the application concurrency of the application to be migrated is above 1000, the application level of the application to be migrated is high, that is, high concurrency. Wherein each application component, such as the front end, may be served by multiple containers, polling is provided by load balancing. Assuming that in the case of high concurrency, the migration policy specifies that each high concurrency application to be migrated can use 10 copies of containers to be highly available, that is, 10 containers provide front-end services, in the mode that the application is divided into front-end+middleware+back-end, 30 container services are required in total, which means that resources in the migration policy are container services, and the number of resources is 30.
When the resource in the migration policy includes the container service, the migration policy further includes resource consumption of the container service. Assuming that a critical and high-access concurrent application is taken as an example, the resource consumption of the container service of one high-concurrency application preset in the migration policy is as follows: the CPU is 4-8 cores, and the JVM size is 8G-16G. According to the number of container services in the migration policy and the resource consumption of each container service, the CPU and memory size required by 30 container services can be determined to be about:
CPU:30 (4-8) cores, up to 240 cores;
JVM:30 (8-16) G, up to 480G, with a practical container content of about 500G.
Because the virtual machine needs to set up a certain overhead of CPU and memory for the operating system itself, each application needs 15 16C32G virtual machines, where 16C32G is the second preset specification specified in the migration policy. The number of virtual machines required can be estimated according to the number of systems, and the number of physical servers required can be further calculated.
Assuming that the concurrency of application in the cloud platform project is above 1000, there are 3 mechanisms and 24 application systems, so 24×15=360 virtual machines are required, and 360/3=120 physical servers are required. The mechanism refers to a department or tenant affiliated to the application system. Typically a department will have multiple application systems. Here, a department is illustrated with 8 application systems, and one application system corresponds to one application.
Therefore, for an application to be migrated, the number of physical servers required to migrate the application to be migrated to the cloud platform is: 15/3=5.
Concurrence in (II):
when the application concurrency of the application to be migrated is between 100-1000, the application class of the migrated application is medium, i.e. medium concurrency. In this case, the migration policy specifies that 8 copies of the concurrent application to be migrated may be available, and in a mode that the application is divided into front end+middleware+back end, a total of 24 container services are required, which means that the resources in the migration policy are container services, and the number of resources is 24.
Assuming that the concurrent application is taken as an example, the resource consumption of the container service of the concurrent application in one preset in the migration policy is as follows: the CPU is 2-4 cores, and the JVM size is 4G-8G. The CPU and memory size required for 24 container services at this time is approximately:
CPU:24 (2-4) cores, up to 96 cores;
JVM:30 (4-8) G, up to 192G, with an actual container content of about 200G.
Because the virtual machine needs to set up a certain overhead of CPU and memory for the operating system itself, each application needs 6 16C32G virtual machines, where 16C32G is the second preset specification specified in the migration policy. It is assumed that the concurrency of application in the cloud platform project is above 100-1000, there are 7 mechanisms, there are 28 application systems, and one mechanism has 4 application systems, so 28×6=168 virtual machines are required, and 168/3=56 physical servers are required.
For an application to be migrated, the number of physical servers required for migrating the application to be migrated to the cloud platform is as follows: 6/3=2.
(III) low concurrency:
when the application concurrency of the application to be migrated is above 1000, the application level of the application to be migrated is high, that is, high concurrency. In this case, the migration policy specifies that each low-concurrency application to be migrated adopts 6 copies to be available, and in the mode that the application is divided into front end+middleware+back end, 18 container services are required in total, which means that the resources in the migration policy are container services, and the number of resources is 18.
Assuming that low concurrency application is taken as an example, the resource consumption of the container service of one low concurrency application preset in the migration policy is as follows: the CPU is 1-2 cores, and the JVM size is 2G-4G. The CPU and memory size required for the 18 container service at this time is approximately:
CPU:18 (1-2) cores, up to 36 cores;
JVM:18 (2-4) G, up to 72G, the actual container content being about 100G.
Because the virtual machine needs to set up a certain overhead of CPU and memory for the operating system itself, each application needs 3 16C32G virtual machines, where 16C32G is the second preset specification specified in the migration policy. Assuming that the concurrency of the application is less than 100, there are 15 organizations, there are 30 application systems, and one organization has 2 application systems, so that a total of 30×3=90 virtual machines and a total of 90/3=30 physical servers are required.
For an application to be migrated, the number of physical servers required for migrating the application to be migrated to the cloud platform is as follows: 3/3=1.
It should be noted that, the above-listed migration policies for the application database to be migrated are also merely illustrative, and the number of container services specified in the migration policies, the virtual machine specification, etc. may be determined according to actual situations, and are not specifically limited herein. Also, as can be seen from the above embodiment, the higher the application level, the more physical server resources are required to be consumed when the application to be migrated is migrated to the cloud platform.
In the above embodiment, the number of physical servers required can be calculated according to the concurrency condition of the application to be migrated, and planning and estimation of capacity are supported. In addition, the number of the required physical servers can also be calculated according to the CPU service condition, the content service condition and the like of the application to be migrated, and the specific calculation mode is similar to the above process and is not repeated.
In an optional implementation manner, after the applications to be migrated are migrated to the cloud platform, the latest resource usage information of each application to be migrated can be continuously collected in real time; and dynamically adjusting the resources allocated to each application to be migrated on the cloud platform before according to the collected new resource use information.
Specifically, when resources allocated to each application to be migrated on the cloud platform before dynamic adjustment are dynamically adjusted according to the collected new resource usage information, the adjustment is performed on the resources allocated to the application to be migrated, where the application level of the resources is changed. Therefore, the application level of each application to be migrated needs to be redetermined according to the use interval to which the collected new resource use information belongs; if the application level of the application to be migrated changes, adjusting resources allocated to the application to be migrated on the cloud platform according to the migration strategy corresponding to the changed application level, for example, the number of resources in the migration strategy changes before and after the change of the application level.
In the embodiment of the application, the resource can be periodically adjusted according to the collected new resource use information. That is, when new resource usage information is collected, that is, the peak value of the resource usage information in a certain period is counted, the application level of each application to be migrated is redetermined according to the usage interval to which the resource usage information in the period belongs. After the application level changes, the allocation of the resources is adjusted according to the migration strategy corresponding to the changed application level.
For example, when the application concurrency of the application 1 to be migrated is reduced from low concurrency to medium concurrency in a certain period, the number of physical servers allocated to the application 1 to be migrated needs to be increased. Specifically, for the application 1 to be migrated, the application is in a front end+back end+database mode, before the change, the resources in the migration policy are virtual machines, and the number of the resources is 2, namely 2 virtual machines are needed for each database, and 1 physical server is needed for the corresponding 2 virtual machines; after the change, the resources in the migration policy are virtual machines, the number of the resources is 4, namely 4 virtual machines are needed for each database, and 2 physical servers are needed for the corresponding 4 virtual machines, so that the number of the physical servers allocated for the application 1 to be migrated needs to be increased from 1 to 2.
According to the above process, the application level of each application to be migrated may be changed, and new applications may be added to the cloud platform, so that the cloud platform may be expanded according to the method in the embodiment of the present application, in addition to the dynamic adjustment of the resources allocated to each application to be migrated.
Fig. 4 is a schematic architecture diagram of a full stack cloud platform according to an embodiment of the present application, which specifically includes a unified cloud pipe, a cloud native platform, and a plurality of Region clusters.
In a general case, the full stack cloud is divided into multiple Region clusters, and assuming that each Region tentatively has 200 physical server capacities, the multiple regions share a unified cloud pipe and a cloud native platform.
The unified cloud management is a unified portal platform and mainly comprises a plurality of cloud management nodes and monitoring nodes; the cloud native platform comprises a plurality of monitoring nodes and management nodes, and further comprises maintenance nodes.
In the embodiment of the application, a cloud platform management node, namely a cloud management node for short, is a cluster management node and is responsible for managing machines in a Region; the monitoring node refers to a resource monitoring report platform and is used for monitoring cloud platform resources; the management node is used for managing the cloud primordia and is a management control node for managing the cloud primordia; the maintenance node is responsible for the state maintenance of the cloud native.
Referring to fig. 5A, which is a Region part in fig. 4, in each Region cluster, a cluster controller (cloud platform management node) is required, and a plurality of computing nodes are added. The computing nodes are cloud platform computing node parts in fig. 5A, and the computing nodes comprise a plurality of computing nodes, namely nodes hatched by a host computer; and the cloud platform management node, namely the cloud platform management node physical and chemical deployment part in fig. 5A, which is positioned at the left side of the cloud platform computing node part and comprises a plurality of management nodes and middleware. Middleware herein refers to a cluster managed database and message queue nodes.
In addition, the cloud native service cluster part is further included, and in particular, referring to fig. 5B, in the embodiment of the present application, the cloud native service cluster part is mainly used for transforming an application program into a container service, where the cloud native service cluster is deployed on a virtual machine. As shown in fig. 5B, an application mainly includes a front end, a back end, and a DB (database) including a main DB and a standby DB, which are directly or indirectly deployed on a virtual machine. The storage pool is used for providing storage capacity for the cloud-native container service; node (Node) refers to a Node of hatching cloud prototheca service; the Master (control Node) refers to a cloud primary cluster management Node, the specification is 16C32G, the cloud primary service cluster shown in fig. 4 and fig. 5A and fig. 5B consists of 3 masters and a plurality of Node nodes, wherein each Node is operated with a plurality of Pods, and the Pods are abstracted to represent a group of application containers and resources shared by the containers. . Each Node is managed by a Master, while the Master automatically schedules Pod over the cloud native service cluster. The automatic scheduling of the Master takes into account the available resources on each Node.
Dividing tenants according to service conditions of user departments, constructing cloud primary service clusters by virtual machines under each tenant, estimating the number of management node virtual machines required by each tenant according to the service conditions, and further calculating the number of required physical servers.
In the embodiment of the application, the needed virtual machines can be calculated according to different migration strategies corresponding to the concurrency conditions of the application and the like, and the number of the needed physical servers can be calculated according to the virtualization capacity of the physical servers; and then calculating the cluster control number according to the divided Region number, and finally adding a unified cloud management and control node and a cloud primary management and control node, namely the total consumption of physical server resources of the whole stack cloud on migration. After the total consumption amount of the resources is estimated, corresponding resources are created and reserved according to the estimated resources, and preparation is made for migration cloud loading so as to realize subsequent migration cloud loading.
Referring to fig. 6, a complete flow chart of a method for migrating an application to a cloud platform is shown. The specific implementation flow of the method is as follows:
step S61: acquiring resource use information of each application to be migrated, which needs to be migrated to a cloud platform;
step S62: determining a use interval to which a peak value of resource use information of each application to be migrated belongs in a preset time period;
step S63: respectively taking the application grade corresponding to the use interval to which each resource use information belongs as the application grade of each application to be migrated;
step S64': for the application to be migrated in the front end+back end+database mode, determining the number of physical servers required for migrating each application to be migrated to the cloud platform according to the migration position and the resource number of the database in the migration strategy corresponding to the application to be migrated;
Step S64': for the application to be migrated in the front end, middleware and back end modes, determining the number of physical servers required for migrating each application to be migrated to the cloud platform according to the number of container services in the migration strategy corresponding to each application to be migrated;
step S65: creating and reserving corresponding resources in the cloud platform according to the acquired number of physical servers;
step S66: and migrating each application to be migrated to the cloud platform.
Fig. 7 is a schematic structural diagram of an apparatus 700 for migrating an application to a cloud platform according to an embodiment of the present application, which may include:
an information obtaining unit 701, configured to obtain resource usage information of each application to be migrated that needs to be migrated to the cloud platform;
a ranking unit 702, configured to determine an application ranking of each application to be migrated according to the resource usage information of each application to be migrated;
the estimating unit 703 is configured to obtain, according to migration policies corresponding to application levels of each application to be migrated, the number of physical servers required for migrating each application to be migrated to the cloud platform;
and the migration unit 704 is configured to migrate each application to be migrated to the cloud platform after creating and reserving corresponding resources on the cloud platform according to the acquired number of physical servers.
According to the embodiment of the application, before the application to be migrated is migrated to the cloud platform, the use condition of application resources is analyzed through the acquired resource use information of each application to be migrated, different application grades are divided for the application to be migrated, different migration strategies are formulated for the application to be migrated of different application grades, and different resources are allocated, so that the use condition of the resources can be estimated in advance in the whole cloud process of migration, the resource can be estimated conveniently in the whole cloud process of migration, guidance is provided for the cloud process of application migration, the cloud process of application migration is more convenient and efficient, and the method can be used for the subsequent cluster capacity expansion of the data center.
Optionally, the ranking unit 702 is specifically configured to:
determining a use interval to which resource use information of each application to be migrated belongs, wherein the use interval is divided in advance according to a preset threshold;
and respectively taking the application grade corresponding to the use interval to which each piece of resource use information belongs as the application grade of each application to be migrated, wherein the application grade corresponding to the use interval is higher as the range of the use interval is larger.
Optionally, the ranking unit 702 is specifically configured to:
And respectively taking the use interval of the peak value of the resource use information of each application to be migrated in the preset period as the use interval to which the resource information of each application to be migrated belongs.
Optionally, the migration policy includes resources and the number of resources allocated to the application to be migrated, where the resources or the number of resources in the migration policy corresponding to different application levels are different; the estimating unit 703 is specifically configured to:
if the resources in the migration policy comprise physical servers or virtual machines, determining the number of physical servers required for migrating the application to be migrated to the cloud platform according to the migration positions of the databases in the migration policy corresponding to the application to be migrated and the number of resources, wherein the migration positions represent the resources occupied when the databases of the application to be migrated are migrated to the cloud platform; or (b)
If the resources in the migration policy include container services, determining the number of physical servers required for migrating the application to be migrated to the cloud platform according to the number of container services in the migration policy corresponding to the application to be migrated, wherein the number of container services represents the number of container services required for migrating the application to be migrated to the cloud platform, and the higher the application level of the application to be migrated is, the larger the number of container services in the migration policy corresponding to the application level is.
Optionally, the resources in the migration policy include physical servers or virtual machines; the estimating unit 703 is specifically configured to:
if the migration position is a physical server, obtaining the number of physical servers required for migrating the application to be migrated to the cloud platform according to the number of physical servers required by each database preset in the migration strategy;
if the migration position is a virtual machine, the number of physical servers required for migrating the application to be migrated to the cloud platform is obtained according to the number of virtual machines required by each database preset in the migration strategy and the conversion number corresponding to a first preset specification of the virtual machine, wherein the conversion number corresponding to the first preset specification is obtained according to the mapping relation between the preset virtual machine specification and the conversion number.
Optionally, the resources in the migration policy include container services, and the migration policy further includes resource consumption of the container services; the estimating unit 703 is specifically configured to:
estimating the resource consumption required by all the container services according to the quantity of the container services in the migration strategy corresponding to the application to be migrated and the resource consumption of each container service;
determining the number of virtual machines with a second preset specification required for migrating the application to be migrated to the cloud platform according to the estimated resource consumption required by all the container services;
And obtaining the number of physical servers required for migrating the application to be migrated to the cloud platform according to the determined number of required virtual machines and the converted number corresponding to a second preset specification of the virtual machines, wherein the converted number corresponding to the second preset specification is obtained according to the mapping relation between the preset virtual machine specification and the converted number.
Optionally, the mapping relationship between the specification of the virtual machine and the converted number is preconfigured according to the specification of the physical server, and the converted number refers to the number of virtual machines of each specification that can be supported by the physical server of the target specification.
Optionally, the apparatus further comprises:
an updating unit 705, configured to collect new resource usage information of each application to be migrated in real time;
determining the application level of each application to be migrated again according to the usage interval to which the collected new resource usage information belongs;
and if the application level of the application to be migrated changes, adjusting the resources allocated to the application to be migrated on the cloud platform according to the migration strategy corresponding to the changed application level.
For convenience of description, the above parts are described as being functionally divided into modules (or units) respectively. Of course, the functions of each module (or unit) may be implemented in the same piece or pieces of software or hardware when implementing the present application.
Having described the method and apparatus for migrating applications to a cloud platform according to an exemplary embodiment of the present application, an electronic device according to another exemplary embodiment of the present application is described next.
Those skilled in the art will appreciate that the various aspects of the application may be implemented as a system, method, or program product. Accordingly, aspects of the application may be embodied in the following forms, namely: an entirely hardware embodiment, an entirely software embodiment (including firmware, micro-code, etc.) or an embodiment combining hardware and software aspects may be referred to herein as a "circuit," module "or" system.
Fig. 8 is a block diagram of an electronic device 800, according to an example embodiment, the apparatus comprising:
a processor 810;
a memory 820 for storing instructions executable by the processor 810;
wherein the processor 810 is configured to execute instructions to implement the steps of the method of migrating an application to a cloud platform in an embodiment of the present disclosure, such as the steps shown in fig. 2.
In an exemplary embodiment, a storage medium is also provided, such as a memory 820, including instructions executable by the processor 810 of the electronic device 800 to perform the above-described method. Alternatively, the storage medium may be a non-transitory computer readable storage medium, for example, a ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, and the like.
In an alternative embodiment, the instant application further provides a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The computer instructions are read from the computer-readable storage medium by a processor of a computer device, and executed by the processor, cause the computer device to perform the method of migrating an application to a cloud platform provided in the various alternative implementations of the embodiments described above.
In some alternative embodiments, aspects of the method for migrating an application to a cloud platform provided by the present application may also be implemented in the form of a program product comprising program code for causing a computer device to perform the steps in the method for migrating an application to a cloud platform according to various exemplary embodiments of the present application described herein above when the program product is run on a computer device, e.g. the computer device may perform the steps as shown in fig. 2.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The program product of embodiments of the present application may employ a portable compact disc read only memory (CD-ROM) and include program code and may run on a computing device. However, the program product of the present application is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with a command execution system, apparatus, or device.
The readable signal medium may include a data signal propagated in baseband or as part of a carrier wave with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with a command execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
While preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present application without departing from the spirit or scope of the application. Thus, it is intended that the present application also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.
Claims (13)
1. A method of migrating an application to a cloud platform, the method comprising:
acquiring resource use information of each application to be migrated, which needs to be migrated to a cloud platform;
determining the application grade of each application to be migrated according to the resource use information of each application to be migrated;
acquiring the number of physical servers required for migrating each application to be migrated to the cloud platform according to the migration strategy corresponding to the application level of each application to be migrated; the migration strategy comprises resources and the quantity of the resources which are distributed for the application to be migrated, and the resources or the quantity of the resources in the migration strategy corresponding to different application grades are different; the method specifically comprises the following steps of: if the resources in the migration policy comprise physical servers or virtual machines, determining the number of physical servers required for migrating the application to be migrated to the cloud platform according to the migration position of the database in the migration policy corresponding to the application to be migrated and the number of resources, wherein the migration position represents the resources occupied when the database of the application to be migrated is migrated to the cloud platform; or if the resources in the migration policy include container services, determining the number of physical servers required for migrating the application to be migrated to the cloud platform according to the number of container services in the migration policy corresponding to the application to be migrated, wherein the number of container services represents the number of container services required for migrating the application to be migrated to the cloud platform, and the higher the application level of the application to be migrated, the higher the number of container services in the migration policy corresponding to the application level;
And after creating and reserving corresponding resources on the cloud platform according to the acquired number of physical servers, migrating each application to be migrated to the cloud platform.
2. The method of claim 1, wherein the determining the application level of each application to be migrated according to the resource usage information of each application to be migrated specifically includes:
determining a use interval to which the resource use information of each application to be migrated belongs, wherein the use interval is divided in advance according to a preset threshold;
and respectively taking the application grade corresponding to the use interval to which each piece of resource use information belongs as the application grade of each application to be migrated, wherein the application grade corresponding to the use interval is higher as the range of the use interval is larger.
3. The method of claim 2, wherein the determining a usage interval to which the resource usage information of each application to be migrated belongs specifically includes:
and respectively taking the use interval of the peak value of the resource use information of each application to be migrated in the preset period as the use interval of the resource information of each application to be migrated.
4. The method of claim 1, wherein the resources in the migration policy comprise physical servers or virtual machines;
the determining, according to the migration position of the database in the migration policy corresponding to the application to be migrated, the number of physical servers required for migrating the application to be migrated to the cloud platform specifically includes:
if the migration position is a physical server, obtaining the number of physical servers required for migrating the application to be migrated to the cloud platform according to the number of physical servers required by each database preset in the migration strategy;
and if the migration position is a virtual machine, obtaining the number of physical servers required for migrating the application to be migrated to the cloud platform according to the number of virtual machines required by each database preset in the migration strategy and the conversion number corresponding to a first preset specification of the virtual machine, wherein the conversion number corresponding to the first preset specification is obtained according to the mapping relation between the preset virtual machine specification and the conversion number.
5. The method of claim 1, wherein the resources in the migration policy comprise container services, the migration policy further comprising resource consumption of container services;
The determining, according to the number of container services in the migration policy corresponding to the application to be migrated, the number of physical servers required for migrating the application to be migrated to the cloud platform specifically includes:
estimating the resource consumption required by all the container services according to the number of the container services in the migration strategy corresponding to the application to be migrated and the resource consumption of each container service;
determining the number of virtual machines with a second preset specification required for migrating the application to be migrated to the cloud platform according to the estimated resource consumption required by all container services;
and obtaining the number of physical servers required for migrating the application to be migrated to the cloud platform according to the determined number of required virtual machines and the converted number corresponding to a second preset specification of the virtual machines, wherein the converted number corresponding to the second preset specification is obtained according to a mapping relation between the preset virtual machine specification and the converted number.
6. The method of claim 4 or 5, wherein the mapping relationship between the virtual machine specification and the converted number is preconfigured according to the specification of the physical server, and the converted number refers to the number of virtual machines of each specification that can be supported by the physical server of the target specification.
7. The method of any one of claims 1-5, further comprising:
collecting new resource use information of each application to be migrated in real time;
determining the application level of each application to be migrated again according to the usage interval to which the collected new resource usage information belongs;
and if the application level of the application to be migrated changes, adjusting the resources allocated to the application to be migrated on the cloud platform according to the migration strategy corresponding to the changed application level.
8. An apparatus for migrating an application to a cloud platform, comprising:
the information acquisition unit is used for acquiring resource use information of each application to be migrated, which needs to be migrated to the cloud platform;
the grade dividing unit is used for determining the application grade of each application to be migrated according to the resource use information of each application to be migrated;
the estimating unit is used for acquiring the number of physical servers required by migrating each application to be migrated to the cloud platform according to the migration strategy corresponding to the application grade of each application to be migrated; the migration strategy comprises resources and the quantity of the resources which are distributed for the application to be migrated, and the resources or the quantity of the resources in the migration strategy corresponding to different application grades are different; the method is specifically used for any application to be migrated, and is specifically used for: if the resources in the migration policy comprise physical servers or virtual machines, determining the number of physical servers required for migrating the application to be migrated to the cloud platform according to the migration position of the database in the migration policy corresponding to the application to be migrated and the number of resources, wherein the migration position represents the resources occupied when the database of the application to be migrated is migrated to the cloud platform; or if the resources in the migration policy include container services, determining the number of physical servers required for migrating the application to be migrated to the cloud platform according to the number of container services in the migration policy corresponding to the application to be migrated, wherein the number of container services represents the number of container services required for migrating the application to be migrated to the cloud platform, and the higher the application level of the application to be migrated, the higher the number of container services in the migration policy corresponding to the application level;
And the migration unit is used for migrating each application to be migrated to the cloud platform after the cloud platform creates and reserves the corresponding resources according to the acquired number of the physical servers.
9. The apparatus of claim 8, wherein the ranking unit is specifically configured to:
determining a use interval to which the resource use information of each application to be migrated belongs, wherein the use interval is divided in advance according to a preset threshold;
and respectively taking the application grade corresponding to the use interval to which each piece of resource use information belongs as the application grade of each application to be migrated, wherein the application grade corresponding to the use interval is higher as the range of the use interval is larger.
10. The apparatus of claim 9, wherein the ranking unit is specifically configured to:
and respectively taking the use interval of the peak value of the resource use information of each application to be migrated in the preset period as the use interval of the resource information of each application to be migrated.
11. The apparatus according to any one of claims 8 to 10, further comprising:
the updating unit is used for collecting new resource use information of each application to be migrated in real time;
Determining the application level of each application to be migrated again according to the usage interval to which the collected new resource usage information belongs;
and if the application level of the application to be migrated changes, adjusting the resources allocated to the application to be migrated on the cloud platform according to the migration strategy corresponding to the changed application level.
12. An electronic device comprising a processor and a memory, wherein the memory stores program code that, when executed by the processor, causes the processor to perform the steps of the method of any of claims 1-7.
13. A computer readable storage medium, characterized in that it comprises a program code for causing an electronic device to perform the steps of the method according to any one of claims 1-7, when said program code is run on the electronic device.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010757876.6A CN111897654B (en) | 2020-07-31 | 2020-07-31 | Method and device for migrating application to cloud platform, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010757876.6A CN111897654B (en) | 2020-07-31 | 2020-07-31 | Method and device for migrating application to cloud platform, electronic equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111897654A CN111897654A (en) | 2020-11-06 |
CN111897654B true CN111897654B (en) | 2023-08-15 |
Family
ID=73182909
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010757876.6A Active CN111897654B (en) | 2020-07-31 | 2020-07-31 | Method and device for migrating application to cloud platform, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111897654B (en) |
Families Citing this family (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112330229B (en) * | 2020-12-02 | 2023-09-22 | 北京元心科技有限公司 | Resource scheduling method, device, electronic equipment and computer readable storage medium |
US20220334870A1 (en) * | 2021-04-16 | 2022-10-20 | International Business Machines Corporation | Automatic Container Migration System |
CN113342611B (en) * | 2021-06-18 | 2023-07-28 | 山东产研信息与人工智能融合研究院有限公司 | Method and system for precisely positioning virtual computing resources |
WO2023007237A1 (en) * | 2021-07-27 | 2023-02-02 | Hexaware Technologies Limited | System and method for batch and scheduler migration in an application environment migration |
CN113377784B (en) * | 2021-08-13 | 2021-12-03 | 成都市维思凡科技有限公司 | Data processing method, system and storage medium based on middleware |
CN116089358B (en) * | 2022-06-02 | 2023-11-24 | 荣耀终端有限公司 | Data migration method and electronic equipment |
CN115442262B (en) * | 2022-08-01 | 2024-02-06 | 阿里巴巴(中国)有限公司 | Resource evaluation method and device, electronic equipment and storage medium |
CN115269564B (en) * | 2022-09-28 | 2022-12-27 | 中国人寿保险股份有限公司上海数据中心 | Centralized creative migration method for large-scale system |
CN117135050B (en) * | 2023-10-26 | 2024-02-09 | 建信金融科技有限责任公司 | Application deployment method and device |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102281329A (en) * | 2011-08-02 | 2011-12-14 | 北京邮电大学 | Resource scheduling method and system for platform as a service (Paas) cloud platform |
CN102882908A (en) * | 2011-07-15 | 2013-01-16 | 易云捷讯科技(北京)有限公司 | Cloud computing management system and cloud computing management method |
CN106254166A (en) * | 2016-09-30 | 2016-12-21 | 中国银联股份有限公司 | A kind of cloud platform resource allocation method based on Disaster Preparation Center and system |
CN110134489A (en) * | 2018-02-08 | 2019-08-16 | 中兴通讯股份有限公司 | Using moving method and device, system, storage medium, using upper cloud tool |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130091285A1 (en) * | 2011-10-11 | 2013-04-11 | International Business Machines Corporation | Discovery-based identification and migration of easily cloudifiable applications |
US10379910B2 (en) * | 2012-10-26 | 2019-08-13 | Syntel, Inc. | System and method for evaluation of migration of applications to the cloud |
US9602598B2 (en) * | 2013-05-29 | 2017-03-21 | International Business Machines Corporation | Coordinating application migration processes |
-
2020
- 2020-07-31 CN CN202010757876.6A patent/CN111897654B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102882908A (en) * | 2011-07-15 | 2013-01-16 | 易云捷讯科技(北京)有限公司 | Cloud computing management system and cloud computing management method |
CN102281329A (en) * | 2011-08-02 | 2011-12-14 | 北京邮电大学 | Resource scheduling method and system for platform as a service (Paas) cloud platform |
CN106254166A (en) * | 2016-09-30 | 2016-12-21 | 中国银联股份有限公司 | A kind of cloud platform resource allocation method based on Disaster Preparation Center and system |
CN110134489A (en) * | 2018-02-08 | 2019-08-16 | 中兴通讯股份有限公司 | Using moving method and device, system, storage medium, using upper cloud tool |
Also Published As
Publication number | Publication date |
---|---|
CN111897654A (en) | 2020-11-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111897654B (en) | Method and device for migrating application to cloud platform, electronic equipment and storage medium | |
Baresi et al. | Towards a serverless platform for edge computing | |
CN107066319B (en) | Multi-dimensional scheduling system for heterogeneous resources | |
CN107430528B (en) | Opportunistic resource migration to optimize resource placement | |
CN103810023B (en) | The intelligent deployment method of Distributed Application and system in a kind of cloud platform | |
US9716746B2 (en) | System and method using software defined continuity (SDC) and application defined continuity (ADC) for achieving business continuity and application continuity on massively scalable entities like entire datacenters, entire clouds etc. in a computing system environment | |
Téllez et al. | A tabu search method for load balancing in fog computing | |
CN109257399B (en) | Cloud platform application program management method, management platform and storage medium | |
Boukerche et al. | A task-centric mobile cloud-based system to enable energy-aware efficient offloading | |
Teng et al. | Simmapreduce: A simulator for modeling mapreduce framework | |
Zou et al. | Design and implementation of hybrid cloud computing architecture based on cloud bus | |
CN116541134B (en) | Method and device for deploying containers in multi-architecture cluster | |
CN115134371A (en) | Scheduling method, system, equipment and medium containing edge network computing resources | |
Bohez et al. | Mobile, collaborative augmented reality using cloudlets | |
Baresi et al. | PAPS: A serverless platform for edge computing infrastructures | |
CN117435324B (en) | Task scheduling method based on containerization | |
CN107528871A (en) | Data analysis in storage system | |
JP2023541607A (en) | Automatic node interchangeability between compute nodes and infrastructure nodes in edge zones | |
Syrigos et al. | Optimization of Execution for Machine Learning Applications in the Computing Continuum | |
CN111796932A (en) | GPU resource scheduling method | |
Khalifa et al. | Towards a mobile ad-hoc cloud management platform | |
Fernández-Cerero et al. | Quality of cloud services determined by the dynamic management of scheduling models for complex heterogeneous workloads | |
Khan et al. | Efficient virtual machine scheduling in cloud computing | |
Chi et al. | A privacy and price-aware inter-cloud system | |
Christodoulopoulos et al. | Commodore: fail safe container scheduling in kubernetes |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |