CN114610798A - Resource allocation management method, system, device, storage medium and electronic equipment - Google Patents

Resource allocation management method, system, device, storage medium and electronic equipment Download PDF

Info

Publication number
CN114610798A
CN114610798A CN202210307595.XA CN202210307595A CN114610798A CN 114610798 A CN114610798 A CN 114610798A CN 202210307595 A CN202210307595 A CN 202210307595A CN 114610798 A CN114610798 A CN 114610798A
Authority
CN
China
Prior art keywords
configuration management
resource information
management database
host
node
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210307595.XA
Other languages
Chinese (zh)
Inventor
张亚庆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yidu Cloud Beijing Technology Co Ltd
Original Assignee
Yidu Cloud Beijing Technology 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 Yidu Cloud Beijing Technology Co Ltd filed Critical Yidu Cloud Beijing Technology Co Ltd
Priority to CN202210307595.XA priority Critical patent/CN114610798A/en
Publication of CN114610798A publication Critical patent/CN114610798A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2471Distributed queries
    • 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/23Updating
    • 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/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Fuzzy Systems (AREA)
  • Mathematical Physics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • Computing Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The disclosure relates to the technical field of computers, and provides a resource allocation management method, a resource allocation management system, a resource allocation management device, a computer-readable storage medium and an electronic device. The method is applied to a cloud environment, the cloud environment comprises a main node and sub-nodes associated with the main node, the main node is deployed in a first cloud environment, and the sub-nodes are deployed in a second cloud environment, and the method comprises the following steps: monitoring resource information in a first configuration management database corresponding to each sub-node associated with the main node according to a preset rule; and when any resource information in the first configuration management database corresponding to any sub-node is monitored to be changed, synchronizing the change information of the resource information into the second configuration management database corresponding to the main node. The scheme is based on active monitoring of the resource information in the child nodes, and can improve the accuracy and timeliness of resource information management.

Description

