CN107665141A - A kind of configuration method for database and its equipment - Google Patents

A kind of configuration method for database and its equipment Download PDF

Info

Publication number
CN107665141A
CN107665141A CN201610597513.4A CN201610597513A CN107665141A CN 107665141 A CN107665141 A CN 107665141A CN 201610597513 A CN201610597513 A CN 201610597513A CN 107665141 A CN107665141 A CN 107665141A
Authority
CN
China
Prior art keywords
virtual machine
database
server
cloud storage
storage resource
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.)
Granted
Application number
CN201610597513.4A
Other languages
Chinese (zh)
Other versions
CN107665141B (en
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.)
Tencent Cloud Computing Beijing Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201610597513.4A priority Critical patent/CN107665141B/en
Publication of CN107665141A publication Critical patent/CN107665141A/en
Application granted granted Critical
Publication of CN107665141B publication Critical patent/CN107665141B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the present invention discloses a kind of configuration method for database and its equipment, and wherein method comprises the following steps:The database for obtaining the Service Database that data write-in is carried out to target service submitted creates conditional information;The virtual machine according to corresponding to database establishment conditional information creates the target service in the destination server under cloud platform, and to the virtual machine configuration cloud storage resource;Initialization process is carried out to the cloud storage resource of the virtual machine and the virtual machine, and the database of the virtual machine is configured after initialization process, connects the database and cloud storage resource of the virtual machine.Using the present invention, it is possible to achieve database automatically configures, and the quantity of the Service Database of increase server carrying, lifts the utilization rate of server, effectively reduces the costs such as human resources, hardware resource.

Description

