Data consistency service deployment method, device, electronic device and storage medium
By building a container image that is suitable for Kolla-ansible for the data consistency module of the OpenStack cloud computing management platform, and adding deployment configuration information to the Kolla-ansible configuration file, the problem of the lack of data consistency services on the platform is solved, and data consistency and platform stability are improved.
Patent Information
- Application Number
- CN202111276855.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-29
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2041-10-29
AI Technical Summary
The OpenStack cloud computing management platform lacks native data consistency services, and Kolla-ansible cannot deploy non-native services, resulting in the inability to deploy data consistency services on the platform, affecting the stable operation of the platform.
Build a container image suitable for Kolla-ansible for the data consistency module and push it to the mirror repository of the cloud computing management platform. Add deployment configuration information for deploying container images in Kolla-ansible's configuration file. When the platform starts deploying services, control Kolla-ansible to extract and deploy container images from the mirror repository to deploy the data consistency module to the platform.
It realizes the deployment of data consistency services on the OpenStack cloud computing management platform, improves the operation stability of the platform, and ensures data consistency and platform reliability.
Smart Images

Figure CN114153554B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of cloud computing, and in particular to a data consistency service deployment method, device, electronic device and computer-readable storage medium. Background Art
[0002] OpenStack is an open source cloud computing management platform that is composed of several major components to complete specific tasks. In order to reduce the complexity of OpenStack cluster operation and maintenance, Kolla-ansible is usually used to deploy OpenStack's various services and infrastructure components.
[0003] In the related art, the OpenStack platform is prone to data inconsistency problems in the platform when facing remote call failures, message sending failures, concurrent bugs, etc., which makes the cloud platform unable to run stably. Therefore, deploying data consistency services within the platform is of great significance to ensure the stable operation of the platform. However, the OpenStack platform does not have a native data consistency service, and Kolla-ansible cannot deploy non-native services, which makes it impossible to deploy data consistency services within the OpenStack platform.
[0004] Therefore, how to deploy data consistency services within the OpenStack cloud computing management platform is a technical problem that technical personnel in this field need to face. Summary of the invention
[0005] The purpose of the present invention is to provide a data consistency service deployment method, device, electronic device and storage medium, which can adapt the data consistency module and Kolla-ansible to ensure that Kolla-ansible can deploy the module into the cloud computing management platform.
[0006] In order to solve the above technical problems, the present invention provides a data consistency service deployment method, which is applied to a cloud computing management platform. The method comprises:
[0007] Build a container image adapted to Kolla-ansible for the data consistency module, and push the container image to the image repository of the cloud computing management platform;
[0008] Add deployment configuration information for deploying the container image in the configuration file of Kolla-ansible;
[0009] When the cloud computing management platform starts to deploy services, the Kolla-ansible is controlled to extract the container image from the image repository and deploy the container image according to the configuration file to deploy the data consistency module to the cloud computing management platform.
[0010] Optionally, building a container image adapted to Kolla-ansible for the data consistency module includes:
[0011] Setting the CentOS image as the base image of the data consistency module;
[0012] Installing the client of each module of the cloud computing management platform in the basic image;
[0013] After the client is installed, the code file of the data consistency module is installed in the basic image to obtain the container image.
[0014] Optionally, adding deployment configuration information for deploying the container image in the configuration file of the Kolla-ansible includes:
[0015] Adding a first configuration field in the global control file of the Kolla-ansible to indicate that the data consistency module needs to be deployed;
[0016] Determine the deployment location of each service in the data consistency module in each node of the cloud computing management platform, and add a second configuration field representing the deployment location in the host inventory file of Kolla-ansible;
[0017] Adding a third configuration field for identifying the data consistency module in the file module entry file of the Kolla-ansible;
[0018] A fourth configuration field for starting the data consistency module is added to the role directory file of the Kolla-ansible.
[0019] Optionally, deploying the container image according to the configuration file includes:
[0020] Determining whether the global control file contains the first configuration field;
[0021] If included, identifying the data consistency module in the container image according to the third configuration field, and deploying the services of the data consistency module to the node corresponding to the cloud computing management platform according to the second configuration field;
[0022] The communication storage configuration information of the data consistency module is configured, and the data consistency module is started according to the fourth configuration file.
[0023] Optionally, configuring the communication storage configuration information of the data consistency module includes:
[0024] Extracting storage configuration information of the database of the cloud computing management platform and communication configuration information of the message queue from the host machine running the data consistency module;
[0025] Mapping the storage configuration information and the communication configuration information to the data consistency module, so that the data consistency module can perform information exchange with each node of the cloud computing management platform through the database and the message queue;
[0026] The module information of the data consistency module is injected into the database, and an endpoint of the data consistency module is created in the database.
[0027] Optionally, the deploying various services of the data consistency module to nodes corresponding to the cloud computing management platform according to the second configuration field includes:
[0028] Deploy the API service and the Conductor service of the data consistency module to the control node of the cloud computing management platform to receive control plane instructions of the control node;
[0029] The Executor service of the data consistency module is deployed to all nodes of the cloud computing management platform to monitor the service status of each node.
[0030] Optionally, starting the data consistency module according to the fourth configuration file includes:
[0031] Start the API service, the Conductor service, and the Executor service in sequence.
[0032] The present invention also provides a data consistency service deployment device, which is applied to a cloud computing management platform, and the device includes:
[0033] An image building module, used to build a container image adapted to Kolla-ansible for the data consistency module, and push the container image to the image warehouse of the cloud computing management platform;
[0034] A configuration information adding module, used to add deployment configuration information for deploying the container image in the configuration file of the Kolla-ansible;
[0035] A deployment module is used to control the Kolla-ansible to extract the container image from the image repository and deploy the container image according to the configuration file when the cloud computing management platform starts to deploy the service, so as to deploy the data consistency module to the cloud computing management platform.
[0036] The present invention also provides an electronic device, comprising:
[0037] Memory for storing computer programs;
[0038] A processor is used to implement the data consistency service deployment method as described above when executing the computer program.
[0039] The present invention also provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are loaded and executed by a processor, the data consistency service deployment method as described above is implemented.
[0040] The present invention provides a data consistency service deployment method, which is applied to a cloud computing management platform. The method comprises: constructing a container image adapted to Kolla-ansible for a data consistency module, and pushing the container image to an image repository of the cloud computing management platform; adding deployment configuration information for deploying the container image in a configuration file of the Kolla-ansible; when the cloud computing management platform starts to deploy a service, controlling the Kolla-ansible to extract the container image from the image repository, and deploying the container image according to the configuration file, so as to deploy the data consistency module to the cloud computing management platform.
[0041] It can be seen that the present invention performs bidirectional adaptation on the container image file of the data consistency module and Kolla-ansible respectively. First, a container image adapted to Kolla-ansible is constructed for the data consistency module, and this image file is pushed to the image repository of the cloud computing management platform to ensure that the adapted Kolla-ansible can correctly obtain and identify the container image of the data consistency module; the present invention then adds deployment configuration information corresponding to the data consistency module container image in the configuration file of Kolla-ansible to ensure that Kolla-ansible can correctly deploy the data consistency module according to the configuration file; after completing the bidirectional adaptation, the present invention can control Kolla-ansible to extract the container image from the image repository and deploy the container image according to the configuration file, thereby achieving the effect of deploying the data consistency service inside the OpenStack cloud computing management platform, and then using the data consistency service to improve the operation stability of the OpenStack cloud computing management platform. The present invention also provides a data consistency service deployment device, an electronic device and a storage medium, which have the above-mentioned beneficial effects. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0043] Figure 1 A flow chart of a data consistency service deployment method provided by an embodiment of the present invention;
[0044] Figure 2 A flowchart of an adaptation container image file and Kolla-ansible provided by an embodiment of the present invention;
[0045] Figure 3 A flow chart of a data consistency service deployment process provided by an embodiment of the present invention;
[0046] Figure 4 A structural block diagram of a data consistency service deployment device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0047] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0048] In the related art, the OpenStack cloud computing management platform is prone to data inconsistency problems within the platform when facing remote call failures, message sending failures, concurrent bugs, etc., resulting in the cloud platform being unable to run stably. Therefore, deploying a data consistency service within the platform is of great significance to ensuring the stable operation of the platform. However, the OpenStack platform does not have a native data consistency service, and Kolla-ansible cannot deploy non-native services, which makes it impossible to deploy a data consistency service within the OpenStack platform. In view of this, the present invention provides a data consistency service deployment method that can adapt a data consistency module and Kolla-ansible to ensure that Kolla-ansible can correctly obtain and identify the container image of the data consistency module, and deploy the module to the cloud computing management platform according to the configuration file. Please refer to Figure 1 , Figure 1 A flow chart of a data consistency service deployment method provided by an embodiment of the present invention, which is applied to a cloud computing management platform and may include:
[0049] S101. Build a container image adapted to Kolla-ansible for the data consistency module, and push the container image to the image repository of the cloud computing management platform.
[0050] In the related technology, Kolla-ansible can only deploy native services for the OpenStack cloud computing management platform, and the data consistency service is not a native service of the platform. Therefore, before adaptation, Kolla-ansible will not be able to deploy the data consistency module. In an embodiment of the present invention, to solve this problem, the container image of the data consistency module is first adapted in a targeted manner to ensure that Kolla-ansible can recognize it normally. It should be noted that the embodiment of the present invention does not limit how to adapt the container image of the data consistency module, as long as this container image can be recognized by Kolla-ansible as a native service of the cloud computing management platform and can be deployed normally, you can refer to the related technologies of OpenStack and Kolla-ansible.
[0051] Preferably, in an embodiment of the present invention, in order to unify the operating environment of each module of the cloud computing management platform, the CentOS image file is first selected as the basic image of the data consistency module, wherein CentOS is a distribution version of the Linux operating system. Furthermore, in order to ensure that the data consistency module can interact with other modules in the cloud computing management platform, after setting up the basic image, the client of each module of the cloud computing management platform needs to be installed therein. The embodiment of the present invention does not limit the installation method of each client, and reference may be made to the relevant technology of OpenStack. After the installation is completed, the data consistency module can be installed in the basic image to obtain the container image file of the data consistency module.
[0052] In one possible scenario, building a container image for Kolla-ansible for the data consistency module may include:
[0053] Step 11: Set the CentOS image as the base image for the data consistency module;
[0054] Step 12: Install the clients of each module of the cloud computing management platform in the basic image;
[0055] Step 13: After the client is installed, install the code file of the data consistency module in the base image to obtain the container image.
[0056] After obtaining the container image, it can be pushed to the private image repository of the cloud computing management platform for Kolla-ansible to access.
[0057] S102. Add deployment configuration information for deploying container images in the Kolla-ansible configuration file.
[0058] After completing the adaptation of the container image, Kolla-ansible needs to be adapted next to ensure that it can effectively identify the deployment code in the data consistency module container image and effectively start the data consistency module after the deployment is completed. The embodiment of the present invention does not limit the specific adaptation method, as long as the adapted Kolla-ansible can correctly deploy and start the data consistency service. Specifically, configuration fields related to the data consistency module can be added to the global control file, host list file, file module entry file and role directory of Kolla-ansible, wherein the configuration field in the global control file is used to indicate whether the data consistency module needs to be deployed, the configuration field in the host list file is used to indicate the deployment location of each service in the data consistency module in each node of the cloud computing management platform, the configuration field in the file module entry file is used to identify the deployment code of the data consistency module in the container image file, and the configuration field in the role file is used to specify the startup order of each service of the data consistency module.
[0059] In one possible scenario, adding deployment configuration information for deploying container images to the Kolla-ansible configuration file may include:
[0060] Step 21: Add the first configuration field in the global control file of Kolla-ansible to indicate that the data consistency module needs to be deployed;
[0061] Step 22: Determine the deployment location of each service in the data consistency module in each node of the cloud computing management platform, and add a second configuration field representing the deployment location in the host inventory file of Kolla-ansible;
[0062] Step 23: Add a third configuration field for identifying the data consistency module in the file module entry file of Kolla-ansible;
[0063] Step 24: Add the fourth configuration field for starting the data consistency module in the Kolla-ansible role catalog file.
[0064] It should be noted that the embodiments of the present invention do not limit the specific contents of the first configuration field, the second configuration field, the third configuration field, and the fourth configuration field. For details, please refer to the relevant technologies of Kolla-ansible's global configuration file (globals.yml file), host list file (multinode file and all-in-one file), file module entry file (site.yml file), and role directory (role file). The embodiments of the present invention also do not limit the deployment locations of the various services in the data consistency module in each node of the cloud computing management platform. It is understandable that different types of data consistency modules may provide different types of services, that is, they may include different services, and the roles played by these services in the cloud computing management platform may also be different, so they can be set in combination with the specific selected data consistency module.
[0065] S103. When the cloud computing management platform starts to deploy services, Kolla-ansible is controlled to extract the container image from the image repository and deploy the container image according to the configuration file to deploy the data consistency module to the cloud computing management platform.
[0066] After completing the two-way adaptation, Kolla-ansible can be controlled to deploy the data consistency module to the cloud computing management platform according to the deployment configuration information in the above configuration file.
[0067] In one possible scenario, deploying a container image based on a configuration file may include:
[0068] Step 31: Determine whether the global control file contains the first configuration field; if so, proceed to step 32; if not, stop deployment or deploy other modules of the cloud computing management platform;
[0069] Step 32: Identify the data consistency module in the container image according to the third configuration field, and deploy various services of the data consistency module to the corresponding node of the cloud computing management platform according to the second configuration field;
[0070] Step 33: configure the communication storage configuration information of the data consistency module, and start the data consistency module according to the fourth configuration file.
[0071] It is understandable that the data consistency service is a service that detects whether the data of each module in the cloud computing management platform is consistent. Therefore, it is necessary to ensure that the data consistency service can access the database of the cloud computing management platform and save the detection results to the database; in addition, in the cloud computing management platform, message queues are usually used for data transmission, so it is also necessary to set the configuration information of the message queue for the data consistency module to ensure that the data consistency module can use the message queue normally. For this reason, in step 33, the communication storage configuration information set for the data consistency module is the above-mentioned configuration information for accessing the database and using the message queue. It should be noted that the embodiment of the present invention is not limited to the method of configuring the communication storage configuration information for the data consistency module, and reference may be made to the relevant technology of OpenStack.
[0072] In one possible scenario, configuring the communication storage configuration information of the data consistency module includes:
[0073] Step 41: extracting storage configuration information of the database of the cloud computing management platform and communication configuration information of the message queue from the host machine running the data consistency module;
[0074] Step 42: Mapping the storage configuration information and the communication configuration information to the data consistency module so that the data consistency module can exchange information with each node of the cloud computing management platform through the database and the message queue;
[0075] Step 43: Inject the module information of the data consistency module into the database, and create an endpoint of the data consistency module in the database.
[0076] In the cloud computing management platform, for the convenience of configuration, the storage configuration information of the database and the communication configuration information of the message queue are usually set in the host machine (i.e., the physical device), so the storage configuration information and the communication configuration information can be directly extracted from the host machine. The embodiment of the present invention does not limit the storage location of the storage configuration information and the communication configuration information in the host machine, and reference may be made to the relevant technologies of OpenStack. Furthermore, in order to store the data of the data consistency module in the database, it is also necessary to inject the module information of the data consistency module into the database, and create an endpoint for the data consistency module in the database, where the endpoint can be understood as the address of the data consistency module in the database. The embodiment of the present invention does not limit the specific content contained in the module information of the data consistency module, and it can be set according to the content injected into the database by other modules of OpenStack; the embodiment of the present invention does not limit the setting method of the endpoint, and reference may be made to the relevant technologies of the database.
[0077] Further, it should be clear that the deployment location of each data consistency service in the cloud computing management platform is related to the type of data consistency module. The embodiment of the present invention does not limit the specific type of the data consistency module, for example, it can be an existing data consistency framework, and of course it can also be a data consistency module developed for the cloud computing management platform. In the embodiment of the present invention, in order to effectively detect the cloud computing management platform, the data consistency module set up for the cloud computing management platform is selected. The embodiment of the present invention also does not limit the service content included in the module, and it can be set according to the detection requirements that may exist in the cloud computing management platform in terms of data consistency. In a possible situation, the data consistency module may include an API service (interface service), a Conductor service (detection task management service) and an Executor service (detection task execution service), wherein the API service is used to interact with the UI interface (UserInterface, user interface) of the cloud computing management platform, the Conductor service is used to manage data consistency detection tasks, and the Executor service is used to execute data consistency detection tasks. The deployment location of the above services can be: the API service and the Conductor service are deployed to the control node of the cloud computing management platform, and the Executor service is deployed to all nodes of the cloud computing management platform.
[0078] In a possible scenario, deploying various services of the data consistency module to the nodes corresponding to the cloud computing management platform according to the second configuration field may include:
[0079] Step 51: Deploy the API service and the Conductor service of the data consistency module to the control node of the cloud computing management platform to receive the control plane instructions of the control node;
[0080] Step 52: Deploy the Executor service of the data consistency module to all nodes of the cloud computing management platform to monitor the service status of each node.
[0081] Furthermore, to ensure that the data consistency module can work properly, these services can be started in the order of API service, Conductor service, and Executor service.
[0082] In a possible case, starting the data consistency module according to the fourth configuration file may include:
[0083] Step 61: Start the API service, Conductor service, and Executor service in sequence.
[0084] Based on the above embodiments, the present invention performs bidirectional adaptation on the container image file of the data consistency module and Kolla-ansible respectively. First, a container image adapted to Kolla-ansible is constructed for the data consistency module, and the image file is pushed to the image repository of the cloud computing management platform to ensure that the adapted Kolla-ansible can correctly obtain and identify the container image of the data consistency module; the present invention then adds deployment configuration information corresponding to the data consistency module container image to the configuration file of Kolla-ansible to ensure that Kolla-ansible can correctly deploy the data consistency module according to the configuration file; after completing the bidirectional adaptation, the present invention can control Kolla-ansible to extract the container image from the image repository and deploy the container image according to the configuration file, thereby achieving the effect of deploying the data consistency service within the OpenStack cloud computing management platform, and then using the data consistency service to improve the operation stability of the OpenStack cloud computing management platform.
[0085] The following is a detailed flowchart to describe the deployment method of the above data consistency service. Please refer to Figure 2 , Figure 2 A flowchart of adapting a container image file and Kolla-ansible provided in an embodiment of the present invention, the adaptation process may include:
[0086] 1. Adapt to Vega (data consistency service) container image.
[0087] A. Select the CentOS image as the base image of the Vega container;
[0088] B. Install the client of each OpenStack module in the base image and interact with each module;
[0089] C. Vega code installation.
[0090] 2. Push the Vega image to the cloud platform private warehouse.
[0091] 3. Modify the relevant code of Kolla-ansible to support the deployment of the Vega module.
[0092] A. Add the Vega field (enable_vega: "yes") in the global control file (globals.yml). This is the Vega service deployment switch, which can control whether the Vega service is deployed;
[0093] B. Add Vega groups to the host inventory file (multinode and all-in-one) and specify the nodes where the Vega services are deployed. The vega-api and vega-conductor services are deployed to the control node to receive control plane instructions. The vega-executor service is deployed to all nodes of the cloud platform to detect the service status of each component of the entire cloud apple.
[0094] C. Add Vega related fields to the file module entry file (site.yml) and use this field to identify Vega deployment code in Kolla-ansible;
[0095] D. Add the startup configuration of the Vega container under the role directory (roles).
[0096] For further information, please refer to Figure 3 , Figure 3 A flow chart of a data consistency service deployment process provided by an embodiment of the present invention. The deployment process may include:
[0097] 1. Identify the globals.yml file and determine whether the Vega service needs to be deployed; if so, proceed to step 2; if not, deploy other services;
[0098] 2. Parse the multinode file and start different Vega services on different functional nodes;
[0099] 3. Map database and message queue related configuration files to realize information interaction with other modules;
[0100] 4. Inject Vega module information into the database and create Vega endpoint;
[0101] 5. Start the vega-api service to interact with the UI interface;
[0102] 6. Start the vega-conductor service to manage the detection tasks;
[0103] 7. Start the vega-executor service and execute the detection task.
[0104] The following is an introduction to the data consistency service deployment device, electronic device and computer-readable storage medium provided in an embodiment of the present invention. The data consistency service deployment device, electronic device and computer-readable storage medium described below can be referenced to each other with the data consistency service deployment processing method described above.
[0105] Please refer to Figure 4 , Figure 4This is a structural block diagram of a data consistency service deployment device provided by an embodiment of the present invention. The device is applied to a cloud computing management platform and may include:
[0106] An image building module 401 is used to build a container image adapted to Kolla-ansible for the data consistency module, and push the container image to the image repository of the cloud computing management platform;
[0107] Configuration information adding module 402, used to add deployment configuration information of deploying container images in the configuration file of Kolla-ansible;
[0108] The deployment module 403 is used to control Kolla-ansible to extract the container image from the image repository and deploy the container image according to the configuration file when the cloud computing management platform starts to deploy the service, so as to deploy the data consistency module to the cloud computing management platform.
[0109] Optionally, the image building module 401 includes:
[0110] The base image setting submodule is used to set the CentOS image as the base image of the data consistency module;
[0111] The client installation submodule is used to install the clients of each module of the cloud computing management platform in the basic image;
[0112] The code installation submodule is used to install the code file of the data consistency module in the base image after the client is installed to obtain the container image.
[0113] Optionally, the configuration information adding module 402 includes:
[0114] A first adding submodule is used to add a first configuration field for indicating that a data consistency module needs to be deployed in a global control file of Kolla-ansible;
[0115] The second adding submodule is used to determine the deployment location of each service in the data consistency module in each node of the cloud computing management platform, and add a second configuration field representing the deployment location in the host inventory file of Kolla-ansible;
[0116] The third adding submodule is used to add a third configuration field for identifying the data consistency module in the file module entry file of Kolla-ansible;
[0117] A fourth added submodule is used to add a fourth configuration field for starting a data consistency module in the role directory file of Kolla-ansible.
[0118] Optionally, the deployment module 403 includes:
[0119] A judgment submodule, used for judging whether the global control file contains the first configuration field;
[0120] A deployment submodule, for, if included, identifying the data consistency module in the container image according to the third configuration field, and deploying the services of the data consistency module to the corresponding node of the cloud computing management platform according to the second configuration field;
[0121] The startup submodule is configured to configure the communication storage configuration information of the data consistency module and start the data consistency module according to the fourth configuration file.
[0122] Optionally, configure a promoter module, including:
[0123] A configuration information extraction unit, used to extract storage configuration information of the database of the cloud computing management platform and communication configuration information of the message queue from the host machine running the data consistency module;
[0124] A data consistency module configuration unit, used to map storage configuration information and communication configuration information to the data consistency module, so that the data consistency module can exchange information with each node of the cloud computing management platform through the database and message queue;
[0125] The database configuration unit is used to inject the module information of the data consistency module into the database and create an endpoint of the data consistency module in the database.
[0126] Optionally, deploy submodules, including:
[0127] A first deployment unit is used to deploy the API service and the Conductor service of the data consistency module to the control node of the cloud computing management platform to receive the control plane instruction of the control node;
[0128] The second deployment unit is used to deploy the Executor service of the data consistency module to all nodes of the cloud computing management platform to monitor the service status of each node.
[0129] Optionally, configure a promoter module, including:
[0130] The startup unit is used to start the API service, Conductor service, and Executor service in sequence.
[0131] An embodiment of the present invention further provides an electronic device, including:
[0132] Memory for storing computer programs;
[0133] The processor is used to implement the steps of the above-mentioned data consistency service deployment method when executing a computer program.
[0134] Since the embodiments of the electronic device part correspond to the embodiments of the data consistency service deployment method part, the embodiments of the electronic device part refer to the description of the embodiments of the data consistency service deployment method part, which will not be repeated here.
[0135] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the data consistency service deployment method of any of the above embodiments are implemented.
[0136] Since the embodiments of the computer-readable storage medium part correspond to the embodiments of the data consistency service deployment method part, please refer to the description of the embodiments of the data consistency service deployment method part for the embodiments of the storage medium part, which will not be repeated here.
[0137] The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.
[0138] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0139] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0140] The above is a detailed introduction to a data consistency service deployment method, device, electronic device and computer-readable storage medium provided by the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present invention, several improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the scope of protection of the claims of the present invention.
Claims
1. A data consistency service deployment method, characterized in that: Applied to a cloud computing management platform, the method includes: Build a container image adapted to Kolla-ansible for the data consistency module, and push the container image to the image repository of the cloud computing management platform; Add deployment configuration information for deploying the container image in the configuration file of Kolla-ansible; When the cloud computing management platform starts to deploy services, control the Kolla-ansible to extract the container image from the image repository and deploy the container image according to the configuration file, so as to deploy the data consistency module to the cloud computing management platform; Adding deployment configuration information for deploying the container image in the configuration file of Kolla-ansible includes: Adding a first configuration field in the global control file of the Kolla-ansible to indicate that the data consistency module needs to be deployed; Determine the deployment location of each service in the data consistency module in each node of the cloud computing management platform, and add a second configuration field representing the deployment location in the host inventory file of Kolla-ansible; Adding a third configuration field for identifying the data consistency module in the file module entry file of the Kolla-ansible; Adding a fourth configuration field for starting the data consistency module in the role directory file of the Kolla-ansible; The deploying the container image according to the configuration file includes: Determining whether the global control file contains the first configuration field; If included, the data consistency module is identified in the container image according to the third configuration field, and the services of the data consistency module are deployed to the node corresponding to the cloud computing management platform according to the second configuration field; The communication storage configuration information of the data consistency module is configured, and the data consistency module is started according to the fourth configuration field.
2. The data consistency service deployment method according to claim 1, characterized in that: The step of building a container image adapted to Kolla-ansible for the data consistency module includes: Setting the CentOS image as the base image of the data consistency module; Installing the client of each module of the cloud computing management platform in the basic image; After the client is installed, the code file of the data consistency module is installed in the base image to obtain the container image.
3. The data consistency service deployment method according to claim 1, characterized in that: The communication storage configuration information of configuring the data consistency module includes: Extracting storage configuration information of the database of the cloud computing management platform and communication configuration information of the message queue from the host machine running the data consistency module; Mapping the storage configuration information and the communication configuration information to the data consistency module so that the data consistency module can perform information exchange with each node of the cloud computing management platform through the database and the message queue; The module information of the data consistency module is injected into the database, and an endpoint of the data consistency module is created in the database.
4. The data consistency service deployment method according to claim 1, characterized in that: The deploying the services of the data consistency module to the nodes corresponding to the cloud computing management platform according to the second configuration field includes: Deploy the API service and the Conductor service of the data consistency module to the control node of the cloud computing management platform to receive control plane instructions of the control node; The Executor service of the data consistency module is deployed to all nodes of the cloud computing management platform to monitor the service status of each node.
5. The data consistency service deployment method according to claim 4, characterized in that: The starting the data consistency module according to the fourth configuration field includes: Start the API service, the Conductor service, and the Executor service in sequence.
6. A data consistency service deployment device, characterized in that: Applied to a cloud computing management platform, the device comprises: An image building module, used to build a container image adapted to Kolla-ansible for the data consistency module, and push the container image to the image warehouse of the cloud computing management platform; A configuration information adding module, used to add deployment configuration information for deploying the container image in the configuration file of the Kolla-ansible; A deployment module, used to control the Kolla-ansible to extract the container image from the image repository and deploy the container image according to the configuration file when the cloud computing management platform starts to deploy the service, so as to deploy the data consistency module to the cloud computing management platform; The configuration information adding module includes: A first adding submodule is used to add a first configuration field in the global control file of the Kolla-ansible, which is used to indicate that the data consistency module needs to be deployed; A second adding submodule is used to determine the deployment location of each service in the data consistency module in each node of the cloud computing management platform, and to add a second configuration field representing the deployment location in the host inventory file of the Kolla-ansible; A third adding submodule, used to add a third configuration field for identifying the data consistency module in the file module entry file of the Kolla-ansible; A fourth adding submodule, used to add a fourth configuration field for starting the data consistency module in the role directory file of the Kolla-ansible; The deployment module includes: A judging submodule, used for judging whether the global control file contains the first configuration field; A deployment submodule, for, if included, identifying the data consistency module in the container image according to the third configuration field, and deploying the services of the data consistency module to the corresponding node of the cloud computing management platform according to the second configuration field; A configuration startup submodule is configured to configure the communication storage configuration information of the data consistency module and to start the data consistency module according to the fourth configuration field.
7. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the data consistency service deployment method as described in any one of claims 1 to 5 when executing the computer program.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are loaded and executed by the processor, the data consistency service deployment method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Container service deployment method, device and equipment and readable storage medium
CN111736956A