Resource allocation management method, system, device, storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a resource allocation management method, a resource allocation management system, a resource allocation management apparatus, a computer-readable storage medium, and an electronic device.
Background
A CMDB (Configuration Management Database) is a logical Database for collecting and managing Configuration items and relationships between the Configuration items.
In the related art, the resource information may be collected through an agent (proxy service) automatic tool, for example, an agent end may directly synchronize the collected resource information to the CMDB through a network protocol.
However, in this way, when the network state is complex, such as in a network one-way communication state between hybrid cloud environments, the agent cannot actively report, and at this time, the integrity of the resource information cannot be guaranteed, or when the traffic exceeds the usage range, the agent cannot rely on the automatic collection tool to complete the automatic collection of the resource information, so that the accuracy and timeliness of the resource information collection are affected.
It is to be noted that the information disclosed in the above background section is only for enhancement of understanding of the background of the present disclosure, and thus may include information that does not constitute prior art known to those of ordinary skill in the art.
Disclosure of Invention
The present disclosure is directed to a resource allocation management method, a resource allocation management system, a resource allocation management apparatus, a computer-readable storage medium, and an electronic device, so as to at least improve, to a certain extent, a technical problem in the related art that it is difficult to ensure accuracy and timeliness of resource information collection under a condition that a network state is complex.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows, or in part will be obvious from the description, or may be learned by practice of the disclosure.
According to a first aspect of the present disclosure, a resource configuration management method is provided, which is applied to a cloud environment, where the cloud environment includes a master node and child nodes associated with the master node, the master node is deployed in a first cloud environment, and the child nodes are deployed in a second cloud environment, and the method includes: monitoring resource information in a first configuration management database corresponding to each sub-node associated with the main node according to a preset rule; and when any resource information in a first configuration management database corresponding to any child node is monitored to be changed, synchronizing the change information of the resource information to a second configuration management database corresponding to the host node.
In an exemplary embodiment of the present disclosure, based on the foregoing scheme, a first configuration management database corresponding to each child node is used to store resource information of each host in the child node, and a second configuration management database corresponding to the master node is used to store resource information of each host in each child node associated with the master node.
In an exemplary embodiment of the present disclosure, based on the foregoing scheme, the resource information of each host is determined by a proxy service deployed in the host; for each host, a proxy service deployed in the host determines resource information for the host by: the agent service deployed in the host monitors current data of the resource information of the host and compares the current data with historical data of the resource information of the host stored in the first configuration management database; and when the historical data is inconsistent with the current data, updating the resource information of the host computer stored in the first configuration management database by using the current data.
In an exemplary embodiment of the present disclosure, based on the foregoing scheme, the monitoring, according to a preset rule, resource information in a first configuration management database corresponding to each child node associated with the master node includes: acquiring current data of resource information in a first configuration management database corresponding to each sub-node associated with the main node according to a preset rule; comparing the current data with historical data of the resource information stored in the second configuration management database to monitor whether the resource information changes.
In an exemplary embodiment of the present disclosure, based on the foregoing scheme, the monitoring, according to a preset rule, resource information in a first configuration management database corresponding to each child node associated with the master node includes: monitoring resource information in a first configuration management database corresponding to each sub-node associated with the main node according to a preset period; or monitoring the resource information in the first configuration management database corresponding to each sub-node associated with the main node in real time.
In an exemplary embodiment of the present disclosure, based on the foregoing scheme, the method further includes: in response to an adjustment operation on any resource information of any host in the second configuration management database, synchronizing the change information of the resource information into a first configuration management database corresponding to the resource information so as to manage the resource information stored in the first configuration management database; and/or responding to the adjustment operation of any resource information of any host in a first configuration management database corresponding to any child node, and synchronizing the change information of the resource information to a second configuration management database corresponding to a main node associated with the child node so as to manage the resource information stored in the first configuration management database.
In an exemplary embodiment of the present disclosure, based on the foregoing solution, the method further includes: in response to receiving a first adjustment instruction and a second adjustment instruction at the same time, determining a target adjustment instruction from the first adjustment instruction and the second adjustment instruction, wherein the first adjustment instruction and the second adjustment instruction are determined based on adjustment operations on the same resource information in the second configuration management database and the first configuration management database, respectively; synchronizing the change information of the resource information in the configuration management database corresponding to the target adjustment instruction to another configuration management database; the target adjusting instruction is an adjusting instruction with a later adjusting time in the first adjusting instruction and the second adjusting instruction.
In an exemplary embodiment of the present disclosure, based on the foregoing scheme, the resource information of the host includes status information of a device related to the host; wherein the state information comprises one or more of in-use, off-shelf, and destroyed.
In an exemplary embodiment of the present disclosure, based on the foregoing scheme, the resource information of the host includes one or more of memory information, hard disk information, a MAC address, an IP address, a port number, and service information running in the host.
According to a second aspect of the present disclosure, there is provided a resource configuration management system, including: the system comprises at least one main node, sub-nodes associated with each main node, a first configuration management database configured for each sub-node, a second configuration management database configured for each main node, and a synchronization server configured for each main node, wherein the main nodes are deployed in a first cloud environment, and the sub-nodes are deployed in a second cloud environment;
the synchronization server configured for each main node is used for monitoring resource information in a first configuration management database corresponding to each sub-node associated with the main node according to a preset rule, and synchronizing change information of the resource information into a second configuration management database corresponding to the main node when monitoring that any resource information in the first configuration management database corresponding to any sub-node changes.
In an exemplary embodiment of the present disclosure, based on the foregoing scheme, the first configuration management database configured for each child node is configured to store resource information of each host in the child node; a second configuration management database configured for each master node is used to store resource information for each host in each child node associated with the master node.
In an exemplary embodiment of the present disclosure, based on the foregoing scheme, the system further includes an agent service respectively deployed in each host, where the agent service is configured to monitor resource information of the host, and synchronize change information of the resource information to a first configuration management database corresponding to a child node to which the host belongs when it is monitored that the resource information of the host changes.
In an exemplary embodiment of the present disclosure, based on the foregoing solution, the resource information of the host includes status information of a device related to the host, where the status information includes one or more of in-use, off-shelf, and destroyed; the configuration management database is also used for responding to the query operation of the current state information of any host in any configuration management database and determining the current state information of the host; and/or the any configuration management database is also used for responding to the trace query operation of the state information of any equipment related to the host in any configuration management database and determining the state transition trace of the equipment according to the time sequence.
In an exemplary embodiment of the present disclosure, based on the foregoing scheme, the resource information of the host includes one or more of memory information, hard disk information, a MAC address, an IP address, a port number, and service information running in the host.
In an exemplary embodiment of the present disclosure, based on the foregoing scheme, the synchronization server is further configured to synchronize, in response to a first adjustment instruction sent by the master node, change information of resource information of a host indicated by the first adjustment instruction into a first configuration management database corresponding to a child node to which the host belongs, so as to manage the resource information in the child node, where the first adjustment instruction is determined based on an adjustment operation on any resource information in a second configuration management database corresponding to the master node; and/or the synchronization server is further configured to synchronize, in response to a second adjustment instruction sent by any one of the child nodes, change information of the resource information of the host indicated by the second adjustment instruction to a second configuration management database corresponding to a master node associated with the child node, so as to manage the resource information in the child node, where the second adjustment instruction is determined based on an adjustment operation on any resource information of any one host in a first configuration management database corresponding to any one of the child nodes.
In an exemplary embodiment of the present disclosure, based on the foregoing solution, the synchronization server is further configured to determine, in response to receiving a first adjustment instruction sent by the master node and a second adjustment instruction sent by the child node at the same time, a target adjustment instruction from the first adjustment instruction and the second adjustment instruction, and synchronize change information of resource information in a configuration management database indicated by the target adjustment instruction into another configuration management database; the first adjustment instruction and the second adjustment instruction are determined based on adjustment operations on the same resource information in a second configuration management database corresponding to the main node and a first configuration management database corresponding to any one of the sub-nodes associated with the main node, respectively, and the target adjustment instruction is an adjustment instruction with a later adjustment time in the first adjustment instruction and the second adjustment instruction.
According to a third aspect of the present disclosure, there is provided a resource configuration management apparatus applied to a cloud environment, where the cloud environment includes a master node and a child node associated with the master node, the master node is deployed in a first cloud environment, and the child node is deployed in a second cloud environment, the apparatus including: the monitoring module is configured to monitor resource information in a first configuration management database corresponding to each sub-node associated with the main node according to a preset rule; and the synchronization module is configured to synchronize the change information of the resource information to a second configuration management database corresponding to the main node when monitoring that any resource information in a first configuration management database corresponding to any sub-node changes.
According to a fourth aspect of the present disclosure, there is provided a computer readable storage medium, on which a computer program is stored, which when executed by a processor, implements the resource configuration management method as described in the first aspect of the embodiments above.
According to a fifth aspect of embodiments of the present disclosure, there is provided an electronic apparatus including: a processor; and a storage device, configured to store one or more programs, which when executed by the one or more processors, cause the one or more processors to implement the resource configuration management method as described in the first aspect of the embodiments.
As can be seen from the foregoing technical solutions, the resource allocation management method, the resource allocation management system, the resource allocation management apparatus, and the computer-readable storage medium and the electronic device for implementing the resource allocation management method in the exemplary embodiments of the present disclosure have at least the following advantages and positive effects:
in some embodiments of the present disclosure, a master node may be deployed in a first cloud environment, and child nodes are deployed in a second cloud environment, and then resource information in a first configuration management database corresponding to each child node associated with the master node may be monitored according to a preset rule, and when it is detected that any resource information in the first configuration management database corresponding to any child node changes, change information of the resource information is synchronized into a second configuration management database corresponding to the master node. Compared with the prior art, the resource information can still be collected under the environment with poor network conditions by monitoring the first configuration management database corresponding to the child node, and the timeliness and the accuracy of the resource information collection are improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure. It is to be understood that the drawings in the following description are merely exemplary of the disclosure, and that other drawings may be derived from those drawings by one of ordinary skill in the art without the exercise of inventive faculty.
FIG. 1 is a flow diagram illustrating a resource configuration management method in an exemplary embodiment of the present disclosure;
FIG. 2 is a flow diagram illustrating a method for monitoring resource information of each host in a child node in an exemplary embodiment of the present disclosure;
FIG. 3 illustrates a state flow process diagram for a full lifecycle of a server in an exemplary embodiment of the disclosure;
FIG. 4 illustrates a schematic structural diagram of a resource configuration management system in an exemplary embodiment of the present disclosure;
FIG. 5 is a schematic diagram illustrating an architecture of a resource configuration management system in another hybrid cloud environment in an exemplary embodiment of the present disclosure;
FIG. 6 is a schematic diagram illustrating an exemplary embodiment of a resource allocation management apparatus according to the present disclosure;
FIG. 7 shows a schematic diagram of a structure of a computer storage medium in an exemplary embodiment of the disclosure;
fig. 8 shows a schematic structural diagram of an electronic device in an exemplary embodiment of the present disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the disclosure. One skilled in the relevant art will recognize, however, that the subject matter of the present disclosure can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and the like. In other instances, well-known technical solutions have not been shown or described in detail to avoid obscuring aspects of the present disclosure.
The terms "a," "an," "the," and "said" are used in this specification to denote the presence of one or more elements/components/parts/etc.; the terms "comprising" and "having" are intended to be inclusive and mean that there may be additional elements/components/etc. other than the listed elements/components/etc.; the terms "first" and "second", etc. are used merely as labels, and are not limiting on the number of their objects.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus their repetitive description will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities.
A CMDB (Configuration Management Database) is a logical Database for collecting and managing Configuration items and relationships between the Configuration items. The CMDB stores and manages various configuration information in an enterprise IT (Internet Technology) architecture, is closely connected with all service support and service delivery processes, supports the operation of the processes, exerts the value of the configuration information and simultaneously ensures the accuracy of data depending on the related processes.
In the related art, the CMDB platform may collect resource information through an agent automation tool, support manual import and export of resource information, and adjust resource information through a Web (World Wide Web) side. Specifically, in a state of good network condition, the agent end may directly synchronize the collected information to the CMDB through the network protocol.
However, when the network state is complex, such as when the network in the hybrid cloud environment is unidirectional, the agent cannot actively report, and it is difficult to ensure the integrity of the data of the resource information stored in the CMDB at this time. For another example, in the case of a flow limit, it is difficult to automatically collect resource information when the flow exceeds the usage range. Therefore, the CMDB-based resource information management method in the related art has a small application range, and it is difficult to ensure accuracy and timeliness of the acquired resource information in a complex network state.
Further, CMDB translation in the related art lacks management of the complete lifecycle of resource information, and cannot track the complete lifecycle of resource information.
In an embodiment of the present disclosure, a resource allocation management method is first provided, which overcomes, at least to some extent, the above-mentioned drawbacks in the related art.
Fig. 1 is a flowchart illustrating a resource configuration management method in an exemplary embodiment of the present disclosure, where the resource configuration management method provided in this embodiment is applied to a cloud environment. The cloud environment comprises a main node and sub-nodes associated with the main node, the main node is deployed in a first cloud environment, and the sub-nodes are deployed in a second cloud environment. Referring to fig. 1, the method includes:
step S110, monitoring resource information in a first configuration management database corresponding to each sub-node associated with the main node according to a preset rule;
step S120, when it is monitored that any resource information in the first configuration management database corresponding to any child node changes, synchronizing the change information of the resource information to the second configuration management database corresponding to the host node.
In the technical solution provided in the embodiment shown in fig. 1, a master node may be deployed in a first cloud environment, child nodes are deployed in a second cloud environment, then resource information in a first configuration management database corresponding to each child node associated with the master node may be monitored according to a preset rule, and when it is detected that any resource information in the first configuration management database corresponding to any child node changes, the change information of the resource information is synchronized to a second configuration management database corresponding to the master node. Compared with the prior art, the resource information can still be collected under the environment with poor network conditions by monitoring the first configuration management database corresponding to the child node, and the timeliness and the accuracy of the resource information collection are improved.
The following detailed description of the various steps in the example shown in fig. 1:
in step S110, according to a preset rule, resource information in a first configuration management database corresponding to each child node associated with the master node is monitored.
In an exemplary embodiment, the cloud environment may comprise a hybrid cloud environment that may include at least one master node and child nodes associated with each master node. Each main node and the child node associated with the main node may correspondingly form a cloud cluster.
In an exemplary embodiment, each master node may be deployed in a first cloud environment and each child node may be deployed in a second cloud environment. The first cloud environment and the second cloud environment may be the same or different.
In an exemplary embodiment, the first cloud environment may comprise a public cloud environment and the second cloud environment may comprise a private cloud environment. Of course, the first cloud environment may include a private cloud environment, that is, the master node may be deployed in a public cloud environment or may be deployed in a private cloud environment, which is not particularly limited in this exemplary embodiment.
The public cloud environment may be understood as a service mode in which a cloud service provider deploys an IT (Internet Technology) infrastructure and performs operation and maintenance, and provides standardized and undifferentiated IT resources borne by the infrastructure to public customers, that is, an environment in which multiple parties share one cloud server to share resource services. The private cloud environment can be understood as a product delivery mode that a cloud service provider constructs an IT infrastructure for a single client, corresponding IT resources are only used by staff in the client, and the private cloud environment is characterized in that cloud resources are only used by a certain client, and other clients do not have access. And a hybrid cloud environment may be understood as a model that includes both public and private cloud environments.
For example, the master node deployed in the first cloud environment may be understood as any one of the master node being the first cloud environment, or the master node being at least one physical server (i.e., a real-existing server) in the first cloud environment, or the master node being at least one virtual server in the first cloud environment, or the master node being at least one physical server and at least one virtual server in the first cloud environment. Similarly, the case that the child node is deployed in the first cloud environment may also be understood as any one of the case that the child node is the second cloud environment, or the case that the child node is at least one physical server in the second cloud environment, or the case that the child node is at least one virtual server in the second cloud environment, or the case that the child node is at least one physical service and at least one virtual server in the second cloud environment, which is not particularly limited by this exemplary embodiment.
Taking the first cloud environment as a public cloud environment and the second cloud environment as a private cloud environment as an example, the master node may be any one of a public cloud, or at least one physical server in the public cloud, or at least one virtual server in the public cloud, or at least one physical server and at least one virtual server in the public cloud. The child node may be any of the private cloud, or at least one physical service in the private cloud, or at least one virtual server in the private cloud, or at least one physical server and at least one virtual server in the private cloud.
For example, a first configuration management database may be respectively configured for each child node, and is used for storing and managing resource information of each host in the child node; each master node may be further configured with a second configuration management database for storing and managing resource information of each host in each child node associated with the master node.
The resource information of the host may include one or more of memory information of the host, hard disk information, a Media Access Control (MAC) address, an Internet Protocol (IP) address, a port number, and service information running in the host. The MAC address may also be understood as a local network address, an ethernet address or a physical address. Of course, the specific resource information stored and managed in the first configuration management database and the second configuration management database may be configured by user-defined according to the requirement of the user, and this is not limited in this exemplary embodiment.
Furthermore, a synchronization server may be configured for each master node, and the synchronization server may monitor resource information in the first configuration management database corresponding to each child node associated with the master node, so as to implement synchronous update and management of the resource information in the master node and each child node associated with the master node.
For example, in a specific implementation manner of step S110, each synchronization server monitors resource information in the first configuration management database corresponding to each child node associated with its corresponding master node according to a preset rule.
In an exemplary embodiment, monitoring resource information in the first configuration management database corresponding to each child node associated with the master node according to a preset rule may include: acquiring current data of resource information in a first configuration management database corresponding to each sub-node associated with the main node according to a preset rule; comparing the current data with historical data of the resource information stored in the second configuration management database to monitor whether the resource information changes. The preset rule may include real-time monitoring or periodic monitoring.
For example, according to a preset rule, monitoring resource information in the first configuration management database corresponding to each child node associated with the master node may include: monitoring resource information in a first configuration management database corresponding to each sub-node associated with the main node according to a preset period; or monitoring the resource information in the first configuration management database corresponding to each sub-node associated with the main node in real time. The preset period may be an equally-spaced period or an unequally-spaced period, which is not particularly limited in this exemplary embodiment.
Taking monitoring according to a preset period with equal intervals as an example, if the preset period is 10 minutes, the synchronization server respectively acquires current data of the resource information stored in each first configuration management database from the first configuration management database corresponding to each child node associated with the corresponding master node every 10 minutes, compares the acquired current data of the resource information with data of the resource information stored in the second configuration management database for each item of resource information, determines that the item of resource information changes when the two are not consistent, and determines that the item of resource information does not change when the two are consistent.
For real-time monitoring, it can be understood that the synchronization server can respond to the synchronization instruction of the resource information sent by any child node in real time. That is to say, when the resource information of the first configuration management database corresponding to a certain child node changes, the child node may send a synchronization instruction to the synchronization server corresponding to the host node associated therewith, so as to instruct the synchronization server to synchronize the change information of the current resource information of the first configuration management database to the second configuration management database corresponding to the host node.
In another exemplary embodiment, the synchronization server may also monitor, according to a preset rule, a change record of resource information stored in the first configuration management database corresponding to each child node associated with the corresponding master node, and determine whether the resource information stored in the first configuration management database changes according to the newly monitored change record of the resource information. For example, in the current monitoring period, if a new resource information change record is monitored, it is determined that the resource information in the first configuration management database corresponding to the child node to which the host belongs corresponding to the resource information change record changes. The new resource information change record can be determined according to the timestamp corresponding to each resource information change record, and if the time represented by the timestamp corresponding to a certain resource information change record is in the current monitoring period, the resource information change record is determined to be the new resource information change record.
Next, in step S120, when it is monitored that any resource information in the first configuration management database corresponding to any child node changes, the change information of the resource information is synchronized to the second configuration management database corresponding to the host node.
For example, the specific implementation manner of step S120 may be that, when monitoring that any resource information in the first configuration management database corresponding to any child node changes, the synchronization server synchronizes the change information of the resource information to the second configuration management database corresponding to the primary node associated with the child node.
In an exemplary embodiment, the change information of the resource information may include one or more of data after the resource information is changed or a change record of the resource information.
For example, when it is monitored that any resource information in the first configuration management database corresponding to any child node changes, the data after the resource information change and/or the change record of the resource information may be synchronized to the second configuration management database corresponding to the primary node associated with the child node. If the memory information of the host 1 obtained from the first configuration management database at the current monitoring time is 8G, and the memory information of the host 1 stored in the second configuration management database is 4G, it indicates that the memory information of the host 1 is changed, and the memory information of the host 1 stored in the second configuration management database may be changed to 8G. The change records "4G before change, 8G after change, 22 minutes and 22 seconds at 2 month, 22 days, 22 minutes and 22 seconds at 2022 year, 22 month and 22 days" corresponding to the memory information of the host 1 may be synchronized in the second configuration management database. The changed memory information and the change record of the memory information may also be synchronized to the second configuration management database at the same time, which is not limited in this exemplary embodiment.
For the resource information of each host in each child node, the change information of the resource information of the host can be monitored through a proxy service deployed in the host. For example, for each host, referring to steps S210 to S220 shown in fig. 2, the resource information of the host is monitored to determine whether the resource information of the host changes. Wherein:
in step S210, the proxy service deployed in the host monitors current data of the resource information of the host, and compares the current data with historical data of the resource information of the host stored in the first configuration management database;
in step S220, when the historical data is inconsistent with the current data, the resource information of the host stored in the first configuration management database is updated by using the current data.
For example, the agent service agent deployed in the host may periodically scan current data of the resource information corresponding to each resource information identifier in the host according to a preset scanning period and each resource information identifier configured in advance, and then compare the current data of each resource information with the data of the resource information stored in the first configuration management database corresponding to the host to which the resource information belongs. When the two are not consistent, it indicates that the resource information in the host changes, and the data of the resource information stored in the first configuration management database needs to be updated, and then the scanned current data of the resource information can be updated to the first configuration management database. And determining a change record of the changed resource information according to the current data and historical data stored in the first configuration management database, and synchronizing the change record into the first configuration management database. The resource information stored in the first configuration management database may be updated to be current data, and the change record of the resource information may be synchronized to the first configuration management database.
If the agent service 1 deployed in the host 1 scans that the current memory information of the host 1 is 8G, and the child node to which the host 1 belongs corresponds to the first configuration management database a, the memory information 8G of the host 1 is compared with the memory information of the host 1 stored in the first configuration management database a. If the two are consistent, it is determined that the memory information of the host 1 is not changed. If the two are not consistent, it indicates that the resource information of the memory information of the host 1 changes, the current data of the memory information of the host 1 is updated to 8G in the first configuration management database a, and meanwhile, the memory information change record of the host 1 "is changed to 4G before the change and 8G after the change, the change time: 22 min 22 s22 h 22 nd 22 month 2/22/2022 "into the first configuration management database.
In an exemplary embodiment, both the first configuration management database and the second configuration management database may be understood as CMDBs. The CMDB platform includes CMDB services and agent services. The CMDB service is configured to manage resource information, and the agent service is deployed in each host, and is configured to collect resource information of the corresponding host, such as host basic information, hard disk information, service information running on the host, and report the collected resource information to the CMDB service.
In the disclosure, a set of CMDB services is deployed in each master node, and a set of CMDB services is also deployed in each child node associated with the master node, so that current data of each item of resource information of the corresponding child node can be collected. When the data of the resource information stored in the sub-nodes changes, the data can be synchronized to the CMDB corresponding to the main node through the synchronization server, so that the accuracy of the data between the main node and each sub-node is ensured.
For example, when the host is expanded, the memory, the hard disk information, and the like of the host may change, and the agent deployed in the host checks that the resource information of the host changes, and may synchronize the changed data to the CMDB in the child node. Then, after monitoring the change of the CMDB in the child node, the synchronization server corresponding to the master node associated with the child node may synchronize change information corresponding to the change to the CMDB in the master node. The collection and synchronization of the resource information can be ensured to be completed under the condition of complex network conditions by an automatic synchronization mode.
The CMDB platform may also manage the collected resource information after completing the collection of the resource information. For example, it is confirmed whether the collected resource information is correct, and in case of incorrect, the resource information may be adjusted manually. Or manually adding some resource information, for example, annotating the information of a responsible person to a certain station of a certain child node.
In an exemplary embodiment, resource information in all child nodes associated with a master node may be managed by the master node. The main node can complete data adjustment of the resource information stored in the sub-node CMDB platform through the synchronization server.
Based on this, an exemplary embodiment of performing adjustment management on resource information in a child node may be that, in response to an adjustment operation on any resource information of any host in a second configuration management database corresponding to a master node, a synchronization server synchronizes change information of the resource information to a first configuration management database corresponding to the resource information to manage the resource information stored in the first configuration management database.
Another exemplary embodiment of adjusting and managing the resource information in the child node may be that, in response to an adjustment operation on any resource information of any host in a first configuration management database corresponding to any child node, the synchronization server synchronizes change information of the resource information to a second configuration management database corresponding to a master node associated with the child node to manage the resource information stored in the first configuration management database.
In other words, when the resource information in the child node is adjusted and managed by the master node, the master node may perform adjustment in the master node, and then the master node may generate a first adjustment instruction based on the adjustment operation and send the first adjustment instruction to the synchronization server, and after receiving the first adjustment instruction, the synchronization server may obtain the resource information adjusted by the master node from the first adjustment instruction and synchronize the resource information adjusted by the master node to the corresponding child node; or directly adjusting some resource information in the child node, then the child node generates a second adjustment instruction based on the adjustment operation and sends the second adjustment instruction to the synchronization server, and when receiving the second adjustment instruction, the synchronization service may acquire the resource information adjusted in the child node from the second adjustment instruction and synchronize the resource information adjusted in the child node to the corresponding master node.
When the same resource information is adjusted in both the main node and the child node, the synchronization server may reserve the latest resource information according to the order of the adjustment time and synchronize the latest resource information to another configuration management database.
Based on this, a further exemplary embodiment of adjusting and managing resource information in a child node may be that, in response to receiving a first adjustment instruction and a second adjustment instruction at the same time, a synchronization server determines a target adjustment instruction from the first adjustment instruction and the second adjustment instruction, where the first adjustment instruction and the second adjustment instruction are determined based on adjustment operations on the same resource information in the second configuration management database and the first configuration management database, respectively; synchronizing the change information of the resource information in the configuration management database corresponding to the target adjustment instruction to another configuration management database; the target adjusting instruction is an adjusting instruction with a later adjusting time in the first adjusting instruction and the second adjusting instruction.
For example, in the first configuration management database, the person in charge of the host 1 is labeled as a, and the labeling time is: 21 minutes and 21 seconds at 2, 8 and 22 days in 2022, and generates a second adjustment instruction according to the information and sends the second adjustment instruction to the synchronization server. And marking the responsible person of the host 1 as B in the second configuration management database, wherein the marking time is as follows: 21 minutes and 23 seconds at 2, 8 and 22 days in 2022, and generates a first adjustment instruction according to the information and sends the first adjustment instruction to the synchronization server. The synchronization server receives the first adjustment instruction and the second adjustment instruction at the same time 21 minutes 24 seconds at 22 hours at 2 months 8 days at 2022 years, and then the synchronization server can determine the second adjustment instruction as a target adjustment instruction according to the adjustment time information in the first adjustment instruction and the second adjustment instruction, and then synchronize the resource information of the human responsible for a of the host 1 to the second configuration management database.
In an exemplary embodiment, the resource information of a host may include status information of devices associated with the host. Wherein the status information may include one or more of in-use, off-shelf, and destroyed.
The status information of the device related to the host may include the status information of the host itself, and may also include the status information of other hardware devices in the host, such as whether the status of the hard disk 1 in the host 1 is in use, off-shelf, or destroyed.
Taking the state information of the host as an example, the representation host is currently used in a certain child node in use; the off-shelf representation host is not used in the current child node any more, but the host is not scrapped and can be used by other child nodes continuously; the destroyed representation host is currently scrapped and is not suitable to be used in other child nodes.
The state transition trace of the equipment can be tracked through the state information of the equipment related to the host, and the complete life cycle tracking and management of the resource information are realized. Taking the example where the device associated with the host is the host itself, fig. 3 shows a state flow diagram for the complete lifecycle of the server in an exemplary embodiment of the disclosure. Referring to fig. 3, the method may include steps S310 to S370.
In step S310, equipment is purchased; in step S320, the device information enters the CMDB platform; in step S330, the device is used in a child node; in step S340, the apparatus is repaired; in step S350, it is determined whether the device can be used continuously, if yes, go to step S330, otherwise go to step S340; step S360, equipment is scrapped; in step S370, the device is off-shelf in the child node, and then the process goes to step S320. Wherein, the child node in step S330 may be deployed in a private cloud environment.
For example, after a certain device is purchased, if the hard disk 1 with the memory of 8G is purchased, the resource information of the hard disk 1 with the memory of 8G can be stored in a CMDB platform, and at this time, the resource information is in the resource pool, and the resource is not formally used. After the hard disk 1 is used in the child node 1, the state of the hard disk 1 is configured to be in use. If the hard disk 1 is not used in the child node any more, the state of the hard disk 1 in the child node 1 is modified from being used to being off-shelf, and the information of the hard disk 1 is stored in the resource pool again, which indicates that the hard disk 1 can be used in other child nodes. If a problem occurs during the use of the hard disk 1 in the child node 1, the maintenance can be performed. If the hard disk 1 is successfully repaired and the hard disk 1 is determined to be required to be continuously used in the child node, the hard disk 1 can be continuously used in the node, and the state information of the hard disk 1 in the child node 1 is still in use. If the hard disk 1 is determined to be scrapped if the hard disk 1 cannot be successfully repaired, a new hard disk can be purchased and put on a shelf for replacement, and meanwhile, the state information of the hard disk 1 is configured to be destroyed.
The state information of each resource information may be synchronized in the first configuration management database and the second configuration management database. Therefore, the circulation of the resources in the configuration management database can be realized through the complete state information record, and then the complete circulation state of the current resources can be tracked so as to realize the complete life cycle management of the resources.
In the disclosure, compared with a mode of directly reporting through proxy service, the mode of actively monitoring through the synchronization server can ensure that the current data of each item of resource information of each host in the child nodes can be collected and synchronized under the condition of complex network conditions, and the timeliness and the accuracy of resource information synchronization are improved.
Meanwhile, the CMDB platform deployed by each cloud cluster can manage the resource information of the current cluster, and the main node can collect and uniformly manage the resource information of all the sub-nodes, so that the management efficiency of the resource information is improved.
Furthermore, by marking the state information of the resources, the complete life cycle management of the resources can be realized, and the tracking of the complete circulation state of the current resources is supported. After the complete life cycle management is possessed, each resource can be effectively evaluated, so that the grade evaluation can be carried out on the service provider.
In an exemplary embodiment, whether the resource information is collected based on the synchronization service or the reporting mode may be selected according to the current network condition. For example, when the network condition meets a preset condition, the child node may synchronize the change information of the resource information in the child node to the master node in a reporting manner; when the network condition does not satisfy the preset condition, the change information of the resource information in the child node may be synchronized to the master node in the manner described in fig. 1, that is, in the manner in which the synchronization service actively monitors. The preset conditions represent that the current network condition is better, and the child nodes can access the main node.
Those skilled in the art will appreciate that all or part of the steps implementing the above embodiments are implemented as computer programs executed by a CPU. The computer program, when executed by the CPU, performs the functions defined by the method provided by the present invention. The program may be stored in a computer readable storage medium, which may be a read-only memory, a magnetic or optical disk, or the like.
Furthermore, it should be noted that the above-mentioned figures are only schematic illustrations of the processes involved in the method according to exemplary embodiments of the invention, and are not intended to be limiting. It will be readily understood that the processes shown in the above figures are not intended to indicate or limit the chronological order of the processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, e.g., in multiple modules.
Next, fig. 4 shows a schematic structural diagram of a resource allocation management system in an exemplary embodiment of the present disclosure, which may be applied to a hybrid cloud environment. Referring to fig. 4, the resource configuration management system may include at least one master node 41, child nodes 42 respectively associated with each master node, a first configuration management database 43 respectively configured for each child node, a second configuration management database 44 respectively configured for the master nodes, and a synchronization server 45 respectively configured for the master nodes. The synchronization server 45 configured for each master node is configured to monitor, according to a preset rule, resource information in the first configuration management database 43 corresponding to each child node 42 associated with the master node 41, and synchronize, when it is monitored that any one of the resource information in the first configuration management database 43 corresponding to any child node 42 changes, change information of the resource information into the second configuration management database 44 corresponding to the master node 41.
In an exemplary embodiment, each master node is deployed in a first cloud environment and each child node is deployed in a second cloud environment. For the description of the first cloud environment and the second cloud environment, reference may be made to the explanation of the resource allocation management method in the embodiment corresponding to the foregoing resource allocation management method, and details are not repeated here.
In an exemplary embodiment, a first configuration management database configured for each child node is used for storing resource information of each host in the child node; a second configuration management database configured for each master node is used to store resource information for each host in each child node associated with the master node.
In an exemplary embodiment, the system further includes an agent service respectively deployed in each host, where the agent service is configured to monitor resource information of the host, and synchronize change information of the resource information into a first configuration management database corresponding to a child node to which the host belongs when it is monitored that the resource information of the host changes.
In an exemplary embodiment, the resource information of the host includes status information of devices associated with the host, the status information including one or more of in-use, off-shelf, and destroyed; any one of the configuration management databases is further configured to determine current state information of any one of the hosts in response to a query operation on the current state information of the host in any one of the configuration management databases; and/or any configuration management database is further used for responding to the trace query operation of the state information of any equipment related to the host in any configuration management database, and determining the state flow trace of the equipment according to the time sequence.
For example, current state information of a certain resource may be queried in any resource configuration management database, and state transition information of a certain resource may also be queried in any resource configuration management database, for example, a state transition trace of the resource may be determined according to a sequence of labeling time of states.
For example, when the state flow information of the host 1 is queried in the second configuration management database 1 corresponding to the master node 1, and it is found that the state information of the host 1 in the child node 1 from 1/2022 to 1/31/2022 is in use, the state information of the host 1 in the child node 1 from 2/1/2022 is in use, and the state information of the host 1 in the child node 2 from 2/2022 is in use, the state flow trace of the host 1 can be obtained as follows: the child node 1 is used from 1/2022 to 1/31/2022, the child node 1 is set off at 1/2/2022, and the child node 2 is used up to now at 2/2022.
In an exemplary embodiment, the resource information of the host includes one or more of memory information, hard disk information, a MAC address, an IP address, a port number, and service information running in the host.
In an exemplary embodiment, the synchronization server 45 is further configured to synchronize, in response to a first adjustment instruction sent by the master node 41, change information of resource information of a host indicated by the first adjustment instruction into a first configuration management database corresponding to a child node to which the host belongs, so as to manage the resource information in the child node, where the first adjustment instruction is determined based on an adjustment operation on any resource information in a second configuration management database corresponding to the master node; and/or the synchronization server 45 is further configured to, in response to a second adjustment instruction sent by any one of the child nodes, synchronize change information of the resource information of the host indicated by the second adjustment instruction into a second configuration management database corresponding to the primary node associated with the child node to manage the resource information in the child node, where the second adjustment instruction is determined based on an adjustment operation on any resource information of any host in a first configuration management database corresponding to any one of the child nodes.
In an exemplary embodiment, the synchronization server 45 is further configured to determine, in response to receiving a first adjustment instruction sent by the master node and a second adjustment instruction sent by the child node at the same time, a target adjustment instruction from the first adjustment instruction and the second adjustment instruction, and synchronize change information of resource information in a configuration management database indicated by the target adjustment instruction into another configuration management database;
the first adjustment instruction and the second adjustment instruction are determined based on adjustment operations on the same resource information in a second configuration management database corresponding to the main node and a first configuration management database corresponding to any one of the sub-nodes associated with the main node, respectively, and the target adjustment instruction is an adjustment instruction with a later adjustment time in the first adjustment instruction and the second adjustment instruction.
In an exemplary embodiment, the monitoring, by the synchronization server, resource information in a first configuration management database corresponding to each child node associated with the master node according to a preset rule includes: the synchronization server acquires current data of resource information in a first configuration management database corresponding to each sub-node associated with the main node according to a preset rule; and the synchronization server compares the current data with the historical data of the resource information stored in the second configuration management database to monitor whether the resource information changes.
In an exemplary embodiment, the monitoring, by the synchronization server, the resource information in the first configuration management database corresponding to each child node associated with the master node according to a preset rule includes: the synchronization server monitors resource information in a first configuration management database corresponding to each sub-node associated with the main node according to a preset period; or the synchronization server monitors the resource information in the first configuration management database corresponding to each sub-node associated with the main node in real time.
The specific implementation details of each implementation in the resource allocation management system have been described in detail in the corresponding resource allocation management method, and are not described herein again.
By way of example, the cloud environment in the present disclosure may be a hybrid cloud environment. A hybrid cloud environment is an IT architecture, and the environment in the hybrid cloud varies from enterprise to enterprise, and may include, but is not limited to: the at least one private cloud is associated with at least one public cloud, 2 or more interconnected private clouds, 2 or more public clouds, a bare metal or virtual environment connecting the at least one public cloud or private cloud.
Fig. 5 is a schematic structural diagram of a resource configuration management system in another hybrid cloud environment in an exemplary embodiment of the present disclosure. Referring to fig. 5, the resource configuration management system in the hybrid cloud environment may include a central node 51, private cloud nodes 52 associated with the central node 51, a first configuration management database 53 configured for each private cloud node, a second configuration management database 54 configured for each central node, and a synchronization service 55 configured for each central node, and an agent service 56 deployed in each host of each private cloud node.
The proxy service 56 deployed in each host of each private cloud may check for changes in resource information in the host and report the changed information to the first configuration management database 53 corresponding to the corresponding private cloud node 52. Meanwhile, after monitoring the change, the synchronization service 55 corresponding to the central node 51 may synchronize the changed data to the second configuration management database 54 corresponding to the central node 51, thereby implementing collection and synchronization of resource information.
The central node in the embodiment shown in fig. 5 may be understood as the master node, and the private cloud node may be understood as the child node. Wherein the central node may be a public cloud.
In an exemplary embodiment, an agent service may also be deployed in each host in the central node 51, but the agent service deployed in the host of the central node 51 is only used for synchronizing resource information of the host in the central node 51 to the first configuration management database corresponding to the central node 51, and the resource information is not synchronized to the child nodes through the synchronization service.
Fig. 6 shows a schematic structural diagram of a resource configuration management apparatus in an exemplary embodiment of the present disclosure. Referring to fig. 6, the resource allocation management apparatus 600 is applied to a cloud environment including a master node and a child node associated with the master node, where the master node is deployed in a first cloud environment, and the child node is deployed in a second cloud environment. The apparatus 600 may include a monitoring module 610, a synchronization module 620. Wherein:
a monitoring module 610 configured to monitor resource information in a first configuration management database corresponding to each child node associated with the master node according to a preset rule;
a synchronizing module 620, configured to synchronize, when it is monitored that any resource information in the first configuration management database corresponding to any child node changes, the change information of the resource information into the second configuration management database corresponding to the host node.
In some exemplary embodiments of the present disclosure, a first configuration management database corresponding to each of the child nodes is configured to store resource information of each of the hosts in the child nodes, and a second configuration management database corresponding to the master node is configured to store resource information of each of the hosts in each of the child nodes associated with the master node.
In some exemplary embodiments of the present disclosure, the resource information of each host is determined by a proxy service deployed in the host; for each host, a proxy service deployed in the host determines resource information for the host by: monitoring current data of the resource information of the host by the proxy service deployed in the host, and comparing the current data with historical data of the resource information of the host stored in the first configuration management database; and when the historical data is inconsistent with the current data, updating the resource information of the host computer stored in the first configuration management database by using the current data.
In some exemplary embodiments of the present disclosure, based on the foregoing embodiments, the monitoring resource information in a first configuration management database corresponding to each child node associated with the master node according to a preset rule includes: acquiring current data of resource information in a first configuration management database corresponding to each sub-node associated with the main node according to a preset rule; comparing the current data with historical data of the resource information stored in the second configuration management database to monitor whether the resource information changes.
In some exemplary embodiments of the present disclosure, based on the foregoing embodiments, the monitoring, according to a preset rule, resource information in a first configuration management database corresponding to each child node associated with the master node includes: monitoring resource information in a first configuration management database corresponding to each sub-node associated with the main node according to a preset period; or monitoring the resource information in the first configuration management database corresponding to each sub-node associated with the main node in real time.
In some exemplary embodiments of the present disclosure, based on the foregoing embodiments, the apparatus 600 further includes a first adjusting unit and/or a second adjusting unit. The first adjusting unit is configured to respond to an adjusting operation of any resource information of any host in the second configuration management database, synchronize the change information of the resource information into a first configuration management database corresponding to the resource information, and manage the resource information stored in the first configuration management database; the second adjusting unit is configured to respond to an adjusting operation on any resource information of any host in a first configuration management database corresponding to any child node, and synchronize the change information of the resource information to a second configuration management database corresponding to a main node associated with the child node so as to manage the resource information stored in the first configuration management database.
In some exemplary embodiments of the present disclosure, based on the foregoing embodiments, the apparatus 600 may further include a third adjusting unit configured to determine a target adjusting instruction from a first adjusting instruction and a second adjusting instruction in response to receiving the first adjusting instruction and the second adjusting instruction at the same time, where the first adjusting instruction and the second adjusting instruction are determined based on adjusting operations on the same resource information in the second configuration management database and the first configuration management database, respectively; synchronizing the change information of the resource information in the configuration management database corresponding to the target adjustment instruction to another configuration management database; the target adjusting instruction is an adjusting instruction with a later adjusting time in the first adjusting instruction and the second adjusting instruction.
In some exemplary embodiments of the present disclosure, based on the foregoing embodiments, the resource information of the host includes status information of a device related to the host; wherein the state information comprises one or more of in-use, off-shelf, and destroyed.
In some exemplary embodiments of the present disclosure, based on the foregoing embodiments, the resource information of the host includes one or more of memory information, hard disk information, a MAC address, an IP address, a port number, and service information running in the host.
The specific details of each unit or module in the resource allocation management apparatus have been described in detail in the corresponding resource allocation management method, and therefore are not described herein again.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Moreover, although the steps of the methods of the present disclosure are depicted in the drawings in a particular order, this does not require or imply that the steps must be performed in this particular order, or that all of the depicted steps must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions, etc.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, and may also be implemented by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
In an exemplary embodiment of the present disclosure, there is also provided a computer storage medium capable of implementing the above method. On which a program product capable of implementing the method described above in this specification is stored. In some possible embodiments, various aspects of the disclosure may also be implemented in the form of a program product comprising program code for causing a terminal device to perform the steps according to various exemplary embodiments of the disclosure as described in the "exemplary methods" section above of this specification, when the program product is run on the terminal device.
Referring to fig. 7, a program product 700 for implementing the above method according to an embodiment of the present disclosure is described, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not so limited, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
A computer readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
In addition, in an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.
As will be appreciated by one skilled in the art, aspects of the present disclosure may be embodied as a system, method or program product. Accordingly, various aspects of the present disclosure may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system.
An electronic device 800 according to this embodiment of the disclosure is described below with reference to fig. 8. The electronic device 800 shown in fig. 8 is only an example and should not bring any limitations to the functionality and scope of use of the embodiments of the present disclosure.
As shown in fig. 8, electronic device 800 is in the form of a general purpose computing device. The components of the electronic device 800 may include, but are not limited to: the at least one processing unit 810, the at least one memory unit 820, a bus 830 connecting various system components (including the memory unit 820 and the processing unit 810), and a display unit 840.
Wherein the storage unit stores program code that is executable by the processing unit 810 to cause the processing unit 810 to perform steps according to various exemplary embodiments of the present disclosure as described in the "exemplary methods" section above in this specification. For example, the processing unit 810 may perform the following as shown in fig. 1: step S110, monitoring resource information in a first configuration management database corresponding to each sub-node associated with the main node according to a preset rule; step S120, when any resource information in a first configuration management database corresponding to any child node is monitored to be changed, the change information of the resource information is synchronized to a second configuration management database corresponding to the master node, wherein the master node is deployed in a first cloud environment, and the child nodes are deployed in a second cloud environment.
The storage unit 820 may include readable media in the form of volatile memory units such as a random access memory unit (RAM)8201 and/or a cache memory unit 8202, and may further include a read only memory unit (ROM) 8203.
The storage unit 820 may also include a program/utility 8204 having a set (at least one) of program modules 8205, such program modules 8205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 830 may be any of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 800 may also communicate with one or more external devices 900 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 800, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 800 to communicate with one or more other computing devices. Such communication may occur via input/output (I/O) interfaces 850. Also, the electronic device 800 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 860. As shown, the network adapter 860 communicates with the other modules of the electronic device 800 via the bus 830. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device 800, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
Furthermore, the above-described figures are merely schematic illustrations of processes included in methods according to exemplary embodiments of the present disclosure, and are not intended to be limiting. It will be readily understood that the processes shown in the above figures are not intended to indicate or limit the chronological order of the processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, e.g., in multiple modules.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

