Cloud platform upgrade method, device, equipment, cloud platform system and storage medium
By obtaining the target version of the cloud computing management platform to replace the current version and upgrading the service plug-in to match it with the target version of the cloud computing management platform, the existing cloud platform has solved the problem of high cost and high risk of upgrading, and achieved efficient and rapid cloud platform upgrades, reducing the upgrade cost and risk.
Patent Information
- Application Number
- CN202010507636.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-06-05
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2040-06-05
AI Technical Summary
The upgrade of existing cloud platforms is high and has high risks, mainly because the upgrade of OpenStack source code version involves a large number of changes in processes and algorithms, changes in functions and data structures, and modification of design patterns, resulting in high costs and greater risks in each upgrade.
A cloud platform upgrade method is proposed, by obtaining the target version of the cloud computing management platform, replacing the current version of the cloud computing management platform, and upgrading the service plug-in according to the target version of the cloud computing platform, so that it is suitable for the target version of the cloud computing management platform. This method relatively separates the cloud computing management platform and the virtualization management platform, and connects it through the plug-in layer to reduce the amount of upgraded source code modifications.
Through this method, you only need to simply replace the current version of the cloud computing management platform and lightweight modifications and upgrades to the corresponding service plug-ins, which significantly reduces the upgrade cost and risk, and can quickly complete the upgrade with as little manpower as possible, improve the upgrade efficiency, and maintain the leading function and performance of the cloud platform.
Smart Images

