CN118069168A - Database deployment method, device and apparatus - Google Patents

Database deployment method, device and apparatus Download PDF

Info

Publication number
CN118069168A
CN118069168A CN202410153656.0A CN202410153656A CN118069168A CN 118069168 A CN118069168 A CN 118069168A CN 202410153656 A CN202410153656 A CN 202410153656A CN 118069168 A CN118069168 A CN 118069168A
Authority
CN
China
Prior art keywords
database
information
virtual machine
target
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410153656.0A
Other languages
Chinese (zh)
Inventor
贾彦平
杨占晓
许芳函
孟维涛
谢宇
刘鹏
彭夕
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Aisino Corp
Original Assignee
Aisino Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Aisino Corp filed Critical Aisino Corp
Priority to CN202410153656.0A priority Critical patent/CN118069168A/en
Publication of CN118069168A publication Critical patent/CN118069168A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application relates to the technical field of databases, in particular to a database deployment method, equipment and device, which are used for improving the deployment efficiency of a database. In the embodiment of the application, in the process of database deployment, a first deployment module creates a database virtual machine in a mode of cloning a common virtual machine, wherein the database virtual machine comprises target application software which is deployed in advance; the second deployment module generates a target template through target application software which is deployed in advance in the database virtual machine, wherein the target template comprises mirror image information of the database virtual machine; and the second deployment module uploads the target template to the cloud platform, and is used for installing database software corresponding to the configuration information in a corresponding virtual machine in an instantiation mode based on the target template according to the configuration information selected by a user to obtain a database instance.

Description