Claims (19)

1. A resource configuration management method is applied to a cloud environment, the cloud environment comprises a main node and sub-nodes associated with the main node, the main node is deployed in a first cloud environment, and the sub-nodes are deployed in a second cloud environment, and the method comprises the following steps:
monitoring resource information in a first configuration management database corresponding to each sub-node associated with the main node according to a preset rule;
and when any resource information in a first configuration management database corresponding to any child node is monitored to be changed, synchronizing the change information of the resource information to a second configuration management database corresponding to the host node.
2. The method according to claim 1, wherein a first configuration management database corresponding to each child node is used for storing resource information of each host in the child node, and a second configuration management database corresponding to the master node is used for storing resource information of each host in each child node associated with the master node.
3. The resource configuration management method according to claim 2, wherein the resource information of each host is determined by a proxy service deployed in the host;
for each host, a proxy service deployed in the host determines resource information for the host by:
the agent service deployed in the host monitors current data of the resource information of the host and compares the current data with historical data of the resource information of the host stored in the first configuration management database;
and when the historical data is inconsistent with the current data, updating the resource information of the host computer stored in the first configuration management database by using the current data.
4. The method according to claim 1, wherein the monitoring resource information in the first configuration management database corresponding to each child node associated with the master node according to a preset rule comprises:
acquiring current data of resource information in a first configuration management database corresponding to each sub-node associated with the main node according to a preset rule;
and comparing the current data with historical data of the resource information stored in the second configuration management database to monitor whether the resource information changes.
5. The method according to claim 1, wherein the monitoring resource information in the first configuration management database corresponding to each sub-node associated with the main node according to a preset rule comprises:
monitoring resource information in a first configuration management database corresponding to each sub-node associated with the main node according to a preset period; or
And monitoring the resource information in the first configuration management database corresponding to each sub-node associated with the main node in real time.
6. The method of claim 1, wherein the method further comprises:
in response to an adjustment operation on any resource information of any host in the second configuration management database, synchronizing the change information of the resource information into a first configuration management database corresponding to the resource information so as to manage the resource information stored in the first configuration management database; and/or
Responding to the adjustment operation of any resource information of any host in a first configuration management database corresponding to any child node, and synchronizing the change information of the resource information to a second configuration management database corresponding to a main node associated with the child node so as to manage the resource information stored in the first configuration management database.
7. The method of claim 1, wherein the method further comprises:
in response to receiving a first adjustment instruction and a second adjustment instruction at the same time, determining a target adjustment instruction from the first adjustment instruction and the second adjustment instruction, the first adjustment instruction and the second adjustment instruction being determined based on adjustment operations for the same resource information in the second configuration management database and the first configuration management database, respectively;
synchronizing the change information of the resource information in the configuration management database corresponding to the target adjustment instruction to another configuration management database;
the target adjusting instruction is an adjusting instruction with a later adjusting time in the first adjusting instruction and the second adjusting instruction.
8. The resource allocation management method according to claim 2, wherein the resource information of the host includes status information of devices related to the host; wherein the state information comprises one or more of in-use, off-shelf, and destroyed.
9. The method according to claim 2, wherein the resource configuration management method includes one or more of memory information of the host, hard disk information, MAC address, IP address, port number, and service information running in the host.
10. A resource allocation management system, comprising: the system comprises at least one main node, sub-nodes associated with each main node, a first configuration management database configured for each sub-node, a second configuration management database configured for each main node, and a synchronization server configured for each main node, wherein the main nodes are deployed in a first cloud environment, and the sub-nodes are deployed in a second cloud environment;
the synchronization server configured for each main node is used for monitoring resource information in a first configuration management database corresponding to each sub-node associated with the main node according to a preset rule, and synchronizing the change information of the resource information into a second configuration management database corresponding to the main node when monitoring that any one of the resource information in the first configuration management database corresponding to any one of the sub-nodes is changed.
11. The resource allocation management system according to claim 10, wherein the first allocation management database allocated for each child node is configured to store resource information of each host in the child node; a second configuration management database configured for each master node is used to store resource information for each host in each child node associated with the master node.
12. The system according to claim 11, further comprising an agent service respectively deployed in each host, wherein the agent service is configured to monitor resource information of the host, and synchronize change information of the resource information into the first configuration management database corresponding to the child node to which the host belongs when it is monitored that the resource information of the host changes.
13. The resource allocation management system of claim 11, wherein the resource information of the host comprises status information of devices associated with the host, the status information comprising one or more of in-use, off-shelf, and destroyed;
the any configuration management database is also used for responding to the query operation of the current state information of any host in any configuration management database and determining the current state information of the host; and/or
And the any configuration management database is also used for responding to the trace query operation of the state information of any equipment related to the host in the any configuration management database and determining the state transition trace of the equipment according to the time sequence.
14. The system according to claim 11, wherein the resource configuration management system of the host includes one or more of memory information of the host, hard disk information, MAC address, IP address, port number, and service information running in the host.
15. The system according to claim 10, wherein the synchronization server is further configured to synchronize, in response to a first adjustment instruction sent by the master node, change information of resource information of a host indicated by the first adjustment instruction into a first configuration management database corresponding to a child node to which the host belongs, so as to manage the resource information in the child node, where the first adjustment instruction is determined based on an adjustment operation on any resource information in a second configuration management database corresponding to the master node; and/or
The synchronization server is further configured to synchronize, in response to a second adjustment instruction sent by any one of the child nodes, change information of resource information of a host indicated by the second adjustment instruction to a second configuration management database corresponding to a master node associated with the child node to manage the resource information in the child node, where the second adjustment instruction is determined based on an adjustment operation on any resource information of any one host in a first configuration management database corresponding to any one of the child nodes.
16. The resource configuration management system according to claim 10, wherein the synchronization server is further configured to determine, in response to receiving a first adjustment instruction sent by the master node and a second adjustment instruction sent by the child node at the same time, a target adjustment instruction from the first adjustment instruction and the second adjustment instruction, and synchronize change information of resource information in the configuration management database indicated by the target adjustment instruction into another configuration management database;
the first adjustment instruction and the second adjustment instruction are determined based on adjustment operations on the same resource information in a second configuration management database corresponding to the main node and a first configuration management database corresponding to any one of the sub-nodes associated with the main node, respectively, and the target adjustment instruction is an adjustment instruction with a later adjustment time in the first adjustment instruction and the second adjustment instruction.
17. A resource configuration management device applied to a cloud environment, wherein the cloud environment comprises a main node and a sub-node associated with the main node, the main node is deployed in a first cloud environment, and the sub-node is deployed in a second cloud environment, the device comprising:
the monitoring module is configured to monitor resource information in a first configuration management database corresponding to each sub-node associated with the main node according to a preset rule;
and the synchronization module is configured to synchronize the change information of the resource information to a second configuration management database corresponding to the main node when monitoring that any resource information in a first configuration management database corresponding to any sub-node changes.
18. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the resource configuration management method according to any one of claims 1 to 9.
19. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to carry out the resource configuration management method according to any one of claims 1 to 9.
CN202210307595.XA 2022-03-25 2022-03-25 Resource allocation management method, system, device, storage medium and electronic equipment Pending CN114610798A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210307595.XA CN114610798A (en) 2022-03-25 2022-03-25 Resource allocation management method, system, device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210307595.XA CN114610798A (en) 2022-03-25 2022-03-25 Resource allocation management method, system, device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN114610798A true CN114610798A (en) 2022-06-10

