CN107872499B - Service creation method, device and system - Google Patents

Service creation method, device and system Download PDF

Info

Publication number
CN107872499B
CN107872499B CN201610861999.8A CN201610861999A CN107872499B CN 107872499 B CN107872499 B CN 107872499B CN 201610861999 A CN201610861999 A CN 201610861999A CN 107872499 B CN107872499 B CN 107872499B
Authority
CN
China
Prior art keywords
target
cloud service
resource
host
target cloud
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.)
Active
Application number
CN201610861999.8A
Other languages
Chinese (zh)
Other versions
CN107872499A (en
Inventor
申航
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Kingsoft Cloud Network Technology Co Ltd
Beijing Kingsoft Cloud Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network Technology Co Ltd
Beijing Kingsoft Cloud 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 Beijing Kingsoft Cloud Network Technology Co Ltd, Beijing Kingsoft Cloud Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN201610861999.8A priority Critical patent/CN107872499B/en
Publication of CN107872499A publication Critical patent/CN107872499A/en
Application granted granted Critical
Publication of CN107872499B publication Critical patent/CN107872499B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/51Discovery or management thereof, e.g. service location protocol [SLP] or web services

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Computer And Data Communications (AREA)

Abstract

The embodiment of the invention discloses a method, a device and a system for creating a service. For the service creation method applied to the resource management server, the method firstly receives a resource query request sent by the service server, and then judges whether available resources of a host machine are enough to create a target cloud service or not based on target resource information carried in the resource query request; if so, feeding back a judgment result to the business server so that the business server acquires a target order corresponding to the target cloud service; and then the resource management server receives a creation request aiming at the target cloud service sent by the business server under the condition of successfully obtaining the target order, and finally creates the target cloud service in the host machine based on the creation request. The method and the device reduce the phenomenon that the acquired corresponding order needs to be cancelled when the cloud service is failed to be created due to insufficient host machine resources, and solve the problem that the service creation in the prior art is complicated.

Description

Service creation method, device and system
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, and a system for creating a service.
Background
The continuous development of informatization enables the demands of people on resources such as computing and storage to rapidly increase, in the existing computer field, people need to invest more hardware equipment and more computer room environment equipment, therefore, the operation and maintenance cost and the labor cost are correspondingly increased, and in order to save the cost, the cloud technology is increasingly applied to the computer field. As is well known, a cloud service provider configures a plurality of hosts, configures resources of the plurality of hosts in a cloud through a cloud technology, and creates corresponding cloud services for a user in the hosts according to user needs, for example, creates a virtual host, a database, or a network disk for the user.
Certainly, the user needs to pay a certain fee by using the cloud service created by the cloud service provider, and a corresponding method for creating the service is provided for the cloud service provider, wherein the creating of the service includes creating the cloud service and obtaining an order corresponding to the cloud service. However, in the prior art, the time required for creating the cloud service is long, and the cloud service cannot be created successfully in a short time, so when a tenant has a demand for creating the cloud service, a business server configured by a cloud service provider first acquires a corresponding order and charges based on the request, and after acquiring the order, sends a request for creating the cloud service to a resource management server configured by the cloud service provider, and the resource management server creates the corresponding cloud service in a host based on the request.
However, when resources in the host, including CPU (Central Processing Unit) resources, memory resources, hard disk resources, and the like, cannot create the cloud service sufficiently, the operation of creating the cloud service in the host cannot be performed successfully, and at this time, the corresponding order obtained before needs to be cancelled manually, obviously, the business server first obtains the order, and then when the creation of the cloud service fails due to insufficient host resources, the obtained corresponding order needs to be cancelled, and the business creation process is complicated.
Disclosure of Invention
The embodiment of the invention discloses a service creation method, a device and a system, which are used for solving the problem that the service creation process is complicated under the condition of insufficient host machine resources in the prior art. The technical scheme is as follows:
in order to achieve the above object, in a first aspect, an embodiment of the present invention provides a service creation method, which is applied to a resource management server, where the method includes:
receiving a resource query request sent by a business server, wherein the resource query request contains target resource information corresponding to resources required by the creation of a target cloud service;
judging whether available resources of a host machine are enough to create the target cloud service or not based on the target resource information;
if yes, feeding back a judgment result to the business server so that the business server can obtain a target order corresponding to the target cloud service;
receiving a creation request aiming at the target cloud service, which is sent by the business server under the condition of successfully obtaining the target order;
and creating the target cloud service in the host machine based on the creation request.
Preferably, the service creation method further includes:
and after judging that the available resources of the host machine are enough to create the target cloud service, executing resource locking operation in the available resources of the host machine based on the target resource information.
In the first implementation manner, preferably, the performing a resource locking operation in an available resource of a host based on the target resource information includes:
determining a first resource used for creating the target cloud service from available resources of a host machine based on the target resource information;
locking the first resource;
the creating the target cloud service in the host based on the creating request comprises:
and creating the target cloud service in the host machine based on the first resource and the creation request.
In the second implementation manner, preferably, the performing a resource locking operation in an available resource of the host based on the target resource information includes:
determining all target hosts used to create the target cloud service based on the target resource information;
determining the target resource amount required by all the target cloud services required to be created on each target host;
the amount of available resources for each target host to update the local record is: the difference between the available resource amount of each target host and the target resource amount corresponding to the target host.
Preferably, after the resource locking operation is performed in the available resource of the host based on the target resource information, the service creation method further includes:
recording the corresponding relation between each target cloud service and the target host;
the creating the target cloud service in the host based on the creating request comprises:
determining a target host corresponding to each target cloud service based on the creation request and the corresponding relation;
creating the corresponding target cloud service in the determined target host.
Preferably, the service creation method further includes:
judging whether the target cloud service is successfully created;
and if not, releasing the resource locking operation.
In a second aspect, an embodiment of the present invention provides another service creation method, which is applied to a service server, and the method includes:
acquiring target resource information corresponding to resources required for creating a target cloud service;
sending a resource query request containing the target resource information to a resource management server so that the resource management server judges whether available resources of a host machine are enough to create the target cloud service or not based on the target resource information;
receiving a judgment result fed back by the resource management server, and if available resources of a host machine are enough to create the target cloud service, acquiring a target order corresponding to the target cloud service;
and under the condition that the target order is successfully acquired, sending a creation request for creating the target cloud service to the resource management server, so that the resource management server creates the target cloud service in a host machine based on the creation request.
In a third aspect, an embodiment of the present invention provides a service creation apparatus, which is applied to a resource management server, where the apparatus includes:
the system comprises a first receiving module, a second receiving module and a third receiving module, wherein the first receiving module is used for receiving a resource query request sent by a business server, and the resource query request comprises target resource information corresponding to resources required by target cloud service creation;
the first judging module is used for judging whether the available resources of the host machine are enough to create the target cloud service or not based on the target resource information;
the feedback module is used for feeding back a judgment result to the business server under the condition that the judgment result of the judgment module is yes, so that the business server obtains a target order corresponding to the target cloud service;
a second receiving module, configured to receive a creation request for the target cloud service, where the creation request is sent by the service server when the target order is successfully obtained;
and the creating module is used for creating the target cloud service in the host machine based on the creating request.
Preferably, the service creation apparatus further includes:
and the locking module is used for executing resource locking operation in the available resources of the host machine based on the target resource information under the condition that the judgment result of the first judgment module is yes.
In the first implementation manner, preferably, the locking module includes:
a first determining unit, configured to determine, based on the target resource information, a first resource used to create the target cloud service from available resources of a host if a determination result of the first determining module is yes;
a locking unit for locking the first resource;
the creation module is specifically configured to create the target cloud service in a host based on the first resource and the creation request.
In the second implementation manner, preferably, the locking module includes:
a second determining unit, configured to determine, based on the target resource information, all target hosts used to create the target cloud service if a determination result of the first determining module is yes;
a third determining unit, configured to determine a target resource amount required by all the target cloud services that need to be created on each target host;
an updating unit, configured to update the available resource amount of each target host of the local record as: the difference between the available resource amount of each target host and the target resource amount corresponding to the target host.
Preferably, the service creation apparatus further includes:
the recording module is used for recording the corresponding relation between each target cloud service and the target host after the locking module executes the resource locking operation;
the creation module includes:
a fourth determining unit, configured to determine, based on the creation request and the correspondence, a target host corresponding to each target cloud service;
a creating unit, configured to create the corresponding target cloud service in the determined target host.
Preferably, the service creation apparatus further includes:
the second judgment module is used for judging whether the target cloud service is successfully established;
and the releasing module is used for releasing the resource locking operation under the condition that the judgment result of the second judging module is negative.
In a fourth aspect, an embodiment of the present invention provides another service creation apparatus, which is applied to a service server, and the apparatus includes:
the acquisition module is used for acquiring target resource information corresponding to resources required by the creation of the target cloud service;
a first sending device, configured to send a resource query request including the target resource information to a resource management server, so that the resource management server determines, based on the target resource information, whether available resources of a host are sufficient to create the target cloud service;
the third receiving device is used for receiving a judgment result fed back by the resource management server, and acquiring a target order corresponding to the target cloud service if available resources of a host machine are enough to create the target cloud service;
and a second sending device, configured to send, to the resource management server, a creation request for creating the target cloud service when the target order is successfully obtained, so that the resource management server creates the target cloud service in a host based on the creation request.
In a fifth aspect, an embodiment of the present invention provides a service creation system, which includes a service server and a resource management server,
the business server is used for acquiring target resource information required by creating a target cloud service; sending a resource query request containing the target resource information to a resource management server, and receiving a judgment result of whether the resource management server is enough to create the target cloud service for the available resources of the host machine; if available resources of the host machine are enough to create the target cloud service, acquiring a target order corresponding to the target cloud service; under the condition that the target order is successfully obtained, sending a creation request for creating the target cloud service to the resource management server;
the resource management server is used for receiving the resource query request sent by the service server; judging whether available resources of a host machine are enough to create the target cloud service or not based on the target resource information; feeding back a judgment result whether available resources of a host machine are enough to create the target cloud service to the business server; and receiving a creation request for creating the target cloud service sent by the business server, and creating the target cloud service in a host machine based on the creation request.
Preferably, the resource management server is further configured to:
and under the condition that the available resources of the host machine are enough to create the target cloud service, executing resource locking operation in the available resources of the host machine based on the target resource information.
In the first implementation manner, preferably, the resource management server is specifically configured to:
under the condition that the available resources of the host machine are enough to create the target cloud service, determining first resources used for creating the target cloud service from the available resources of the host machine based on the target resource information; and locking the first resource; and after receiving a creation request for creating the target cloud service sent by the business server, creating the target cloud service in a host machine based on the first resource and the creation request.
In a second implementation manner, preferably, the resource management server is specifically configured to:
determining all target hosts used to create the target cloud service based on the target resource information if available resources of the hosts are sufficient to create the target cloud service; determining the target resource amount required by all the target cloud services required to be created on each target host; the amount of available resources for each target host to update the local record is: a difference between an available resource amount of each target host and the target resource amount corresponding to each target host.
Preferably, the resource management server is further configured to: after resource locking operation is executed in available resources of a host, recording the corresponding relation between each target cloud service and the target host;
the resource management server is specifically configured to: determining a target host corresponding to each target cloud service based on the creation request and the corresponding relation; correspondingly creating the target cloud service in the determined target host.
Preferably, the resource management server is further configured to:
judging whether the target cloud service is successfully created; and if not, releasing the resource locking operation.
As can be seen from the above, in the scheme provided in the embodiment of the present invention, the resource management server first receives the resource query request sent by the service server, and then determines whether the available resources of the host are sufficient to create the target cloud service based on the target resource information carried in the resource query request; if so, feeding back a judgment result to the business server so that the business server acquires a target order corresponding to the target cloud service; and then the resource management server receives a creation request aiming at the target cloud service sent by the business server under the condition of successfully obtaining the target order, and finally creates the target cloud service in the host machine based on the creation request. In the scheme provided by the embodiment of the invention, when a new service needs to be created, the resource management server firstly judges whether enough resources exist in the host machine to create the cloud service corresponding to the new service, and when the judgment result is yes, the service server obtains the corresponding order; compared with the prior art, the phenomenon that the acquired corresponding orders need to be cancelled when the cloud service is failed to be created due to insufficient host machine resources is reduced, the problem that the service creation in the prior art is complicated is solved, and therefore useless orders caused by insufficient host machine resources are reduced.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a signaling flow diagram of a service creation method in the prior art;
fig. 2 is a signaling flow diagram of a service creation method according to an embodiment of the present invention;
fig. 3 is a first flowchart of a service creation method according to an embodiment of the present invention;
fig. 4 is a second flowchart of a service creation method according to an embodiment of the present invention;
fig. 5 is a third flowchart illustrating a service creation method according to an embodiment of the present invention;
fig. 6 is a schematic flowchart of another service creation method according to an embodiment of the present invention;
fig. 7 is a schematic diagram of a first structure of a service creation apparatus according to an embodiment of the present invention;
fig. 8 is a schematic diagram of a second structure of a service creation apparatus according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of a third service creation apparatus according to an embodiment of the present invention;
fig. 10 is a schematic structural diagram of another service creation apparatus according to an embodiment of the present invention;
fig. 11 is a schematic structural diagram of a service creation system according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
First, technical terms referred to in the present document will be briefly described below.
Service server and resource management server: cloud management platforms such as an Openstack (an open source cloud computing management platform project) management platform belong to cloud service providers, and the cloud service providers manage hosts, create cloud services, create orders and the like through the cloud management platforms. In the actual use process, an order server can be correspondingly arranged to create an order and charge. It should be noted that the service server, the resource management server, and the order server may be in different machines, or may be in the same machine, and the service server, the resource management server, and the order server may be regarded as a service logic layer, a resource management layer, and an order and charging system of a cloud management platform.
The present invention will be described in detail in view of comparison with the prior art, wherein for convenience of description, it is assumed that an order of a cloud service is created by a preset order server, and of course, the present invention is not limited to creating an order by an order server.
Fig. 1 is a signaling flow diagram of a service creation method in the prior art.
In the prior art, when a service is created, a service server first needs to obtain resource information (S301), such as the number of CPU cores and the size of a memory, needed by a cloud service corresponding to the service, and then the service server sends an order creation request including the needed resource information to an order server (S302); the order server creates a corresponding order and charges according to the required resource information (S303), and then the order server feeds back order creation information whether the order is successfully created to the service server (S304); when the order is successfully created, the service server sends a creation request for creating the corresponding cloud service to the resource management server (S305), where the creation request also includes the required resource information, and the service server may poll the resource management server for whether the cloud service is successfully created; finally, the resource management server creates a cloud service in the host based on the required resource information (S306), and the resource management server may also return information whether the cloud service was created successfully to the service server.
As can be seen from the above description, in the prior art, when creating a service, the service server first interacts with the order server to obtain a corresponding order through the order server, and then interacts with the resource management server, so that the resource management server creates a corresponding cloud service in the host. When the resources in the host are not enough to create the cloud service, the resource management server cannot successfully create the corresponding cloud service, and at this time, the corresponding order acquired before needs to be cancelled manually, which is obviously complicated in the service creation process under the condition.
Fig. 2 is a signaling flow diagram of a service creation method according to an embodiment of the present invention.
In the scheme provided by the invention, when a service is created, a service server firstly obtains target resource information corresponding to the created target cloud service (S401), and then the service server sends a resource query request containing the target resource information to a resource management server (S402); the resource management server determines whether there are sufficient resources in the host to create the target cloud service based on the target resource information (S403), and feeds back the determination result to the business server (S404).
When the judgment result fed back by the resource management server is yes, the business server sends an order creating request containing the target resource information to an order server (S405); the order server creates a corresponding order and charges according to the target resource information (S406), and then the order server feeds back order creation information whether the order is successfully created to the service server (S407); under the condition that the order is successfully created, the business server sends a creation request for creating the target cloud service to the resource management server (S408), wherein the creation request also comprises the target resource information; finally, the resource management server creates a target cloud service in the host based on the target resource information (S409).
As can be seen from the above, in the solution provided by the present invention, when creating a service, the service server first interacts with the resource management server to ensure that sufficient resources exist in the host machine to create a corresponding cloud service, then interacts with the order server to obtain a corresponding order through the order server, and finally interacts with the resource management server to create a corresponding cloud service in the host machine by the resource management server. Compared with the prior art, the scheme provided by the invention reduces the phenomenon that the acquired corresponding order needs to be cancelled when the cloud service is failed to be created due to insufficient host resources, solves the problem of complex service creation in the prior art, and further reduces useless orders due to insufficient host resources.
The present invention will be described in detail with reference to specific examples.
Fig. 3 is a first flowchart of a service creation method provided in an embodiment of the present invention, where the method is applied to a resource management server, and the method includes:
s101: and receiving a resource query request sent by the service server.
The resource query request comprises target resource information corresponding to resources required by the creation of the target cloud service; such as the number of CPU cores, memory, and hard disk resources required.
S102: and judging whether the available resources of the host machine are enough to create the target cloud service or not based on the target resource information.
The resource management server may manage resources in the host, and of course, the resource management server may record the total amount of available resources remaining in the host, so the resource management server may determine whether the available resources of the host are sufficient to create the target cloud service based on the target resource information.
For example, the target cloud service corresponds to two virtual cloud hosts, and the target resource information indicates: creating these two virtual cloud hosts requires two CPU cores, 5G of memory, and 200G of hard disk capacity. If the resources available in the host at this time are: 5 CPU cores, a memory of 15G and a hard disk capacity of 600G, at this time, the resource management server can judge that the available resources of the host machine are enough to create the target cloud service; if the resources available in the host at this time are: the hardware capacity of the host machine is insufficient, at this time, the resource management server can judge that the available resources of the host machine are insufficient to create the target cloud service.
If the judgment result of S102 is yes, S103 is executed: and feeding back a judgment result to the business server so that the business server acquires the target order corresponding to the target cloud service.
And the service server acquires the corresponding order only when the received judgment result is yes. Of course, if the determination result of S102 is no, the resource management server also feeds back the determination result to the service server, but if the determination result is no, it indicates that the available resources of the host are not enough to create the target cloud service, and the determination result at this time may be regarded as a resource early warning sent by the resource management server to the service server, and in this case, the service server may not obtain the corresponding order.
S104: and receiving a creation request aiming at the target cloud service, which is sent by the business server under the condition of successfully obtaining the target order.
The creation request corresponds to the target cloud service, so the creation request should include resource information required for creating the target cloud service, for example, the creation request includes information: creating a target cloud service requires 3 CPU cores, 15G of memory, and 1500G of hard disk capacity.
S105: and creating a target cloud service in the host machine based on the creation request.
It should be noted that the number of hosts and the number of target cloud services are at least one. For example: the target cloud service is a virtual cloud host, a user needs to create 3 virtual cloud hosts, the number of hosts is 20, when the virtual cloud hosts are created, the resource management server selects appropriate hosts for the 3 virtual cloud hosts according to actual conditions, and creates the 3 virtual cloud hosts in the selected hosts respectively.
Of course, the specific creation method and the host selection method belong to the prior art, and the embodiment of the present invention is not described in detail herein.
As can be seen from the above, in the scheme provided in the embodiment of the present invention, the resource management server first receives the resource query request sent by the service server, and then determines whether the available resources of the host are sufficient to create the target cloud service based on the target resource information carried in the resource query request; if so, feeding back a judgment result to the business server so that the business server acquires a target order corresponding to the target cloud service; and then the resource management server receives a creation request aiming at the target cloud service sent by the business server under the condition of successfully obtaining the target order, and finally creates the target cloud service in the host machine based on the creation request. In the scheme provided by the embodiment of the invention, when a new service needs to be created, the resource management server firstly judges whether enough resources exist in the host machine to create the cloud service corresponding to the new service, and when the judgment result is yes, the service server obtains the corresponding order; compared with the prior art, the phenomenon that the acquired corresponding orders need to be cancelled when the cloud service is failed to be created due to insufficient host machine resources is reduced, the problem that the service creation in the prior art is complicated is solved, and therefore useless orders caused by insufficient host machine resources are reduced.
It should be noted that, in the method embodiment shown in fig. 3, since the resource query operation is already performed before the target order is acquired, the occurrence of a phenomenon that the acquired corresponding order needs to be cancelled when the cloud service is failed to be created due to insufficient host resources can be reduced, but the phenomenon cannot be completely eliminated, because the available resources of the host may also change during the period from the resource query to the creation of the target service.
For example: the target cloud service is as follows: three virtual cloud hosts X, Y, Z, which need 3 CPU cores, 15G memory, and 1500G hard disk capacity for creating the three virtual cloud hosts, and are known when resource query is performed: if the available resources of the host are 4 CPU cores, 20G memory, and 2000 hard disk capacity, the service server will obtain the corresponding order under this condition, and it is assumed that new virtual cloud hosts U and W are created in the host in the process of obtaining the order by the service server, and occupy two CPU cores, 10G memory, and 1000 hard disk capacity.
Therefore, after the service server obtains the order corresponding to the virtual cloud host X, Y, Z, the remaining resources in the host are two CPU cores, 10G memory, and 1000 hard disk capacity, and the resource management server cannot create the virtual cloud host X, Y, Z because the host resources are insufficient, so the obtained order still needs to be cancelled.
Therefore, in order to completely avoid the occurrence of the phenomenon that the acquired corresponding order needs to be cancelled when the cloud service creation fails due to insufficient host resources, as shown in fig. 4, with respect to fig. 3, a second flow diagram of the service creation method provided by the embodiment of the present invention is as follows:
after judging that the available resources of the host machine are enough to create the target cloud service, the service creation method further comprises the following steps: s106: based on the target resource information, a resource locking operation is performed in the available resources of the host.
It should be noted that the resource query request received by the resource management server may include a resource locking instruction, and the resource management server may execute a resource locking operation in an available resource of the host based on the target resource information and the resource locking instruction; the resource management server may also actively execute the resource locking operation when determining that the available resources of the host are sufficient to create the target cloud service.
As is well known to those skilled in the art, once the resource locking operation is performed, the resource management server reserves resources for the target cloud service to create the target cloud service, that is, it is ensured that there are enough resources in the host to create the target cloud service when the target cloud service is created.
For example, the target cloud service is: a network disk, which needs 500G of hard disk capacity when being created, and obtains when resource query is performed: if the available resources of the host machine are the hard disk capacity of 2000, the available resources in the host machine are not less than the hard disk capacity of 500G all the time after the resource locking operation is performed until the network disk is created, that is, the resources in the host machine are enough to create the network disk all the time.
In an embodiment of the present invention, the resource locking operation may include two implementation manners, in the first implementation manner of resource locking, the performing the resource locking operation in the available resource of the host based on the target resource information (S106) includes:
determining a first resource used for creating a target cloud service from available resources of a host machine based on the target resource information;
the first resource is locked.
It is to be understood that, in this implementation manner, the creating a target cloud service in the host based on the creation request (S105) may be:
and creating a target cloud service in the host machine based on the first resource and the creation request.
In this implementation, the resource management server partitions a first resource used for creating the target cloud service from available host resources, locks the first resource to ensure that the first resource is only used for creating the target cloud service, and creates the target cloud service based on the first resource when creating the target cloud service.
For example, the target cloud service is a virtual cloud host X, and creating the virtual cloud host X requires 1 CPU core, 5G of memory, and 800G of hard disk capacity, and when resource query is performed, it is known that: the available resources of the host are 3 CPU cores, 15G memory and 2000 hard disk capacity, at this time, the CPU core x in the host may be locked, and the 5G memory and 800 hard disk capacity may be divided and locked from the 15G memory and 2000 hard disk capacity.
In the process from the locking of the first resource by the resource management server to the creation of the virtual cloud host X, it is assumed that the resource management server receives a new resource query request, and the virtual cloud host A, B, C corresponding to the new resource query request needs 3 CPU cores, a memory of 15G, and a hard disk capacity of 1500, and since the CPU core X in the host, the partitioned memory of 5G, and the hard disk capacity of 800 are locked at this time, the resource management server determines that the resource in the host is insufficient to create the virtual cloud host A, B, C. When the resource manager creates the virtual cloud host X, the CPU core X, the partitioned 5G memory, and the hard disk capacity of 800 are directly used to create the virtual cloud host X.
In a second implementation manner of resource locking, the performing a resource locking operation in an available resource of a host based on the target resource information (S106) may include:
the first step is as follows: based on the target resource information, all target hosts to create the target cloud service are determined.
As mentioned above, the number of target cloud services and the number of target hosts are at least one, and when there is more than one target cloud service and more than one target host, different target cloud services may be created in different target hosts, so that a pre-allocation may be made to all target cloud services, i.e. all target hosts for creating the target cloud services are determined first.
It should be noted that the pre-allocation operation may be implemented based on the prior art, and in the prior art, when creating the target cloud service, the host corresponding to the target cloud service is first found, and then the corresponding target cloud service is created in the host.
For example, the target cloud service is five virtual cloud hosts D, E, F, G and H, the hosts include hosts 1-10, and assuming that pre-allocated virtual cloud host D, E is created on host 2, virtual cloud host F is created on host 6, and virtual cloud host G is created on host 9, hosts 2, 6, and 9 are determined to be target hosts.
The second step is that: and determining the target resource quantity required by all the target cloud services required to be created on each target host.
When a target cloud service is pre-allocated in a certain target host, the target resource amount corresponding to the target host is the resource amount required for creating the target cloud service, for example, if the target cloud service is a network disk with a capacity of 500G, the first resource amount is 500G of hard disk resource amount.
When at least two target cloud services are pre-distributed in a certain target host, the target resource amount corresponding to the target host is as follows: the resource amount required for creating all target cloud services pre-allocated in the target host, for example, target cloud services X and Y are pre-allocated in the target host, two CPU cores, 5G memory and 500G hard disk capacity, are required for creating the target cloud service X, 1 CPU core, 10G memory and 800G hard disk capacity are required for creating the target cloud service Y, and the first resource amount is the resource amount of 3 cores, 15G memory and 1300G hard disk capacity.
The third step: the amount of available resources for each target host to update the local record is: the difference between the available resource amount of each target host and the target resource amount corresponding to the target host.
Suppose that the available resource amount of a target host at the current time is: the resource amounts of 5 cores, 25G memory, and 2500G hard disk capacity, and the target resource amount corresponding to the target host is the resource amounts of 3 cores, 15G memory, and 1500G hard disk capacity, then the available resource amount of the target host locally recorded by the updated resource management server is the resource amounts of two cores, 10G memory, and 1000G hard disk capacity.
As can be understood by combining the three steps, when the resource management server determines that the resources are enough to create the target cloud service, a pre-reduction operation is performed on the locally recorded available resource amount of the host, where the pre-reduced resource amount is all the resource amounts required for creating the target cloud service.
For example, the target cloud service is a virtual cloud host Y, and 1 CPU core, 5G of memory, and 800G of hard disk capacity are required to create the virtual cloud host Y, and when resource query is performed, the following information is obtained: the available resources of the host M are two CPU cores, 10G memory, and 1500 hard disk capacity, and assuming that the host M is determined to be the target host, the amount of available resources of the host M that needs to update the local record of the resource manager is: 1 CPU core, 5G memory and 700G hard disk capacity.
In the process from the locking of the first resource to the creation of the virtual cloud host Y by the resource management service, it is assumed that the resource management server receives a new resource query request, and the virtual cloud hosts N and P corresponding to the new resource query request require two CPU cores, an 8G memory, and a 1500 d disk capacity, but because the available resource amount of the host M is: 1 CPU core, 5G memory and 700G hard disk capacity, and at this time, virtual cloud hosts N and P are not created on the host M. When the resource manager creates the virtual cloud host Y, the virtual cloud host Y is created directly using the pre-reduced resource amount.
In addition, it should be noted that, for multiple created target cloud services in the same service, if it is determined for each target cloud service one by one whether available resources of a host are sufficient and the available resources in the host are only sufficient to create a part of target cloud services, if a resource pre-reduction operation has been performed on the part of cloud services, the resource pre-reduction operation that has been performed should be rolled back and cancelled because the remaining cloud services cannot implement pre-allocation.
For example, the target cloud service is two network disks M and N with 500G capacity, the current available resource of the host is the hard disk capacity of 800G, and for the network disk M, the resource management server performs pre-reduction operation: and updating the locally recorded hard disk resource amount available to the host to be 300G, and then, if the resource management server finds that the residual resources are not enough to create the network disk N, the pre-reduction operation needs to be cancelled at the moment, and the locally recorded hard disk resource amount available to the host is changed to be 800G.
It can be understood that after the resource is locked, in order to ensure that the host corresponding to each target cloud service can be found when each target cloud service is created, as shown in fig. 5, after the resource locking operation (S106) is performed in the available resources of the host based on the target resource information, the service creation method further includes:
s107: and recording the corresponding relation between each target cloud service and the target host.
It is understood that the resource locking operation is performed based on the target resource information of the target cloud service and is performed in the host, so that there is a corresponding relationship between each target cloud service and each target host, for example, the target cloud service is two virtual cloud hosts X and Y, and the resource management server selects host a as the target host creating virtual cloud hosts X and Y when performing the resource locking operation. At this time, the resource management server should record the corresponding relationship between the virtual cloud host X and the host a, and the corresponding relationship between the virtual cloud host Y and the host a.
It should be noted that each correspondence may be distinguished by identification information, for example, a list is set in the resource management server, and correspondence between cloud services and hosts, identified by req _ id, is recorded in the list. The identification information may be generated by the service server and sent to the resource management server, for example, the resource query request carries the identification information. Of course, the creating request for creating the target cloud service sent by the service server may also carry the identification information.
In this case, the creating a target cloud service in the host based on the creation request (S105) may include:
s1051: determining a target host corresponding to each target cloud service based on the creation request and the corresponding relation;
s1052: and creating a corresponding target cloud service in the determined target host.
For example, the resource query request received by the resource management server includes identification information a about the amount of resources required to create the virtual cloud host X and the corresponding virtual cloud host X, and identification information b about the amount of resources required to create the virtual cloud host Y and the corresponding virtual cloud host Y, and the resource manager determines that the target host is the host a, that is, both the virtual cloud hosts X and Y are to be created in the host a, at this time, the resource management server records the corresponding relationship between the virtual cloud host X and the host a by using the identification information a as an identification, and records the corresponding relationship between the virtual cloud host Y and the host a by using the identification information b as an identification.
When the resource management server receives a creation request for creating the target cloud service, the resource management server can also obtain the identification information a and b, and then the resource management server firstly finds the host machine A corresponding to the virtual cloud host machines X and Y based on the identification information a and b, and then creates the virtual cloud host machines X and Y in the host machine A based on the creation request.
In addition, it should be noted that, the resource management server may not be able to successfully create the target cloud service, and may also have a phenomenon of failed creation in the case of sufficient resources, and when this phenomenon occurs, the locked resource is not utilized, but cannot be utilized by other cloud services that need to be created, and to avoid resource waste in this case, the service creation method further includes:
judging whether the target cloud service is successfully established or not;
if not, the resource locking operation is released.
The resource management server may determine whether the target cloud service is successfully created based on the prior art, and if not, the resource locking operation is released, which indicates that the locked resource is released and can be utilized by any cloud service.
As can be seen from the above, in the scheme provided in the embodiment of the present invention, the resource management server first receives the resource query request sent by the service server, and then determines whether the available resources of the host are sufficient to create the target cloud service based on the target resource information carried in the resource query request; if so, feeding back a judgment result to the business server so that the business server acquires a target order corresponding to the target cloud service; and then the resource management server receives a creation request aiming at the target cloud service sent by the business server under the condition of successfully obtaining the target order, and finally creates the target cloud service in the host machine based on the creation request. In the scheme provided by the embodiment of the invention, when a new service needs to be created, the resource management server firstly judges whether enough resources exist in the host machine to create the cloud service corresponding to the new service, and when the judgment result is yes, the service server obtains the corresponding order; compared with the prior art, the phenomenon that the acquired corresponding orders need to be cancelled when the cloud service is failed to be created due to insufficient host machine resources is reduced, the problem that the service creation in the prior art is complicated is solved, and therefore useless orders caused by insufficient host machine resources are reduced.
With respect to the method embodiment shown in fig. 3, as shown in fig. 6, another service creation method provided by the embodiment of the present invention is applied to a service server, and the service creation method includes:
s201: and obtaining target resource information corresponding to resources required for creating the target cloud service.
It should be noted that the target resource information may be input by the user, for example, the user inputting the target resource information includes: and creating a virtual cloud host with 1 CPU core, 15G memory and 1500G hard disk capacity.
S202: and sending a resource query request containing the target resource information to a resource management server so that the resource management server judges whether the available resources of the host machine are enough to create the target cloud service or not based on the target resource information.
S203: and receiving a judgment result fed back by the resource management server, and if the available resources of the host machine are enough to create the target cloud service, acquiring a target order corresponding to the target cloud service.
It should be noted that the target order may be obtained locally by the service server, i.e. it means that the service server also has the function of creating the order, but in actual use, the creation of the order may be done by the order server, which is used to create the order and charge. When the judgment result shows that the available resources of the host are enough to create the target cloud service, the business server sends an order creating request containing target resource information to the order server, the order server creates an order based on the order creating request and charges, and then the order server sends the created target order to the business server.
S204: and under the condition of successfully acquiring the target order, sending a creation request for creating the target cloud service to a resource management server, so that the resource management server creates the target cloud service in a host machine based on the creation request.
In the scheme provided by the embodiment of the invention, when a new service needs to be created, the resource management server judges whether enough resources exist in the host computer to create the cloud service corresponding to the new service, and when the judgment result is yes, the service server obtains the corresponding order; compared with the prior art, the phenomenon that the acquired corresponding orders need to be cancelled when the cloud service is failed to be created due to insufficient host machine resources is reduced, the problem that the service creation in the prior art is complicated is solved, and therefore useless orders caused by insufficient host machine resources are reduced.
The invention will be briefly described below by way of a specific example, in which it is assumed that the creation of the order and the billing are performed by the order server.
The service server firstly receives a resource message, and the resource message comprises: creating 3 virtual cloud hosts X, Y, Z, creating virtual cloud host X requires 1 CPU core, 5G memory and 400G hard disk capacity, creating virtual cloud host Y requires two CPU cores, 6G memory and 500G hard disk capacity, creating virtual cloud host Z requires 1 CPU core, 5G memory and 320G hard disk capacity.
Then the service server sends a resource query request containing the resource information to the resource management server, wherein the resource query request also comprises identification information x, y and z corresponding to the virtual cloud host X, Y, Z; the resource management server determines whether there are sufficient resources in the host to create the virtual cloud host X, Y, Z based on the resource information carried by the resource query request.
Assuming that the available resources in the hosts are sufficient to create cloud virtual host X, Y, Z, the resource management server determines that the hosts used to create cloud virtual host X, Y, Z are hosts a, b, and c, respectively. At this time, the corresponding relation between the virtual cloud host X and the host a, the corresponding relation between the virtual cloud host Y and the host b, and the corresponding relation between the virtual cloud host Z and the host c are respectively recorded by respectively taking the identification information X, Y, and Z as identifications.
If the available resource amount corresponding to the host a is the resource amounts of two CPU cores, 15G internal memory and 2000G hard disk capacity, the available resource amount corresponding to the host b is the resource amounts of 3 CPU cores, 15G internal memory and 2500G hard disk capacity, and the available resource amount corresponding to the host c is the resource amounts of two CPU cores, 10G internal memory and 1800G hard disk capacity; the resource management server updates: the available resource amount corresponding to the host a is the resource amount of 1 CPU core, 10G memory and 1600G hard disk capacity, the available resource amount corresponding to the host b is the resource amount of 1 CPU core, 9G memory and 2000G hard disk capacity, and the available resource amount corresponding to the host c is the resource amount of 1 CPU core, 5G memory and 1480G hard disk capacity. Then, the resource management server feeds back the judgment result to the service server, and informs the service server that the available resources of the host are enough to create the virtual cloud host X, Y, Z.
After the business server receives the judgment result, the business server sends an order creating request containing the resource information to an order server as the judgment result is yes; the order server creates a corresponding order and charges according to the resource information, then the order server feeds back order creation information of whether the order is successfully created to the service server, and sends the created order to the service server; after receiving the order, the service server sends a creation request for creating the virtual cloud host X, Y, Z to the resource management server, where the creation request also includes the target resource information and the identification information x, y, and z.
Finally, based on the target resource information and the identification information x, y, and z, the resource management server first finds hosts a, b, and c corresponding to the virtual cloud host X, Y, Z, and then creates a virtual cloud host X, Y, Z in the hosts a, b, and c, respectively.
Corresponding to the method embodiment shown in fig. 3, an embodiment of the present invention further provides a service creation apparatus, which is applied to a resource management server, and as shown in fig. 7, the apparatus includes:
a first receiving module 110, configured to receive a resource query request sent by a service server, where the resource query request includes target resource information corresponding to resources required to create a target cloud service;
a first determining module 120, configured to determine whether available resources of a host are sufficient to create the target cloud service based on the target resource information;
a feedback module 130, configured to feed back a determination result to the service server when the determination result of the determination module is yes, so that the service server obtains a target order corresponding to the target cloud service;
a second receiving module 140, configured to receive a creation request for the target cloud service, where the creation request is sent by the business server when the target order is successfully obtained;
a creating module 150, configured to create the target cloud service in the host based on the creation request.
As can be seen from the above, in the scheme provided in the embodiment of the present invention, the resource management server first receives the resource query request sent by the service server, and then determines whether the available resources of the host are sufficient to create the target cloud service based on the target resource information carried in the resource query request; if so, feeding back a judgment result to the business server so that the business server acquires a target order corresponding to the target cloud service; and then the resource management server receives a creation request aiming at the target cloud service sent by the business server under the condition of successfully obtaining the target order, and finally creates the target cloud service in the host machine based on the creation request. In the scheme provided by the embodiment of the invention, when a new service needs to be created, the resource management server firstly judges whether enough resources exist in the host machine to create the cloud service corresponding to the new service, and when the judgment result is yes, the service server obtains the corresponding order; compared with the prior art, the phenomenon that the acquired corresponding orders need to be cancelled when the cloud service is failed to be created due to insufficient host machine resources is reduced, the problem that the service creation in the prior art is complicated is solved, and therefore useless orders caused by insufficient host machine resources are reduced.
Corresponding to the embodiment of the method shown in fig. 4, with respect to fig. 7, a service creation apparatus according to an embodiment of the present invention is, as shown in fig. 8, further including:
and a locking module 160, configured to, if the determination result of the first determining module is yes, perform a resource locking operation in the available resource of the host based on the target resource information.
Specifically, in a first implementation manner, the locking module 160 includes a first determining unit and a locking unit (not shown in the figure),
a first determining unit, configured to determine, if a determination result of the first determining module 120 is yes, a first resource used for creating the target cloud service from available resources of a host based on the target resource information;
a locking unit for locking the first resource;
the creating module 150 is specifically configured to create the target cloud service in a host based on the first resource and the creation request.
Specifically, in the second implementation manner, the locking module 160 includes a second determining unit, a third determining unit, and an updating unit (not shown in the figure).
A second determining unit, configured to determine, based on the target resource information, all target hosts used to create the target cloud service if a determination result of the first determining module 120 is yes;
a third determining unit, configured to determine a target resource amount required by all the target cloud services that need to be created on each target host;
an updating unit, configured to update the available resource amount of each target host of the local record as: the difference between the available resource amount of each target host and the target resource amount corresponding to the target host.
In the actual use process, as shown in fig. 9, the apparatus further includes:
a recording module 170, configured to record a corresponding relationship between each target cloud service and the target host after the locking module 160 executes a resource locking operation;
the creation module 150 includes a fourth determination unit 1501 and a creation unit 1502.
The fourth determining unit 1501 is configured to determine, based on the creation request and the correspondence relationship, a target host corresponding to each target cloud service;
the creating unit 1502 is configured to create the corresponding target cloud service in the determined target host.
In practical applications, specifically, the apparatus further includes a second determining module and a releasing module (not shown in the figure).
The second judgment module is used for judging whether the target cloud service is successfully established;
and the releasing module is used for releasing the resource locking operation under the condition that the judgment result of the second judging module is negative.
In the scheme provided by the embodiment of the invention, when a new service needs to be created, the resource management server firstly judges whether enough resources exist in the host machine to create the cloud service corresponding to the new service, and when the judgment result is yes, the service server obtains the corresponding order; compared with the prior art, the phenomenon that the acquired corresponding orders need to be cancelled when the cloud service is failed to be created due to insufficient host machine resources is reduced, the problem that the service creation in the prior art is complicated is solved, and therefore useless orders caused by insufficient host machine resources are reduced.
Corresponding to the method embodiment shown in fig. 6, another service creation apparatus is further provided in the embodiment of the present invention, and is applied to a service server, as shown in fig. 10, the apparatus includes:
an obtaining module 210, configured to obtain target resource information corresponding to a resource required to create a target cloud service;
a first sending module 220, configured to send a resource query request including the target resource information to a resource management server, so that the resource management server determines, based on the target resource information, whether available resources of a host are sufficient to create the target cloud service;
a third receiving module 230, configured to receive a determination result fed back by the resource management server, and if available resources of a host are sufficient to create the target cloud service, obtain a target order corresponding to the target cloud service;
a second sending module 240, configured to send, to the resource management server, a creation request for creating the target cloud service when the target order is successfully obtained, so that the resource management server creates the target cloud service in a host based on the creation request.
In the scheme provided by the embodiment of the invention, when a new service needs to be created, the resource management server judges whether enough resources exist in the host computer to create the cloud service corresponding to the new service, and when the judgment result is yes, the service server obtains the corresponding order; compared with the prior art, the phenomenon that the acquired corresponding orders need to be cancelled when the cloud service is failed to be created due to insufficient host machine resources is reduced, the problem that the service creation in the prior art is complicated is solved, and therefore useless orders caused by insufficient host machine resources are reduced.
Corresponding to the embodiments of the method and the apparatus, the embodiment of the present invention further discloses a service creation system, as shown in fig. 11, the system includes a service server and a resource management server,
the business server is used for acquiring target resource information required by creating a target cloud service; sending a resource query request containing the target resource information to a resource management server, and receiving a judgment result of whether the resource management server is enough to create the target cloud service for the available resources of the host machine; if available resources of the host machine are enough to create the target cloud service, acquiring a target order corresponding to the target cloud service; under the condition that the target order is successfully obtained, sending a creation request for creating the target cloud service to the resource management server;
the resource management server is used for receiving the resource query request sent by the service server; judging whether available resources of a host machine are enough to create the target cloud service or not based on the target resource information; feeding back a judgment result whether available resources of a host machine are enough to create the target cloud service to the business server; and receiving a creation request for creating the target cloud service sent by the business server, and creating the target cloud service in a host machine based on the creation request.
Specifically, the resource management server is further configured to:
and under the condition that the available resources of the host machine are enough to create the target cloud service, executing resource locking operation in the available resources of the host machine based on the target resource information.
In a first implementation manner, the resource management server is specifically configured to:
under the condition that the available resources of the host machine are enough to create the target cloud service, determining first resources used for creating the target cloud service from the available resources of the host machine based on the target resource information; and locking the first resource; and after receiving a creation request for creating the target cloud service sent by the business server, creating the target cloud service in a host machine based on the first resource and the creation request.
In a second implementation manner, the resource management server is specifically configured to:
determining all target hosts used to create the target cloud service based on the target resource information if available resources of the hosts are sufficient to create the target cloud service; determining the target resource amount required by all the target cloud services required to be created on each target host; the amount of available resources for each target host to update the local record is: a difference between an available resource amount of each target host and the target resource amount corresponding to each target host.
Specifically, the resource management server is further configured to: after resource locking operation is executed in available resources of a host, recording the corresponding relation between each target cloud service and the target host;
the resource management server is specifically configured to: determining a target host corresponding to each target cloud service based on the creation request and the corresponding relation; correspondingly creating the target cloud service in the determined target host.
Specifically, the resource management server is further configured to:
judging whether the target cloud service is successfully created; and if not, releasing the resource locking operation.
In the scheme provided by the embodiment of the invention, when a new service needs to be created, the resource management server judges whether enough resources exist in the host computer to create the cloud service corresponding to the new service, and when the judgment result is yes, the service server obtains the corresponding order; compared with the prior art, the phenomenon that the acquired corresponding orders need to be cancelled when the cloud service is failed to be created due to insufficient host machine resources is reduced, the problem that the service creation in the prior art is complicated is solved, and therefore useless orders caused by insufficient host machine resources are reduced.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
Those skilled in the art will appreciate that all or part of the steps in the above method embodiments may be implemented by a program to instruct relevant hardware to perform the steps, and the program may be stored in a computer-readable storage medium, which is referred to herein as a storage medium, such as: ROM/RAM, magnetic disk, optical disk, etc.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (20)

1. A service creation method applied to a resource management server is characterized by comprising the following steps:
receiving a resource query request sent by a business server, wherein the resource query request contains target resource information corresponding to resources required by the creation of a target cloud service;
judging whether available resources of a host machine are enough to create the target cloud service or not based on the target resource information;
if yes, feeding back a judgment result to the business server so that the business server can obtain a target order corresponding to the target cloud service; the business server acquires a target order corresponding to the target cloud service, and the method comprises the following steps: the business server sends an order creating request containing target resource information to an order server, so that the order server creates a target order corresponding to the target cloud service based on the order creating request and sends the created target order to the business server;
receiving a creation request aiming at the target cloud service, which is sent by the business server under the condition of successfully obtaining the target order;
and creating the target cloud service in the host machine based on the creation request.
2. The method of claim 1, further comprising:
and after judging that the available resources of the host machine are enough to create the target cloud service, executing resource locking operation in the available resources of the host machine based on the target resource information.
3. The method of claim 2, wherein performing a resource lock operation in an available resource of a host based on the target resource information comprises:
determining a first resource used for creating the target cloud service from available resources of a host machine based on the target resource information;
locking the first resource;
the creating the target cloud service in the host based on the creating request comprises:
and creating the target cloud service in the host machine based on the first resource and the creation request.
4. The method of claim 2, wherein performing a resource lock operation in an available resource of a host based on the target resource information comprises:
determining all target hosts used to create the target cloud service based on the target resource information;
determining the target resource amount required by all the target cloud services required to be created on each target host;
the amount of available resources for each target host to update the local record is: the difference between the available resource amount of each target host and the target resource amount corresponding to the target host.
5. The method of claim 2, wherein after performing a resource lock operation in an available resource of a host based on the target resource information, the method further comprises:
recording the corresponding relation between each target cloud service and a target host;
the creating the target cloud service in the host based on the creating request comprises:
determining a target host corresponding to each target cloud service based on the creation request and the corresponding relation;
creating the corresponding target cloud service in the determined target host.
6. The method of claim 2, further comprising:
judging whether the target cloud service is successfully created;
and if not, releasing the resource locking operation.
7. A service creation method applied to a service server is characterized in that the method comprises the following steps:
acquiring target resource information corresponding to resources required for creating a target cloud service;
sending a resource query request containing the target resource information to a resource management server so that the resource management server judges whether available resources of a host machine are enough to create the target cloud service or not based on the target resource information;
receiving a judgment result fed back by the resource management server, and if available resources of a host machine are enough to create the target cloud service, acquiring a target order corresponding to the target cloud service; the obtaining of the target order corresponding to the target cloud service includes: sending an order creating request containing target resource information to an order server, so that the order server creates a target order corresponding to the target cloud service based on the order creating request, and sends the created target order to the business server;
and under the condition that the target order is successfully acquired, sending a creation request for creating the target cloud service to the resource management server, so that the resource management server creates the target cloud service in a host machine based on the creation request.
8. A service creation apparatus applied to a resource management server, the apparatus comprising:
the system comprises a first receiving module, a second receiving module and a third receiving module, wherein the first receiving module is used for receiving a resource query request sent by a business server, and the resource query request comprises target resource information corresponding to resources required by target cloud service creation;
the first judging module is used for judging whether the available resources of the host machine are enough to create the target cloud service or not based on the target resource information;
the feedback module is used for feeding back a judgment result to the business server under the condition that the judgment result of the judgment module is yes, so that the business server obtains a target order corresponding to the target cloud service; the business server acquires a target order corresponding to the target cloud service, and the method comprises the following steps: the business server sends an order creating request containing target resource information to an order server, so that the order server creates a target order corresponding to the target cloud service based on the order creating request and sends the created target order to the business server;
a second receiving module, configured to receive a creation request for the target cloud service, where the creation request is sent by the service server when the target order is successfully obtained;
and the creating module is used for creating the target cloud service in the host machine based on the creating request.
9. The apparatus of claim 8, further comprising:
and the locking module is used for executing resource locking operation in the available resources of the host machine based on the target resource information under the condition that the judgment result of the first judgment module is yes.
10. The apparatus of claim 9, wherein the locking module comprises:
a first determining unit, configured to determine, based on the target resource information, a first resource used to create the target cloud service from available resources of a host if a determination result of the first determining module is yes;
a locking unit for locking the first resource;
the creation module is specifically configured to create the target cloud service in a host based on the first resource and the creation request.
11. The apparatus of claim 9, wherein the locking module comprises:
a second determining unit, configured to determine, based on the target resource information, all target hosts used to create the target cloud service if a determination result of the first determining module is yes;
a third determining unit, configured to determine a target resource amount required by all the target cloud services that need to be created on each target host;
an updating unit, configured to update the available resource amount of each target host of the local record as: the difference between the available resource amount of each target host and the target resource amount corresponding to the target host.
12. The apparatus of claim 9, further comprising:
the recording module is used for recording the corresponding relation between each target cloud service and the target host after the locking module executes the resource locking operation;
the creation module includes:
a fourth determining unit, configured to determine, based on the creation request and the correspondence, a target host corresponding to each target cloud service;
a creating unit, configured to create the corresponding target cloud service in the determined target host.
13. The apparatus of claim 9, further comprising:
the second judgment module is used for judging whether the target cloud service is successfully established;
and the releasing module is used for releasing the resource locking operation under the condition that the judgment result of the second judging module is negative.
14. A service creation apparatus applied to a service server, the apparatus comprising:
the acquisition module is used for acquiring target resource information corresponding to resources required by the creation of the target cloud service;
a first sending device, configured to send a resource query request including the target resource information to a resource management server, so that the resource management server determines, based on the target resource information, whether available resources of a host are sufficient to create the target cloud service;
the third receiving device is used for receiving a judgment result fed back by the resource management server, and acquiring a target order corresponding to the target cloud service if available resources of a host machine are enough to create the target cloud service; the obtaining of the target order corresponding to the target cloud service includes: sending an order creating request containing target resource information to an order server, so that the order server creates a target order corresponding to the target cloud service based on the order creating request, and sends the created target order to the business server;
and a second sending device, configured to send, to the resource management server, a creation request for creating the target cloud service when the target order is successfully obtained, so that the resource management server creates the target cloud service in a host based on the creation request.
15. A service creation system, characterized in that the system comprises a service server and a resource management server,
the business server is used for acquiring target resource information required by creating a target cloud service; sending a resource query request containing the target resource information to a resource management server, and receiving a judgment result of whether the resource management server is enough to create the target cloud service for the available resources of the host machine; if available resources of the host machine are enough to create the target cloud service, acquiring a target order corresponding to the target cloud service; under the condition that the target order is successfully obtained, sending a creation request for creating the target cloud service to the resource management server; the business server acquires a target order corresponding to the target cloud service, and the method comprises the following steps: the business server sends an order creating request containing target resource information to an order server, so that the order server creates a target order corresponding to the target cloud service based on the order creating request and sends the created target order to the business server;
the resource management server is used for receiving the resource query request sent by the service server; judging whether available resources of a host machine are enough to create the target cloud service or not based on the target resource information; feeding back a judgment result whether available resources of a host machine are enough to create the target cloud service to the business server; and receiving a creation request for creating the target cloud service sent by the business server, and creating the target cloud service in a host machine based on the creation request.
16. The system of claim 15, wherein the resource management server is further configured to:
and under the condition that the available resources of the host machine are enough to create the target cloud service, executing resource locking operation in the available resources of the host machine based on the target resource information.
17. The system of claim 16, wherein the resource management server is specifically configured to:
under the condition that the available resources of the host machine are enough to create the target cloud service, determining first resources used for creating the target cloud service from the available resources of the host machine based on the target resource information; and locking the first resource; and after receiving a creation request for creating the target cloud service sent by the business server, creating the target cloud service in a host machine based on the first resource and the creation request.
18. The system of claim 16, wherein the resource management server is specifically configured to:
determining all target hosts used to create the target cloud service based on the target resource information if available resources of the hosts are sufficient to create the target cloud service; determining the target resource amount required by all the target cloud services required to be created on each target host; the amount of available resources for each target host to update the local record is: a difference between an available resource amount of each target host and the target resource amount corresponding to each target host.
19. The system of claim 16, wherein the resource management server is further configured to: after resource locking operation is executed in available resources of a host, recording the corresponding relation between each target cloud service and a target host;
the resource management server is specifically configured to: determining a target host corresponding to each target cloud service based on the creation request and the corresponding relation; correspondingly creating the target cloud service in the determined target host.
20. The system of claim 16, wherein the resource management server is further configured to:
judging whether the target cloud service is successfully created; and if not, releasing the resource locking operation.
CN201610861999.8A 2016-09-28 2016-09-28 Service creation method, device and system Active CN107872499B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610861999.8A CN107872499B (en) 2016-09-28 2016-09-28 Service creation method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610861999.8A CN107872499B (en) 2016-09-28 2016-09-28 Service creation method, device and system

Publications (2)

Publication Number Publication Date
CN107872499A CN107872499A (en) 2018-04-03
CN107872499B true CN107872499B (en) 2021-05-25

Family

ID=61762188

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610861999.8A Active CN107872499B (en) 2016-09-28 2016-09-28 Service creation method, device and system

Country Status (1)

Country Link
CN (1) CN107872499B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108961004B (en) * 2018-07-06 2021-08-06 北京金山云网络技术有限公司 Cloud service order processing method, device and system, electronic equipment and medium
CN110764899A (en) * 2019-09-03 2020-02-07 无锡华云数据技术服务有限公司 Resource quota management method, resource processing method, device, equipment, system and medium
CN110674153B (en) * 2019-09-25 2023-02-07 北京金山云网络技术有限公司 Data consistency detection method and device and electronic equipment
CN111385150A (en) * 2020-03-09 2020-07-07 北京百度网讯科技有限公司 Method and device for acquiring information
CN111459660B (en) * 2020-03-13 2023-07-07 平安科技(深圳)有限公司 Dynamic allocation method of cloud host on host, electronic device and storage medium
CN111652605A (en) * 2020-06-08 2020-09-11 山东汇贸电子口岸有限公司 Creation system and creation method for creating cloud service package by public cloud service
CN113285975A (en) * 2021-03-30 2021-08-20 紫光云技术有限公司 High-concurrency resource detection method

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101605139A (en) * 2009-07-10 2009-12-16 中兴通讯股份有限公司 The method and apparatus of P 2 P service establishing
CN103377407A (en) * 2012-04-25 2013-10-30 华为技术有限公司 Method for processing cloud service, and related device and system of cloud service
CN103810015A (en) * 2012-11-09 2014-05-21 华为技术有限公司 Virtual machine establishing method and equipment
CN104468150A (en) * 2013-09-12 2015-03-25 阿里巴巴集团控股有限公司 Method for realizing fault migration through virtual host and virtual host service device
CN104731657A (en) * 2013-12-24 2015-06-24 中国移动通信集团山西有限公司 Resource scheduling method and system
CN105159782A (en) * 2015-08-28 2015-12-16 北京百度网讯科技有限公司 Cloud host based method and apparatus for allocating resources to orders

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101605139A (en) * 2009-07-10 2009-12-16 中兴通讯股份有限公司 The method and apparatus of P 2 P service establishing
CN103377407A (en) * 2012-04-25 2013-10-30 华为技术有限公司 Method for processing cloud service, and related device and system of cloud service
CN103810015A (en) * 2012-11-09 2014-05-21 华为技术有限公司 Virtual machine establishing method and equipment
CN104468150A (en) * 2013-09-12 2015-03-25 阿里巴巴集团控股有限公司 Method for realizing fault migration through virtual host and virtual host service device
CN104731657A (en) * 2013-12-24 2015-06-24 中国移动通信集团山西有限公司 Resource scheduling method and system
CN105159782A (en) * 2015-08-28 2015-12-16 北京百度网讯科技有限公司 Cloud host based method and apparatus for allocating resources to orders

Also Published As

Publication number Publication date
CN107872499A (en) 2018-04-03

Similar Documents

Publication Publication Date Title
CN107872499B (en) Service creation method, device and system
CN111580977B (en) Resource adjustment method and related equipment
CN102567115B (en) Distribute for information technology resources in cloud system and utilize the apparatus and method of following the tracks of
CN110175822B (en) Equipment standing book management method and system
US8296198B2 (en) Method and system for distribution of information
CN108632063B (en) Method, device and system for managing network slice instances
US20010029526A1 (en) Method for controlling a mobile agent
CN110244901B (en) Task allocation method and device and distributed storage system
CN113157446B (en) Cloud edge cooperative resource allocation method, device, equipment and medium
CN111291062B (en) Data synchronous writing method and device, computer equipment and storage medium
CN112579692B (en) Data synchronization method, device, system, equipment and storage medium
CN110149352B (en) Service request processing method and device, computer equipment and storage medium
CN111209060A (en) Capability development platform processing method and device
CN102511041B (en) Computer implementation and calculating system
CN111726241B (en) Network resource management method, system, network device and readable storage medium
CN109951548B (en) Resource management method of cloud platform and cloud management platform
CN109614263B (en) Disaster tolerance data processing method, device and system
CN113204406A (en) Server resource management method, system, device and storage medium
CN112035579A (en) Graph management method, data storage method, data query method, device and storage medium
CN111722783B (en) Data storage method and device
CN111833029A (en) Claims data auditing method and system and computer readable storage medium
CN114500553B (en) Processing method, system, electronic equipment and storage medium of blockchain network
CN116455753B (en) Data smoothing method and device
CN118245235B (en) Multi-cloud platform operation and maintenance method
CN111338752B (en) Container adjusting method and device

Legal Events

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