Database deployment method, device and apparatus
Technical Field
The present application relates to the field of database technologies, and in particular, to a method, an apparatus, and a device for deploying a database.
Background
With the development of science and technology, the application of database services is also more and more widespread, the development of databases is also more and more emphasized, and with the advent of cloud computing technology capable of more conveniently acquiring computing resources and application programs, database services based on cloud computing technology, which are obtained by combining databases with cloud computing, are also rising.
The current cloud database technology is mainly implemented by providing database resources for users, and the users can access and manage the database resources through the cloud computing technology. The service of the cloud database can be used as required, database software and hardware do not need to be purchased and deployed, and the data processing efficiency of enterprises can be improved and the cost can be reduced.
However, in the process of operating and maintaining cloud databases, in particular to databases deployed on private clouds, the common cloud database system has low efficiency due to excessive manual intervention and manual operation, and service may be seriously unavailable.
Disclosure of Invention
The application aims to provide a database deployment method, equipment and device, which are used for improving the playback performance of ultrasonic images and improving the experience of users.
In a first aspect, the present application provides a database deployment method, the method comprising:
The method comprises the steps that a first deployment module creates a database virtual machine in a mode of cloning a common virtual machine, wherein the database virtual machine comprises target application software which is deployed in advance;
the second deployment module generates a target template through target application software which is deployed in advance in the database virtual machine, wherein the target template comprises mirror image information of the database virtual machine;
And the second deployment module uploads the target template to the cloud platform, and is used for installing database software corresponding to the configuration information in a corresponding virtual machine in an instantiation mode based on the target template according to the configuration information selected by a user to obtain a database instance.
Optionally, the method further comprises:
when a physical resource pool is added, front-end auditing is carried out on first target information of the physical resource pool to be added, wherein the first target information comprises a server IP address;
And after the front-end auditing is confirmed to pass, sending second target information obtained by encoding the first target information to a rear end, and sending third target information output by the rear end based on the second target information to a SaltStack end so that the SaltStack end performs cluster configuration based on the IP address of the server.
Optionally, the method further comprises:
The back end obtains fourth target information of cluster configuration sent by the SaltStack end;
And writing the fourth target information into corresponding fields of a target database table, and setting the server state corresponding to the IP address to be available.
Optionally, after the database software corresponding to the configuration information is instantiated and installed in the corresponding virtual machine, the method further includes:
after acquiring input information which is adjusted by a user based on the database instance, the back end performs data synchronization based on the database instance information, and the state field of the database instance is modified to be in a disabled state;
The back end sends the database instance information to SALTSLACK and receives server information for the database instance information returned by SALTSLACK;
the back end determines a server pool meeting the requirements based on the server information, and adjusts the database instance based on the input information;
and transmitting the adjusted database instance information to SALTSLACK ends.
Optionally, before the backend determines the server pool that meets the requirement based on the server information, the method further includes:
the back end calculates the current residual storage and disk size of each server pool through weighting;
If all the server pools are determined not to meet the requirements, returning to the creation error.
In a second aspect, the present application provides a database deployment apparatus comprising:
The first deployment module is used for creating a database virtual machine in a mode of cloning a common virtual machine, wherein the database virtual machine comprises target application software which is deployed in advance;
The second deployment module is used for generating a target template through target application software which is deployed in advance in the database virtual machine, wherein the target template comprises mirror image information of the database virtual machine;
The second deployment module is further configured to upload the target template to a cloud platform, and based on the target template, install database software corresponding to the configuration information in a corresponding virtual machine in an instantiation manner according to the configuration information selected by a user, so as to obtain a database instance.
Optionally, the apparatus further includes:
The front-end module is used for performing front-end auditing on first target information of the physical resource pool to be added when the physical resource pool is added, wherein the first target information comprises a server IP address; after the front-end audit is confirmed to pass, second target information obtained after the first target information is encoded is sent to the rear end;
And the back-end module is used for sending a third target message output based on the second target information to the SaltStack end so that the SaltStack end performs cluster configuration based on the server IP address.
Optionally, the back-end module is further configured to:
acquiring fourth target information of cluster configuration sent by a SaltStack end;
And writing the fourth target information into corresponding fields of a target database table, and setting the server state corresponding to the IP address to be available.
Optionally, the back-end module is further configured to:
After the input information which is adjusted by the user based on the database instance is obtained, carrying out data synchronization based on the database instance information, and modifying the state field of the database instance into a disabled state;
Transmitting the database instance information to SALTSLACK, and receiving server information for the database instance information returned by the SALTSLACK;
Determining a server pool meeting requirements based on the server information, and adjusting the database instance based on the input information;
and transmitting the adjusted database instance information to SALTSLACK ends.
Optionally, the back-end module is further configured to:
calculating the current residual storage and disk size of each server pool through weighting;
If all the server pools are determined not to meet the requirements, returning to the creation error.
In a third aspect, the present application provides a computer readable storage medium, which when executed by an electronic device, causes the electronic device to perform a database deployment method as described in the first aspect above.
In a fourth aspect, the application provides a computer program product comprising a computer program:
The computer program, when executed by a processor, implements a database deployment method as described in the first aspect above.
The technical scheme provided by the embodiment of the application at least has the following beneficial effects:
According to the embodiment of the application, the mysql cloud database module in the automatic deployment module is matched with the static deployment module for use, the mysql cloud database module instantiates a new virtual machine in a virtual machine template mirroring mode, so that the rapid deployment of the application or service is realized, the deployment period is greatly shortened, the deployment flow is simplified, and a user does not know the specific deployment process at all. The cloud database system can be used rapidly by modifying few configurations after deployment, so that convenience and operation efficiency of the whole system in the use process are improved, meanwhile, the cloud database system can be deployed automatically based on SaltStack, complex operation and maintenance tasks can be executed efficiently, risks of human misoperation are reduced, accuracy and repeatability of operation are guaranteed, the possibility of system failure is reduced, availability and reliability of the whole system are improved, saltStack is further known and learned, and a tamped technical basis is provided for applying more open source tool management cloud platforms in future.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments of the present application will be briefly described below, and it is obvious that the drawings described below are only some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a first database deployment architecture according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a module architecture in a database deployment according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a module architecture in another database deployment according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a database deployment process according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a module architecture in another database deployment according to an embodiment of the present application;
FIG. 6 is a schematic flow chart of creating a server pool SALTSLACK according to an embodiment of the present application;
FIG. 7 is a schematic diagram of a database deployment method according to an embodiment of the present application;
FIG. 8 is a schematic diagram of a database deployment device according to an embodiment of the present application;
Fig. 9 is a schematic diagram of another database deployment apparatus according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present disclosure more apparent, the technical solutions of the present disclosure will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present disclosure, and it is apparent that the described embodiments are some embodiments of the technical solutions of the present disclosure, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without inventive effort, based on the embodiments described in the present disclosure are intended to be within the scope of the present disclosure.
In the embodiment of the invention, the term "and/or" describes the association relation of the association objects, which means that three relations can exist, for example, a and/or B can be expressed as follows: a exists alone, A and B exist together, and B exists alone. The character "three kinds generally indicates that the front-rear association object is an or relationship.
The terms first, second and the like in the description and in the claims and in the above-described figures, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be capable of being practiced otherwise than as specifically illustrated and described.
The application scenario described in the embodiment of the present invention is for more clearly describing the technical solution of the embodiment of the present invention, and does not constitute a limitation on the technical solution provided by the embodiment of the present invention, and as a person of ordinary skill in the art can know that the technical solution provided by the embodiment of the present invention is applicable to similar technical problems as the new application scenario appears. In the description of the present invention, unless otherwise indicated, the meaning of "a plurality" is two or more.
The current cloud database technology is mainly implemented by providing database resources for users, and the users can access and manage the database resources through the cloud computing technology. The service of the cloud database can be used as required, database software and hardware do not need to be purchased and deployed, and the data processing efficiency of enterprises can be improved and the cost can be reduced.
However, in the process of operating and maintaining cloud databases, in particular to databases deployed on private clouds, the common cloud database system has low efficiency due to excessive manual intervention and manual operation, and service may be seriously unavailable.
In order to solve the technical problems, the embodiment of the application provides a database deployment method, which is characterized in that a mysql cloud database module in an automatic deployment module is matched with a static deployment module for use, and the mysql cloud database module instantiates a new virtual machine in a virtual machine template mirroring mode, so that the rapid deployment of applications or services is realized, the deployment period is greatly shortened, the deployment flow is simplified, and a user does not know the specific deployment process at all. In addition, the method and the device can be used rapidly by modifying few configurations after deployment is completed, so that convenience and operation efficiency of the whole system in the use process are improved, meanwhile, the cloud database system can be deployed automatically based on SaltStack, complex operation and maintenance tasks can be executed efficiently, risks of human misoperation are reduced, accuracy and repeatability of operation are guaranteed, the possibility of system failure is reduced, availability and reliability of the whole system are improved, deeper understanding and learning are provided for SaltStack, and a tamping technology foundation is provided for managing a cloud platform by applying more open source tools in future.
Fig. 1 schematically illustrates an exemplary system architecture that may be applied to a database deployment method according to an embodiment of the present disclosure. The system architecture may include a power module 100, a user management module 200, an automated deployment module 300, a virtual machine management module 400, and a database module 500.
As an example, in the embodiment of the present application, the output end of the power supply module 100 is connected to the input end of the user management module 200, the output end of the user management module 200 is connected to the input end of the automatic deployment module 300, the output end of the automatic deployment module 300 is connected to the input end of the virtual machine management module 400, and the output end of the virtual machine management module 400 is connected to the input end of the database module 500.
The user management module 200 is configured to perform functions of creating a user, resetting a user password, authorizing the user, deleting the user, and the like.
Further, in the embodiment of the present application, the user management module may include a plurality of cases when in use, and is not limited to the following 4 cases:
case 1: a user is created.
In this case 1, when the user management module is used for user creation, the creation may be a new user or an administrator may be created from an existing user.
Illustratively, the user enters a user password for creation by operating the user management module. Other information of the user can be correspondingly perfected after the corresponding user logs in.
As an example, when a user uses the database deployment system provided by the embodiment of the application, the user can use the database deployment system to perform batch addition user operation when the identity of the user is an administrator.
For example, when a user with an administrator identity uses the database deployment system described in the embodiment of the present application to add users in batches, the administrator can directly create a user account in the background database as long as inputting the number of users to be added, the user name defaults to use-numbers, and the password is a default value set by the system.
Case 2: the user is deleted.
In this case 2, when the user management module is used to perform user deletion, the embodiment of the present application may delete an administrator user or delete a general user.
Illustratively, the user, by operating the user management module, changes the status field value such that the user status becomes unavailable without deleting the user data.
As an example, when a user uses the database deployment system provided by the embodiment of the application, the user can use the database deployment system to perform batch deletion user operation when the identity of the user is an administrator.
Case 3: the user password is reset.
For example, when a general user forgets his own password, an administrator may be contacted, and the administrator resets the user password by operating the user management module.
Case 4: the user rights change.
Illustratively, an administrator may implement the modification of user rights by operating the user management module.
As an example, as shown in fig. 2, the automation deployment module 300 in the embodiment of the present application may be provided with a mysql cloud database module 310 and a static deployment module 320.
The integral output ends of the mysql cloud database module 310 and the static deployment module 320 are connected with the input end of the automated deployment module 300.
Further, the mysql cloud database module 310 according to the embodiment of the present application has a function of quickly creating a virtual machine.
Illustratively, the mysql cloud database module 310 according to the embodiment of the present application may quickly create a virtual machine by using a common virtual machine image cloning method, and omits the step of installing an operating system.
In addition, the embodiment of the application can take the installed virtual machine of mysql as a template, thereby rapidly instantiating a mysql database instance and providing mysql database service.
Referring to fig. 3, the embodiment of the application provides a mysql cloud database module for implementing mysql automatic installation mode through Ansible playbook, which specifically comprises the following steps:
Step 301: writing a mysql role file uniform entry.
Illustratively, the unified portal of the mysql role file written in the embodiment of the application is mysql.
Step 302: character variables are written.
Illustratively, the character variables written in embodiments of the present application may be/vars/man.
Step 303: and writing task files to be executed by the roles.
By way of example, the task files described in the embodiments of the present application may include copy. Yml, install. Yml, main. Yml, and the like.
Step 304: writing deployment mysql script files.
Illustratively, the mysql script file written in the embodiment of the present application may be mysql_user.
As an example, in addition to installing mysql, this script in embodiments of the present application also performs default configuration of some parameters for mysql and resets the password for mysql.
Step 305: setting mysql boot-up self-start/meta/main.yml;
Step 306: automated deployment of mysql database is achieved by executing playbook with an ansable-playbook mysql.yml command.
The static deployment module is used for uploading the corresponding virtual machine image to the cloud platform as a template by utilizing the required application software deployed in the virtual machine, so that a user can quickly instantiate the virtual machine with the application software installed.
As an example, in the embodiment of the present application, the administrator may configure the required application software in the virtual machine in advance according to the requirement.
Based on the mode, static deployment gives more complicated deployment operation and configuration operation to a system administrator for processing, a user does not care or seldom care about configuration problems, the user can effectively omit an intermediate installation process, and software or service in the virtual machine is directly used.
Referring to fig. 4 described below, the embodiment of the present application provides a static deployment scheme for designing a mysql cloud database service system according to the idea of static deployment, which specifically includes the following steps:
Step 401: and creating a virtual machine, connecting the virtual machine to complete the installation of an operating system by using a connecting tool, and configuring the virtual machine basically.
For example, in the embodiment of the application, an administrator can use a QEMU-KVM virtualization technology to connect to a virtual machine by using a VNC connection tool to complete the installation of an operating system and the basic configuration of the virtual machine.
Step 402: and finishing SSH mutual trust configuration between the virtual machine and the server host.
By way of example, embodiments of the present application may enable SSH mutually trusted configuration between a virtual machine and a server host by an administrator using an accept tool.
Step 403: based on playbook of mysql automated deployment, automated deployment of mysql in the virtual machine is completed by using an ansable automated deployment tool.
Illustratively, playbook may be pre-written for an administrator.
Step 404: and taking the virtual machine as a template to make a mirror image or snapshot, and uploading the mirror image or snapshot to the cloud platform.
Step 405: the user selects the configuration of the cloud database according to the own requirements, and the system selects a proper mirror image to instantiate a virtual machine according to the configuration selected by the user.
As an example, as shown in fig. 5, the mysql cloud database module 310 in the embodiment of the present application may further be provided with a physical resource pool module 311, an instance creation and deletion module 312, an instance operation module, and a backup restoration module 313.
The integral output ends of the physical resource pool module 311, the instance creation and deletion module 312, the instance operation module and the backup recovery module 313 are connected with the input end of the mysql cloud database module 310.
The physical resource pool module 311 is configured to implement physical resource pool addition.
As an example, in the embodiment of the present application, when adding a physical resource pool based on the physical resource pool module, the platform performs front-end audit through information such as IP format, string length, multicast address, and the like.
The method can be divided into a plurality of cases according to different auditing results, and is not limited to the following two cases:
Case 1: verification pass
When the audit passes, embodiments of the present application may encode the above information at the front end and send them to the C++ backend in ASN.1 format.
Case 2: failure of audit
When the auditing fails, the system of the embodiment of the application prompts the user that the verification fails.
Then, the c++ backend decodes the asn.1 message and writes ServerPoolList the relevant information entered by the website into the database table, at which time the server pool is in an unavailable state.
After this, the servers in the server pool will be ping multiple times by the c++ backend.
If the C++ back end can successfully ping the IP address of the server, the message output by the back end is encoded according to the protocol buffer format and is sent to the SaltStack end.
After the message after the ping is sent to the SaltStack end, the message of the protocol buffer area is decoded first, then the SaltStack interface is called, and the cluster configuration is carried out on the server according to the IP address.
The process of configuring the cluster includes creating a virtual IP address, installing PACEMAKER, installing Corosync, and configuring the database 4 points.
In configuring a cluster, a volume group may be created by SaltStack in order to enable subsequent created database instances to share storage.
As the above work is completed SALTSTACKMASTER receives the relevant information from the Salt-Minion cluster, encodes the received information into protocol buffer format and returns it to the C++ backend.
The c++ backend writes ServerPoolList the information received from the SaltStack into the corresponding field of the table and sets the server state to available.
At this point, the addition of the physical resource pool has been completed.
It will be appreciated that if an error occurs at any stage of the addition, the server status field in the database table will be modified to fail the addition.
The instance creation and deletion module is used for executing the creation and deletion of the instance.
As an example, when creating an instance based on the instance creation and deletion module, the platform performs front-end verification on input information such as the maximum connection number, the instance capacity, verification content and the like.
It is further determined whether the instance name is legal and whether the private network is connected.
The verification method can be divided into a plurality of cases according to different verification results, and is not limited to the following two cases:
case 1: and cannot pass verification.
If the verification is case 1, the system alerts the user to make the rectification.
Case 2: verification passes.
If the verification result is the case 2, the foreground encrypts the input information and sends the encrypted input information to the c++ server for processing the asn.1 message format.
After receiving the asn.1 message, the c++ server first decrypts the asn.1 message, synchronizes DbEntityList data according to the decrypted information, and modifies its status field to a disabled state.
The C++ server sends a server pool resource information synchronization request to SALTSLACK.
When SALTSLACK MASTER receives all the Salt-Minion state information, the server information is returned to the C++ server immediately, and the server updates the received information into the ServerPoolList table.
And (5) calculating the current residual storage and disk size of each server pool through weighting, and selecting the server pool meeting the requirements.
If all the server pools do not meet the requirements, returning a creation error; if the requirements are met, the CREATE INSTANCE method is called to retrieve the instance information from the DbEntityList database table and pass it to the SALTSLACK side in protocol buffer message format.
Upon receipt of the message SALTSLACK will create an instance of the server pool.
Referring to fig. 6 described below, an embodiment of the present application provides an example method for creating a server pool SALTSLACK, which specifically includes the steps of:
Step 601: a shared storage LVM is created for installing database instances.
Step 602: an instance is created in the LVM and a random password and delta port number are generated for each instance.
Step 603: the instances are configured PACEMAKER to form a cluster state with standby functionality.
Step 604: the state of the instance is detected.
As an example, in performing the detection, if it is determined that the number of detections exceeds a threshold number of times, for example, the threshold number of times is 25 times, that is, if 25 consecutive detections are not available, the creation will fail.
Step 605: after determining the instance state, the state information of the server pool may be updated.
Step 606: SALTSLACK returns the results to the c++ server, updates DbEntityList information, and sets the status to available.
Illustratively, the DbEntityList information may include VIP, username, and Password.
It will be appreciated that in performing instance creation, if a certain step fails, the state is set to create failure.
The instance operation module is used for providing a plurality of database parameter preset values for the database instance by the system and storing the database parameter preset values in ALLPARAMETERLIST database tables in a lasting mode.
Further, in the embodiment of the present application, after the database storage is completed by the instance operation module, the front end checks the input information on the page, if the information input by the user is illegal, the front end requests the user to input again until the input is correct, and sends the correct information to the c++ server in an asn.1 message encoding format.
The message contains information such as instance ID, parameter Uuid, current value of parameter, and changed value.
And the backup recovery module is used for carrying out data recovery according to the backed-up data.
As an example, in the embodiment of the present application, the instance backup corresponding to the backup recovery module includes two parts, namely an instant backup and a timing backup. The backup strategy may be recorded in BackupStraList tables, including backup time and method.
Illustratively, when a specified time is reached, the instance is automatically backed up. Information about the backed-up file is recorded in BackupInfoList table, including the backup Type and backup method, distinguished by Type and BackupType fields.
The backup recovery module is specifically realized as follows:
after decoding the ASN.1 message, the C++ server writes the backup information into BackupInfoList table.
Whether it is an incremental backup or a full backup is determined according to the backup type.
In performing incremental backups, it is necessary to confirm whether all the history backup records can be retrieved.
If the complete history backup record can not be found, the current increment buffer information format is encoded and sent to SLATSTACK ends for processing, and the information comprises the backup type, the backup path, the backup method and the instance name.
After decoding the protocol buffer message at SLATSTACK, a backup may be performed according to the backup type, using innobackupex tool to name the backup file in a time-stamped manner by instance name, and starting the backup.
After the completion of backup is detected, SLATSTACK returns a backup status message to the c++ server, and the user can query the status of the backup instance at the front end through the backup information of the BackupInfoList table.
The virtual machine management module is used for executing functions of creating, deleting, starting, closing, configuring the virtual machine and the like of the virtual machine.
As an example, the virtual machine management module in the embodiment of the application comprises common virtual machine management and mysql virtual machine management. The mysql virtual machine refers to creating a virtual machine with a common virtual machine image, and automatic deployment of mysql databases in the virtual machine is achieved using an automated deployment tool Ansible.
Wherein mysql virtual machine management functions similarly to normal virtual machine management.
As an example, the virtual machine management module in the embodiments of the present application may perform management using QEMU-KVM virtualization technology.
Illustratively, KVM is responsible for the virtualization of processors and memory, and QEMU is responsible for the virtualization of disks. For example, linux Bridge is used for realizing the virtualization of a network card, a virtual machine connects a network card eth0 in the virtual machine through a physical machine br0 through virtual network equipment tun/tap, br0 can play a role of a switch, when the virtual machine communicates with the outside, an emitted data packet is transmitted to br0 of the physical machine through eth0 of the virtual machine, and then is transmitted to eth0 of the physical machine through br0, and the data packet is transmitted to the outside through TCP/IP to realize communication. Moreover, the foregoing descriptions of fig. 1-5 are merely examples of a system architecture or a method flow to which the embodiments of the present disclosure may be applied to help those skilled in the art understand the technical content of the present disclosure, and do not mean that the embodiments of the present disclosure may not be used in other devices, systems, environments, or scenarios, nor that the embodiments of the present disclosure define the steps of the foregoing flow.
It should be noted that, the functions of each module in the embodiment of the present application are not limited by the foregoing description of the embodiment of the present application, and the functions of each module in the embodiment of the present application may be adjusted according to actual situations, and each module may be combined or split according to actual situations, which is not limited herein.
The database deployment method of the embodiment of the present disclosure will be described in detail below by fig. 6 based on the scenario described by the above system architecture.
Fig. 7 schematically illustrates a flowchart of a database deployment method according to an embodiment of the present disclosure.
In step 701, a first deployment module creates a database virtual machine by cloning a common virtual machine, wherein the database virtual machine comprises target application software which is deployed in advance.
In step 702, the second deployment module generates a target template through target application software deployed in advance in the database virtual machine, where the target template includes mirror image information of the database virtual machine.
Step 703: and the second deployment module uploads the target template to the cloud platform, and is used for installing database software corresponding to the configuration information in a corresponding virtual machine in an instantiation mode based on the target template according to the configuration information selected by a user to obtain a database instance.
According to the embodiment of the application, the mysql cloud database module in the automatic deployment module is matched with the static deployment module for use, the mysql cloud database module instantiates a new virtual machine in a virtual machine template mirroring mode, so that the rapid deployment of the application or service is realized, the deployment period is greatly shortened, the deployment flow is simplified, and a user does not know the specific deployment process at all. The cloud database system can be used rapidly by modifying few configurations after deployment, so that convenience and operation efficiency of the whole system in the use process are improved, meanwhile, the cloud database system can be deployed automatically based on SaltStack, complex operation and maintenance tasks can be executed efficiently, risks of human misoperation are reduced, accuracy and repeatability of operation are guaranteed, the possibility of system failure is reduced, availability and reliability of the whole system are improved, saltStack is further known and learned, and a tamped technical basis is provided for applying more open source tool management cloud platforms in future.
Based on the same inventive concept, the embodiment of the present invention further provides a database deployment device, and since the device is the device in the method in the embodiment of the present invention, and the principle of the device for solving the problem is similar to that of the method, the implementation of the device may refer to the implementation of the method, and the repetition is omitted.
As shown in fig. 8, the apparatus includes:
a first deployment module 801, configured to create a database virtual machine by cloning a common virtual machine, where the database virtual machine includes pre-deployed target application software;
A second deployment module 802, configured to generate, by using target application software deployed in advance in a database virtual machine, a target template, where the target template includes mirror image information of the database virtual machine;
The second deployment module 802 is further configured to upload the target template to a cloud platform, and based on the target template, install database software corresponding to the configuration information in a corresponding virtual machine in an instantiation manner according to the configuration information selected by the user, so as to obtain a database instance.
As an alternative embodiment, the apparatus further comprises:
A front-end module 803, configured to perform front-end audit on first target information of a physical resource pool to be added when the physical resource pool is added, where the first target information includes a server IP address; after the front-end audit is confirmed to pass, second target information obtained after the first target information is encoded is sent to the rear end;
And the back-end module 804 is configured to send a third target message output based on the second target information to a SaltStack end, so that the SaltStack end performs cluster configuration based on the server IP address.
As an alternative embodiment, the back-end module 804 is further configured to:
acquiring fourth target information of cluster configuration sent by a SaltStack end;
And writing the fourth target information into corresponding fields of a target database table, and setting the server state corresponding to the IP address to be available.
As an alternative embodiment, the back-end module 804 is further configured to:
After the input information which is adjusted by the user based on the database instance is obtained, carrying out data synchronization based on the database instance information, and modifying the state field of the database instance into a disabled state;
Transmitting the database instance information to SALTSLACK, and receiving server information for the database instance information returned by the SALTSLACK;
Determining a server pool meeting requirements based on the server information, and adjusting the database instance based on the input information;
and transmitting the adjusted database instance information to SALTSLACK ends.
As an alternative embodiment, the back-end module 804 is further configured to:
calculating the current residual storage and disk size of each server pool through weighting;
If all the server pools are determined not to meet the requirements, returning to the creation error.
Based on the same inventive concept, the embodiment of the present invention further provides a database deployment device, and since the device is the device in the method in the embodiment of the present invention, and the principle of the device for solving the problem is similar to that of the method, the implementation of the device may refer to the implementation of the method, and the repetition is omitted.
As shown in fig. 9, the apparatus includes a processor 900 and a memory 901, the memory being configured to store a program executable by the processor, the processor being configured to read the program in the memory and perform the steps of:
Creating a database virtual machine by adopting a first deployment module in a mode of cloning a common virtual machine, wherein the database virtual machine comprises target application software which is deployed in advance; generating a target template by pre-deploying target application software in a database virtual machine by adopting a second deployment module, wherein the target template comprises mirror image information of the database virtual machine; and uploading the target template to a cloud platform by adopting the second deployment module, wherein the cloud platform is used for installing database software corresponding to the configuration information in a corresponding virtual machine in an instantiation mode based on the target template according to the configuration information selected by a user, so as to obtain a database instance.
Based on the same inventive concept, the embodiments of the present invention also provide a computer storage medium having a computer program stored thereon, which when executed by a processor, realizes the above.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, magnetic disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present invention without departing from the spirit or scope of the invention. Thus, it is intended that the present invention also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.

