A cloud platform upgrade method, device, equipment and storage medium
Patent Information
- Application Number
- CN202010671450.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-07-13
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2040-07-13
AI Technical Summary
In the existing OpenStack cloud platform upgrade solution, the redeployment method consumes huge labor costs and cannot be automated. The containerized method requires additional physical resources and affects performance, so it is impossible to achieve full automation upgrade.
By determining the components to be upgraded based on the component information of the current cloud platform and target version, sending virtual machine migration instructions and receiving migration completion instructions, realizing on-site upgrade of computing nodes, reducing costs and automated upgrades, and avoiding performance impacts.
The automated upgrade of the cloud platform has been realized, which reduces the upgrade cost, does not affect the performance after the upgrade, and avoids the need for manual intervention and additional physical resources.
Smart Images

Figure CN113934441B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of cloud computing technology, and relates to but is not limited to a cloud platform upgrade method, device, equipment and storage medium. Background Art
[0002] OpenStack is an open source cloud computing management platform project, 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 licensed under the Apache license. OpenStack is an open source project that aims to provide software for the construction and management of private and public clouds.
[0003] With the development of cloud computing technology, OpenStack must also be continuously improved. Since its birth in 2010, OpenStack has released a new version approximately every six months to meet the needs of cloud computing users. Currently, there are two main solutions for OpenStack upgrades: one is to use the redeployment method, by rebuilding the resource pool of the higher version, and migrating the low-version stock resources to the resource pool of the higher version to achieve the upgrade. This upgrade method consumes huge manpower costs and cannot achieve automatic upgrades. The other is to use the containerization method to achieve the upgrade of stock resources by replacing and upgrading the control nodes and upgrading the computing nodes in containers. In this method, additional physical machines need to be added, which increases the upgrade cost, affects the performance of OpenStack, and cannot achieve automatic upgrades. Summary of the invention
[0004] In view of this, the embodiments of the present application provide a cloud platform upgrade method, device, equipment and storage medium to solve the problems existing in the prior art.
[0005] The present application provides a cloud platform upgrade method, including:
[0006] Determine the components to be upgraded based on the information of components deployed in the current cloud platform and the component information of the target version cloud platform;
[0007] Based on the virtual machines carried on the computing nodes of the current cloud platform, sending virtual machine migration instructions to the current cloud platform;
[0008] Receiving a migration completion instruction sent by the current cloud platform, wherein the migration completion instruction is an instruction sent by the current cloud platform after the migration of the virtual machine carried by the computing node is completed;
[0009] The components to be upgraded are upgraded to obtain the target version cloud platform.
[0010] The present application provides a cloud platform upgrade device, including:
[0011] A determination module is used to determine the components to be upgraded based on the component information deployed in the current cloud platform and the component information of the target version cloud platform;
[0012] A sending module, used to send a virtual machine migration instruction to the current cloud platform based on the virtual machine carried on the computing node of the current cloud platform;
[0013] A receiving module, configured to receive a migration completion instruction sent by the current cloud platform, wherein the migration completion instruction is an instruction sent by the current cloud platform after the migration of the virtual machine carried by the computing node is completed;
[0014] The upgrade module is used to upgrade the components to be upgraded to obtain the target version cloud platform.
[0015] The present application provides a cloud platform upgrade device, including:
[0016] A memory for storing executable instructions;
[0017] The processor is used to implement the cloud platform upgrade method provided in the embodiment of the present application when executing the executable instructions stored in the memory.
[0018] An embodiment of the present application provides a storage medium storing executable instructions for causing a processor to execute and implement the cloud platform upgrade method provided in the embodiment of the present application.
[0019] The cloud platform upgrade method provided in the embodiment of the present application determines the components to be upgraded based on the component information deployed in the current cloud platform and the component information of the target version cloud platform, and then sends a virtual machine migration instruction to the current cloud platform based on the virtual machine carried on the computing node of the current cloud platform, receives a migration completion instruction sent by the current cloud platform, and the migration completion instruction is an instruction sent by the current cloud platform after the migration of the virtual machine carried on the computing node is completed. Finally, the components to be upgraded are upgraded to obtain the target version cloud platform. By upgrading the computing nodes in situ, no additional physical resources are required, the upgrade cost can be reduced, and the automatic upgrade of the cloud platform can be realized without affecting the performance of the upgraded cloud platform. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 A schematic diagram of the network architecture of the cloud platform upgrade method provided in an embodiment of the present application.
[0021] Figure 2 It is a schematic diagram of the composition structure of the cloud platform upgrade device provided in an embodiment of the present application.
[0022] Figure 3 A schematic diagram of an implementation flow of a cloud platform upgrade method provided in an embodiment of the present application.
[0023] Figure 4 A schematic diagram of another implementation flow of the cloud platform upgrade method provided in an embodiment of the present application.
[0024] Figure 5 A schematic diagram of another implementation process of the cloud platform upgrade method provided in the embodiment of the present application. DETAILED DESCRIPTION
[0025] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.
[0026] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0027] In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0028] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0029] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.
[0030] 1) Network cutover is the operation of the lines and equipment in use, which will directly affect the services carried on them. The most critical step in network transformation is network cutover. Network cutover, also known as network migration, refers to the physical or logical changes in the running network.
[0031] 2) Live Migration, also known as dynamic migration or real-time migration, is the saving / restoration of a virtual machine. It usually saves the entire running state of the virtual machine and can quickly restore it to the original hardware platform or even a different hardware platform. After the restoration, the virtual machine still runs smoothly and the user will not notice any difference.
[0032] In order to better understand the embodiments of the present application, the OpenStack cloud platform is first taken as an example to illustrate the cloud platform upgrade method in the related art and the existing shortcomings.
[0033] In the related art, when upgrading OpenStack, a redeployment method can be adopted, that is, a new high-version resource pool is rebuilt, and then the low-version stock resources (virtual machines, networks) to be upgraded are migrated to the new resource pool, so as to achieve the upgrade of the low-version OpenStack. The advantage of this upgrade method is that the upgrade is thorough, but it has the disadvantages of consuming huge manpower costs and being unable to achieve automated upgrades.
[0034] In related technologies, when upgrading OpenStack, a containerized approach can also be used to complete the upgrade of existing resources. The core method is to use the separation of OpenStack control nodes and computing nodes to deploy a high-version control cluster on an additional physical machine, import the low-version database into the high-version control node, and upgrade the database; shut down the original low-version service on the computing node, start the high-version OpenStack service through the container, modify the configuration to point the computing node to the deployed high-version control cluster, and complete the OpenStack upgrade. This upgrade method can achieve semi-automatic upgrades, but this upgrade method requires additional physical resources and cannot achieve fully automated upgrades, which increases hardware costs, and the use of containers leads to a decrease in cloud platform performance.
[0035] Based on the above problems, a cloud platform upgrade method is provided in an embodiment of the present application. First, the components to be upgraded are determined according to the component information deployed in the current cloud platform and the component information of the target version cloud platform. Then, based on the virtual machines carried on the computing nodes of the current cloud platform, a virtual machine migration instruction is sent to the current cloud platform, and a migration completion instruction sent by the current cloud platform is received. The migration completion instruction is an instruction sent by the current cloud platform after the migration of the virtual machines carried on the computing nodes is completed. Finally, the components to be upgraded are upgraded to obtain the target version cloud platform. The entire upgrade process does not require manual intervention, and can realize automatic upgrade of the cloud platform. By upgrading the computing nodes in situ, no additional physical resources are required, and the upgrade cost can be reduced without affecting the performance of the cloud platform after the upgrade.
[0036] The following describes an exemplary application of the apparatus for implementing the embodiment of the present application. The apparatus provided in the embodiment of the present application can be implemented as a terminal device. The following describes an exemplary application of the terminal device when the apparatus is implemented as a terminal device.
[0037] See also Figure 1 , Figure 1 A schematic diagram of the network architecture of the cloud platform upgrade method provided in the embodiment of the present application, such as Figure 1 As shown, the network architecture includes at least a cloud platform upgrade device 100, a current cloud platform 200, and a network 300. To support an exemplary application, the cloud platform upgrade device 100 is connected to the current cloud platform 200 via the network 300. The network 300 can be a wide area network or a local area network, or a combination of the two, and a wireless link is used to realize data transmission.
[0038] In another embodiment, the cloud platform upgrade device 100 and the current cloud platform 200 may be deployed on the same physical device. In this case, the cloud platform upgrade device 100 and the current cloud platform 200 may interact through an internal communication bus to achieve data transmission.
[0039] The user obtains the component information deployed in the current cloud platform 200 through the cloud platform upgrade device 100, and determines the components to be upgraded in combination with the component information of the target version of the cloud platform; then obtains the virtual machine information carried on the computing node of the current cloud platform 200, and sends a virtual machine migration instruction to the current cloud platform 200. The current cloud platform 200 migrates and upgrades the virtual machines carried on the computing nodes, and returns a migration completion instruction to the cloud platform upgrade device 100. Finally, the cloud platform upgrade device 100 upgrades the components to be upgraded to obtain the target version of the cloud platform.
[0040] The device provided in the embodiments of the present application may be implemented in the form of hardware or a combination of hardware and software. Various exemplary implementations of the device provided in the embodiments of the present application are described below.
[0041] according to Figure 2 The exemplary structure of the cloud platform upgrade device 100 shown can foresee other exemplary structures of the cloud platform upgrade device 100, so the structure described here should not be regarded as limiting. For example, some components described below can be omitted, or components not described below can be added to meet the special needs of certain applications.
[0042] Figure 2The cloud platform upgrade device 100 shown includes: at least one processor 110, a memory 140, at least one network interface 120 and a user interface 130. Each component in the cloud platform upgrade device 100 is coupled together through a bus system 150. It can be understood that the bus system 150 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 150 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, Figure 2 Various buses are labeled as bus system 150 .
[0043] The user interface 130 may include a display, a keyboard, a mouse, a touch pad, a touch screen, and the like.
[0044] The memory 140 may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM). The volatile memory may be a random access memory (RAM). The memory 140 described in the embodiments of the present application is intended to include any suitable type of memory.
[0045] The memory 140 in the embodiment of the present application can store data to support the operation of the cloud platform upgrade device 100. Examples of such data include: any computer program used to operate on the cloud platform upgrade device 100, such as an operating system and an application program. Among them, the operating system includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., which are used to implement various basic services and process hardware-based tasks. The application program can include various applications.
[0046] As an example of the method provided in the embodiment of the present application being implemented by software, the method provided in the embodiment of the present application can be directly embodied as a combination of software modules executed by the processor 110. The software module can be located in a storage medium, and the storage medium is located in the memory 140. The processor 110 reads the executable instructions included in the software module in the memory 140, and completes the method provided in the embodiment of the present application in combination with the necessary hardware (for example, including the processor 110 and other components connected to the bus 150).
[0047] As an example, the processor 110 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.
[0048] The cloud platform upgrade method provided in the embodiment of the present application will be explained in combination with the exemplary application and implementation of the terminal provided in the embodiment of the present application.
[0049] See also Figure 3 , Figure 3 A schematic diagram of an implementation flow of a cloud platform upgrade method provided in an embodiment of the present application, which is applied to Figure 1 The cloud platform upgrade device shown below will be combined with Figure 3 The steps shown are explained.
[0050] Step S301, determining components to be upgraded according to the component information deployed in the current cloud platform and the component information of the target version cloud platform.
[0051] Here, when obtaining the information of components deployed in the current cloud platform, the user needs to have the permission to upgrade the current cloud platform. Users who do not have the permission to upgrade the current platform may not be able to perform the upgrade operation. For example, users with administrator permissions can not only use the current cloud platform, but also upgrade the current cloud platform, while general users can use the current cloud platform but cannot upgrade it.
[0052] When a user needs to upgrade the cloud platform, he or she first uses his or her administrator privileges to obtain the component information deployed in the current version of the cloud platform, and determines the component information of the higher version to be upgraded, that is, the target version of the cloud platform. Then, based on the component information deployed in the current cloud platform and the component information of the target version of the cloud platform, the components that need to be upgraded are determined.
[0053] For example, the components deployed in the current cloud platform OpenStack include the commonly used components Keystone, Glance, Nova, Cinder, Neutron and Ceilometer. There are no new components or deleted components in the component information of the target version cloud platform. Therefore, it can be determined that the components that need to be upgraded include Keystone, Glance, Nova, Cinder, Neutron and Ceilometer. Alternatively, when it is determined that a component (such as Neutron) is no longer used in a higher version of the cloud platform, it does not need to be upgraded during the upgrade. At this time, it is determined that the components that need to be upgraded include Keystone, Glance, Nova, Cinder and Ceilometer.
[0054] Among them, the Keystone component provides authentication management services, manages, creates, and modifies authentication information of other components; the Glance component provides image management services, which can manage images when virtual machines are deployed; Nova provides computing management services, which manages Nova of computing nodes; the Cinder component provides storage node management services, and provides the Cinder management panel in Horizon; the Neutron component provides network management services, manages the network topology of network nodes, and provides the Neutron management interface in Horizon; the Ceilometer component monitors physical resources and virtual resources, records these data, and analyzes the data.
[0055] Step S302: Send a virtual machine migration instruction to the current cloud platform based on the virtual machines carried on the computing nodes of the current cloud platform.
[0056] After the cloud platform upgrade device determines the components that need to be upgraded, it further determines the virtual machines carried on the computing nodes of the current cloud platform, and sends virtual machine migration instructions to the current cloud platform so that the current cloud platform can migrate and upgrade the virtual machines carried on the computing nodes.
[0057] Here, the current cloud platform can migrate and upgrade the virtual machines of some computing nodes, or migrate and upgrade the virtual machines of all computing nodes. If the current cloud platform migrates and upgrades the virtual machines of all computing nodes, the virtual machines carried by each computing node of the current cloud platform are determined, so that the current cloud platform migrates and upgrades the virtual machines carried by each computing node.
[0058] Step S303, receiving a migration completion instruction sent by the current cloud platform, wherein the migration completion instruction is an instruction sent by the current cloud platform after the migration of the virtual machine carried on the computing node is completed.
[0059] The current cloud platform uses its own hot migration function to migrate the virtual machine on the computing node to be migrated to another host machine, and realizes the upgrade of the virtual machine through the yum upgrade method. This embodiment uses the hot migration function of the cloud platform to ensure that there is no impact on the virtual machine business during the upgrade process.
[0060] After the current cloud platform completes the migration of the virtual machines carried by the computing nodes to be migrated, it sends a migration completion instruction to the cloud platform upgrade device. After the cloud platform upgrade device receives the migration completion instruction sent by the current cloud platform, it can determine that the upgrade of the virtual machines carried by the computing nodes of the current cloud platform is completed.
[0061] Step S304, upgrading the components to be upgraded to obtain a target version cloud platform.
[0062] After step S303 is completed, the cloud platform upgrade device has completed the computing node upgrade of the current cloud platform, and continues to upgrade the previously determined components to be upgraded accordingly, thereby obtaining the target version of the cloud platform.
[0063] Here, the components to be upgraded are upgraded, including software package upgrade, configuration file upgrade and database upgrade of the components to be upgraded of the current cloud platform, wherein the software package upgrade is performed in yum mode.
[0064] The cloud platform upgrade method provided in this embodiment determines the components to be upgraded based on the component information deployed in the current cloud platform and the component information of the target version cloud platform, and then sends a virtual machine migration instruction to the current cloud platform based on the virtual machine carried on the computing node of the current cloud platform, receives the migration completion instruction sent by the current cloud platform, and the migration completion instruction is an instruction sent by the current cloud platform after the migration of the virtual machine carried on the computing node is completed. Finally, the components to be upgraded are upgraded to obtain the target version cloud platform. By upgrading the computing nodes in situ, no additional physical resources are required, the upgrade cost can be reduced, and the automatic upgrade of the cloud platform can be realized without affecting the performance of the upgraded cloud platform.
[0065] Optionally, before the cloud platform is officially upgraded, a cutover pre-test may be performed to ensure the success rate of the network cutover upgrade. Based on this, in some embodiments, the following steps may be performed after step S301:
[0066] Step S011, backing up the database of the current cloud platform to obtain a backup database.
[0067] Before upgrading the current cloud platform, a cutover pre-test is performed. In one implementation, the network cutover pre-test can be performed by checking whether the database of the current cloud platform can be successfully upgraded. In this method, the database of the current cloud platform is backed up first to obtain a backup database, and the network cutover pre-test is performed by upgrading the backup database.
[0068] Step S012, loading the backup database into a test environment, wherein the test environment is a pre-built test environment of a target version cloud platform.
[0069] Before testing, users need to build a test environment for testing the upgrade process of the backup database. During the test, the cloud platform upgrade device copies the backup database to the test environment and restores it in the test environment to load the backup data into the test environment.
[0070] Step S013: performing an upgrade test on the backup database in the test environment.
[0071] After the backup database is loaded into the test environment, the cloud platform upgrade device continues to perform the upgrade test of the backup database in the test environment. If the backup database upgrade is successful in the test environment, the network cutover test passes, indicating that the current network can be used for the current cloud platform upgrade and subsequent upgrade operations can be performed; if the backup database upgrade fails in the test environment, the network cutover test fails, indicating that the current network cannot be used for the current cloud platform upgrade and network repair is required before the upgrade can be performed.
[0072] Still taking OpenStack as an example, when performing backup database upgrade testing, the database fields of the backup database are mainly upgraded. Fields that exist in the structure of the target version database but not in the structure of the backup database are added to the backup database. That is, the database fields newly added during the iterative development process are mainly upgraded.
[0073] When upgrading the OpenStack backup database, the upgrade is mainly managed through two tools: alembic and SqlAlchemy Migrate. Among them, Keystone, Glance, Nova, Cinder, and Heat components are upgraded using SqlAlchemyMigrate, and Neutron and Ironic are upgraded using Alembic.
[0074] Taking the Keystone component as an example, the Keystone component mainly provides authentication management services, providing authentication information management, creation or modification services for other components. The component can use databases such as MySQL to store authentication information.
[0075] When upgrading the Keystone component, you can call the function "keystone-manage db_sync" to upgrade the Keystone database structure. The implementation code can be:
[0076] su -s / bin / sh -c "keystone-manage db_sync" keystone.
[0077] When the component no longer supports upgrading the database from the current version of the cloud platform to the target version of the cloud platform, you need to first upgrade to the intermediate version of the cloud platform between the current version and the target version, and then upgrade from the intermediate version of the cloud platform to the target version of the cloud platform. The intermediate version here can be one or more.
[0078] Since the cloud platform involves many components and the upgrade of the components is heavily dependent on the network conditions, before the formal network cutover, the above steps S011 to S013 are first used to perform a cutover pre-test to ensure that the database of the current cloud platform can be upgraded normally under the current network environment. This ensures that the network cutover upgrade is successful, avoids upgrade failures due to database anomalies, and improves the success rate of the cloud platform upgrade.
[0079] Optionally, in some embodiments, Figure 3 After the database upgrade is successful in step S013 and before step S304, the current cloud platform is backed up to ensure that it can be rolled back during or after the upgrade. Step S014 of backing up the current cloud platform is as follows:
[0080] Step S014, when the upgrade test of the backup database is successful, the current cloud platform is backed up to obtain a backup cloud platform.
[0081] To ensure that you can roll back during or after the upgrade, you can back up the data of the current cloud platform before the upgrade. After the upgrade test of the backup database in step S013, if the upgrade test is successful, it indicates that the current cloud platform can be upgraded. At this time, the cloud platform upgrade device backs up the current cloud platform to obtain a backup cloud platform to ensure that you can roll back to the current cloud platform after the upgrade fails.
[0082] In some embodiments, Figure 3 The step S304 "upgrading the components to be upgraded to obtain the target version cloud platform" shown in the figure can be implemented by the following steps S3041 to S3045, and the following is a related explanation in combination with each step.
[0083] Step S3041, upgrading the components to be upgraded to obtain components to be determined.
[0084] Here, the components to be upgraded are upgraded, including software package upgrade, configuration file upgrade and database upgrade of the components to be upgraded of the current cloud platform, wherein the software package upgrade is performed in yum mode.
[0085] When upgrading the software package, configuration file and database of the components to be upgraded on the current cloud platform, the software package is upgraded first, then the configuration file is upgraded, and finally the database is upgraded. After the upgrade is completed, the service is restarted to obtain the components to be determined.
[0086] In some implementations, when upgrading a software package, the software package can be upgraded through the traditional yum method. When upgrading a configuration file, the configuration items of the current version can be updated to the configuration items of the target version to achieve the upgrade. When upgrading a database, the database fields of the database are mainly upgraded, and the fields that exist in the structure of the target version database but not in the structure of the cloud platform database of the current version are added to the cloud platform database of the current version, that is, the database fields newly added during the iterative development process are mainly upgraded. The upgrade of specific components refers to the upgrade of the backup database mentioned above, which will not be repeated here.
[0087] Step S3042: testing the function of the component to be determined.
[0088] Although the components to be upgraded have been upgraded, an upgrade error may occur during the upgrade process due to network or other reasons, resulting in the components to be determined not being components of the target version. Therefore, the functions of the components to be determined need to be tested to determine whether the functions are normal.
[0089] Step S3043: When all function tests of the component to be determined are successful, it is determined that the component to be upgraded is upgraded successfully, the component to be determined is determined as the target component, and the target version cloud platform is obtained.
[0090] If all functions of the current component to be determined are normal, that is, all functions of the current component to be determined are tested successfully, it is determined that the current component to be upgraded is upgraded successfully, and it can be determined that the current component to be determined is the current target component. When all functions of all components to be determined obtained from all components to be upgraded are tested successfully, the target version cloud platform is obtained.
[0091] Step S3044: When a function test of the component to be determined fails, it is determined that the upgrade of the component to be upgraded fails.
[0092] If one of the functional tests of any of the components to be determined fails, that is, the component to be determined cannot implement part or all of the functions of the target component, then it is determined that the upgrade of the component to be determined has failed.
[0093] Step S3045: using the backup cloud platform to roll back the component to be determined to the component to be upgraded.
[0094] Here, a rollback operation of the components to be determined is performed based on the current cloud platform before the backup upgrade, and the components to be determined are restored to the initial components to be upgraded.
[0095] In some implementations, when a functional test of one of the components to be determined fails, it can be determined whether there is an impact on other components that have successfully passed the functional test based on the association relationship between the component to be determined and other components. If there is an impact, the affected components can be rolled back to the components to be upgraded at the same time.
[0096] If it is necessary to roll back all the components to be determined on the cloud platform, when rolling back the software packages, configuration files and databases of the components to be determined according to the backup cloud platform, the rollback order of the software packages, configuration files and databases is not restricted. Corresponding to the upgrade of the software package through yum, the software package can be rolled back through yum history undo, which can achieve one-click fully automated upgrade and rollback without manual intervention, shorten the upgrade time and avoid upgrade failures caused by too much manual intervention.
[0097] In some embodiments, the above-mentioned step S302 "sending virtual machine migration instructions to the current cloud platform based on the virtual machines carried on the computing nodes of the current cloud platform" can be implemented through steps S3021 to S3023, and each step is described below.
[0098] Step S3021, obtaining the number of virtual machines carried by the computing nodes of the current cloud platform.
[0099] The computing nodes are upgraded by in-place upgrade, starting from the computing nodes that occupy the least resources. No additional physical resources are required, which can greatly save the upgrade cost. In this embodiment, the number of virtual machines carried by the computing nodes to be migrated on the current cloud platform is obtained, and the resources occupied by each computing node to be migrated are determined according to the number of virtual machines. Here, the computing nodes to be migrated can be all computing nodes of the current cloud platform, or they can be part of the computing nodes.
[0100] Step S3022: Determine the migration order of the computing nodes based on the number of virtual machines carried by the computing nodes.
[0101] Here, the migration order of the computing nodes to be migrated is determined according to the order of occupied resources from small to large, that is, the order of the number of virtual machines carried on the computing nodes to be migrated from small to large.
[0102] Step S3023: Send migration instructions to the current cloud platform in sequence according to the migration order, so that the current cloud platform migrates the virtual machines carried on the computing nodes in sequence.
[0103] Sending an i-th migration instruction to the current cloud platform according to the migration order, so that the current cloud platform migrates the virtual machine carried by the i-th computing node, where i is a positive integer and is less than or equal to the number of computing nodes to be migrated;
[0104] Correspondingly, the receiving of the migration completion instruction sent by the current cloud platform, wherein the migration completion instruction is an instruction sent by the current cloud platform after the migration of the virtual machine carried by the computing node is completed, includes:
[0105] An i-th migration completion instruction sent by the current cloud platform is received, where the i-th migration completion instruction is an instruction sent by the current cloud platform after the migration of the virtual machine carried on the i-th computing node is completed.
[0106] The cloud platform upgrade device sends a migration instruction to the current cloud platform in the migration order. The current cloud platform migrates the virtual machines carried by the computing node. After the migration is completed, a migration completion instruction is returned to the cloud platform upgrade device, so that the cloud platform upgrade device continues to send migration instructions for migrating the virtual machines carried by the next computing node until all virtual machines on all computing nodes to be migrated are migrated.
[0107] This embodiment obtains and determines the migration order of computing nodes according to the number of virtual machines carried on the computing nodes, and upgrades the computing nodes in situ without requiring additional resources and without relying on containers, thereby avoiding degradation of cloud platform performance.
[0108] Figure 4 Another implementation flow diagram of the cloud platform upgrade method provided in the embodiment of the present application is as follows: Figure 4 As shown, the process includes:
[0109] Step S401: The cloud platform upgrade device determines the components to be upgraded according to the component information deployed in the current cloud platform and the component information of the target version cloud platform.
[0110] Here, when the user needs to upgrade the cloud platform, the administrator first obtains the component information deployed in the current cloud platform and determines the component information of the higher version to be upgraded, that is, the target version. Then, based on the component information deployed in the current cloud platform and the component information of the target version cloud platform, the components that need to be upgraded are determined.
[0111] Step S402: The cloud platform upgrade device backs up the database of the current cloud platform to obtain a backup database.
[0112] Before the cloud platform is officially upgraded, a cutover pre-test is required to ensure the success rate of the network cutover upgrade. Here, the network cutover pre-test can be performed by checking whether the database of the current cloud platform can be successfully upgraded.
[0113] Step S403: the cloud platform upgrade device loads the backup database into the test environment.
[0114] Here, the test environment is a pre-built test environment of the target version cloud platform, which is a test environment pre-built by the user before the test for testing the upgrade process of the backup database.
[0115] Step S404: the cloud platform upgrade device performs an upgrade test on the backup database in the test environment.
[0116] If the backup database upgrade is successful in the test environment, the network cutover test passes, indicating that the current network can be used for the current cloud platform upgrade, and step S405 is entered at this time; if the backup database upgrade fails in the test environment, the network cutover test fails, indicating that the current network cannot be used for the current cloud platform upgrade. At this time, the network needs to be updated and then tested until the network cutover test passes.
[0117] Step S405, when the upgrade test of the backup database is successful, the cloud platform upgrade device backs up the current cloud platform to obtain a backup cloud platform.
[0118] Here, step S405 may be executed in any order after step S404 and before step S411.
[0119] Step S406: The cloud platform upgrade device obtains the number of virtual machines carried by the computing nodes of the current cloud platform.
[0120] Step S407: The cloud platform upgrade device determines the migration order of the computing nodes based on the number of virtual machines carried by the computing nodes.
[0121] Step S408: the cloud platform upgrade device sends migration instructions to the current cloud platform in sequence according to the migration order.
[0122] Step S409: the current cloud platform migrates the virtual machines carried by the computing nodes in sequence.
[0123] The migration order of computing nodes is determined by the number of virtual machines carried on the computing nodes, and the computing nodes are upgraded in situ according to the migration order. No additional resources are required, and they are not dependent on containers, thus avoiding the performance degradation of the cloud platform.
[0124] Step S410: the cloud platform upgrade device receives a migration completion instruction sent by the current cloud platform.
[0125] Here, the migration completion instruction is an instruction sent by the current cloud platform after the migration of the virtual machine carried on the computing node is completed.
[0126] This embodiment uses the hot migration function of the cloud platform to ensure that the upgrade process has no impact on the virtual machine business.
[0127] Step S411: the cloud platform upgrade device upgrades the components to be upgraded to obtain components to be determined.
[0128] Here, the components to be upgraded are upgraded, including software package upgrade, configuration file upgrade and database upgrade of the components to be upgraded of the current cloud platform, wherein the software package upgrade is performed in yum mode.
[0129] Step S412: the cloud platform upgrade device tests the function of the component to be determined.
[0130] The functions of the component to be determined are tested to determine whether all its functions are normal. When all the function tests of the component to be determined are successful, it indicates that the component to be determined is the target component, and it is determined that the upgrade of the component to be upgraded is successful, and the process goes to step S413; when one function test of the component to be determined fails, it indicates that the component to be determined does not realize all the functions of the target component, and it is determined that the upgrade of the component to be upgraded fails, and the process goes to step S414.
[0131] Step S413, the cloud platform upgrade device determines that the component to be upgraded is successfully upgraded, determines the component to be determined as the target component, and obtains the target version cloud platform.
[0132] Step S414: the cloud platform upgrade device determines that the upgrade of the component to be upgraded fails.
[0133] Step S415, the cloud platform upgrade device uses the backup cloud platform to roll back the component to be determined to the component to be upgraded.
[0134] Here, a rollback operation of the components to be determined is performed based on the current cloud platform before the backup upgrade, and the components to be determined are restored to the initial components to be upgraded.
[0135] The cloud platform upgrade method provided in this embodiment can achieve one-click fully automated upgrade and rollback without manual intervention, with a short upgrade time, avoiding upgrade failures caused by too much manual intervention; performing database pre-testing can avoid upgrade failures due to database anomalies and improve the success rate of cloud platform upgrades; the underlying virtual machine upgrade is upgraded in situ without the need for additional resources, and the upgrade process has no impact on the virtual machine business and is independent of containers, avoiding cloud platform performance degradation.
[0136] The following is an explanation of an exemplary application of an embodiment of the present application in a practical application scenario.
[0137] In the embodiment of the present application, the upgrade of OpenStack version K to OpenStack version P is used as an example. The OpenStack upgrade method provided in this embodiment mainly includes the following core logical steps: collecting platform information, database pre-testing, data backup, underlying virtual machine upgrade, OpenStack upgrade, functional test verification and upgrade rollback.
[0138] Figure 5 A schematic diagram of another implementation process of the cloud platform upgrade method provided in the embodiment of the present application is as follows: Figure 5 As shown, the cloud platform upgrade method provided in this embodiment includes the following steps:
[0139] Step S501, collecting platform information.
[0140] In this embodiment, the cloud platform upgrade device determines the components to be upgraded according to the current OpenStack information and the OpenStack information of the target version.
[0141] Here, the platform information collection module of the cloud platform upgrade device determines which components of the OpenStack platform to upgrade based on the administrator authority of the current OpenStack platform input by the user and the information of the target version of OpenStack to be upgraded.
[0142] Get the current OpenStack version information and the information of the components that have been deployed in the current OpenStack to determine the components that need to be upgraded. Common OpenStack components include Keystone, Glance, Nova, Cinder, Neutron, and Ceilometer. Common OpenStack components can be used as components to be upgraded.
[0143] In addition to OpenStack version information and OpenStack component information, the platform information collection module can also collect the number of virtual machines carried by each computing node, so as to determine which computing node to select first for upgrading the virtual machine software Qemu and Libvirt according to the number of virtual machines carried by each computing node. For example, the size of occupied resources can be determined according to the number of virtual machines carried by each computing node, and the order of upgraded Qemu and Libvirt computing nodes can be determined in the order of occupied resources from least to most. The platform information collection module can also collect specific models of backend storage to verify whether the target version of OpenStack can be docked and whether it has the relevant target version of drivers.
[0144] Step S502: database pre-test.
[0145] The cloud platform upgrade device backs up the database of the current cloud platform to obtain a backup database, loads the backup database into a test environment, and performs an upgrade test on the backup database in the test environment. Here, the test environment is a test environment of a pre-built target version of the cloud platform.
[0146] OpenStack involves many components and the upgrade of each component is heavily dependent on the current network situation. Before the formal network cutover, a cutover pre-test is required to ensure the success rate of the network cutover upgrade. This pre-test step is mainly used to ensure that the network database can be upgraded normally.
[0147] This step will back up the network database, and then perform the test database upgrade process in a P version test environment. OpenStack uses MySQL as the default database. Since the OpenStack database is less than 50G, MySQLdump is used to back up the database. MySQL data backup uses existing well-known technology, which will not be repeated in this embodiment.
[0148] After obtaining the database backup, copy the database backup to the test environment and restore it, and further perform database upgrade verification tests in this test environment.
[0149] The structural upgrade of the OpenStack database mainly refers to the newly added database fields during the iterative development process. OpenStack has two database upgrades that are mainly managed through the two tools Alembic and SQLAlchemy Migrate. Projects that use SQLAlchemy Migrate include Keystone, Glance, Nova, Cinder, and Heat, and projects that use Alembic include Neutron and Ironic. During the upgrade process, you need to switch to different OpenStack code history versions to upgrade.
[0150] When upgrading the OpenStack database, the upgrade process of each component is as follows:
[0151] 1) Keystone Upgrade
[0152] Use "Keystone Manage db_sync" to upgrade the database structure. The replacement code during the upgrade is as follows:
[0153] su-s / bin / sh-c"Keystone Manage db_sync"Keystone
[0154] 2) Glance Upgrade
[0155] The OpenStack Glance component no longer supports upgrading the database from version K to version P. You need to replace Glance with the L version code, first upgrade the database version to 42, then replace it back to the P version code, and synchronize the database version to pike01. The replacement code during the upgrade is as follows:
[0156] #git switch to version L
[0157] su-s / bin / sh-c"Glance Manage db_sync"Glance
[0158] #git switch to P version of the code
[0159] su-s / bin / sh-c"Glance Manage db_sync"Glance
[0160] 3) Cinder Upgrade
[0161] The OpenStack Cinder component no longer supports upgrading the database directly from version K to version P. Starting from version N, it only supports upgrading across one version. Since the Cinder database uses a sequential upgrade method, the database is upgraded by the upgrade scripts in the db / Sqlalchemy / migrate_repo / versions directory in version order. We only need to add the missing upgrade scripts to the corresponding directory to successfully upgrade.
[0162] The replacement code during upgrade is as follows:
[0163] #Update the database upgrade script under db / Sqlalchemy / migrate_repo / versions
[0164] su-s / bin / sh-c"Cinder Manage db sync"Cinder
[0165] 4) Neutron Upgrade
[0166] Neutron uses alembic for database management and adopts a chain upgrade method. The revision current pointer and down_revision subsequent pointer of each script form an ordered single linked list, so that the db can be upgraded in an orderly manner. The replacement code during the upgrade is as follows:
[0167] Neutron-db Manage upgrade--expand
[0168] Neutron-db Manage upgrade--contract
[0169] 5) Nova Upgrade
[0170] Upgrade the database through "Nova Manage db sync", "Nova Manage api_db sync" and "Nova Manage dbonline_data_migrations". OpenStack Nova components no longer support upgrading the database directly from version K to version P. The version P upgrade script requires that the db data online migration must be performed on version N first. However, the version N upgrade script also clearly states that the db data online migration must be performed on version M first. The upgrade order of all Nova is K->M->N->P. The replacement code during the upgrade is as follows:
[0171] CREATE DATABASE IF NOT EXISTS Nova_api;
[0172] CREATE DATABASE IF NOT EXISTS Nova_cell0;
[0173] #git switch to M version Nova code
[0174] su-s / bin / sh-c"Nova Manage db sync"Nova
[0175] su -s / bin / sh -c"Nova Manage api_db sync"Nova
[0176] su-s / bin / sh-c"Nova Manage db online_data_migrations"Nova
[0177] #git switch to N version Nova code
[0178] su-s / bin / sh-c"Nova Manage db sync"Nova
[0179] su -s / bin / sh -c"Nova Manage api_db sync"Nova
[0180] su-s / bin / sh-c"Nova Manage db online_data_migrations"Nova
[0181] #git switch to P version Nova code
[0182] su-s / bin / sh-c"Nova Manage db sync"Nova
[0183] su-s / bin / sh-c"Nova Manage cell_v2 simple_cell_setup"Nova
[0184] su -s / bin / sh -c"Nova Manage api_db sync"Nova
[0185] su-s / bin / sh-c"Nova Manage db online_data_migrations"Nova
[0186] 6) Ceilometer database upgrade
[0187] Use Ceilometer-upgrade to upgrade the database without replacing the code.
[0188] This embodiment performs a pre-test of the database upgrade to avoid upgrade failures due to database upgrade anomalies during the change process of the formal environment, thereby improving the success rate of the upgrade.
[0189] Step S503: data backup.
[0190] When the upgrade test of the backup database is successful, the cloud platform upgrade device backs up the current cloud platform to obtain a backup cloud platform.
[0191] To ensure rollback, you need to back up the persistent data in the existing network, including software packages, databases, and configuration items.
[0192] The backup of the software package should include two parts: the backup of the software repository and the record of the software packages installed on each node. The backup of the software repository is used to ensure that the current version of the yum source repository will not be contaminated by the target version of the rpm package during the upgrade process. In the actual operation process, the target version of the software package, that is, the P version of the software package, can be remade into a yum source repository. Just add a directory pointing to the new configuration source in the yum configuration file. Different versions of the yum source repository are physically isolated. By adding and reducing the yum configuration file, the software repository can be added and rolled back. The record of the software package of each node is backed up, which is similar to the implementation principle of the multi-version concurrency control technology (MVCC, Multiversion Concurrency Control) of the database. The unique code (ID, Identity Document) of yum history is used to uniquely mark each change operation. When rolling back, you only need to undo the upgraded ID to achieve the rollback of the software package.
[0193] The database backup adopts MySQL backup, which adopts the existing technology and will not be described in detail in this embodiment.
[0194] The backup of configuration items is the backup of configuration files.
[0195] Step S504: upgrading the underlying virtual machine.
[0196] The cloud platform upgrade device sends a virtual machine migration instruction to the current cloud platform based on the virtual machines carried on each computing node of the current cloud platform, and receives a migration completion instruction sent by the current cloud platform.
[0197] Here, the migration completion instruction is an instruction sent by the current cloud platform after the migration of the virtual machines carried on each computing node is completed.
[0198] The upgrade order of the computing nodes has been determined in the platform information module. Use the OpenStack hot migration function to migrate the virtual machines on this node to other hosts. Qemu and libvirt are upgraded through yum update. One implementation step is as follows:
[0199] 1) According to the order of upgrading computing nodes determined by the platform information collection module, qemu and libvirt of the computing node ranked first are determined.
[0200] 2) Migrate the existing virtual machines to the new node through the interface of the OpenStack layer. The virtual machines migrated to the new node automatically use the new version of qemu and libvirt to complete the upgrade of qemu and libvirt of the computing node ranked first.
[0201] 3) Update the computing node that ranks first.
[0202] After the update is complete, return to step 2) and repeat until the virtual machine migration of all computing nodes is completed.
[0203] This embodiment uses the virtual machine hot migration function to iteratively complete the upgrade of the computing node virtualization software Qemu and Libvirt, which can ensure that the virtual machine business is not affected during the upgrade process.
[0204] Step S505: OpenStack upgrade.
[0205] It mainly upgrades the database, configuration files, and software packages of the current version of OpenStack.
[0206] Database upgrade: The structural upgrade of the OpenStack database mainly refers to the database fields that are newly added during the iterative development process. OpenStack has two types of database upgrades that are mainly managed through the two tools Alembic and SQLAlchemy Migrate. Projects using SQLAlchemy Migrate: Keystone, Glance, Nova, Cinder, Heat, and projects using Alembic: Neutron, Ironic. During the upgrade process, it is necessary to upgrade by switching different historical versions of the OpenStack code. For the upgrade of the database, please refer to the corresponding records in step S502, which will not be repeated here.
[0207] Upgrade of configuration files: Update the configuration items of version P through the configuration items of the lower version.
[0208] Software package upgrade: Upgrade the software package through the traditional yum method.
[0209] During the upgrade process, first upgrade the software package, then upgrade the configuration items, and finally upgrade the database, and finally restart the service.
[0210] Step S506: function verification test.
[0211] After the upgrade is complete, tempest will be called for functional testing. This step completes the functional test by calling the tempest interface. If the functional test is normal, the upgrade is complete. If the functional test is abnormal, it indicates that the upgrade has failed and the upgrade rollback step is entered.
[0212] Step S507, upgrade rollback.
[0213] If the upgrade fails, a rollback is required. Rollback mainly includes three aspects: database recovery, configuration item recovery, and software package recovery. The database will be rolled back using the previous data backup. The software package is rolled back using yum history undo. Configuration items are rolled back by overwriting the old configuration items with the new ones.
[0214] This embodiment implements the entire process of OpenStack upgrade and rollback based on the traditional software package, does not rely on containers, and avoids the degradation of cloud platform performance.
[0215] The cloud platform upgrade method provided in this embodiment includes: platform information collection, database pre-testing, current cloud platform data backup, underlying virtual machine upgrade, cloud platform upgrade, post-upgrade functional test verification and upgrade rollback after upgrade failure. It can realize one-click fully automatic upgrade and rollback without manual intervention, and the upgrade time is short, avoiding upgrade failures caused by too much manual work; performing database pre-testing to avoid upgrade failures due to database anomalies can improve the success rate of cloud platform upgrades; the underlying virtual machine upgrade is upgraded in situ without the need for additional resources, and the upgrade process has no impact on the virtual machine business and does not rely on containers, avoiding cloud platform performance degradation.
[0216] The following is a description of an exemplary structure of a cloud platform upgrade device implemented as a software module provided in an embodiment of the present application. In some embodiments, Figure 2 As shown, the software modules stored in the cloud platform upgrade device 60 of the memory 140 may include:
[0217] The determination module 61 is used to determine the components to be upgraded according to the component information deployed in the current cloud platform and the component information of the target version cloud platform;
[0218] A sending module 62, configured to send a virtual machine migration instruction to the current cloud platform based on the virtual machine carried by the computing node of the current cloud platform;
[0219] A receiving module 63 is used to receive a migration completion instruction sent by the current cloud platform, wherein the migration completion instruction is an instruction sent by the current cloud platform after the migration of the virtual machine carried by the computing node is completed;
[0220] The upgrade module 64 is used to upgrade the components to be upgraded to obtain the target version cloud platform.
[0221] Here, the upgrading of the components to be upgraded includes: upgrading the software package, configuration files and database of the components to be upgraded of the current cloud platform, wherein the software package is upgraded by using yum.
[0222] In some embodiments, the cloud platform upgrading device 60 may further include:
[0223] A backup module, used to back up the database of the current cloud platform to obtain a backup database;
[0224] A loading module, used to load the backup database into a test environment, where the test environment is a pre-built test environment of the target version cloud platform;
[0225] The upgrade test module is used to perform an upgrade test on the backup database in the test environment.
[0226] In some embodiments, the upgrade module 64 may further include:
[0227] An upgrading unit, used for upgrading the component to be upgraded to obtain a component to be determined;
[0228] A testing unit, used for testing the function of the component to be determined;
[0229] The first determining unit is used to determine that the component to be upgraded is successfully upgraded when the function test of the component to be determined is successful, determine the component to be determined as the target component, and obtain the target version cloud platform.
[0230] In some embodiments, the upgrade module 64 may further include:
[0231] A backup unit, when the upgrade test of the backup database is successful, backs up the current cloud platform to obtain a backup cloud platform;
[0232] A second determining unit, configured to determine that the upgrade of the component to be upgraded fails when a function test of the component to be determined fails;
[0233] The rollback unit is used to roll back the component to be determined to the component to be upgraded by using the backup cloud platform.
[0234] In some embodiments, the upgrade module 62 may further include:
[0235] An acquisition unit, used to acquire the number of virtual machines carried by the computing node of the current cloud platform;
[0236] A third determining unit, configured to determine a migration order of the computing nodes based on the number of virtual machines carried by the computing nodes;
[0237] The sending unit is used to send migration instructions to the current cloud platform in sequence according to the migration order, so that the current cloud platform can migrate the virtual machines carried on the computing nodes in sequence.
[0238] In some embodiments, the sending unit may further include:
[0239] A sending subunit, configured to send an i-th migration instruction to the current cloud platform according to the migration order, so that the current cloud platform migrates the virtual machine carried by the i-th computing node, wherein i is a positive integer less than or equal to the number of computing nodes;
[0240] Accordingly, the receiving module 63 includes:
[0241] The receiving unit is used to receive the i-th migration completion instruction sent by the current cloud platform, where the i-th migration completion instruction is an instruction sent by the current cloud platform after the migration of the virtual machine carried on the i-th computing node is completed.
[0242] It should be noted that the cloud platform upgrade device provided in the embodiment of the present application corresponds to the cloud platform upgrade method provided in the embodiment of the present application and can achieve the same technical effect. Therefore, the description of the device is relatively simple. For relevant matters, please refer to the above description of the cloud platform upgrade method, which will not be repeated here.
[0243] The embodiment of the present application provides a storage medium storing executable instructions, wherein the executable instructions are stored. When the executable instructions are executed by a processor, the processor will execute the method provided by the embodiment of the present application, for example, Figure 3 , Figure 4 and Figure 5 The method shown.
[0244] In some embodiments, the storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or various devices including one or any combination of the above memories.
[0245] In some embodiments, executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.
[0246] As an example, executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file that stores other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).
[0247] By way of example, executable instructions may be deployed to be executed on one computing device, or on multiple computing devices located at one site, or on multiple computing devices distributed across multiple sites and interconnected by a communication network.
[0248] The above is only an embodiment of the present application and is not intended to limit the protection scope of the present application. Any modifications, equivalent substitutions and improvements made within the spirit and scope of the present application are included in the protection scope of the present application.
Claims
1. A cloud platform upgrade method, characterized in that: The method comprises: Determine the components to be upgraded based on the information of components deployed in the current cloud platform and the component information of the target version cloud platform; Backing up the database of the current cloud platform to obtain a backup database, and loading the backup database into a test environment, where the test environment is a pre-built test environment of the target version cloud platform; In the test environment, performing an upgrade test on the backup database; If the backup database in the test environment is successfully upgraded, a virtual machine migration instruction is sent to the current cloud platform based on the virtual machine carried on the computing node of the current cloud platform; Receiving a migration completion instruction sent by the current cloud platform, wherein the migration completion instruction is an instruction sent by the current cloud platform after the migration of the virtual machine carried by the computing node is completed; The components to be upgraded are upgraded to obtain the target version cloud platform.
2. The method according to claim 1, characterized in that: The step of upgrading the component to be upgraded to obtain the target version cloud platform includes: Upgrading the component to be upgraded to obtain a component to be determined; Testing the function of the component to be determined; When the function test of the component to be determined succeeds, it is determined that the component to be upgraded is upgraded successfully, the component to be determined is determined as the target component, and the target version cloud platform is obtained.
3. The method according to claim 2, characterized in that The method further comprises: When the upgrade test of the backup database is successful, backing up the current cloud platform to obtain a backup cloud platform; When a function test of the component to be determined fails, determining that the component to be upgraded fails to be upgraded; The backup cloud platform is used to roll back the component to be determined to the component to be upgraded.
4. The method according to claim 1, characterized in that: The step of sending a virtual machine migration instruction to the current cloud platform based on a virtual machine carried on a computing node of the current cloud platform includes: Obtain the number of virtual machines carried by the computing nodes of the current cloud platform; Determining a migration order of the computing nodes based on the number of virtual machines carried by the computing nodes; According to the migration order, migration instructions are sent to the current cloud platform in sequence, so that the current cloud platform migrates the virtual machines carried on the computing nodes in sequence.
5. The method according to claim 4, characterized in that The sending migration instructions to the current cloud platform in sequence according to the migration order so that the current cloud platform sequentially migrates the virtual machines carried by the computing nodes, including: Sending an i-th migration instruction to the current cloud platform according to the migration order, so that the current cloud platform migrates the virtual machine carried by the i-th computing node, where i is a positive integer less than or equal to the number of computing nodes; The receiving of the migration completion instruction sent by the current cloud platform, wherein the migration completion instruction is an instruction sent by the current cloud platform after the migration of the virtual machine carried by the computing node is completed, includes: An i-th migration completion instruction sent by the current cloud platform is received, where the i-th migration completion instruction is an instruction sent by the current cloud platform after the migration of the virtual machine carried on the i-th computing node is completed.
6. The method according to any one of claims 1 to 5, characterized in that: The upgrading of the components to be upgraded includes: upgrading the software package, the configuration file and the database of the components to be upgraded of the current cloud platform, wherein the software package is upgraded by using yum.
7. A cloud platform upgrade device, characterized in that: The device comprises: A determination module is used to determine the components to be upgraded based on the component information deployed in the current cloud platform and the component information of the target version cloud platform; A backup module, used to back up the database of the current cloud platform to obtain a backup database; A loading module, used to load the backup database into a test environment, where the test environment is a pre-built test environment of the target version cloud platform; An upgrade test module, used to perform an upgrade test on the backup database in the test environment; A sending module, configured to send a virtual machine migration instruction to the current cloud platform based on the virtual machine carried on the computing node of the current cloud platform if the backup database in the test environment is successfully upgraded; A receiving module, configured to receive a migration completion instruction sent by the current cloud platform, wherein the migration completion instruction is an instruction sent by the current cloud platform after the migration of the virtual machine carried by the computing node is completed; The upgrade module is used to upgrade the components to be upgraded to obtain the target version cloud platform.
8. A cloud platform upgrade device, characterized in that: include: A memory for storing executable instructions; A processor, configured to implement the method according to any one of claims 1 to 6 when executing the executable instructions stored in the memory.
9. A storage medium, characterized in that: Executable instructions are stored, which are used to cause a processor to execute and implement the method according to any one of claims 1 to 6.