Family

ID=81866923

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210307595.XA Pending CN114610798A (en) 2022-03-25 2022-03-25 Resource allocation management method, system, device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN114610798A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116401319A (en) * 2023-06-09 2023-07-07 建信金融科技有限责任公司 Data synchronization method and device, electronic equipment and computer readable storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116401319A (en) * 2023-06-09 2023-07-07 建信金融科技有限责任公司 Data synchronization method and device, electronic equipment and computer readable storage medium
CN116401319B (en) * 2023-06-09 2023-09-12 建信金融科技有限责任公司 Data synchronization method and device, electronic equipment and computer readable storage medium

Similar Documents

Publication Publication Date Title
CN109660397B (en) System, method and device for collecting logs
CN110795503A (en) Multi-cluster data synchronization method and related device of distributed storage system
CN113742031B (en) Node state information acquisition method and device, electronic equipment and readable storage medium
CN104486445A (en) Distributed extendable resource monitoring system and method based on cloud platform
CN110874272A (en) Resource allocation method and device, computer readable storage medium and electronic device
CN109245908B (en) Method and device for switching master cluster and slave cluster
CN105429791A (en) Distributed service state detection device and method
CN104834582A (en) Monitoring event display method
CN111552701B (en) Method for determining data consistency in distributed cluster and distributed data system
CN104935455A (en) Cluster construction method and device therefor
CN102026228B (en) Statistical method and equipment for communication network performance data
CN111338834B (en) Data storage method and device
CN111641521A (en) Ambari-based method for deploying big data clusters on cloud
CN112860343A (en) Configuration changing method, system, device, electronic equipment and storage medium
CN114610798A (en) Resource allocation management method, system, device, storage medium and electronic equipment
CN111913933A (en) Power grid historical data management method and system based on unified support platform
CN110213359B (en) Internet of vehicles networking data pushing system and method based on D2D
CN110784347A (en) Node management method, system, equipment and storage medium for container cluster
CN114553867A (en) Cloud-native cross-cloud network monitoring method and device and storage medium
CN104951855A (en) Apparatus and method for improving resource management
CN111162938A (en) Data processing system and method
CN113114480A (en) Data reporting method and related equipment
CN109450686B (en) Network resource management system and method based on pervasive network
CN110750424B (en) Resource inspection method and device
CN114090201A (en) Resource scheduling method, device, equipment and storage medium

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