Claims (12)

1. A method of database deployment, the method comprising:
The method comprises the steps that a first deployment module creates a database virtual machine in a mode of cloning a common virtual machine, wherein the database virtual machine comprises target application software which is deployed in advance;
the second deployment module generates a target template through target application software which is deployed in advance in the database virtual machine, wherein the target template comprises mirror image information of the database virtual machine;
And the second deployment module uploads the target template to the cloud platform, and is used for installing database software corresponding to the configuration information in a corresponding virtual machine in an instantiation mode based on the target template according to the configuration information selected by a user to obtain a database instance.
2. The method according to claim 1, wherein the method further comprises:
when a physical resource pool is added, front-end auditing is carried out on first target information of the physical resource pool to be added, wherein the first target information comprises a server IP address;
And after the front-end auditing is confirmed to pass, sending second target information obtained by encoding the first target information to a rear end, and sending third target information output by the rear end based on the second target information to a SaltStack end so that the SaltStack end performs cluster configuration based on the IP address of the server.
3. The method according to claim 2, wherein the method further comprises:
The back end obtains fourth target information of cluster configuration sent by the SaltStack end;
And writing the fourth target information into corresponding fields of a target database table, and setting the server state corresponding to the IP address to be available.
4. The method according to claim 1, wherein after instantiating the database software corresponding to the configuration information in the corresponding virtual machine, further comprising:
after acquiring input information which is adjusted by a user based on the database instance, the back end performs data synchronization based on the database instance information, and the state field of the database instance is modified to be in a disabled state;
The back end sends the database instance information to SALTSLACK and receives server information for the database instance information returned by SALTSLACK;
the back end determines a server pool meeting the requirements based on the server information, and adjusts the database instance based on the input information;
and transmitting the adjusted database instance information to SALTSLACK ends.
5. The method of claim 4, wherein before the backend determines a server pool that meets a demand based on the server information, further comprising:
the back end calculates the current residual storage and disk size of each server pool through weighting;
If all the server pools are determined not to meet the requirements, returning to the creation error.
6. A database deployment apparatus, the apparatus comprising:
The first deployment module is used for creating a database virtual machine in a mode of cloning a common virtual machine, wherein the database virtual machine comprises target application software which is deployed in advance;
The second deployment module is used for generating a target template through target application software which is deployed in advance in the database virtual machine, wherein the target template comprises mirror image information of the database virtual machine;
The second deployment module is further configured to upload the target template to a cloud platform, and based on the target template, install database software corresponding to the configuration information in a corresponding virtual machine in an instantiation manner according to the configuration information selected by a user, so as to obtain a database instance.
7. The apparatus of claim 6, wherein the apparatus further comprises:
The front-end module is used for performing front-end auditing on first target information of the physical resource pool to be added when the physical resource pool is added, wherein the first target information comprises a server IP address; after the front-end audit is confirmed to pass, second target information obtained after the first target information is encoded is sent to the rear end;
And the back-end module is used for sending a third target message output based on the second target information to the SaltStack end so that the SaltStack end performs cluster configuration based on the server IP address.
8. The apparatus of claim 7, wherein the back-end module is further configured to:
acquiring fourth target information of cluster configuration sent by a SaltStack end;
And writing the fourth target information into corresponding fields of a target database table, and setting the server state corresponding to the IP address to be available.
9. The apparatus of claim 6, wherein the back-end module is further configured to:
After the input information which is adjusted by the user based on the database instance is obtained, carrying out data synchronization based on the database instance information, and modifying the state field of the database instance into a disabled state;
Transmitting the database instance information to SALTSLACK, and receiving server information for the database instance information returned by the SALTSLACK;
Determining a server pool meeting requirements based on the server information, and adjusting the database instance based on the input information;
and transmitting the adjusted database instance information to SALTSLACK ends.
10. The apparatus of claim 9, wherein the back-end module is further configured to:
calculating the current residual storage and disk size of each server pool through weighting;
If all the server pools are determined not to meet the requirements, returning to the creation error.
11. A computer device comprising a memory and a processor, the memory storing a computer program executable on the processor, characterized in that the processor implements the steps of the method of any of claims 1 to 5 when the program is executed.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that the computer program is
A processor, when executing, performs the steps of the method of any one of claims 1 to 5.
CN202410153656.0A 2024-02-02 2024-02-02 Database deployment method, device and apparatus Pending CN118069168A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410153656.0A CN118069168A (en) 2024-02-02 2024-02-02 Database deployment method, device and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410153656.0A CN118069168A (en) 2024-02-02 2024-02-02 Database deployment method, device and apparatus