Figure CN113760313B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of communications, and specifically to a cloud platform upgrade method, device, equipment, cloud platform system and storage medium. Background Art
[0002] There are many cloud platforms on the market to meet various commercial and medical needs. For example, there are many enhanced cloud platforms based on OpenStack or compatible with OpenStack on the market. The reason for being based on OpenStack or compatible with OpenStack is that OpenStack brings a better ecosystem and faster docking functions. OpenStack is both a community, a project and an open source software. It provides open source software to build public and private clouds. It provides an operating platform for deploying clouds. Its purpose is to help organizations run clouds for virtual computing or storage services, and provide scalable and flexible cloud computing for public clouds, private clouds, large clouds and small clouds. CloudStack and OpenNebula also have similar features to OpenStack. The following is an example of a cloud platform based on OpenStack.
[0003] In the cloud platform architecture based on OpenStack, the cloud computing management function and virtualization management function of OpenStack are integrated and designed together. At present, the version of OpenStack open source software is upgraded every six months. The version naming rule is named in alphabetical order (ABCD...). The latest released version is Train. At present, the version of most commercial sites is Mitaka, which is 7 versions behind the latest version. The reason for such a large gap is that the workload of upgrading various cloud platforms based on OpenStack is very large. When upgrading the version of OpenStack source code, a large number of process and algorithm changes, function and data structure changes, and design pattern modifications will be involved. The modification of OpenStack source code involves about 20 million lines, so each upgrade will bring high costs and greater risks. Summary of the invention
[0004] The embodiments of the present invention mainly provide a cloud platform upgrade method, device, equipment, cloud platform system and storage medium, aiming to solve the problems of high cost and high risk in existing cloud platform upgrades.
[0005] To solve the above technical problems, an embodiment of the present invention provides a method for upgrading a cloud platform, wherein the cloud platform includes a cloud computing management platform and a virtualization management platform, and also includes a plug-in layer for connecting the cloud computing management platform and the virtualization management platform, wherein the plug-in layer includes at least one service plug-in;
[0006] The cloud platform upgrade method includes:
[0007] Obtain a target version of the cloud computing management platform to replace the current version of the cloud computing management platform; and upgrade at least one of the service plug-ins according to the target version of the cloud computing platform so that the upgraded service plug-in is compatible with the target version of the cloud computing management platform.
[0008] To solve the above technical problems, an embodiment of the present invention further provides an upgrade device for a cloud platform, wherein the cloud platform includes a cloud computing management platform and a virtualization management platform, and further includes a plug-in layer for connecting the cloud computing management platform and the virtualization management platform, wherein the plug-in layer includes at least one service plug-in;
[0009] The upgrade device of the cloud platform includes:
[0010] An acquisition module is used to acquire a target version of a cloud computing management platform;
[0011] An upgrade processing module is used to replace the current version of the cloud computing management platform with the target version of the cloud computing management platform, and to upgrade at least one of the service plug-ins according to the target version of the cloud computing platform, so that the upgraded service plug-in is compatible with the target version of the cloud computing management platform.
[0012] To solve the above technical problems, an embodiment of the present invention further provides a cloud platform system, including a cloud platform and an upgrade device;
[0013] The cloud platform includes a cloud computing management platform and a virtualization management platform, and also includes a plug-in layer connected to the cloud computing management platform and the virtualization management platform, and the plug-in layer includes at least one service plug-in;
[0014] The upgrading device comprises:
[0015] An acquisition module is used to acquire a target version of a cloud computing management platform;
[0016] An upgrade processing module is used to replace the current version of the cloud computing management platform with the target version of the cloud computing management platform, and to upgrade at least one of the service plug-ins according to the target version of the cloud computing platform, so that the upgraded service plug-in is compatible with the target version of the cloud computing management platform.
[0017] To solve the above technical problems, an embodiment of the present invention further provides an upgrade device for a cloud platform, comprising a processor, a memory, and a communication bus connecting the processor and the memory;
[0018] The memory stores a computer program, and the computer program can be executed by the processor to implement the steps of the cloud platform upgrade method as described above.
[0019] To solve the above technical problems, an embodiment of the present invention further provides a computer-readable storage medium, which stores a computer program. The computer program can be executed by a processor to implement the steps of the cloud platform upgrade method as described above.
[0020] The cloud platform upgrade method, device, equipment, cloud platform system and storage medium provided by the embodiment of the present invention, firstly, the architecture of the cloud platform provided by the embodiment of the present invention includes a cloud computing management platform and a virtualization management platform, and also includes a plug-in layer for docking the cloud computing management platform and the virtualization management platform, and the plug-in layer includes at least one service plug-in for realizing the docking of the cloud computing management platform and the virtualization management platform; that is, the embodiment of the present invention first provides a cloud platform with a new structure, in which the cloud computing management platform and the virtualization management platform are relatively separated architectures, and docking is realized through the plug-in layer; the cloud platform upgrade method includes: obtaining a target version of the cloud computing management platform to replace the current version of the cloud computing management platform; and upgrading at least one of the service plug-ins in the plug-in layer according to the target version of the cloud computing platform, so that the upgraded service plug-in is compatible with the target version of the cloud computing management platform; so that the upgraded plug-in layer can normally realize the docking between the target version of the cloud computing management platform and the underlying virtualization management platform; this upgrade method only needs to simply replace the current version of the cloud computing management platform, and only needs to modify and upgrade the corresponding service plug-ins, which can greatly reduce the upgrade cost and risk, can quickly complete the upgrade with as little manpower as possible, improve the upgrade efficiency, and maintain the leading function and performance of the cloud platform.
[0021] Other features and corresponding beneficial effects of the present invention are described in the latter part of the specification, and it should be understood that at least part of the beneficial effects become obvious from the description in the specification of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 Schematic diagram of the cloud platform structure provided in Example 1 of the present invention Figure 1 ;
[0023] Figure 2 Schematic diagram of the cloud platform structure provided in Example 1 of the present invention Figure 2 ;
[0024] Figure 3 Schematic diagram of the cloud platform structure provided in Example 1 of the present invention Figure 3 ;
[0025] Figure 4A schematic diagram of a cloud platform upgrade method flow chart provided in Embodiment 1 of the present invention;
[0026] Figure 5 A schematic diagram of the cloud platform architecture based on OpenStack provided in the first embodiment of the present invention;
[0027] Figure 6 A schematic diagram of the cloud platform architecture of CloudStack provided in the first embodiment of the present invention;
[0028] Figure 7 A schematic diagram of the front-end interface upgrade process provided in the first embodiment of the present invention;
[0029] Figure 8 A schematic diagram of the structure of an upgrade device for a cloud platform provided in Embodiment 2 of the present invention;
[0030] Fig. 9 A schematic diagram of the process of creating a virtual machine on a cloud platform provided in the second embodiment of the present invention;
[0031] Fig.10 A schematic diagram of the process of importing an image on a cloud platform provided in the second embodiment of the present invention;
[0032] Fig.11 A schematic diagram of a process of modifying a virtual machine affinity group on a cloud platform provided in Embodiment 2 of the present invention;
[0033] Fig.12 A schematic diagram of the process of creating a security group on a cloud platform provided in the second embodiment of the present invention;
[0034] Fig.13 A schematic diagram of the process of creating a cloud hard disk on a cloud platform provided in the second embodiment of the present invention;
[0035] Fig.14 This is a schematic diagram of the upgrade device structure of the cloud platform provided in Example 3 of the present invention. DETAILED DESCRIPTION
[0036] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the embodiments of the present invention are further described in detail below through specific implementation methods combined with the accompanying drawings. It should be understood that the specific embodiments described here are only used to explain the present invention and are not used to limit the present invention.
[0037] Embodiment 1:
[0038] The specific implementation of the present invention is further described in detail below in conjunction with the accompanying drawings and implementation examples.
[0039] In the cloud platform architecture in the related technology, the cloud computing management function and the virtualization management function are designed to be integrated. As a result, the cloud platform source code will involve a large number of changes in processes and algorithms, changes in functions and data structures, and modifications to design patterns when upgrading the version. The modification of the cloud platform source code involves about 20 million lines, so each upgrade will have high costs and greater risks. This embodiment provides a new cloud platform architecture, please refer to Figure 1 As shown, the cloud platform includes a cloud computing management platform and a virtualization management platform, and also includes a plug-in layer for docking the cloud computing management platform and the virtualization management platform, and the plug-in layer includes at least one service plug-in for realizing the docking between the cloud computing management platform and the virtualization management platform. That is, the cloud platform architecture provided by this embodiment relatively separates the cloud computing management platform and the virtualization management platform, and realizes the docking through the plug-in layer. In this way, when the cloud platform is upgraded, the target version of the cloud computing management platform can be directly obtained, and the current version of the cloud computing management platform can be replaced with the obtained target version of the cloud platform, and the replacement basically does not involve the modification of the source code; and according to the target version of the cloud computing platform, at least one of the service plug-ins included in the plug-in layer is upgraded, so that the upgraded plug-in layer can normally realize the docking between the target version of the cloud computing management platform and the underlying virtualization management platform. The upgrade method provided in this embodiment only requires a simple replacement of the current version of the cloud computing management platform and only requires modification and upgrading of the corresponding service plug-ins. The modification and upgrading of the service plug-ins is a lightweight upgrade, which only involves modification of about 100,000 lines of source code. Compared with the direct modification of the OpenStack source code involving about 20 million lines of code, it can greatly reduce the upgrade cost and risk, and can quickly complete the upgrade with as little manpower as possible, thereby improving the upgrade efficiency.
[0040] It can be seen that through the cloud platform upgrade method provided in this embodiment, the cloud platform can be upgraded based on the rapid upgrade of plug-ins. By adjusting a small amount of plug-in code, the target version of the cloud computing management platform can be quickly upgraded to maintain the leading functions and performance of the cloud platform.
[0041] For an example, see Figure 2 As shown, the plug-in layer for connecting the cloud computing management platform and the virtualization management platform may include but is not limited to at least one of a computing service plug-in, a storage service plug-in, and a network service plug-in. Each service plug-in can realize the data structure conversion and interface call of the corresponding service. For example, the computing service plug-in corresponds to the computing service of the cloud platform open source software, the storage service plug-in corresponds to the storage service of the cloud platform open source software, and the network service plug-in corresponds to the network service of the cloud platform open source software. It should be understood that the service plug-ins specifically included in the plug-in layer of the cloud platform in this embodiment are not limited to the several service plug-ins in the above examples, and can be flexibly set according to the type of cloud platform and the needs of specific application scenarios. For example, in Figure 3 In the cloud platform architecture shown, the plug-in layer may also include at least one of an image service plug-in and an authentication service plug-in.
[0042] This embodiment is based on Figure 1 For the cloud platform upgrade method provided by the cloud platform architecture shown in the figure, please refer to Figure 4 As shown, including:
[0043] S401: Obtain a target version of a cloud computing management platform to replace a current version of a cloud computing management platform.
[0044] S402: According to the target version of the cloud computing platform, at least one of the service plug-ins is upgraded so that the upgraded service plug-in is compatible with the target version of the cloud computing management platform.
[0045] It should be understood that the execution sequence of the above steps S401 and S402 is not strictly limited, and S401 can be executed first, and then S402; S402 can also be executed first, and then S401, or S401 and S402 can be executed simultaneously. In addition, it should be understood that in S402 of this embodiment, according to the target version of the cloud computing platform, upgrading at least one of the service plug-ins may include but is not limited to:
[0046] Obtain a target service plug-in generated according to the difference between the current version of the cloud computing management platform and the target version of the cloud computing management platform, and upgrade the service plug-in in the plug-in layer through the target service plug-in, for example, upgrade the corresponding service plug-in to the target service plug-in. That is, in one example, the generation of the target service plug-in is generated according to the difference between the current version of the cloud computing management platform and the target version of the cloud computing management platform. Therefore, each time the cloud platform is upgraded, the number and type of the generated target service plug-ins may be the same as or different from the number and type of the target service plug-ins generated in the last upgrade, and which service plug-ins need to be upgraded can be determined based on the specific differences between the current version of the cloud computing management platform and the target version of the cloud computing management platform. At least it is required to meet the requirement that the service plug-ins in the plug-in layer after the upgrade can realize the normal docking between the current version of the cloud computing management platform and the target version of the cloud computing management platform. It should also be understood that, in this embodiment, when upgrading the service plug-in in the plug-in layer, it may include updating the existing service plug-ins in the plug-in layer (the updating method may include but is not limited to directly replacing the current service plug-in with the corresponding target service plug-in, or modifying and upgrading a part of the code of the current service plug-in), and may also include adding new service plug-ins to the plug-in layer or deleting some existing service plug-ins in the plug-in layer as needed.
[0047] For example, in some examples, when the plug-in layer for connecting the cloud computing management platform and the virtualization management platform includes a computing service plug-in, a storage service plug-in, and a network service plug-in, the target service plug-in generated according to the difference between the current version of the cloud computing management platform and the target version of the cloud computing management platform can include at least one of the target computing service plug-in, the target storage service plug-in, and the target network service plug-in. For another example, when the plug-in layer for connecting the cloud computing management platform and the virtualization management platform includes a computing service plug-in, an image service plug-in, an authentication service plug-in, a storage service plug-in, and a network service plug-in, the target service plug-in generated according to the difference between the current version of the cloud computing management platform and the target version of the cloud computing management platform can include at least one of the target computing service plug-in, the target image service plug-in, the target authentication service plug-in, the target storage service plug-in, and the target network service plug-in. Which service plug-ins need to be upgraded each time the cloud platform is upgraded, and which specific contents of the service plug-ins need to be upgraded (that is, which codes need to be modified or added when generating the corresponding target service plug-in) can be flexibly determined according to the specific application scenario. In other application scenarios, when the target version of the cloud computing management platform itself contains corresponding plug-ins (such as computing service plug-ins, image service plug-ins, authentication service plug-ins, storage service plug-ins, and network service plug-ins), the corresponding plug-in code can also be directly extracted from the target version of the cloud computing management platform as the corresponding target service plug-in. In this case, it is not necessary to obtain the target service plug-in generated according to the difference between the current version of the cloud computing management platform and the target version of the cloud computing management platform.
[0048] For ease of understanding, this embodiment is described below using the example that the cloud computing management platform can be various open source cloud computing management platforms, such as but not limited to at least one of OpenStack, CloudStack, and OpenNebula. It should be understood that in some application scenarios, a cloud platform may include only one of OpenStack, CloudStack, and OpenNebula; of course, in other application scenarios, a cloud platform may also be compatible with at least two of OpenStack, CloudStack, and OpenNebula. It can be flexibly set according to the needs of specific application scenarios.
[0049] In this embodiment, OpenStack is an open source cloud computing management platform project, which is a combination of a series of software open source projects. It is an open source code project jointly developed and initiated by NASA (National Aeronautics and Space Administration) and Rackspace, and authorized by the Apache License (a free software license issued by the Apache Software Foundation).
[0050] CloudStack is an open source cloud computing platform with high availability and scalability, and is also an open source cloud computing solution. It can accelerate the deployment, management, and configuration of highly scalable public and private clouds (IaaS). Using CloudStack as a foundation, data center operators can quickly and easily create cloud services through existing infrastructure.
[0051] OpenNebula is an open source system specially designed for cloud computing. Users can use virtualization software such as Xen, KVM, VMware, etc. to build enterprise clouds. OpenNebula can be used to easily build private clouds, hybrid clouds, and public clouds.
[0052] For example, in one example, the cloud computing management platform included in the cloud platform may be OpenStack, that is, the cloud platform is an OpenStack-based cloud platform. The OpenStack open source project is maintained by the community, and the corresponding open source software mainly includes a collection of components such as computing services (code-named Nova), block storage services (code-named Cinder), image services (code-named Glance), network services (code-named Neutron), and authentication services (code-named Keystone). The core resource is the virtual machine, and Nova is responsible for creating the virtual machine, Glance provides the virtual machine with an image, Neutron provides the virtual machine with the network used, Cinder provides the cloud hard disk, and Keystone is responsible for authenticating all operations. For the cloud platform architecture based on OpenStack in this embodiment, please refer to Figure 5As shown, a front-end interface is set up in the upper layer of OpenStack (i.e., cloud computing management platform) (the front-end interface is not the dashboard that comes with OpenStack, but is set up additionally), and the front-end interface can be used for, but not limited to, calling the OpenStack interface to complete the demand issuance and data display. A virtualization management platform is set up in the lower layer of OpenStack, and the part between OpenStack and the virtualization management platform is a plug-in layer including a service plug-in. The service plug-in in the plug-in layer sends the demand sent to OpenStack to the underlying virtualization management platform through data structure conversion and interface call, and the underlying platform completes the specific virtual machine creation, virtual switch configuration, image preservation, etc. In this embodiment, the service plug-in corresponding to the setting in the plug-in layer can be divided into nova plugin (i.e., computing service plug-in), cinder plugin (i.e., block storage service plug-in, i.e., a storage service plug-in), glance plugin (i.e., image service plug-in) and neutron plugin (i.e., network service plug-in) according to the service of OpenStack, and each plug-in is responsible for the data structure conversion and interface call of the corresponding service. In addition, in some examples, in addition to docking the virtualization management platform, the neutron plugin can also dock the network equipment of a third party, and the network equipment of the third party can provide it with services such as load balancing vFW or firewall vLB. In this example, when the cloud computing management platform includes OpenStack, the target service plug-in generated according to the difference between the current version of the cloud computing management platform and the target version of the cloud computing management platform may include a target computing service plug-in, a target image service plug-in, a target storage service plug-in, and a target network service plug-in.
[0053] For another example, the cloud computing management platform included in the cloud platform may be CloudStack, that is, the cloud platform is a CloudStack-based cloud platform. The open source software corresponding to CloudStack mainly includes a collection of components such as computing services (compute), storage services (storage), and network services (network). The core resource is the virtual machine, which is created by compute, provided by network, and provided by storage. The cloud platform architecture based on CloudStack in this embodiment can be found in Figure 6As shown, a front-end interface is set up in the upper layer of CloudStack (i.e., cloud computing management platform) (the front-end interface is not CloudStack itself, but is set up additionally), and the front-end interface can be used for, but not limited to, calling the CloudStack interface to complete the demand issuance and data display. A virtualization management platform is set up in the lower layer of CloudStack, and the part between CloudStack and the virtualization management platform is a plug-in layer including service plug-ins. The service plug-ins in the plug-in layer send the demand sent to CloudStack to the underlying virtualization management platform through data structure conversion and interface call, and the underlying platform completes the specific virtual machine creation, virtual switch configuration, etc. In this embodiment, the service plug-ins set up in the plug-in layer can be divided into compute plugin (i.e., computing service plug-in), storage plugin (i.e., storage service plug-in) and network plugin (i.e., network service plug-in) according to the services of CloudStack, and each plug-in is responsible for the data structure conversion and interface call of the corresponding service. In addition, in some examples, in addition to docking the virtualization management platform, the network plugin can also dock the network equipment of a third party, and the network equipment of the third party can provide it with services such as load balancing vFW or firewall vLB. In this example, when the cloud computing management platform includes CloudStack, the target service plug-in generated according to the difference between the current version of the cloud computing management platform and the target version of the cloud computing management platform may include a target computing service plug-in, a target storage service plug-in, and a target network service plug-in. Figure 5 and Figure 6 The architecture shown is similar and will not be repeated here.
[0054] In this embodiment, the corresponding target service plug-in can be generated by modifying the service plug-in. At this time, only the code of the service plug-in needs to be adjusted and modified accordingly, mainly involving the modification of function parameter changes, the adaptation of some data structure changes, and the corresponding adjustment of interface extension mode changes. Compared with the modification of OpenStack, CloudStack or OpenNebula source code during version upgrades (a large number of changes in processes and algorithms, changes in functions and data structures, and modifications in design patterns), these modifications of the plug-in are relatively lightweight and can be quickly upgraded with a small amount of manpower.
[0055] For example, in one example of this embodiment, when the target service plug-in includes a target image service plug-in, the generated target image service plug-in may include, but is not limited to: image driver information corresponding to the target version of the cloud computing management platform and an image library capacity acquisition code;
[0056] The image driver information includes the image driver name corresponding to the target version of the cloud computing management platform, so that the image driver corresponding to the target version of the cloud computing management platform can be avoided from being identified as an invalid driver in subsequent calls; the image library capacity acquisition code is used for calling to obtain the image library capacity.
[0057] For another example of this embodiment, when the target service plug-in includes a target computing service plug-in, the target computing service plug-in may include but is not limited to: a build_and_run_instance code corresponding to the computing service plug-in driver of the target version of the cloud computing management platform to build and run the instance; the build_and_run_instance code is used for calling to convert the parameter data structure into a parameter data structure compatible with the computing service plug-in driver of the target version of the cloud computing management platform.
[0058] For another example, in this embodiment, when the target service plug-in includes a target computing service plug-in, the target computing service plug-in may include but is not limited to: interface implementation method description information and interface controller implementation location description information corresponding to the interface; wherein the interface implementation method description information and the interface controller implementation location description information corresponding to the interface can be used for calling the corresponding interface to send the corresponding task (for example, it may be but is not limited to modifying the affinity group task) to the virtualization management platform.
[0059] For another example, in some examples of this embodiment, when the target service plug-in includes a target network service plug-in, the security group network driver of the target network service plug-in does not include a function for creating and obtaining a tenant id (i.e., a get_tenant_id_for_create function) to correspond to the network service plug-in corresponding to the target version of the cloud computing management platform. For example, when the current OpenStack is version M and the target OpenStack version is version P, the security group network driver of the target network service plug-in does not include the get_tenant_id_for_create function, thereby avoiding the security group network driver of the target network service plug-in reporting an error after upgrading to the OpenStack version.
[0060] For another example, in some examples of the present embodiment, when the input parameters of the create_volume function of the current version of the cloud computing management platform are different from the input parameters of the create_volume function of the target version of the cloud computing platform, the target service plug-in may include a target storage service plug-in, and the input parameters of the create_volume function of the target storage service plug-in correspond to the input parameters of the create_volume function of the target version of the cloud computing management platform, thereby avoiding errors in subsequent calls.
[0061] In this embodiment, when the cloud computing management platform (such as at least one of OpenStack, CloudStack and OpenNebula) of the cloud platform is directly replaced and upgraded, if the presentation layer state conversion REST API version in the target version of the cloud computing management platform is different from the REST API version in the current version of the cloud computing management platform (that is, it involves the change of the REST API version number), please refer to Figure 7 As shown, the cloud platform upgrade method in this embodiment also includes:
[0062] S701: Obtain a target front-end interface generated according to a presentation layer state conversion REST API version in a target version of a cloud computing management platform.
[0063] S702: Upgrading the current front-end interface according to the target front-end interface.
[0064] For example, for a cloud platform based on OpenStack, if you want to upgrade OpenStack, if it involves a change in the version number of the REST API, you can only modify the code of the corresponding service plug-in to generate the corresponding target service plug-in to complete the upgrade adaptation. Compared with modifying the OpenStack source code of about 20 million lines, it will be much easier to modify the plug-in code of about 100,000 lines; if it involves a change in the REST API version number, such as changing from v1 to v2, you can modify the code of the front-end interface to complete the upgrade adaptation while modifying the code of the corresponding service plug-in to generate the corresponding target service plug-in. Compared with the source code scale of OpenStack, the scale of the front-end interface code is also very small. That is, the cloud platform upgrade method provided in this embodiment can realize the upgrade of the cloud platform based on the rapid upgrade of the plug-in. By adjusting a small amount of plug-in code, the upgrade of the target version of the cloud computing management platform can be quickly realized, and the functions and performance of the cloud platform can be kept leading.
[0065] Embodiment 2:
[0066] For ease of understanding, this embodiment further provides a cloud platform upgrade device based on the above embodiment. The cloud platform architecture of this embodiment can adopt but is not limited to the cloud platform architecture illustrated in the above embodiment. Figure 8 As shown, the cloud platform upgrade device provided in this embodiment includes:
[0067] The acquisition module 801 is used to acquire the target version of the cloud computing platform; the acquisition of the target version of the cloud computing platform is shown in the above embodiment, and will not be repeated here. It should be understood that the function of the acquisition module 801 in this embodiment can be implemented by, but not limited to, the processor in the corresponding upgrade device.
[0068] The upgrade processing module 802 is used to replace the current version of the cloud computing management platform according to the acquired target version of the cloud computing platform, and to upgrade at least one of the service plug-ins according to the target version of the cloud computing platform, so that the upgraded service plug-in is compatible with the target version of the cloud computing management platform.
[0069] The method of replacing the current version of the cloud computing management platform according to the acquired target version of the cloud computing platform, as well as the generation and acquisition of the target service plug-in and the upgrading of the service plug-in in the plug-in layer through the target service plug-in, can be seen in the above embodiment, and will not be repeated here. It should be understood that the function of the upgrade processing module 802 in this embodiment can be implemented by, but not limited to, the processor in the corresponding upgrade device.
[0070] This embodiment also provides a cloud platform system, including a cloud platform and an upgrade device, wherein the cloud platform can adopt but is not limited to the cloud platform architecture illustrated in the above embodiment, and the upgrade device can adopt but is not limited to Figure 8 Upgrade unit shown.
[0071] For ease of understanding, this embodiment is described below by taking the upgrade process of an OpenStack-based cloud platform (that is, the cloud computing management platform included in the cloud platform is OpenStack) as an example.
[0072] See also Figure 5 The overall architecture diagram of the cloud platform product shown includes: front-end interface, OpenStack, plug-in layer, virtualization management platform and third-party vFW / vLB.
[0073] The front-end interface (Iros is used in this example, but it should be understood that other types of front-end interfaces can also be used) is used to display the usage of various resources of the current cloud platform to users, and to facilitate the allocation of virtual machines, networks, and disks to users. These functions are completed by calling the OpenStack interface; OpenStack is an open source project for managing virtual resources. Here it is mainly used to provide tenant isolation, network function enhancement, and resource management data organization for the underlying virtualization cloud platform; the plug-in layer mainly includes nova plugin to complete computing-related functions, cinder plugin to complete block storage-related functions, glance plugin to complete image-related functions, and neutron plugin to complete network-related functions; the bottom layer is the virtualization management platform (iECS is used in this example, but it should be understood that other types of virtualization management platforms can also be used), which completes the specific implementation of virtual machines, storage, and some network functions. In addition, some network functions may be provided by third parties, such as vLB and vFW, which provide load balancing and firewall functions respectively.
[0074] For ease of understanding, this embodiment is described by taking the current (i.e., before upgrade) OpenStack version as version M and the upgraded (i.e., after upgrade) OpenStack version as version P as an example.
[0075] In this example, when creating a virtual machine on the front-end interface, the OpenStack interface is called. The nova-api (computing api) service receives the request, parses the request message and sends it to the nova-conductor service to write the library, and then sends it to the nova-scheduler (computing scheduler) to select a suitable computing node. Finally, it goes to the compute_manager (computing plug-in manager) in the nova-compute (computing background service) service to complete the specific creation action. The corresponding code is nova / compute / manager.py.
[0076] Therefore, during the upgrade process, the current (i.e., before the upgrade) OpenStack version is replaced with the P version of OpenStack, and the function _build_and_run_instance in the nova-compute service code manager.py can be rewritten through the plug-in code iecs_manager.py (that is, the upgrade of the target computing service plug-in containing build_and_run_instance is completed, as shown in the above embodiment. One implementation method can be to first generate the target computing service plug-in containing build_and_run_instance, and then replace the old version of the computing service plug-in with the target computing service plug-in), completing the customized development of the open source code. In this example, the extended compute_manager class function of nova itself is specifically utilized. The reason why build_and_run_instance is rewritten here is that the parameter data structure of calling the driver has been changed in the corresponding P version of OpenStack compared to the M version of OpenStack. The build_and_run_instance code in the upgraded target computing service plug-in can be called to convert the parameter data structure into a parameter data structure that is compatible with the driver of the computing service plug-in of the P version of OpenStack to avoid subsequent errors. Therefore, the data structure can be adjusted here and then passed to the subsequent driver, which calls the interface of the underlying virtualization management platform to send down relevant tasks (for example, including but not limited to virtual machine creation tasks).
[0077] Here you can see that when OpenStack M version is upgraded to P version, the function of creating a virtual machine only needs to modify the _build_and_run_instance code in iecs_manager.py and driver to make the product adapt to the new version of OpenStack.
[0078] After the above upgrade, the process of creating a virtual machine on the cloud platform in the above example can be found in Fig. 9 As shown, including:
[0079] S901: Send a request to create a virtual machine to the nova api through the Iros front-end interface.
[0080] S902: Nova API selects a computing node according to the rule request.
[0081] S903: nova-scheduler returns the computing node to nova api.
[0082] S904: nova-scheduler sends a request to create a virtual machine to nova-compute.
[0083] S905: nova-compute's iecs_manager obtains resources such as images and networks, converts parameters into data structures applicable to iecs, and calls iecs dirver.
[0084] S906: iecs directory sends a virtual machine creation task to iecs.
[0085] S907: IECS returns the interface call result to IECS dirver.
[0086] S908: iecs dirver returns the interface call result to iecs_manager.
[0087] In this example, when uploading an image through the front-end interface, the OpenStack interface is called three times. The first operation completes the image database write operation, the second operation completes the image data upload operation, and the third operation completes the image metadata modification operation. The first and third operations only modify the OpenStack database without going through the plug-in layer and will not be sent to the underlying virtualization management platform. This type of interface operation can be used directly without modification every time OpenStack is upgraded.
[0088] However, the second image data upload operation needs to be passed to the bottom layer through the plug-in layer. The plug-in layer is set with a driver to handle the task of uploading image data. Since the extended driver is modified when the OpenStack M version is upgraded to the P version, after the OpenStack upgrade, the glance-api (image storage API) service startup will report an error that the newly added driver is invalid. Therefore, it is necessary to upgrade the glance_store / backend.py file in the image service plug-in. For example, you can add code to the glance_store / backend.py file and add the image driver name corresponding to the P version of OpenStack to the valid driver. In this way, the image driver corresponding to the P version of OpenStack will not be recognized as invalid in subsequent calls. After modifying this point, the glance-api service will still report an error when restarting. The error content is that the actual image library capacity has not been obtained. Therefore, during the upgrade, you can also add an image library capacity acquisition code to the backend.py code in the image service plug-in to obtain the image library capacity for calling to obtain the image library capacity. After the addition, the glance-api startup will not report an error. In the above-mentioned image service plug-in upgrade process, referring to the above-mentioned embodiment, one implementation method may be to first generate a target image service plug-in including the modified glance_store / backend.py file, and then replace the old version of the image service plug-in with the target image service plug-in.
[0089] Here you can see that to upgrade OpenStack M to P, you can import images by simply modifying the code in glance_store / backend.py in the image service plug-in to adapt the product to the new version of OpenStack.
[0090] After the above upgrade, please refer to the process of importing the image on the cloud platform in the above example. Fig.10 As shown, including:
[0091] S101: Send a request to create an image to the glance API through the Iros front-end interface.
[0092] S102: glance api returns the result of calling the interface to Iros.
[0093] S103: Send an image upload request to the glance API through Iros.
[0094] S104: glance api sends the task to glance store.
[0095] S105: The IECS backend of the glance store selects a suitable IECS directory and uploads the image to the specified location.
[0096] S106: IECS dirver sends the image creation task to IECS.
[0097] S107: IECS returns the interface call result to IECS dirver.
[0098] S108: IECS driver returns the interface call result to IECS backend.
[0099] S109: Send an image modification request to the glance API through Iros.
[0100] S1010: glance api returns the interface call result to Iros.
[0101] In this example, when the virtual machine affinity group is modified through the front-end interface, the OpenStack interface is called once. This is a transparent interface. The function of the interface is to send the task of modifying the affinity group to the underlying virtualization management platform for implementation. All the codes implemented by the interface are custom developed. The part involving the OpenStack source code is the modification of the database operation. This type of interface generally does not change after the OpenStack upgrade, so there is no need to adjust this part of the code.
[0102] However, after the OpenStack M version is upgraded to the P version, the interface extension method changes, so corresponding code adjustments need to be made. For example, for such extension interfaces in the old version, you only need to place the code file in the appropriate location, but the new version needs to describe the interface method and the corresponding interface controller implementation location in detail in the code at the following location nova / api / openstack / compute / router.py. Therefore, an example upgrade method may be, but is not limited to: first generate a target computing service plug-in, and the code of nova / api / openstack / compute / router.py of the target computing service plug-in includes the interface implementation method description information and the interface controller implementation location description information corresponding to the interface, so as to facilitate subsequent calls to the corresponding interface to send tasks to the virtualization management platform; then replace the old version of the computing service plug-in with the target computing service plug-in. It should be understood that the target computing service plug-in in this example can be upgraded in one upgrade process with the target computing service plug-in in the above example.
[0103] Here you can see that to upgrade OpenStack version M to version P and modify the function of the virtual machine affinity group, you only need to modify the router.py code of the Compute service plug-in to make the product adapt to the new version of OpenStack.
[0104] After the upgrade, see the procedure for modifying the affinity group of a virtual machine on the cloud platform in the example above. Fig.11 As shown, including:
[0105] S1101: Send a request to modify the virtual machine affinity group to the router.py of wsgi Web through Iros.
[0106] S1102: The router.py of wsgi Web routes to the correct nova api interface.
[0107] S1103: nova api parses parameters and sends a request to the nova compute service.
[0108] S1104: Nova compute's IECS manager converts the parameters into data structures applicable to IECS and calls IECSdirver.
[0109] S1105: IECS dirver sends the task to IECS.
[0110] S1106: IECS returns the interface call result to IECS dirver.
[0111] S1107: IECS dirver returns the interface call result to IECS manager.
[0112] S1108: IECS Manager returns the interface call result to Nova API.
[0113] S1109: nova api returns the interface call result to router.py of wsgi Web.
[0114] S1110: The router.py of wsgi Web returns the result of calling the interface to Iros.
[0115] In this example, when creating a security group through the front-end interface, the OpenStack interface is called once. First, the open source code module neutron-api (network service api) receives the request, and then sends the task to the security group network driver of the network service plug-in. After the security group network driver processes it, it selects the appropriate implementation mechanism and finally sends the task to the IECS virtualization management platform.
[0116] After upgrading OpenStack, if the network service plug-in is adapted and upgraded, an error will be reported in the code of the network service plug-in's security group network driver. The error is caused by the lack of a function _get_tenant_id_for_create in the openstack p version. In the OpenStack m version, it can be seen that this function is no longer available after the N version. This phenomenon meets this description. Therefore, in this example, the network service plug-in's security group network driver code needs to be modified (that is, upgraded) and updated to the function corresponding to the neutron of the OpenStack P version. That is, the _get_tenant_id_for_create function is no longer included in the OpenStack M version.
[0117] It can be seen that in this example, OpenStack version M is upgraded to version P, and the security group function is created. It only requires modifying the security group network driver code of the network service plug-in to make the product adapt to the new version of OpenStack.
[0118] After the upgrade, see the procedure for creating a security group on the cloud platform in the example above. Fig.12 As shown, including:
[0119] S1201: Send a security group creation request to neutron-api through Iros.
[0120] S1202: neutron-api sends the corresponding task to the security group network driver sg_neutron_driver.
[0121] S1203: sg_neutron_driver selects a suitable network implementation mechanism mech_iecs.
[0122] S1204: mech_iecs sends the corresponding task to iecs.
[0123] S1205: iecs returns the interface call result to mech_iecs.
[0124] S1206: mech_iecs returns the interface call result to sg_neutron_driver.
[0125] S1207: sg_neutron_driver returns the interface call result to neutron-api.
[0126] S1208: neutron-api returns the interface calling result to Iros.
[0127] In this example, when a cloud hard disk is created through the front-end interface, the OpenStack interface is called once. First, the open source code module storage service API (cinder-api) receives the request to create a cloud hard disk, and then the task is scheduled to the appropriate block storage service node and sent to the plug-in code IECS disk driver. After processing, the IECS disk driver sends it to the IECS virtualization management platform.
[0128] After upgrading OpenStack, an error is reported in the code of the iecs disk driver of the block storage service plug-in. The reason for the error is that the input parameters of the create_volume function in the OpenStackP version have been adjusted. Therefore, in this example, you need to modify (that is, upgrade) the input parameters of the create_volume function in the disk driver of the block storage service plug-in to meet the requirements of the P version.
[0129] Here we can see that to upgrade OpenStack version M to version P and create the security group function, we only need to modify the iecs disk driver code of the storage service plug-in to make the product adapt to the new version of OpenStack.
[0130] After the upgrade, please refer to the process of creating a cloud disk on the cloud platform in the above example. Fig.13 As shown, including:
[0131] S1301: Send a request to create a cloud disk to cinder-api through Iros.
[0132] S1302: cinder-api dispatches to a suitable block storage service node create_volume.
[0133] S1303: create_volume sends the corresponding task to iecs_driver iecs.
[0134] S1304: iecs_driver iecs sends the corresponding task to iecs.
[0135] S1305: iecs returns the interface call result to iecs_driver iecs.
[0136] S1306: iecs_driver iecs returns the interface call result to create_volume.
[0137] S1307: create_volume returns the interface call result to cinder-api.
[0138] S1308: cinder-api returns the interface calling result to Iros.
[0139] It can be seen that the cloud platform upgrade method provided in this embodiment can realize the upgrade of the cloud platform based on the rapid upgrade of the plug-in. By adjusting a small amount of plug-in code, the upgrade of the target version of the cloud computing management platform can be quickly realized, thereby maintaining the leading functions and performance of the cloud platform.
[0140] Embodiment three:
[0141] This embodiment also provides a cloud platform upgrade device, see Fig.14 As shown, it includes a processor 1401, a memory 1402 and a communication bus 1403 connecting the processor 1401 and the memory 1402;
[0142] The memory 1402 stores a computer program, which can be executed by the processor 1401 to implement the steps of the cloud platform upgrade method shown in the above embodiments.
[0143] This embodiment also provides a computer-readable storage medium, which stores a computer program. The computer program can be executed by a processor to implement the steps in the cloud platform upgrade method shown in the above embodiments.
[0144] The computer-readable storage medium in this embodiment includes volatile or non-volatile, removable or non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, computer program modules or other data). Computer-readable storage media include, but are not limited to, RAM (Random Access Memory), ROM (Read-Only Memory), EEPROM (Electrically Erasable Programmable read only memory), flash memory or other memory technology, CD-ROM (Compact Disc Read-Only Memory), digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer.
[0145] This embodiment also provides a computer program (or computer software), which can be distributed on a computer-readable medium and executed by a computing device to implement the steps in the cloud platform upgrade method as described above; and in some cases, at least one of the steps shown or described can be executed in an order different from that described in the above embodiment.
[0146] This embodiment further provides a computer program product, including a computer readable device, on which any computer program as shown above is stored. In this embodiment, the computer readable device may include the computer readable storage medium as shown above.
[0147] It can be seen that those skilled in the art should understand that all or some of the steps, systems, and functional modules / units in the above disclosed methods can be implemented as software (which can be implemented with computer program code executable by a computing device), firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component can have multiple functions, or a function or step can be performed by several physical components in cooperation. Some or all physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit.
[0148] In addition, it is well known to those skilled in the art that communication media generally contain computer readable instructions, data structures, computer program modules or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery media. Therefore, the present invention is not limited to any specific hardware and software combination.
[0149] The above contents are further detailed descriptions of the embodiments of the present invention in combination with specific implementation methods, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the protection scope of the present invention.
Claims
1. A method for upgrading a cloud platform, the cloud platform comprising a cloud computing management platform and a virtualization management platform, and further comprising a plug-in layer for connecting the cloud computing management platform and the virtualization management platform, the plug-in layer comprising at least one service plug-in, wherein: Each of the plug-ins is responsible for data structure conversion and interface calling of the corresponding service; The cloud platform upgrade method includes: Obtain a target version of the cloud computing management platform to replace the current version of the cloud computing management platform, and upgrade at least one of the service plug-ins according to the target version of the cloud computing platform so that the upgraded service plug-in is compatible with the target version of the cloud computing management platform.
2. The cloud platform upgrade method according to claim 1, characterized in that: The step of upgrading at least one of the service plug-ins according to the target version cloud computing platform includes: Acquire a target service plug-in generated according to the difference between the target version of the cloud computing management platform and the current version of the cloud computing management platform; The corresponding service plug-in is upgraded to the target service plug-in.
3. The cloud platform upgrade method according to claim 2, characterized in that: The plug-in layer includes at least one of a computing service plug-in, a storage service plug-in, a network service plug-in, and an image service plug-in; The target service plug-in corresponds to at least one of a target computing service plug-in, a target storage service plug-in, a target network service plug-in, and a target image service plug-in.
4. The cloud platform upgrade method according to claim 3, characterized in that: When the target service plug-in includes a target image service plug-in, the target image service plug-in includes: image driver information and image library capacity acquisition code corresponding to the target version cloud computing management platform; The image driver information includes the image driver name corresponding to the target version cloud computing management platform, and the image library capacity acquisition code is used for calling to acquire the image library capacity.
5. The cloud platform upgrade method according to claim 3, characterized in that: When the target service plug-in includes a target computing service plug-in, the target computing service plug-in includes: a build_and_run_instance code corresponding to the computing service plug-in driver of the target version of the cloud computing management platform to build and run the instance; the build_and_run_instance code is used for being called to convert the parameter data structure into a parameter data structure compatible with the computing service plug-in driver of the target version of the cloud computing management platform; and / or, The target computing service plug-in includes: interface implementation method description information and interface controller implementation location description information corresponding to the interface; the interface implementation method description information and the interface controller implementation location description information corresponding to the interface are used for calling the corresponding interface to send the task to the virtualization management platform.
6. The method for upgrading a cloud platform according to any one of claims 3 to 5, characterized in that: The target version of the cloud computing management platform is a cloud computing management platform of version N or above, and the current version of the cloud computing management platform is a cloud computing management platform of version below N; When the target service plug-in includes a target network service plug-in, the security group network driver of the target network service plug-in does not include a function for creating and obtaining a tenant id to correspond to the network service plug-in corresponding to the target version of the cloud computing management platform.
7. The cloud platform upgrade method according to any one of claims 3 to 5, characterized in that: When the target service plug-in includes a target storage service plug-in, the input parameters of the create_volume function of the target storage service plug-in correspond to the input parameters of the create_volume function of the target version cloud computing management platform.
8. The method for upgrading a cloud platform according to any one of claims 1 to 5, characterized in that: The cloud platform also includes a front-end interface connected to the cloud computing management platform. When the presentation layer state conversion REST API version in the target version cloud computing management platform is different from the REST API version in the current version cloud computing management platform, the upgrade method of the cloud platform also includes: Obtain a target front-end interface generated according to the presentation layer state conversion REST API version in the target version of the cloud computing management platform; The current front-end interface is upgraded according to the target front-end interface.
9. A cloud platform upgrade device, characterized in that: The cloud platform includes a cloud computing management platform and a virtualization management platform, and also includes a plug-in layer for connecting the cloud computing management platform and the virtualization management platform, wherein the plug-in layer includes at least one service plug-in, wherein each of the plug-ins is responsible for data structure conversion and interface call of a corresponding service; The upgrade device of the cloud platform includes: An acquisition module is used to acquire a target version of a cloud computing management platform; An upgrade processing module is used to replace the current version of the cloud computing management platform with the target version of the cloud computing management platform, and to upgrade at least one of the service plug-ins according to the target version of the cloud computing platform, so that the upgraded service plug-in is compatible with the target version of the cloud computing management platform.
10. A cloud platform system, characterized in that: Including cloud platform and upgrade device; The cloud platform includes a cloud computing management platform and a virtualization management platform, and also includes a plug-in layer for connecting the cloud computing management platform and the virtualization management platform, wherein the plug-in layer includes at least one service plug-in, wherein each of the plug-ins is responsible for data structure conversion and interface call of a corresponding service; The upgrading device comprises: An acquisition module is used to acquire a target version of a cloud computing management platform; An upgrade processing module is used to replace the current version of the cloud computing management platform with the target version of the cloud computing management platform, and to upgrade at least one of the service plug-ins according to the target version of the cloud computing platform, so that the upgraded service plug-in is compatible with the target version of the cloud computing management platform.
11. A cloud platform upgrade device, characterized in that: comprising a processor, a memory and a communication bus connecting the processor and the memory; The memory stores a computer program, and the computer program can be executed by the processor to implement the steps of the cloud platform upgrade method as described in any one of claims 1-8.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program can be executed by a processor to implement the steps of the cloud platform upgrade method as described in any one of claims 1-8.
Citation Information
Patent Citations
Customer relation management system based on cloud platform and cloud computing
CN104735102A
Service-uninterrupted upgrading method, to-be-upgraded node and readable storage medium
CN107515776A