A kind of configuration method for database and its equipment
Technical field
The present invention relates to Internet technical field, more particularly to a kind of configuration method for database and its equipment.
Background technology
As Internet technology is constantly developed and perfect, by service server configuration database can meet net The storage demand of business datum in network, existing database is generally all artificially to be configured, while relies on service server The hard-disc storage space of itself stores to business datum, as the growth of business is, it is necessary to accordingly increase service server Quantity, cause the increase of the costs such as human resources, hardware resource, reduce the utilization rate of service server.
The content of the invention
The embodiment of the present invention provides a kind of configuration method for database and its equipment, it is possible to achieve and database automatically configures, Increase the quantity of the Service Database of server carrying, lift the utilization rate of server, effectively reduce human resources, hardware money The costs such as source.
First aspect of the embodiment of the present invention provides a kind of configuration method for database, it may include:
The database for obtaining the Service Database that data write-in is carried out to target service submitted creates conditional information;
Conditional information is created according to the database target service pair is created in the destination server under cloud platform The virtual machine answered, and to the virtual machine configuration cloud storage resource;
Initialization process is carried out to the cloud storage resource of the virtual machine and the virtual machine, and matched somebody with somebody after initialization process The database of the virtual machine is put, connects the database and cloud storage resource of the virtual machine.
Second aspect of the embodiment of the present invention provides a kind of database configuration equipment, it may include:
Information acquisition unit, for obtaining the database for the Service Database that data write-in is carried out to target service submitted Create conditional information;
Resource configuration unit, created for creating conditional information according to the database in the destination server under cloud platform Virtual machine corresponding to the target service is built, and to the virtual machine configuration cloud storage resource;
Database dispensing unit, for being carried out to the cloud storage resource of the virtual machine and the virtual machine at initialization Manage, and the database of the virtual machine is configured after initialization process, connect the database and cloud storage resource of the virtual machine.
In embodiments of the present invention, conditional information is created by the database obtained to the Service Database of target service, Conditional information is created according to database virtual machine corresponding to target service is created in the destination server under cloud platform, to virtual Machine configures cloud storage resource, and carries out initialization process to the cloud storage resource of virtual machine and virtual machine, after initialization process Configure the database of virtual machine, the database and cloud storage resource of final connecting virtual machine.By being created according to the database obtained Conditional information is built, the establishment of virtual machine and the configuration of database are completed in destination server, realizes the automatic of database Configuration process, while by using virtual machine and the mode of cloud storage so that the number for the Service Database that server can carry Amount increase, improves the utilization rate of server, effectively reduces the costs such as human resources, hardware resource.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing There is the required accompanying drawing used in technology description to be briefly described, it should be apparent that, drawings in the following description are only this Some embodiments of invention, for those of ordinary skill in the art, on the premise of not paying creative work, can be with Other accompanying drawings are obtained according to these accompanying drawings.
Fig. 1 is a kind of schematic flow sheet of configuration method for database provided in an embodiment of the present invention;
Fig. 2 is the schematic flow sheet of another configuration method for database provided in an embodiment of the present invention;
Fig. 3 is a kind of example schematic of database configuration provided in an embodiment of the present invention;
Fig. 4 is the schematic flow sheet of another configuration method for database provided in an embodiment of the present invention;
Fig. 5 is a kind of structural representation of database configuration equipment provided in an embodiment of the present invention;
Fig. 6 is the structural representation of resource configuration unit provided in an embodiment of the present invention;
Fig. 7 is the structural representation of database dispensing unit provided in an embodiment of the present invention;
Fig. 8 is the structural representation of another database configuration equipment provided in an embodiment of the present invention;
Fig. 9 is the structural representation of another database configuration equipment provided in an embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, rather than whole embodiments.It is based on Embodiment in the present invention, those of ordinary skill in the art are obtained every other under the premise of creative work is not made Embodiment, belong to the scope of protection of the invention.
Configuration method for database provided in an embodiment of the present invention can apply in the server under cloud platform to items The scene of business configuration database, such as:Database configuration equipment obtains the industry that data write-in is carried out to target service submitted Business wide area information server creates conditional information, and the database configuration equipment creates conditional information in cloud according to the database Virtual machine corresponding to the target service is created in destination server under platform, and the virtual machine configuration cloud storage is provided Source, the database configure equipment to the cloud storage resource of the virtual machine and virtual machine progress initialization process, and The database of the virtual machine is configured after initialization process, connects the database of the virtual machine and the scene of cloud storage resource Deng.By creating conditional information according to the database obtained, establishment and the database of virtual machine are completed in destination server Configuration, realize the automatic configuration process of database, while by using virtual machine and the mode of cloud storage so that service The quantity increase for the Service Database that device can carry, the utilization rate of server is improved, effectively reduce human resources, hardware money The costs such as source.
The present embodiments relate to database configuration equipment can be management is monitored to the server under cloud platform Background service equipment;The cloud platform may be used to provide the necessary basis such as computing resource, storage resource, Internet resources mutually Networking technology (Internet Technology, IT) infrastructure services.
Below in conjunction with accompanying drawing 1- accompanying drawings 4, configuration method for database provided in an embodiment of the present invention is described in detail.
Fig. 1 is referred to, for the embodiments of the invention provide a kind of schematic flow sheet of configuration method for database.Such as Fig. 1 institutes Show, the methods described of the embodiment of the present invention may comprise steps of S101-S103.
S101, the database for obtaining the Service Database that data write-in is carried out to target service of submission create condition letter Breath;
Specifically, database configuration equipment can obtain the business number that data write-in is carried out to target service of user's submission Conditional information is created according to the database in storehouse, the target service carries out business datum write-in to be currently needed for configuration service database The Network of storage, such as:Game, special webpage etc., the business datum are that the target service is produced in terminal operating Raw data, can be for data or the business framework for presently described target service caused by personal operation Caused data, such as:Web page resources data in game in personal game data, special webpage etc., the database Create the database that conditional information can be inputted by the developer of the target service for the demand of the target service The relevant information of establishment, such as:Type of database, database configuration needs information etc., the database configuration needs information can For representing whether presently configured Service Database needs the demand information for High Availabitity, it is preferred that the database Configuration equipment can be selected with output database configuration interface for developer.
S102, conditional information is created according to the database target industry is created in the destination server under cloud platform Virtual machine corresponding to business, and to the virtual machine configuration cloud storage resource;
Specifically, the database configuration equipment can create mesh of the conditional information under cloud platform according to the database Virtual machine corresponding to the target service is created in mark server, and to the virtual machine configuration cloud storage resource, further, The database configuration equipment may determine that whether the type of database that the database creates selected in conditional information is pre- If type of database, such as:It may determine that whether mirror image title is MySQL etc., and judge the database configuration needs information Whether High Availabitity demand information is designated as.
The database configuration equipment can be pressed in the server cluster under based on the computer room mark selected by cloud platform Destination server is determined using polling mode according to the putting in order for network address information of each server in the server cluster, Virtual machine corresponding to the target service is created in the destination server, and to the virtual machine configuration cloud storage resource. It is understood that computer room mark is both provided with for the computer room where each server, for being accurately positioned current server institute Region, the database creates the computer room mark that can also include in conditional information selected by developer, it is preferred that institute Stating database configuration equipment can also be named to the virtual machine, and each server under the selected computer room mark is all Network address information is previously provided with, such as:IP address etc., the database configuration equipment can be according to network address information Put in order and find first available server in each server by the way of poll, such as:Possess enough Space creates server of virtual machine etc., and first available server is defined as into destination server, and in the target Virtual machine corresponding to the target service is created in server, while network address information is set to the virtual machine, and to institute State virtual machine configuration cloud storage resource, the cloud storage resource is depositing for the memory node that is selected in the cloud storage resource pool Resource is stored up, can include multiple OSD in the memory node.
S103, initialization process is carried out to the cloud storage resource of the virtual machine and the virtual machine, and at initialization The database of the virtual machine is configured after reason, connects the database and cloud storage resource of the virtual machine;
Specifically, the database configuration equipment can be carried out to the cloud storage resource of the virtual machine and the virtual machine Initialization process, can be described virtual including being named, setting to the virtual machine to the process of virtual machine initialization process The network address information of machine, disk initialization etc., disk scanning, disk can be included to cloud storage initializing resource processing Activation, disk formatting and drive etc. is set using, the database configuration equipment is to the virtual machine and described virtual After the cloud storage resource of machine carries out initialization process, the database of the virtual machine can be further configured, while connect institute State the database and cloud storage resource of virtual machine.
In embodiments of the present invention, conditional information is created by the database obtained to the Service Database of target service, Conditional information is created according to database virtual machine corresponding to target service is created in the destination server under cloud platform, to virtual Machine configures cloud storage resource, and carries out initialization process to the cloud storage resource of virtual machine and virtual machine, after initialization process Configure the database of virtual machine, the database and cloud storage resource of final connecting virtual machine.By being created according to the database obtained Conditional information is built, the establishment of virtual machine and the configuration of database are completed in destination server, realizes the automatic of database Configuration process, while by using virtual machine and the mode of cloud storage so that the number for the Service Database that server can carry Amount increase, improves the utilization rate of server, effectively reduces the costs such as human resources, hardware resource.
It should be noted that developer creates conditional information, example for the database that the demand of current business is inputted Such as:Type of database, database configuration needs information etc., conditional information is created according to different databases, two kinds can be provided Database schema, be respectively " main duplication " and " unit establishment ", below in conjunction with accompanying drawing 2- accompanying drawings 4, to " main duplication " and " unit establishment " two kinds of database schemas describe in detail respectively.
Fig. 2 is referred to, for the embodiments of the invention provide the schematic flow sheet of another configuration method for database.Such as Fig. 2 Shown, the methods described of the embodiment of the present invention is used for the configuration process for illustrating the database schema of " main duplication ", and this method can To comprise the following steps S201- steps S205.
S201, the database for obtaining the Service Database that data write-in is carried out to target service of submission create condition letter Breath;
Specifically, database configuration equipment can obtain the business number that data write-in is carried out to target service of user's submission Conditional information is created according to the database in storehouse, the target service carries out business datum write-in to be currently needed for configuration service database The Network of storage, such as:Game, special webpage etc., the business datum are that the target service is produced in terminal operating Raw data, can be for data or the business framework for presently described target service caused by personal operation Caused data, such as:Web page resources data in game in personal game data, special webpage etc., the database Create the database that conditional information can be inputted by the developer of the target service for the demand of the target service The relevant information of establishment, such as:Type of database, database configuration needs information etc., the database configuration needs information can For representing whether presently configured Service Database needs the demand information for High Availabitity, it is preferred that the database Configuration equipment can be selected with output database configuration interface for developer.
S202, when the selected type of database is presetting database type, and the database configuration needs are believed When breath is designated as High Availabitity demand information, the first void corresponding to the target service is created in the server cluster under cloud platform Plan machine and the second virtual machine, and cloud storage resource is respectively configured to first virtual machine and second virtual machine;
Specifically, the database configuration equipment may determine that the database creates the data selected in conditional information Whether storehouse type is presetting database type, such as:It may determine that whether mirror image title is MySQL etc., and judge the data Whether storehouse configuration needs information is designated as High Availabitity demand information.
When the selected type of database is presetting database type, and the database configuration needs information indicates For High Availabitity demand information when, database configuration equipment can configure the database schema of " main duplication ", described main Replicated database pattern can be understood as two virtual machines can each bearer service database, while can be with synchronous service number According to when wherein a virtual machine breaks down, target service can point to the Service Database of another virtual machine, continue as Target service provides service.Preferably, the database configuration equipment can create institute in the server cluster under cloud platform The first virtual machine corresponding to target service and the second virtual machine are stated, and first virtual machine and second virtual machine are distinguished Configure cloud storage resource.Further, clothes of the database configuration equipment under based on the computer room mark selected by cloud platform Be engaged in device cluster in, according in the server cluster network address information of each server put in order it is true using polling mode Determine first server, the first virtual machine corresponding to the target service created in the first server, it is to be understood that Computer room mark is both provided with for the computer room where each server, it is described for the region being accurately positioned where current server Database creates the computer room mark that can also include in conditional information selected by developer, under the selected computer room identifies Each server be all previously provided with network address information, such as:Network interconnection agreement (Internet Protocol, IP) Location etc., the database configuration equipment can putting in order and by the way of poll in each service according to network address information First available server is found in device, such as:Possess enough space and create server of virtual machine etc., by this first Individual available server is defined as first server, and is created in the first server first corresponding to the target service Virtual machine, it is preferred that database configuration equipment can also be named to first virtual machine, and naming rule can be with For:Computer room mark+MYSQL+6 positions random sequence number -1, while network address information is set to first virtual machine, and to institute The first virtual machine configuration cloud storage resource is stated, the cloud storage resource is the memory node selected in the cloud storage resource pool Storage resource, multiple offer storage resources (Object Storage Device, OSD) can be provided in the memory node. Database configuration equipment is in remaining server of the server cluster in addition to the first server, according to described surplus Putting in order for the network address information of each server determines second server using polling mode in remaining server, described The second virtual machine corresponding to the target service is created in two servers, in order to preferably ensure the characteristic of High Availabitity, the number According to storehouse configuration equipment can be in the server cluster in addition to the Servers-all of frame where the first server residue Second server is determined in server, i.e. first server and second server is located in the different frames with a computer room respectively, By selecting the establishment of the server progress database with a computer room difference frame, machine can be avoided on the basis of time delay is reduced The server failure of frame rank, the effective characteristic for ensureing High Availabitity certainly, can be with for the not high business datum of real-time The establishment of database is carried out using the server of different computer rooms.The database creates equipment can be by first virtual machine Network address information is passed to second virtual machine, obtains the network address information of second virtual machine, and to described second Virtual machine configuration cloud storage resource, the database configuration equipment can also be named to second virtual machine, name rule Can be then:Computer room mark+MYSQL+6 positions random sequence number -2, it is to be understood that the determination of second server, the second void The establishment of plan machine, the second virtual machine network address information setting and the second virtual machine cloud storage resource configuration With the determination with above-mentioned first server, the establishment of the first virtual machine, the first virtual machine network address information setting and The process of the configuration of the cloud storage resource of first virtual machine is identical, it is necessary to which explanation, the cloud of first virtual machine configuration are deposited Storage resource needs to be located in different memory nodes from the cloud storage resource of the second virtual machine configuration.The database configures equipment The network address information of second virtual machine is further passed to first virtual machine.
S203, to first virtual machine, the second virtual machine, the cloud storage resource of the first virtual machine, the second virtual machine Cloud storage resource carries out initialization process, and network address information after initialization process to first virtual machine and described The network address information of second virtual machine is associated;
Specifically, database configuration equipment can be respectively to first virtual machine, the second virtual machine, first virtual Cloud storage resource, the cloud storage resource of the second virtual machine of machine carry out initialization process, to the mistake of the initialization process of virtual machine Journey can include network address information, disk initialization for being named to the virtual machine, setting the virtual machine etc., to cloud The initialization process of storage resource can include disk scanning, disk activation, disk formatting and be set using drive etc., institute State database configure equipment can be to the network address information of first virtual machine and described second empty after initialization process The network address information of plan machine is associated, it is preferred that the database configuration equipment can be by the net of first virtual machine Network address information is configured in the address information list of second virtual machine, and the network address of second virtual machine is believed Breath is configured in the address information list of first virtual machine, and the address information list is preferably hosts files.
S204, the database of first virtual machine and the database of second virtual machine are configured, and connect described the The database and cloud storage resource of one virtual machine, and the database and cloud storage resource of connection second virtual machine;
Specifically, database configuration equipment can configure the database of first virtual machine and described second virtual The database of machine, and the database and cloud storage resource of first virtual machine are connected, and connection second virtual machine Database and cloud storage resource.
S205, using the configuration shape of the creation state of virtual machine, the cloud storage resource described in default monitoring script logging The configuration status of the database of state and the virtual machine;
Specifically, the database configuration equipment can also be set in advance when obtaining the database establishment conditional information Put monitoring script, the establishment monitored script and be used to record the creation state, second virtual machine of first virtual machine The configuration status of state, the configuration status of the cloud storage resource and the database, establishment, institute when first virtual machine There is exception in any process stated in the establishment, the configuration of the cloud storage resource and the configuration of the database of the second virtual machine And when causing database configuration failure, the monitoring script can be with generation error daily record, and triggers rolling back action, when database is matched somebody with somebody When being set to work(, the script of monitoring can generate the announcement information of database configuration successful, and the announcement information is preferably advance Agreement script status value (such as:200 etc.).
For the database schema of " main duplication ", please also refer to Fig. 3, for the embodiments of the invention provide a kind of data The example schematic of storehouse configuration.As shown in figure 3, first server and second server are determined by polling mode, first The first virtual machine, while carry cloud storage resource are created under the first machine tool in server, second in second server is female The second virtual machine, while carry cloud storage resource are created under machine, cloud storage resource connects a storage in cloud storage resource pool Node, the memory node include multiple OSD, can from Fig. 3 for the business datum in follow-up storage service database D B1 To find out, the Service Database configured in the Service Database and the second virtual machine that are configured in the first virtual machine is DB1, is represented For both Service Databases be for target service and can be synchronous database, the database mould of " main duplication " is realized with this Formula.
In embodiments of the present invention, conditional information is created by the database obtained to the Service Database of target service, Conditional information is created according to database virtual machine corresponding to target service is created in the destination server under cloud platform, to virtual Machine configures cloud storage resource, and carries out initialization process to the cloud storage resource of virtual machine and virtual machine, after initialization process Configure the database of virtual machine, the database and cloud storage resource of final connecting virtual machine.By being created according to the database obtained Conditional information is built, the establishment of virtual machine and the configuration of database are completed in destination server, realizes the automatic of database Configuration process, while by using virtual machine and the mode of cloud storage so that the number for the Service Database that server can carry Amount increase, improves the utilization rate of server, effectively reduces the costs such as human resources, hardware resource;It is " main to answer by configuring The database schema of system ", realizes the deployment of High Availabitity framework;By selecting to enter line number with a server for computer room difference frame According to the establishment in storehouse, the other server failure of chassis level can be avoided on the basis of time delay is reduced, effective guarantee High Availabitity Characteristic.
Fig. 4 is referred to, for the embodiments of the invention provide the schematic flow sheet of another configuration method for database.Such as Fig. 4 Shown, the methods described of the embodiment of the present invention is used for the configuration process for illustrating the database schema of " unit establishment ", and this method can To comprise the following steps S301- steps S304.
S301, the database for obtaining the Service Database that data write-in is carried out to target service of submission create condition letter Breath;
Specifically, database configuration equipment can obtain the business number that data write-in is carried out to target service of user's submission Conditional information is created according to the database in storehouse, the target service carries out business datum write-in to be currently needed for configuration service database The Network of storage, such as:Game, special webpage etc., the business datum are that the target service is produced in terminal operating Raw data, can be for data or the business framework for presently described target service caused by personal operation Caused data, such as:Web page resources data in game in personal game data, special webpage etc., the database Create the database that conditional information can be inputted by the developer of the target service for the demand of the target service The relevant information of establishment, such as:Type of database, database configuration needs information etc., the database configuration needs information can For representing whether presently configured Service Database needs the demand information for High Availabitity, it is preferred that the database Configuration equipment can be selected with output database configuration interface for developer.
S302, when the selected type of database is presetting database type, and the database configuration needs are believed When breath instruction is not High Availabitity demand information, in the server cluster under based on the computer room mark selected by cloud platform, according to Putting in order for the network address information of each server determines destination server using polling mode in the server cluster, Virtual machine corresponding to the target service is created in the destination server, and to the virtual machine configuration cloud storage resource;
Specifically, the database configuration equipment may determine that the database creates the data selected in conditional information Whether storehouse type is presetting database type, such as:It may determine that whether mirror image title is MySQL etc., and judge the data Whether storehouse configuration needs information is designated as High Availabitity demand information.
When the selected type of database is presetting database type, and the database configuration needs information indicates When not being High Availabitity demand information, the database configuration equipment can configure the database schema of " unit establishment ", the list The database schema for hitting establishment can be understood as single virtual machine bearer service database.Preferably, the database is matched somebody with somebody and installed It is standby can be in the server cluster under based on the computer room mark selected by cloud platform, according to respectively being serviced in the server cluster Putting in order for the network address information of device determines destination server using polling mode, and institute is created in the destination server Virtual machine corresponding to target service is stated, and to the virtual machine configuration cloud storage resource.It is understood that it is directed to each server The computer room at place is both provided with computer room mark, and for the region being accurately positioned where current server, the database creates bar The computer room mark selected by developer can also be included in part information, it is preferred that the database configuration equipment can also be right The virtual machine is named, and naming rule can be:Computer room mark+MYSQL+6 positions random sequence number -0, it is described selected Each server under computer room mark is all previously provided with network address information, such as:IP address etc., the database configure equipment Can according to network address information put in order and found by the way of poll in each server first it is available Server, such as:Possess enough spaces and create server of virtual machine etc., first available server is defined as mesh Server is marked, and virtual machine corresponding to the target service is created in the destination server, while the virtual machine is set Network address information is put, and to the virtual machine configuration cloud storage resource, the cloud storage resource is in the cloud storage resource The storage resource of the memory node selected in pond, multiple OSD can be included in the memory node.
S303, initialization process is carried out to the cloud storage resource of the virtual machine and the virtual machine, and at initialization The database of the virtual machine is configured after reason, connects the database and cloud storage resource of the virtual machine;
Specifically, the database configuration equipment can be carried out to the cloud storage resource of the virtual machine and the virtual machine Initialization process, can be described virtual including being named, setting to the virtual machine to the process of virtual machine initialization process The network address information of machine, disk initialization etc., disk scanning, disk can be included to cloud storage initializing resource processing Activation, disk formatting and drive etc. is set using, the database configuration equipment is to the virtual machine and described virtual After the cloud storage resource of machine carries out initialization process, the database of the virtual machine can be further configured, while connect institute State the database and cloud storage resource of virtual machine.
S304, using the configuration shape of the creation state of virtual machine, the cloud storage resource described in default monitoring script logging The configuration status of the database of state and the virtual machine;
Specifically, the database configuration equipment can also be set in advance when obtaining the database establishment conditional information Put monitoring script, creation state, the configuration status of the cloud storage resource monitored script and be used to record the virtual machine With the configuration status of the database of the virtual machine, the configuration of establishment, the cloud storage resource when the virtual machine and described When any process in the configuration of the database of virtual machine exception occurs and causes database configuration failure, the monitoring script can With generation error daily record, and rolling back action is triggered, when database configuration successful, the monitoring script can generate database and match somebody with somebody Put successful announcement information, the announcement information be preferably make an appointment script status value (such as:200 etc.).
In embodiments of the present invention, conditional information is created by the database obtained to the Service Database of target service, Conditional information is created according to database virtual machine corresponding to target service is created in the destination server under cloud platform, to virtual Machine configures cloud storage resource, and carries out initialization process to the cloud storage resource of virtual machine and virtual machine, after initialization process Configure the database of virtual machine, the database and cloud storage resource of final connecting virtual machine.By being created according to the database obtained Conditional information is built, the establishment of virtual machine and the configuration of database are completed in destination server, realizes the automatic of database Configuration process, while by using virtual machine and the mode of cloud storage so that the number for the Service Database that server can carry Amount increase, improves the utilization rate of server, effectively reduces the costs such as human resources, hardware resource.
Below in conjunction with accompanying drawing 5- accompanying drawings 8, database provided in an embodiment of the present invention configuration equipment is described in detail. It should be noted that the database configuration equipment shown in accompanying drawing 5- accompanying drawings 8, for performing Fig. 1-embodiment illustrated in fig. 4 of the present invention Method, for convenience of description, illustrate only the part related to the embodiment of the present invention, particular technique details does not disclose, please With reference to the embodiment shown in Fig. 1-Fig. 4 of the present invention.
Fig. 5 is referred to, is that the embodiments of the invention provide the structural representation that a kind of database configures equipment.Such as Fig. 5 institutes Show, the database configuration equipment 1 of the embodiment of the present invention can include:Information acquisition unit 11, the and of resource configuration unit 12 Database dispensing unit 13.
Information acquisition unit 11, for obtaining the data for the Service Database that data write-in is carried out to target service submitted Storehouse creates conditional information;
In the specific implementation, described information acquiring unit 11 can obtain user submission to target service carry out data write-in Service Database database create conditional information, the target service for be currently needed for configuration service database carry out business The Network of data write-in storage, such as:Game, special webpage etc., the business datum are the target service in terminal Data caused by operation, can be for data caused by personal operation or for presently described target service Data caused by business framework, such as:Web page resources data in game in personal game data, special webpage etc., institute Stating database establishment conditional information can be inputted by the developer of the target service for the demand of the target service Database create relevant information, such as:Type of database, database configuration needs information etc., the database configuration need Information is asked to can be used to indicate that whether presently configured Service Database needs the demand information for High Availabitity, it is preferred that institute Stating database configuration equipment 1 can be with output database configuration interface so that developer is selected.
Resource configuration unit 12, for creating conditional information in the destination server under cloud platform according to the database Virtual machine corresponding to the target service is created, and to the virtual machine configuration cloud storage resource;
In the specific implementation, the resource configuration unit 12 can create conditional information under cloud platform according to the database Destination server in create virtual machine corresponding to the target service, and to the virtual machine configuration cloud storage resource, enter one Step, the resource configuration unit 12 may determine that whether the database creates type of database selected in conditional information For presetting database type, such as:It may determine that whether mirror image title is MySQL etc., and judge the database configuration needs Whether information is designated as High Availabitity demand information.
The resource configuration unit 12 can be pressed in the server cluster under based on the computer room mark selected by cloud platform Destination server is determined using polling mode according to the putting in order for network address information of each server in the server cluster, Virtual machine corresponding to the target service is created in the destination server, and to the virtual machine configuration cloud storage resource. It is understood that computer room mark is both provided with for the computer room where each server, for being accurately positioned current server institute Region, the database creates the computer room mark that can also include in conditional information selected by developer, it is preferred that institute Stating resource configuration unit 12 can also be named to the virtual machine, and each server under the selected computer room mark is all Network address information is previously provided with, such as:IP address etc., the resource configuration unit 12 can be according to network address information Put in order and find first available server in each server by the way of poll, such as:Possess enough Space creates server of virtual machine etc., and first available server is defined as into destination server, and in the target Virtual machine corresponding to the target service is created in server, while network address information is set to the virtual machine, and to institute State virtual machine configuration cloud storage resource, the cloud storage resource is depositing for the memory node that is selected in the cloud storage resource pool Resource is stored up, can include multiple OSD in the memory node.
It should be noted that developer creates conditional information, example for the database that the demand of current business is inputted Such as:Type of database, database configuration needs information etc., conditional information is created according to different databases, two kinds can be provided Database schema, it is respectively " main duplication " and " unit establishment ".
For the embodiment of the present invention the first feasible embodiment (database schema of " main duplication "), please in the lump Referring to Fig. 6, for the embodiments of the invention provide the structural representation of resource configuration unit.As shown in fig. 6, the resource distribution list Member 12 can include:
Virtual machine creating subelement 121, for being presetting database type when the selected type of database, and institute When stating database configuration needs information and being designated as High Availabitity demand information, the clothes under based on the computer room mark selected by cloud platform Be engaged in device cluster in, according in the server cluster network address information of each server put in order it is true using polling mode Determine first server, the first virtual machine corresponding to the target service is created in the first server;
In the specific implementation, when the selected type of database is presetting database type, and the database configures When demand information is designated as High Availabitity demand information, the resource configuration unit 12 can configure the database mould of " main duplication " Formula, the main replicated database pattern can be understood as two virtual machines can each bearer service database, while can With synchronous service data, when wherein a virtual machine breaks down, target service can point to the business of another virtual machine Database, continue as target service and service is provided.Further, the virtual machine creating subelement 121 is based on cloud platform institute In server cluster under the computer room mark of selection, according to the row of the network address information of each server in the server cluster Row order determines first server using polling mode, is created in the first server first corresponding to the target service Virtual machine, it is to be understood that computer room mark is both provided with for the computer room where each server, for being accurately positioned current clothes Region where business device, the database create the computer room mark that can also include in conditional information selected by developer, institute Each server stated under selected computer room mark is all previously provided with network address information, such as:IP address etc., it is described virtual Machine creates subelement 121 can putting in order and being searched by the way of poll in each server according to network address information To first available server, such as:Possess enough spaces and create server of virtual machine etc., it is available by this first Server is defined as first server, and the first virtual machine corresponding to the target service is created in the first server.
Resource distribution subelement 122, for obtaining the network address information of first virtual machine, and it is empty to described first Plan machine configures cloud storage resource;
In the specific implementation, the resource distribution subelement 122 can also be named to first virtual machine, name rule Can be then:Computer room mark+MYSQL+6 positions random sequence number -1, while network address information is set to first virtual machine, And the first virtual machine configuration cloud storage resource, the cloud storage resource are deposited for what is selected in the cloud storage resource pool The storage resource of node is stored up, can include multiple OSD in the memory node.
The virtual machine creating subelement 121, it is additionally operable to surplus in addition to the first server in the server cluster In remaining server, according in the remaining server network address information of each server put in order it is true using polling mode Determine second server, the second virtual machine corresponding to the target service is created in the second server;
In the specific implementation, the virtual machine creating subelement 121 in the server cluster in addition to the first server Remaining server in, put in order according to the network address information of each server in the remaining server using poll side Formula determines second server, the second virtual machine corresponding to the target service is created in the second server, in order to more preferable Guarantee High Availabitity characteristic, the virtual machine creating subelement 121 can remove the first service in the server cluster Second server, i.e. first server and second server are determined in remaining server where device outside the Servers-all of frame It is located at respectively in the different frames with a computer room, by selecting the server of same computer room difference frame to carry out the wound of database Build, the other server failure of chassis level can be avoided on the basis of time delay is reduced, the effective characteristic for ensureing High Availabitity, when So, for the not high business datum of real-time, the server of different computer rooms can be used to carry out the establishment of database.It is appreciated that , determination that the determination of second server, the establishment of the second virtual machine can be with above-mentioned first servers, the first virtual machine Establishment process it is identical.
The resource distribution subelement 122, it is additionally operable to the network address information of first virtual machine being passed to described Two virtual machines, the network address information of second virtual machine is obtained, and to the second virtual machine configuration cloud storage resource;
In the specific implementation, the database, which creates equipment, to be passed to institute by the network address information of first virtual machine The second virtual machine is stated, obtains the network address information of second virtual machine, and the second virtual machine configuration cloud storage is provided Source, the resource distribution subelement 122, second virtual machine can also be named, naming rule can be:Computer room mark Knowledge+MYSQL+6 positions random sequence number -2, it is to be understood that the setting of the network address information of the second virtual machine, second virtual The configuration of the cloud storage resource of machine can be with the setting of the network address information of above-mentioned first virtual machine, the cloud of the first virtual machine The process of the configuration of storage resource is identical, it is necessary to which explanation, the cloud storage resource of first virtual machine configuration are empty with second The cloud storage resource of plan machine configuration needs to be located in different memory nodes.
Information is passed to subelement 123, virtual for the network address information of second virtual machine to be passed into described first Machine;
In the specific implementation, described information is passed to subelement 123 further by the network address information of second virtual machine It is passed to first virtual machine.
And for second of feasible embodiment (database schema of " unit establishment ") of the embodiment of the present invention:
When the selected type of database is presetting database type, and the database configuration needs information indicates When not being High Availabitity demand information, the resource configuration unit 12 can configure the database schema of " unit establishment ", the list The database schema for hitting establishment can be understood as single virtual machine bearer service database.Preferably, the resource configuration unit 12 can be in the server cluster under based on the computer room mark selected by cloud platform, according to respectively being serviced in the server cluster Putting in order for the network address information of device determines destination server using polling mode, and institute is created in the destination server Virtual machine corresponding to target service is stated, and to the virtual machine configuration cloud storage resource.It is understood that it is directed to each server The computer room at place is both provided with computer room mark, and for the region being accurately positioned where current server, the database creates bar The computer room mark selected by developer can also be included in part information, it is preferred that the resource configuration unit 12 can also be right The virtual machine is named, and naming rule can be:Computer room mark+MYSQL+6 positions random sequence number -0, it is described selected Each server under computer room mark is all previously provided with network address information, such as:IP address etc., the resource configuration unit 12 Can according to network address information put in order and found by the way of poll in each server first it is available Server, such as:Possess enough spaces and create server of virtual machine etc., first available server is defined as mesh Server is marked, and virtual machine corresponding to the target service is created in the destination server, while the virtual machine is set Network address information is put, and to the virtual machine configuration cloud storage resource, the cloud storage resource is in the cloud storage resource The storage resource of the memory node selected in pond, multiple OSD can be included in the memory node.
Database dispensing unit 13, for being carried out to the cloud storage resource of the virtual machine and the virtual machine at initialization Manage, and the database of the virtual machine is configured after initialization process, connect the database and cloud storage resource of the virtual machine;
In the specific implementation, the database dispensing unit 13 can provide to the cloud storage of the virtual machine and the virtual machine Source carries out initialization process, can be including being named to the virtual machine, setting institute to the process of virtual machine initialization process Network address information, disk initialization of virtual machine etc. are stated, cloud storage initializing resource processing can be swept including disk Retouch, disk activation, disk formatting and be set using drive etc., the database dispensing unit 13 to the virtual machine and After the cloud storage resource of the virtual machine carries out initialization process, the database of the virtual machine can be further configured, together When connect the database and cloud storage resource of the virtual machine.
For the first above-mentioned feasible embodiment, please also refer to Fig. 7, for the embodiments of the invention provide database The structural representation of dispensing unit.As shown in fig. 7, the database dispensing unit 13 can include:
Information association subelement 131, for first virtual machine, the second virtual machine, the first virtual machine cloud storage Resource, the cloud storage resource of the second virtual machine carry out initialization process, and to first virtual machine after initialization process Network address information and the network address information of second virtual machine are associated;
In the specific implementation, described information association subelement 131 can respectively to first virtual machine, the second virtual machine, Cloud storage resource, the cloud storage resource of the second virtual machine of first virtual machine carry out initialization process, the initialization to virtual machine The process of processing can include being named the virtual machine, the network address information that sets the virtual machine, disk are initial Change etc., disk scanning, disk activation, disk formatting can be included to the initialization process of cloud storage resource and are set using Drive etc., described information association subelement 131 can be to the network address information of first virtual machine after initialization process It is associated with the network address information of second virtual machine, it is preferred that described information association subelement 131 can be by described in The network address information of first virtual machine is configured in the address information list of second virtual machine, and virtual by described second The network address information of machine is configured in the address information list of first virtual machine, and the address information list is preferably Hosts files.
Database configures subelement 132, for the database for configuring first virtual machine and second virtual machine Database, and the database and cloud storage resource of first virtual machine are connected, and the data of connection second virtual machine Storehouse and cloud storage resource;
In the specific implementation, the database configuration subelement 132 can configure database and the institute of first virtual machine The database of the second virtual machine is stated, and connects the database and cloud storage resource of first virtual machine, and connection described the The database and cloud storage resource of two virtual machines.
And be directed to above-mentioned second feasible embodiment, the database dispensing unit 13 can to the virtual machine and The cloud storage resource of the virtual machine carries out initialization process, and the process of virtual machine initialization process can be included to the void Plan machine is named, sets the virtual machine network address information, disk initialization etc., to the cloud storage initializing resource Processing can include disk scanning, disk activation, disk formatting and be set using drive etc., the database dispensing unit 13 to the cloud storage resource of the virtual machine and the virtual machine after initialization process is carried out, and can further be configured described The database of virtual machine, while connect the database and cloud storage resource of the virtual machine.
In embodiments of the present invention, conditional information is created by the database obtained to the Service Database of target service, Conditional information is created according to database virtual machine corresponding to target service is created in the destination server under cloud platform, to virtual Machine configures cloud storage resource, and carries out initialization process to the cloud storage resource of virtual machine and virtual machine, after initialization process Configure the database of virtual machine, the database and cloud storage resource of final connecting virtual machine.By being created according to the database obtained Conditional information is built, the establishment of virtual machine and the configuration of database are completed in destination server, realizes the automatic of database Configuration process, while by using virtual machine and the mode of cloud storage so that the number for the Service Database that server can carry Amount increase, improves the utilization rate of server, effectively reduces the costs such as human resources, hardware resource;It is " main to answer by configuring The database schema of system ", realizes the deployment of High Availabitity framework;By selecting to enter line number with a server for computer room difference frame According to the establishment in storehouse, the other server failure of chassis level can be avoided on the basis of time delay is reduced, effective guarantee High Availabitity Characteristic;By providing the database schema of " main duplication " and " unit establishment ", can be met with the configuration mode in abundant data storehouse Different business demands.
Fig. 8 is referred to, is that the embodiments of the invention provide the structural representation that another database configures equipment.Such as Fig. 8 Shown, the database configuration equipment 1 of the embodiment of the present invention can include:Information acquisition unit 11, resource configuration unit 12, Database dispensing unit 13 and state recording unit 14;Wherein, information acquisition unit 11, resource configuration unit 12, database are matched somebody with somebody The structure for putting unit 13 may refer to the specific descriptions of embodiment illustrated in fig. 5, herein without repeating.
State recording unit 14, for being deposited using the creation state of virtual machine, the cloud described in default monitoring script logging Store up the configuration status of the configuration status of resource and the database of the virtual machine;
In the specific implementation, for the first above-mentioned feasible embodiment, the state recording unit 14 can also be in institute When stating information acquisition unit 11 and obtaining the database and create conditional information, monitoring script is pre-set, the monitoring script is used In the configuration for the creation state, the creation state, the cloud storage resource of second virtual machine for recording first virtual machine The configuration status of state and the database, establishment, the establishment of second virtual machine when first virtual machine, the cloud When there is exception and causes database configuration failure in any process in the configuration of storage resource and the configuration of the database, institute State monitor script can be with generation error daily record, and trigger rolling back action, when database configuration successful, the monitoring script can be with Generate database configuration successful announcement information, the announcement information be preferably make an appointment script status value (such as:200 Deng).
For above-mentioned second feasible embodiment, the state recording unit 14 can also obtain single in described information When member 11 obtains the database establishment conditional information, monitoring script is pre-set, the monitoring script is used to record the void The configuration status of the database of the creation state of plan machine, the configuration status of the cloud storage resource and the virtual machine, when described Any process in the configuration of the database of the establishment of virtual machine, the configuration of the cloud storage resource and the virtual machine occurs different When often causing database configuration failure, the monitoring script can be with generation error daily record, and triggers rolling back action, works as database During configuration successful, the script of monitoring can generate the announcement information of database configuration successful, and the announcement information is preferably pre- First arrange script status value (such as:200 etc.).
In embodiments of the present invention, conditional information is created by the database obtained to the Service Database of target service, Conditional information is created according to database virtual machine corresponding to target service is created in the destination server under cloud platform, to virtual Machine configures cloud storage resource, and carries out initialization process to the cloud storage resource of virtual machine and virtual machine, after initialization process Configure the database of virtual machine, the database and cloud storage resource of final connecting virtual machine.By being created according to the database obtained Conditional information is built, the establishment of virtual machine and the configuration of database are completed in destination server, realizes the automatic of database Configuration process, while by using virtual machine and the mode of cloud storage so that the number for the Service Database that server can carry Amount increase, improves the utilization rate of server, effectively reduces the costs such as human resources, hardware resource;It is " main to answer by configuring The database schema of system ", realizes the deployment of High Availabitity framework;By selecting to enter line number with a server for computer room difference frame According to the establishment in storehouse, the other server failure of chassis level can be avoided on the basis of time delay is reduced, effective guarantee High Availabitity Characteristic;By providing the database schema of " main duplication " and " unit establishment ", can be met with the configuration mode in abundant data storehouse Different business demands.
Fig. 9 is referred to, is that the embodiments of the invention provide the structural representation that another database configures equipment.Such as Fig. 9 Shown, the database configuration equipment 1000 can include:At least one processor 1001, such as CPU, at least one network connect Mouth 1004, user interface 1003, memory 1005, at least one communication bus 1002.Wherein, communication bus 1002 is used to realize Connection communication between these components.Wherein, user interface 1003 can include display screen (Display), keyboard (Keyboard), optional user interface 1003 can also include wireline interface, the wave point of standard.Network interface 1004 is optional Wireline interface, the wave point (such as WI-FI interfaces) that can include standard.Memory 1005 can be high-speed RAM memory, Can also be non-labile memory (non-volatile memory), for example, at least a magnetic disk storage.Memory 1005 optionally can also be at least one storage device for being located remotely from aforementioned processor 1001.As shown in figure 9, as a kind of Operating system, network communication module, Subscriber Interface Module SIM and number can be included in the memory 1005 of computer-readable storage medium Application program is configured according to storehouse.
In the database configuration equipment 1000 shown in Fig. 9, user interface 1003 is mainly used in providing the user input Interface, obtain the data of user's input;Network interface 1004 is used to enter row data communication with the Cloud Server managed;And handle Device 1001 can be used for calling the database configuration application program stored in memory 1005, and specifically perform following operate:
The database for obtaining the Service Database that data write-in is carried out to target service submitted creates conditional information;
Conditional information is created according to the database target service pair is created in the destination server under cloud platform The virtual machine answered, and to the virtual machine configuration cloud storage resource;
Initialization process is carried out to the cloud storage resource of the virtual machine and the virtual machine, and matched somebody with somebody after initialization process The database of the virtual machine is put, connects the database and cloud storage resource of the virtual machine.
In one embodiment, the database, which creates conditional information, includes selected type of database and selected Database configuration needs information;
The processor 1001 is performing the destination server according to database establishment conditional information under cloud platform It is middle to create virtual machine corresponding to the target service, and during to the virtual machine configuration cloud storage resource, it is specific to perform following grasp Make:
When the selected type of database is presetting database type, and the database configuration needs information indicates For High Availabitity demand information when, created in the server cluster under cloud platform the first virtual machine corresponding to the target service and Second virtual machine, and cloud storage resource is respectively configured to first virtual machine and second virtual machine;
It is described that initialization process is carried out to the cloud storage resource of the virtual machine and the virtual machine, and in initialization process The database of the virtual machine is configured afterwards, connects the database and cloud storage resource of the virtual machine, including:
To first virtual machine, the second virtual machine, the cloud storage resource of the first virtual machine, the cloud storage of the second virtual machine Resource carries out initialization process, and the network address information after initialization process to first virtual machine and second void The network address information of plan machine is associated;
The database of first virtual machine and the database of second virtual machine are configured, and it is virtual to connect described first The database and cloud storage resource of machine, and the database and cloud storage resource of connection second virtual machine.
In one embodiment, the processor 1001 creates the mesh in execution in the server cluster under cloud platform First virtual machine corresponding to mark business and the second virtual machine, and first virtual machine and second virtual machine are respectively configured It is specific to perform following operate during cloud storage resource:
In the server cluster under based on the computer room mark selected by cloud platform, according to respectively being taken in the server cluster The putting in order for network address information of business device determines first server using polling mode, is created in the first server First virtual machine corresponding to the target service;
The network address information of first virtual machine is obtained, and to the first virtual machine configuration cloud storage resource;
In remaining server of the server cluster in addition to the first server, according in the remaining server Putting in order for the network address information of each server determines second server using polling mode, in the second server Create the second virtual machine corresponding to the target service;
The network address information of first virtual machine is passed to second virtual machine, obtains second virtual machine Network address information, and to the second virtual machine configuration cloud storage resource;
The network address information of second virtual machine is passed to first virtual machine.
In one embodiment, the first server is to belong to same computer room and adhere to separately not with the second server With the server in frame.
In one embodiment, the processor 1001 is performing network address information and institute to first virtual machine It is specific to perform following operate when stating the network address information of the second virtual machine and being associated:
The network address information of first virtual machine is configured in the address information list of second virtual machine, and The network address information of second virtual machine is configured in the address information list of first virtual machine.
In one embodiment, the database, which creates conditional information, includes selected type of database and selected Database configuration needs information;
The processor 1001 is performing the destination server according to database establishment conditional information under cloud platform It is middle to create virtual machine corresponding to the target service, and during to the virtual machine configuration cloud storage resource, it is specific to perform following grasp Make:
When the selected type of database is presetting database type, and the database configuration needs information indicates When not being High Availabitity demand information, in the server cluster under based on the computer room mark selected by cloud platform, according to the clothes The putting in order for network address information of each server determines destination server using polling mode in business device cluster, in the mesh Virtual machine corresponding to the target service is created in mark server, and to the virtual machine configuration cloud storage resource.
In one embodiment, the processor 1001 also performs following operation:
Using the creation state of virtual machine, the configuration status of the cloud storage resource and institute described in default monitoring script logging State the configuration status of the database of virtual machine.
In embodiments of the present invention, conditional information is created by the database obtained to the Service Database of target service, Conditional information is created according to database virtual machine corresponding to target service is created in the destination server under cloud platform, to virtual Machine configures cloud storage resource, and carries out initialization process to the cloud storage resource of virtual machine and virtual machine, after initialization process Configure the database of virtual machine, the database and cloud storage resource of final connecting virtual machine.By being created according to the database obtained Conditional information is built, the establishment of virtual machine and the configuration of database are completed in destination server, realizes the automatic of database Configuration process, while by using virtual machine and the mode of cloud storage so that the number for the Service Database that server can carry Amount increase, improves the utilization rate of server, effectively reduces the costs such as human resources, hardware resource;It is " main to answer by configuring The database schema of system ", realizes the deployment of High Availabitity framework;By selecting to enter line number with a server for computer room difference frame According to the establishment in storehouse, the other server failure of chassis level can be avoided on the basis of time delay is reduced, effective guarantee High Availabitity Characteristic;By providing the database schema of " main duplication " and " unit establishment ", can be met with the configuration mode in abundant data storehouse Different business demands.
One of ordinary skill in the art will appreciate that realize all or part of flow in above-described embodiment method, being can be with The hardware of correlation is instructed to complete by computer program, described program can be stored in a computer read/write memory medium In, the program is upon execution, it may include such as the flow of the embodiment of above-mentioned each method.Wherein, described storage medium can be magnetic Dish, CD, read-only memory (Read-Only Memory, ROM) or random access memory (Random Access Memory, RAM) etc..
Above disclosure is only preferred embodiment of present invention, can not limit the right model of the present invention with this certainly Enclose, therefore the equivalent variations made according to the claims in the present invention, still belong to the scope that the present invention is covered.

Claims (14)

  1. A kind of 1. configuration method for database, it is characterised in that including:
    The database for obtaining the Service Database that data write-in is carried out to target service submitted creates conditional information;
    According to corresponding to database establishment conditional information creates the target service in the destination server under cloud platform Virtual machine, and to the virtual machine configuration cloud storage resource;
    Initialization process is carried out to the cloud storage resource of the virtual machine and the virtual machine, and institute is configured after initialization process The database of virtual machine is stated, connects the database and cloud storage resource of the virtual machine.
  2. 2. according to the method for claim 1, it is characterised in that the database, which creates conditional information, includes selected number According to storehouse type and selected database configuration needs information;
    It is described that the target service pair is created in the destination server under cloud platform according to database establishment conditional information The virtual machine answered, and to the virtual machine configuration cloud storage resource, including:
    When the selected type of database is presetting database type, and the database configuration needs information is designated as height When can use demand information, the first virtual machine and second corresponding to the target service is created in the server cluster under cloud platform Virtual machine, and cloud storage resource is respectively configured to first virtual machine and second virtual machine;
    It is described that initialization process is carried out to the cloud storage resource of the virtual machine and the virtual machine, and match somebody with somebody after initialization process The database of the virtual machine is put, connects the database and cloud storage resource of the virtual machine, including:
    To first virtual machine, the second virtual machine, the cloud storage resource of the first virtual machine, the cloud storage resource of the second virtual machine Carry out initialization process, and the network address information after initialization process to first virtual machine and second virtual machine Network address information be associated;
    The database of first virtual machine and the database of second virtual machine are configured, and connects first virtual machine Database and cloud storage resource, and the database and cloud storage resource of connection second virtual machine.
  3. 3. according to the method for claim 2, it is characterised in that described in being created in the server cluster under cloud platform First virtual machine corresponding to target service and the second virtual machine, and first virtual machine and second virtual machine are matched somebody with somebody respectively Cloud storage resource is put, including:
    In the server cluster under based on the computer room mark selected by cloud platform, according to each server in the server cluster Putting in order for network address information first server is determined using polling mode, in the first server create described in First virtual machine corresponding to target service;
    The network address information of first virtual machine is obtained, and to the first virtual machine configuration cloud storage resource;
    In remaining server of the server cluster in addition to the first server, according to respectively being taken in the remaining server The putting in order for network address information of business device determines second server using polling mode, is created in the second server Second virtual machine corresponding to the target service;
    The network address information of first virtual machine is passed to second virtual machine, obtains the network of second virtual machine Address information, and to the second virtual machine configuration cloud storage resource;
    The network address information of second virtual machine is passed to first virtual machine.
  4. 4. according to the method for claim 3, it is characterised in that the first server is to belong to the second server Same computer room and adhere to the server in different frames separately.
  5. 5. according to the method for claim 2, it is characterised in that the network address information to first virtual machine and The network address information of second virtual machine is associated, including:
    The network address information of first virtual machine is configured in the address information list of second virtual machine, and by institute The network address information for stating the second virtual machine is configured in the address information list of first virtual machine.
  6. 6. according to the method for claim 1, it is characterised in that the database, which creates conditional information, includes selected number According to storehouse type and selected database configuration needs information;
    It is described that the target service pair is created in the destination server under cloud platform according to database establishment conditional information The virtual machine answered, and to the virtual machine configuration cloud storage resource, including:
    When the selected type of database is presetting database type, and database configuration needs information instruction is not During High Availabitity demand information, in the server cluster under based on the computer room mark selected by cloud platform, according to the server Putting in order for the network address information of each server determines destination server using polling mode in cluster, is taken in the target Virtual machine corresponding to the target service is created in business device, and to the virtual machine configuration cloud storage resource.
  7. 7. according to the method for claim 1, it is characterised in that also include:
    Using the creation state of virtual machine, the configuration status of the cloud storage resource and the void described in default monitoring script logging The configuration status of the database of plan machine.
  8. 8. a kind of database configures equipment, it is characterised in that including:
    Information acquisition unit, the database for obtaining the Service Database that data write-in is carried out to target service submitted create Conditional information;
    Resource configuration unit, institute is created in the destination server under cloud platform for creating conditional information according to the database Virtual machine corresponding to target service is stated, and to the virtual machine configuration cloud storage resource;
    Database dispensing unit, for carrying out initialization process to the cloud storage resource of the virtual machine and the virtual machine, and The database of the virtual machine is configured after initialization process, connects the database and cloud storage resource of the virtual machine.
  9. 9. equipment according to claim 8, it is characterised in that the database, which creates conditional information, includes selected number According to storehouse type and selected database configuration needs information;
    The resource configuration unit is specifically used for when the selected type of database is presetting database type, and the number When being designated as High Availabitity demand information according to storehouse configuration needs information, the target industry is created in the server cluster under cloud platform First virtual machine corresponding to business and the second virtual machine, and are respectively configured by cloud and is deposited for first virtual machine and second virtual machine Store up resource;
    The database dispensing unit includes:
    Information association subelement, for first virtual machine, the second virtual machine, the cloud storage resource of the first virtual machine, The cloud storage resource of two virtual machines carries out initialization process, and to the network address of first virtual machine after initialization process Information and the network address information of second virtual machine are associated;
    Database configures subelement, for configuring the database of first virtual machine and the database of second virtual machine, And the database and cloud storage resource of first virtual machine are connected, and the database of connection second virtual machine and cloud are deposited Store up resource.
  10. 10. equipment according to claim 9, it is characterised in that the resource configuration unit includes:
    Virtual machine creating subelement, for being presetting database type when the selected type of database, and the data When storehouse configuration needs information is designated as High Availabitity demand information, the server set under based on the computer room mark selected by cloud platform In group, first is determined using polling mode according to the putting in order for network address information of each server in the server cluster Server, the first virtual machine corresponding to the target service is created in the first server;
    Resource distribution subelement, match somebody with somebody for obtaining the network address information of first virtual machine, and to first virtual machine Put cloud storage resource;
    The virtual machine creating subelement, it is additionally operable to the remaining server in addition to the first server in the server cluster In, the second clothes are determined using polling mode according to the putting in order for network address information of each server in the remaining server Business device, creates the second virtual machine corresponding to the target service in the second server;
    The resource distribution subelement, it is additionally operable to the network address information of first virtual machine being passed to described second virtual Machine, the network address information of second virtual machine is obtained, and to the second virtual machine configuration cloud storage resource;
    Information is passed to subelement, for the network address information of second virtual machine to be passed into first virtual machine.
  11. 11. equipment according to claim 10, it is characterised in that the first server is category with the second server In same computer room and adhere to the server in different frames separately.
  12. 12. equipment according to claim 9, it is characterised in that described information association subelement is specifically used for described the One virtual machine, the second virtual machine, the cloud storage resource of the first virtual machine, the cloud storage resource of the second virtual machine are carried out at initialization Manage, and the network address information of first virtual machine is configured to the address pass of second virtual machine after initialization process Join in list, and the network address information of second virtual machine is configured to the address information list of first virtual machine In.
  13. 13. equipment according to claim 8, it is characterised in that the database creates conditional information including selected Type of database and selected database configuration needs information;
    The resource configuration unit is specifically used for when the selected type of database is presetting database type, and the number According to storehouse configuration needs information instruction be High Availabitity demand information when, based on selected by cloud platform computer room identify under service In device cluster, determined according to the putting in order for network address information of each server in the server cluster using polling mode Destination server, virtual machine corresponding to the target service is created in the destination server, and to the virtual machine configuration Cloud storage resource.
  14. 14. equipment according to claim 8, it is characterised in that also include:
    State recording unit, for using default creation state, the cloud storage resource for monitoring virtual machine described in script logging Configuration status and the virtual machine database configuration status.
CN201610597513.4A 2016-07-27 2016-07-27 Database configuration method and equipment thereof Active CN107665141B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610597513.4A CN107665141B (en) 2016-07-27 2016-07-27 Database configuration method and equipment thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610597513.4A CN107665141B (en) 2016-07-27 2016-07-27 Database configuration method and equipment thereof

Publications (2)

Publication Number Publication Date
CN107665141A true CN107665141A (en) 2018-02-06
CN107665141B CN107665141B (en) 2020-12-29

Family

ID=61114717

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610597513.4A Active CN107665141B (en) 2016-07-27 2016-07-27 Database configuration method and equipment thereof

Country Status (1)

Country Link
CN (1) CN107665141B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109271235A (en) * 2018-09-06 2019-01-25 广州力挚网络科技有限公司 A kind of data-base cluster method for building up and device
CN110519365A (en) * 2019-08-26 2019-11-29 网宿科技股份有限公司 A kind of method and business change system changing appliance services
CN110716914A (en) * 2019-09-02 2020-01-21 平安普惠企业管理有限公司 Database configuration method, system, computer readable storage medium and terminal equipment
CN110955409A (en) * 2019-12-02 2020-04-03 郑州阿帕斯数云信息科技有限公司 Method and device for creating resources on cloud platform
CN111651431A (en) * 2020-06-09 2020-09-11 中国雄安集团数字城市科技有限公司 Database service oriented management flow standardization method
CN115643286A (en) * 2022-10-14 2023-01-24 中铁第四勘察设计院集团有限公司 Cloud platform monitoring system based on vacuum pipeline and construction method thereof

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102801806A (en) * 2012-08-10 2012-11-28 薛海强 Cloud computing system and cloud computing resource management method
CN103200020A (en) * 2012-01-04 2013-07-10 中兴通讯股份有限公司 Resource allocating method and resource allocating system
CN103797462A (en) * 2013-10-23 2014-05-14 华为技术有限公司 Method, system, and device for creating virtual machine
US20150066860A1 (en) * 2013-08-27 2015-03-05 Connectloud, Inc. Method and apparatus for utilizing virtual machine instance information from a database for software defined cloud recovery
CN104424013A (en) * 2013-08-26 2015-03-18 国际商业机器公司 Method and device for deploying virtual machine in computing environment
CN104717233A (en) * 2013-12-11 2015-06-17 中国电信股份有限公司 Database deployment method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103200020A (en) * 2012-01-04 2013-07-10 中兴通讯股份有限公司 Resource allocating method and resource allocating system
CN102801806A (en) * 2012-08-10 2012-11-28 薛海强 Cloud computing system and cloud computing resource management method
CN104424013A (en) * 2013-08-26 2015-03-18 国际商业机器公司 Method and device for deploying virtual machine in computing environment
US20150066860A1 (en) * 2013-08-27 2015-03-05 Connectloud, Inc. Method and apparatus for utilizing virtual machine instance information from a database for software defined cloud recovery
CN103797462A (en) * 2013-10-23 2014-05-14 华为技术有限公司 Method, system, and device for creating virtual machine
CN104717233A (en) * 2013-12-11 2015-06-17 中国电信股份有限公司 Database deployment method and device

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109271235A (en) * 2018-09-06 2019-01-25 广州力挚网络科技有限公司 A kind of data-base cluster method for building up and device
CN109271235B (en) * 2018-09-06 2023-12-19 广州力挚网络科技有限公司 Database cluster establishment method and device
CN110519365A (en) * 2019-08-26 2019-11-29 网宿科技股份有限公司 A kind of method and business change system changing appliance services
WO2021036229A1 (en) * 2019-08-26 2021-03-04 网宿科技股份有限公司 Method for changing service on device and service changing system
CN110519365B (en) * 2019-08-26 2022-07-01 网宿科技股份有限公司 Method for changing equipment service and service changing system
CN110716914A (en) * 2019-09-02 2020-01-21 平安普惠企业管理有限公司 Database configuration method, system, computer readable storage medium and terminal equipment
CN110716914B (en) * 2019-09-02 2024-05-28 工业和信息化部国际经济技术合作中心 Database configuration method, system, computer readable storage medium and terminal device
CN110955409A (en) * 2019-12-02 2020-04-03 郑州阿帕斯数云信息科技有限公司 Method and device for creating resources on cloud platform
CN110955409B (en) * 2019-12-02 2023-03-28 郑州阿帕斯数云信息科技有限公司 Method and device for creating resources on cloud platform
CN111651431A (en) * 2020-06-09 2020-09-11 中国雄安集团数字城市科技有限公司 Database service oriented management flow standardization method
CN115643286A (en) * 2022-10-14 2023-01-24 中铁第四勘察设计院集团有限公司 Cloud platform monitoring system based on vacuum pipeline and construction method thereof

Also Published As

Publication number Publication date
CN107665141B (en) 2020-12-29

Similar Documents

Publication Publication Date Title
CN107665141A (en) A kind of configuration method for database and its equipment
CN105005532B (en) A kind of system and method for automatic test application programming interfaces stability
CN107666493A (en) A kind of configuration method for database and its equipment
US10846706B2 (en) Method and apparatus for autonomous services composition
CN107169007B (en) Display interface setting method and device of mobile terminal
CN106301829A (en) A kind of method and apparatus of Network dilatation
BR102015007166A2 (en) mechanism for job assignment in a graph-based contact center
EP1650897A1 (en) Element management method and system in multiple networks
WO2013138315A1 (en) Automated data center network patching system
CN111078404B (en) Computing resource determining method and device, electronic equipment and medium
CN113055232B (en) Network configuration deployment method, device and equipment
CN112669110A (en) Server label management method and related equipment
CN107992392A (en) A kind of automatic monitoring repair system and method for cloud rendering system
CN109246201A (en) cloud resource delivery method, processor and storage medium
CN103634177A (en) Method and system for implementing configuration on basis of network services
CN110233767A (en) Service configuration method, system, device and the readable storage medium storing program for executing of distributed type assemblies
CN109446062A (en) The method and apparatus of software debugging in cloud computing service
CN113256095A (en) Draggable configured agile flow service construction method, system, device and medium
CN109379268A (en) Creation method, device and the server of Virtual Private Network
CN105933154A (en) Management method of cloud calculation resources
CN110944067A (en) Load balancing method and server
CN107273112A (en) A kind of present list method for information display and device
CN112333672B (en) Method and device for opening UPF network element of 5G core network
CN107612753A (en) Processing method, device and the radio reception device of wireless messages
CN103281202A (en) System of browser/server architecture and front-end presentation method of 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
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20230919

Address after: 100190 Beijing Haidian District Zhichun Road 49 No. 3 West 309

Patentee after: TENCENT CLOUD COMPUTING (BEIJING) Co.,Ltd.

Address before: 2, 518000, East 403 room, SEG science and Technology Park, Zhenxing Road, Shenzhen, Guangdong, Futian District

Patentee before: TENCENT TECHNOLOGY (SHENZHEN) Co.,Ltd.

TR01 Transfer of patent right