Publications (1)

Publication Number Publication Date
CN118069168A true CN118069168A (en) 2024-05-24

Family

ID=91105058

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410153656.0A Pending CN118069168A (en) 2024-02-02 2024-02-02 Database deployment method, device and apparatus

Country Status (1)

Country Link
CN (1) CN118069168A (en)

Similar Documents

Publication Publication Date Title
US10944740B2 (en) Cluster claim
CN110750334B (en) Ceph-based network target range rear end storage system design method
US10073747B2 (en) Reducing recovery time in disaster recovery/replication setup with multitier backend storage
US10169173B2 (en) Preserving management services with distributed metadata through the disaster recovery life cycle
KR101862718B1 (en) Reducing data volume durability state for block-based storage
US9231923B1 (en) Secure data destruction in a distributed environment using key protection mechanisms
EP3777014B1 (en) Encryption by default in an elastic computing system
US11080041B1 (en) Operating system management for virtual workspaces
CN109471699B (en) Virtual machine incremental backup system based on difference bitmap characteristics of Qcow2 image file
US11240209B2 (en) Data transfer in a data protection system
US10346618B1 (en) Data encryption for virtual workspaces
US11336749B2 (en) Systems, methods, and computer program products to implement changes in a converged infrastructure system
US11023339B2 (en) Asynchronous remote mirror cloud archival
US10452502B2 (en) Handling node failure in multi-node data storage systems
US11531712B2 (en) Unified metadata search
EP3407240A1 (en) Data protection method and associated apparatus
US10223538B1 (en) Preventing persistent storage of cryptographic information
CN112035062B (en) Migration method of local storage of cloud computing, computer equipment and storage medium
CN112738249A (en) File uploading method, device, equipment and storage medium based on quantitative transaction
US11099942B2 (en) Archival to cloud storage while performing remote backup of data
CN118069168A (en) Database deployment method, device and apparatus
KR101618992B1 (en) System for providing virtual desktop service, control method thereof, recording medium for recording program for executing the control method, application saved in the recording medium for executing the control method being combined with hardware
CN114328026A (en) Virtual disk backup method, device, equipment and medium
CN109324931B (en) Method for realizing vmware mount recovery in data de-duplication system
US11550671B2 (en) Backup management device, backup management method, and information processing system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination