CN113254152A - Service deployment method and device, electronic equipment and storage medium - Google Patents

Service deployment method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113254152A
CN113254152A CN202110541989.7A CN202110541989A CN113254152A CN 113254152 A CN113254152 A CN 113254152A CN 202110541989 A CN202110541989 A CN 202110541989A CN 113254152 A CN113254152 A CN 113254152A
Authority
CN
China
Prior art keywords
target
service
resource
container group
resource amount
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110541989.7A
Other languages
Chinese (zh)
Other versions
CN113254152B (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
Original Assignee
Beijing Kingsoft Cloud Network 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 filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN202110541989.7A priority Critical patent/CN113254152B/en
Publication of CN113254152A publication Critical patent/CN113254152A/en
Application granted granted Critical
Publication of CN113254152B publication Critical patent/CN113254152B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45562Creating, deleting, cloning virtual machine instances
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45595Network integration; Enabling network access in virtual machine instances

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The application provides a service deployment method and device, an electronic device and a storage medium, wherein the method comprises the following steps: receiving a service deployment request sent by a target object, wherein the service deployment request is used for requesting that the target service is deployed for the target object through service resources up to the target resource amount; determining an initial resource amount of service resources required by creating a target container group, wherein the target container group is used for deploying target services, the initial resource amount is less than or equal to the target resource amount, and the target container group at most allows the service resources of the target resource amount to be used; and creating a target container group by using the service resources of the initial resource amount in the container resource pool, wherein the target container group is deployed with target services, the container resource pool comprises available service resources on a plurality of target hosts, and each target host is allowed to create a plurality of container groups. By the method and the device, the problem that the utilization rate of cloud service resources is low in the configuration mode of the cloud service in the related technology is solved.

Description

Service deployment method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of internet, and in particular, to a service deployment method and apparatus, an electronic device, and a storage medium.
Background
With the development of big data and AI (Artificial Intelligence) Technology, big data applications and big data platforms are becoming core technologies of various IT (Information Technology) companies and internet companies, and many cloud companies have introduced big data platforms built on the IAAS (Infrastructure as a Service) layer.
At present, most of the vendor infrastructure services are cloud hosts using cloud services, that is, a big data service is deployed on one or more cloud host clusters and sold according to the amount of resources used by users, for example, read-write traffic, a host package ([ CPU (Central Processing Unit) configuration, memory configuration ]). Through the form of the big data service deployment and cloud host package binding selling, a user purchases the big data service and the cloud host deployed by the service, the resource usage is exclusive, and the performance is complete.
However, the usage of the cloud service is costly for users, costly for cloud service (e.g., big data cloud service) providers, and low in utilization of cloud service resources. Therefore, the configuration mode of the cloud service in the related art has the problem of low utilization rate of cloud service resources.
Disclosure of Invention
The application provides a service deployment method and device, electronic equipment and a storage medium, which are used for solving the problem that the utilization rate of cloud service resources is low in a configuration mode of cloud services in the related art.
According to an aspect of an embodiment of the present application, there is provided a service deployment method, including: receiving a service deployment request sent by a target object, wherein the service deployment request is used for requesting that a target service is deployed for the target object through service resources up to a target resource amount; determining an initial resource amount of service resources required for creating a target container group, wherein the target container group is used for deploying the target service, the initial resource amount is smaller than or equal to the target resource amount, and the target container group at most allows the service resources of the target resource amount to be used; and creating the target container group by using the service resources of the initial resource amount in a container resource pool, wherein the target service is deployed on the target container group, the container resource pool comprises available service resources on a plurality of target hosts, and each target host is allowed to create a plurality of container groups.
Optionally, the determining an initial resource amount of service resources required to create the target container group includes: configuring a target resource parameter for the target container group, wherein the target resource parameter is used for controlling the resource amount of the service resource used by the target container group, and the initial resource amount is determined according to the target resource parameter.
Optionally, the configuring target resource parameters for the target container group includes: configuring a first resource parameter for the target container group, wherein the first resource parameter is used for controlling a maximum resource amount of service resources used by the target container group, and the maximum resource amount is smaller than or equal to the target resource amount; configuring a second resource parameter for the target container group, wherein the second resource parameter is used for controlling a minimum resource amount of service resources used by the target container group, and the initial resource amount is greater than or equal to the minimum resource amount; wherein the target resource parameter comprises the first resource parameter and the second resource parameter.
Optionally, the service deployment request carries a target time range, where the target time range is preset use time of the target container group; the creating the target container group using the service resource of the initial resource amount in the container resource pool comprises: and according to the initial resource amount and the target time range, using the service resources on the first target host in the container resource pool to create the target container group, wherein the resource amount of the remaining available service resources on the first target host is greater than or equal to the initial resource amount, and the first target host does not create the container group with the preset use time overlapping with the target time range.
Optionally, after the target container group is created by using the service resource of the initial resource amount in the container resource pool, the method further includes: in the process of processing the business data of the target object and the target service through the target container group, adjusting the resource amount of the service resources used by the target container group according to the load amount of the service load of the target service, wherein the resource amount of the service resources used by the target container group is positively correlated with the load amount of the service load of the target service, and the resource amount of the service resources used by the target container group is less than or equal to the target resource amount.
Optionally, the adjusting, according to the load amount of the service load of the target service, the resource amount of the service resource used by the target container group includes: when the load capacity of the service load of the target service is greater than or equal to a first load capacity threshold and the resource amount of the service resource used by the target container group is less than the target resource amount, adjusting the resource amount of the service resource used by the target container group to be greater than the resource amount of the service resource currently used by the target container group; and when the load capacity of the service load of the target service is less than or equal to a first load capacity threshold and the resource amount of the service resource used by the target container group is greater than the minimum resource amount allowed to be used by the target container group, adjusting the resource amount of the service resource used by the target container group to be less than the resource amount of the service resource currently used by the target container group.
Optionally, after the target container group is created by using the service resource of the initial resource amount in the container resource pool, the method further includes: in the process of processing the business data of the target object and the target service through the target container group, determining to adjust the resource quantity of the service resource used by the target container group from a first resource quantity to a second resource quantity, wherein the second resource quantity is greater than the first resource quantity; and migrating the target container group to a second target host under the condition that the resource quantity of the remaining available service resources on the target host where the target container group is located is less than the difference value between the second resource quantity and the first resource quantity, wherein the resource quantity of the remaining available service resources on the second target host is greater than or equal to the second resource quantity.
According to another aspect of the embodiments of the present application, there is also provided a service deployment apparatus, including: the system comprises a receiving unit, a service deployment unit and a service deployment unit, wherein the receiving unit is used for receiving a service deployment request sent by a target object, and the service deployment request is used for requesting that a target service is deployed for the target object through service resources up to a target resource amount; a first determining unit, configured to determine an initial resource amount of service resources required to create a target container group, where the target container group is used to deploy the target service, the initial resource amount is less than or equal to the target resource amount, and the target container group allows at most to use the service resources of the target resource amount; a creating unit, configured to create the target container group using the service resource of the initial resource amount in a container resource pool, where the target container group is deployed with the target service, the container resource pool includes available service resources on a plurality of target hosts, and each target host allows creation of a plurality of container groups.
Optionally, the first determining unit includes: a configuration module, configured to configure a target resource parameter for the target container group, where the target resource parameter is used to control a resource amount of a service resource used by the target container group, and the initial resource amount is determined according to the target resource parameter.
Optionally, the configuration module includes: a first configuration sub-module, configured to configure a first resource parameter for the target container group, where the first resource parameter is used to control a maximum resource amount of service resources used by the target container group, and the maximum resource amount is smaller than or equal to the target resource amount; a second configuration submodule, configured to configure a second resource parameter for the target container group, where the second resource parameter is used to control a minimum resource amount of service resources used by the target container group, and the initial resource amount is greater than or equal to the minimum resource amount; wherein the target resource parameter comprises the first resource parameter and the second resource parameter.
Optionally, the service deployment request carries a target time range, where the target time range is preset use time of the target container group; the creating unit includes: and a creating module, configured to create the target container group using the service resource on the first target host in the container resource pool according to the initial resource amount and the target time range, where a resource amount of the remaining available service resource on the first target host is greater than or equal to the initial resource amount, and a container group whose preset use time overlaps with the target time range is not created on the first target host.
Optionally, the apparatus further comprises: an adjusting unit, configured to, after the target container group is created by the service resources of the initial resource amount in the usage container resource pool, adjust, according to a load amount of a service load of the target service, a resource amount of the service resources used by the target container group in a process of processing, by the target container group, the traffic data of the target object associated with the target service, where the resource amount of the service resources used by the target container group is positively correlated with the load amount of the service load of the target service, and the resource amount of the service resources used by the target container group is less than or equal to the target resource amount.
Optionally, the adjusting unit includes: a first adjusting module, configured to adjust, when a load amount of a service load of the target service is greater than or equal to a first load amount threshold and a resource amount of a service resource used by the target container group is smaller than the target resource amount, the resource amount of the service resource used by the target container group to be greater than a resource amount of a service resource currently used by the target container group; a second adjusting module, configured to adjust, when a load amount of a service load of the target service is smaller than or equal to a first load amount threshold and a resource amount of a service resource used by the target container group is greater than a minimum resource amount allowed to be used by the target container group, the resource amount of the service resource used by the target container group to be smaller than a resource amount of a service resource currently used by the target container group.
Optionally, the apparatus further comprises: a second determining unit, configured to determine, after the target container group is created by the service resources of the initial resource amount in the usage container resource pool, to adjust the resource amount of the service resources used by the target container group from a first resource amount to a second resource amount in a process of processing the traffic data of the target object associated with the target service by the target container group, where the second resource amount is greater than the first resource amount; and a migration unit, configured to migrate the target container group to a second target host when a resource amount of the remaining available service resources on the target host where the target container group is located is less than a difference between the second resource amount and the first resource amount, where the resource amount of the remaining available service resources on the second target host is greater than or equal to the second resource amount.
According to another aspect of the embodiments of the present application, there is also provided an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory communicate with each other through the communication bus; wherein the memory is used for storing the computer program; a processor for performing the method steps in any of the above embodiments by running the computer program stored on the memory.
According to a further aspect of the embodiments of the present application, there is also provided a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to perform the method steps of any of the above embodiments when the computer program is executed.
In the embodiment of the application, a cloud service deployment mode based on a container group is adopted, and a service deployment request sent by a target object is received, wherein the service deployment request is used for requesting that the target service is deployed for the target object through service resources up to a target resource amount; determining an initial resource amount of service resources required by creating a target container group, wherein the target container group is used for deploying target services, the initial resource amount is less than or equal to the target resource amount, and the target container group at most allows the service resources of the target resource amount to be used; the method comprises the steps of using service resources of initial resource amount in a container resource pool to create a target container group, wherein target services are deployed on the target container group, the container resource pool comprises available service resources on a plurality of target hosts, and a plurality of container groups are allowed to be created on each target host.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art to obtain other drawings without inventive exercise.
FIG. 1 is a schematic diagram of a hardware environment for an alternative method of deploying services according to an embodiment of the present application;
FIG. 2 is a flow chart diagram illustrating an alternative method for deploying services according to an embodiment of the present application;
FIG. 3 is a schematic diagram of an alternative method of deploying a service according to an embodiment of the present application;
FIG. 4 is a schematic diagram of another alternative service deployment method according to an embodiment of the application;
FIG. 5 is a schematic diagram of yet another alternative method of deploying a service according to an embodiment of the present application;
FIG. 6 is a flow chart diagram illustrating an alternative method for deploying services according to an embodiment of the present application;
FIG. 7 is a block diagram of an alternative service deployment apparatus according to an embodiment of the present application;
fig. 8 is a block diagram of an alternative electronic device according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all 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 application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
First, partial nouns or terms appearing in the description of the embodiments of the present application are applicable to the following explanations:
1. big data component
The big data component is a tool and a system commonly used in the production of an Internet big data ecosystem, such as Hadoop, HBase, Elasticisearh and the like;
2. big data cloud platform
The big data cloud platform refers to big data service on the cloud, namely, big data platform service built on IaaS infrastructure of public cloud
3. Container with a lid
A container is an operating system level virtualization technology that can run applications and their dependent programs in the process of resource isolation. The container is a lightweight technology, packages components required by the running of an application program into a single reusable image file, runs the image file in an independent environment, and realizes the isolation from other applications in the aspects of memory, CPU, disk, network and the like.
4. Resource reuse
Resource reuse means that limited resources are allocated to more users as much as possible on the premise of ensuring service.
According to one aspect of the embodiments of the present application, a method for deploying a service is provided. Alternatively, in this embodiment, the service deployment method described above may be applied to a hardware environment formed by the terminal 102 and the server 104 as shown in fig. 1. As shown in fig. 1, the server 104 is connected to the terminal 102 through a network, and may be configured to provide services (e.g., game services, application services, etc.) for the terminal or a client installed on the terminal, and may be configured with a database on the server or separately from the server, and configured to provide data storage services for the server 104.
The network may include, but is not limited to, at least one of: wired networks, wireless networks. The wired network may include, but is not limited to, at least one of: wide area networks, metropolitan area networks, local area networks, which may include, but are not limited to, at least one of the following: WIFI (Wireless Fidelity), bluetooth. The terminal 102 may not be limited to a PC, a mobile phone, a tablet computer, etc.
The service deployment method according to the embodiment of the present application may be executed by the server 104, or executed by the terminal 102, or executed by both the server 104 and the terminal 102. The deployment method of the terminal 102 for executing the service according to the embodiment of the present application may also be executed by a client installed thereon.
Taking the method for deploying the service in this embodiment executed by the server 104 as an example, fig. 2 is a schematic flowchart of an optional method for deploying the service according to the embodiment of the present application, and as shown in fig. 2, the flowchart of the method may include the following steps:
step S202, receiving a service deployment request sent by a target object, wherein the service deployment request is used for requesting to deploy a target service for the target object through service resources up to a target resource amount.
The service deployment method in this embodiment may be applied to a scenario in which a big data service is deployed in a cloud, for example, a scenario in which a big data service is deployed through a container cluster. The container cluster may be a container cluster based on a container cluster management system, for example, a Kubernetes (a container group management system, abbreviated as K8s) cluster.
When the target object has a use demand of the cloud big data service, the target user can use the target client running on the terminal device to apply for deploying the cloud big data service, namely the target service, to the target server. The target client can be connected with the target server for deploying the cloud big data service through a network, and the target client is logged in by using a target account. The target object may be an object identified by the target account number. Optionally, the target object may also be an object executed when applying for deploying the target service.
It should be noted that the target object may correspond to an enterprise user, and the applied target service may be used by a plurality of users associated with the enterprise user; the target object may also be an individual user, and the requested target service may be temporarily used by the individual user, and optionally, by another user authenticated by the individual user. This is not limited in this embodiment.
It should be further noted that, in addition to identifying the target object through the target account, the target object may also be identified through, for example, a terminal identifier, a user name, a domain name, and the like of the terminal device, and as long as the target server can identify the identification information of the object targeted by the cloud big data service requested to be deployed, the identification information may be used in this embodiment.
When applying for deploying the target service, the target user can send a service deployment request to the target server through the target client, wherein the service deployment request is used for requesting that the target service is deployed for the target object through the service resources with the maximum target resource amount.
The service deployment request may carry information of at least one of the following: indication information of target resource amount, indication information of service resource, identification information of target object and identification information of target service. The service resource may be a resource required for running the target service, and may include but is not limited to at least one of the following: CPU, internal memory.
The target server may receive the service deployment request sent by the target client, and extract the required information from the service deployment request, thereby determining the service type of the target service to be deployed and the resource amount of the service resource corresponding to the deployment target service.
In addition, in order to apply for deploying the cloud big data service for the target object, the target user needs to pay a certain fee in exchange for the deployment of the cloud big data service. The payment method, the type of the cloud big data service, the payment cost required for different types of cloud big data services, and the like may be configured as needed, which is not limited in this embodiment.
Step S204, determining an initial resource amount of service resources required for creating a target container group, wherein the target container group is used for deploying the target service, the initial resource amount is less than or equal to the target resource amount, and the target container group allows to use the service resources of the target resource amount at most.
After receiving the service deployment request, the target server may deploy the target service for the target object. In the related art, a big data service on the cloud is deployed based on a cloud host. As shown in fig. 3, the big data service on the cloud may be deployed in a cloud host cluster, where a big data service a of a user a is deployed on a cloud host 1 and a cloud host 3, a big data service B of a user B is deployed on a cloud host 2, a cloud host 4, and a cloud host 6, and a user exclusively shares cloud host resources. Resources (e.g., host 5) that are not purchased by the cloud host resource pool user cannot be reused, and can only be idle for purchase.
In this embodiment, the service resources are changed from cloud hosts to container groups, for example, pod of K8s, one container group is functionally equivalent to a cloud host, and the big data service is deployed in the container group. Taking the pod as an example, the pod is the smallest unit of K8s, and the pod is a group of containers, which may have one pause container (i.e., a base container) and several service containers. A user purchasing resources is changed from deploying a service on a portion of the hosts in the cloud host cluster to creating a batch of pods from the pool of container resources.
The operation of the container group requires the use of certain service resources (e.g., CPU, memory, etc.), and the amount of the service resources used by the container group can be flexibly configured. For a target service, a target server may determine an initial amount of resources of the service resources needed to create a target set of containers for deploying the target service. Since the target object provides the target service for the target object by using at most the service resource of the target resource amount, the determined initial resource amount is less than or equal to the target resource amount, for example, may be half of the target resource amount, and the target container group allows at most the service resource of the target resource amount to be used.
Step S206, a target container group is created by using the service resources of the initial resource amount in the container resource pool, wherein the target container group is deployed with target services, the container resource pool comprises available service resources on a plurality of target hosts, and each target host is allowed to create a plurality of container groups.
In this embodiment, the container cluster may create a container in a container resource pool containing available service resources on multiple cloud hosts (e.g., multiple target hosts) according to a user purchase. The container resource pool is equivalent to realize resource multiplexing with the cloud host, and container groups (for example, pod) of different users can be created on the same cloud host, so that the cloud host resources can be fully utilized. And the resource reuse can realize the service of using limited resources to more users.
For the target service, the target server may create a target container group using the service resource of the initial resource amount in the container resource pool, and the target service is deployed on the created target container group. If the service resources used to create the target container group are located on one cloud host, the number of created target container groups may be 1. If the service resources used for creating the target container group are located on a plurality of cloud hosts, the number of created target container groups may be multiple, and one target container group is located on one cloud host. In addition, a plurality of container groups of the same big data service of the same user may be created on one cloud host, and the creation method of the container group in this embodiment is not limited.
For example, as shown in fig. 3, a big data service on the cloud may be deployed in a container cluster, where there are 3 pods deployed for big data service a of user a and a pod deployed for big data service B of user B.
The created target container group may provide the target service for the target object, for example, processing business data associated with the target object and the target service by using at most the service resources of the target resource amount through the target container group.
Receiving a service deployment request sent by a target object through the steps S202 to S206, wherein the service deployment request is used for requesting that a target service is deployed for the target object through service resources up to the target resource amount; determining an initial resource amount of service resources required by creating a target container group, wherein the target container group is used for deploying target services, the initial resource amount is less than or equal to the target resource amount, and the target container group at most allows the service resources of the target resource amount to be used; the method comprises the steps that a target container group is created by using service resources of an initial resource amount in a container resource pool, wherein target services are deployed on the target container group, the container resource pool comprises available service resources on a plurality of target hosts, and each target host allows for the creation of a plurality of container groups, so that the problem that the utilization rate of cloud service resources is low in a configuration mode of cloud services in the related art is solved, and the utilization rate of the service resources is improved.
As an alternative embodiment, determining an initial amount of resources of the service resources required to create the target group of containers comprises:
s11, configuring a target resource parameter for the target container group, wherein the target resource parameter is used to control the resource amount of the service resource used by the target container group, and the initial resource amount is determined according to the target resource parameter.
For a target group of containers, the target server may configure target resource parameters for the target container, which may be used to control the resource amount of the service resources used by the target group of containers. The target resource parameter may be configured according to the target resource amount, or may be configured by combining the target resource amount with other object information (for example, object level) of the target object.
The resource amount of the service resource used by the target container group may be allowed to be dynamically controlled, that is, the resource amount of the service resource used by the target container group may be dynamically adjusted as needed. The target server may limit the resource amount of the service resource used by the target container group by a target resource parameter, for example, a parameter that limits at least one of the following of the service resource used by the target container group: maximum resource amount, minimum resource amount, average resource amount, allowed resource amount in different time periods, etc. And the initial resource amount may be determined according to the target resource parameter.
By the embodiment, the resource parameter for controlling the resource amount of the service resource used by the container group is configured for the container group, so that the resource amount of the service resource used by the container group can be conveniently controlled, and the rationality of the service resource utilization is improved.
As an alternative embodiment, configuring the target set of containers with the target resource parameters comprises:
s21, configuring a first resource parameter for the target container group, where the first resource parameter is used to control a maximum resource amount of service resources used by the target container group, and the maximum resource amount is less than or equal to the target resource amount;
s22, configuring a second resource parameter for the target container group, where the second resource parameter is used to control a minimum resource amount of the service resource used by the target container group, and the initial resource amount is greater than or equal to the minimum resource amount;
wherein the target resource parameter comprises a first resource parameter and a second resource parameter.
After the resource reuse is realized, the compression mechanism of the container can be utilized to realize the service of using limited resources for more users. For the target container group, the target server may configure a first resource parameter for the target container group, where the first resource parameter is used to control a maximum resource amount of the service resource used by the target container group, and the maximum resource amount is smaller than or equal to the target resource amount. And in order to guarantee the service usage experience of the user, the maximum resource amount may be configured as the target resource amount.
The target server may also configure a second resource parameter for the target group of containers, which is used to control a minimum amount of resources of the service resources used by the target group of containers. The minimum amount of resources may be determined according to the target amount of resources, e.g., it may be half, 60%, 80%, etc. of the target amount of resources. The minimum resource amount may also be determined based on the target resource amount and the resource amount of the currently remaining available service resource in the container resource pool. For example, if the currently remaining available service resources in the container resource pool are sufficient, the minimum resource amount may be configured to be a target resource amount, 60% of the target resource amount, 80% of the target resource amount, and so on. If the currently remaining available service resources in the container resource pool are insufficient, the minimum resource amount can be configured to be half of the target resource amount, one third of the target resource amount, and the like. This is not limited in this embodiment.
The initial amount of resources may be determined based on a minimum amount of resources and a maximum amount of resources, for example, the initial amount of resources may be the minimum amount of resources, the maximum amount of resources, or between the minimum amount of resources and the maximum amount of resources. For example, in order to guarantee resource reuse, the initial resource amount may be set to the minimum resource amount described above.
It should be noted that the target resource parameter configured for the target container group may be flexibly adjusted according to needs, that is, the maximum resource amount and the minimum resource amount are not fixed, but may be adjusted up or down according to needs, which is not specifically limited in this embodiment. For example, when the available service resources remaining in the container resource pool increase, the minimum resource amount may be adjusted higher in order to improve the service quality.
For example, as shown in fig. 4, K8s (container service) itself provides a service compression mechanism, and resource usage can be controlled by two parameters, namely requests and limits, where limits represents the maximum number of resources that can be used by a single container, and requests is the minimum number of resources required by a single container.
If the value of requests is equal to the value of limits, the method indicates no compression, a container is created, namely the number of the limits resources is used, if the value of requests is less than the value of limits, the container is served by the minimum resources available during creation, and if the self service load is increased, the container automatically supplements the resources until the limit upper limit is reached.
Illustratively, in conjunction with fig. 5, if the 5 user requirements are 50 CPUs (an example of a service resource), the current resource pool only uses 30 CPUs, and a minimum of 5 CPUs can be opened for each user for a total of 25 CPUs. According to the resource utilization of the user, peak staggering is carried out, although the maximum requirement of the user is 50 CPUs, the requirement can be met by 30 CPUs in consideration of different utilization peaks of the user, and therefore efficient resource reuse is achieved.
By the embodiment, the maximum resource amount and the minimum resource amount of the container group are configured, so that limited resources can be used for providing services for more users, and the utilization rate of service resources is improved.
As an optional embodiment, the service deployment request may also carry a target time range, where the target time range is a preset use time of the target container group, that is, an estimated time range for the target object to use the target service. Here, the target time range is an estimated time range, but is not necessarily a time range in which the target container group is actually used, that is, the target container group may be used outside the target time range.
Optionally, in this embodiment, creating the target container group using the service resource of the initial resource amount in the container resource pool includes:
and S31, according to the initial resource amount and the target time range, creating a target container group by using the service resources on the first target host in the container resource pool, wherein the resource amount of the remaining available service resources on the first target host is greater than or equal to the initial resource amount, and no container group with the preset use time overlapping with the target time range is created on the first target host.
When creating the target container group, the target server may select the target host, i.e., the first target host, where the target container group is created from the plurality of target hosts according to the initial resource amount and/or the target time range. The selection rule of the first target host may be configured as required, for example, the manner of selecting the first target host may be: the method comprises the steps of firstly selecting a candidate host with the resource amount of the remaining available service resources larger than the initial resource amount from a plurality of target hosts according to the initial resource amount, and then determining whether to select the candidate host to establish a target container group or not according to a target time range.
When the candidate host is selected, the target service may obtain the resource amount of the remaining available service resources on each target cloud host, and select the target cloud host from which the resource amount of the remaining available service resources is greater than the initial resource amount as the candidate host in sequence (for example, according to the sequence from large to small or from small to large of the resource amount of the remaining available service resources).
When further judgment is made on the candidate host, the target server may determine whether a created container group exists on the candidate host, and if not, may determine the candidate host as the first target host. If so, further judgment can be made as to whether the preset use time of the existing container group is overlapped with the target time range. If there is no overlap, the candidate host may be determined to be the first target host. If the container group is overlapped, in order to avoid container group migration caused by insufficient resource amount of the remaining service resources on the cloud host due to increase of the resource amount of the service resources used by the container group, a target cloud host with the resource amount of the next remaining available service resources larger than the initial resource amount can be selected as a candidate host, and judgment is carried out again.
Optionally, if there is an overlap, it may be further determined whether the total resource amount of the available service resources on the candidate host is greater than or equal to the sum of the maximum resource amount of the service resources used by the target container group and the maximum resource amount of the service resources used by the existing container group; if yes, determining the candidate host as a first target host; otherwise, the target cloud host with the resource amount of the next remaining available service resource larger than the initial resource amount can be selected as the candidate host, and the judgment is carried out again. The selection rule of the first target host may be configured as needed, which is not specifically limited in this embodiment.
According to the embodiment, the cloud host is selected according to the initial resource amount and the preset service time of the container group to establish the container group, so that the selection rationality of the cloud host can be improved, and the utilization rate of service resources can be improved.
As an optional embodiment, after creating the target container group using the service resource of the initial resource amount in the container resource pool, the method further includes:
s41, in the process of processing the business data associated with the target object and the target service through the target container group, adjusting the resource amount of the service resource used by the target container group according to the load amount of the service load of the target service, wherein the resource amount of the service resource used by the target container group is positively correlated with the load amount of the service load of the target service, and the resource amount of the service resource used by the target container group is less than or equal to the target resource amount.
In the process of processing the service data associated with the target object and the target service by the target container group, the target server (or another server, which is described in this embodiment by taking the target server as an example) may adjust the resource amount of the service resource used by the target container group, for example, the resource amount of the service resource used by the target container group may be adjusted according to the load amount of the service load of the target service, and the restriction condition for the adjustment may include: after the adjustment, the resource amount of the service resource used by the target container group is less than or equal to the target resource amount.
The resource amount of the service resource used by the target container group is positively correlated with the load amount of the service load of the target service, for example, the resource amount of the service resource used by the target container group increases with the increase of the load amount of the service load of the target service, and decreases with the decrease of the load amount of the service load of the target service. The service load of the target service may include, but is not limited to, at least one of: the number of objects using the target service, the traffic volume of the target service, and the like, which are not limited in this embodiment.
By the embodiment, the resource amount of the service resource used by the target container group is adjusted according to the load amount of the service load of the target service, so that the utilization rate of the service resource can be improved.
As an alternative embodiment, the adjusting the resource amount of the service resource used by the target container group according to the load amount of the service load of the target service includes:
s51, when the load amount of the service load of the target service is greater than or equal to the first load amount threshold and the resource amount of the service resource used by the target container group is less than the target resource amount, adjusting the resource amount of the service resource used by the target container group to be greater than the resource amount of the service resource currently used by the target container group;
s52, when the load amount of the service load of the target service is less than or equal to the first load amount threshold and the resource amount of the service resource used by the target container group is greater than the minimum resource amount allowed to be used by the target container group, the resource amount of the service resource used by the target container group is adjusted to be less than the resource amount of the service resource currently used by the target container group.
The target server may be configured with a load threshold corresponding to the resource amount of the service resource used by the target container group in advance, and the larger the resource amount is, the larger the load threshold is, and the positive correlation between the two is. The adjustment operation of the resource amount of the service resource used by the target container group may be performed based on the load amount threshold, the maximum resource amount (i.e., the target resource amount), and the minimum resource amount allowed to be used by the target container group.
If the load capacity of the service load of the target service is greater than or equal to the first load capacity threshold and the resource amount of the service resource used by the target container group is less than the target resource amount, the resource can be automatically supplemented, and the resource amount of the service resource used by the target container group is adjusted to be greater than the resource amount of the service resource currently used by the target container group. If the load amount of the service load of the target service is greater than or equal to the first load amount threshold and the resource amount of the service resource used by the target container group is equal to the target resource amount, sending a prompt message to the terminal device of the target object to prompt the increase of the resource amount of the service resource used by the target service.
If the load amount of the service load of the target service is less than or equal to the first load amount threshold and the resource amount of the service resource used by the target container group is greater than the minimum resource amount allowed to be used by the target container group, the service resource used by the container group can be automatically reduced, and the resource amount of the service resource used by the target container group is adjusted to be less than the resource amount of the service resource currently used by the target container group. If the load amount of the service load of the target service is less than or equal to the first load amount threshold and the resource amount of the service resource used by the target container group is equal to the minimum resource amount allowed to be used by the target container group, no adjustment may be performed.
For example, for the K8s cluster, the service resource usage can be controlled by the aforementioned two parameters of requests and limits, and when the self service load is increased, the pod can automatically replenish the resource until the limit upper limit is reached.
According to the embodiment, the resource amount of the service resources used by the container group is automatically adjusted based on the load amount threshold, the maximum resource amount and the minimum resource amount, so that the rationality of service resource scheduling and the utilization rate of the service resources can be improved.
As an optional embodiment, after creating the target container group using the service resource of the initial resource amount in the container resource pool, the method further includes:
s61, in the process of processing the business data of the target object and the target service through the target container group, determining to adjust the resource quantity of the service resource used by the target container group from a first resource quantity to a second resource quantity, wherein the second resource quantity is larger than the first resource quantity;
and S62, migrating the target container group to a second target host when the resource quantity of the remaining available service resources on the target host where the target container group is located is less than the difference value between the second resource quantity and the first resource quantity, wherein the resource quantity of the remaining available service resources on the second target host is greater than or equal to the second resource quantity.
In the process of processing the service data associated with the target object and the target service through the target container group, the resource amount of the service resource used by the target container group may need to be increased due to an increase in a load amount of a service load of the target service, an increase in a service resource amount used by the target service in an application of a user, or other reasons. For example, the target server determines to adjust the resource amount of the service resource used by the target container group from a first resource amount to a second resource amount, the second resource amount being greater than the first resource amount.
If the resource amount of the remaining available service resources on the target host where the target container group is located is less than the difference between the second resource amount and the first resource amount, the resource amount of the service resources used by the target container group cannot be increased to the second resource amount on the local cloud host. At this time, the adjustment of the resource amount of the service resource used by the target container group from the first resource amount to the second resource amount may be achieved by deploying an associated container group of the target container group (the resource amount of the service resource used by the associated container group may be a difference between the second resource amount and the first resource amount) on another cloud host.
Optionally, the target server may also migrate the target container group to a new cloud host (i.e., a second target host), where the resource amount of the remaining available service resources on the migrated cloud host is greater than or equal to the second resource amount. The process of container group migration is unaware of the target object and migration is performed without affecting the use of the target object.
By the embodiment, the migration compatibility of the container group can be improved by migrating the container group between different cloud hosts.
The following explains a deployment method of a service in the embodiment of the present application with reference to an optional example. In this example, the target service is a cloud big data service, the container group is a pod, the service resource is a CPU, the target resource amount provides a resource usage peak amount for the user, and the target time range provides resource usage time for the user.
Provided in this example is a container-based resource multiplexing mechanism for big data services on the cloud, where the big data services are deployed on a container cluster depending on a container base service, where the container cluster employs a K8s scheme, i.e., deployed in a K8s cluster.
As shown in fig. 6, the flow of the service deployment method in this alternative example may include the following steps:
step S602, the user purchases service;
step S604, the user provides the resource using peak value amount and time;
step S606, configuring resource compression value;
step S608, creating a container resource pool according to the service selected by the user.
By the embodiment, resource reuse of big data cloud service is realized based on a container technology, user resource reuse with different attributes is achieved on the premise of ensuring user service, a multi-user shared resource pool is realized by means of a resource isolation mechanism of a container, and resource reuse on a cloud host is realized; the resource supply can be dynamically adjusted according to the actual use of the user, and the user does not sense the expansion of the subsequent resource pool; meanwhile, the cost of using the cloud big data service by the user can be greatly reduced, and a big data cloud service provider can fully utilize resources to serve more users.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (e.g., a ROM (Read-Only Memory)/RAM (Random Access Memory), a magnetic disk, an optical disk) and includes several instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the methods according to the embodiments of the present application.
According to another aspect of the embodiment of the present application, there is also provided a service deployment apparatus for implementing the service deployment method. Fig. 7 is a block diagram of a configuration of an alternative service deployment apparatus according to an embodiment of the present application, and as shown in fig. 7, the apparatus may include:
a receiving unit 702, configured to receive a service deployment request sent by a target object, where the service deployment request is used to request that a target service is deployed for the target object through service resources up to a target resource amount;
a first determining unit 704, connected to the receiving unit 702, configured to determine an initial resource amount of service resources required to create a target container group, where the target container group is used to deploy a target service, the initial resource amount is less than or equal to the target resource amount, and the target container group allows at most to use the service resources of the target resource amount;
a creating unit 706, connected to the first determining unit 704, configured to create a target container group using the service resource of the initial resource amount in the container resource pool, where the target container group is deployed with a target service, the container resource pool includes available service resources on a plurality of target hosts, and each target host allows creation of a plurality of container groups.
It should be noted that the receiving unit 702 in this embodiment may be configured to execute the step S202, the first determining unit 704 in this embodiment may be configured to execute the step S204, and the creating unit 706 in this embodiment may be configured to execute the step S206.
Receiving a service deployment request sent by a target object through the module, wherein the service deployment request is used for requesting that a target service is deployed for the target object through service resources up to a target resource amount; determining an initial resource amount of service resources required by creating a target container group, wherein the target container group is used for deploying target services, the initial resource amount is less than or equal to the target resource amount, and the target container group at most allows the service resources of the target resource amount to be used; the method comprises the steps that a target container group is created by using service resources of an initial resource amount in a container resource pool, wherein target services are deployed on the target container group, the container resource pool comprises available service resources on a plurality of target hosts, and each target host allows for the creation of a plurality of container groups, so that the problem that the utilization rate of cloud service resources is low in a configuration mode of cloud services in the related art is solved, and the utilization rate of the service resources is improved.
As an alternative embodiment, the first determining unit 704 includes:
and the configuration module is used for configuring a target resource parameter for the target container group, wherein the target resource parameter is used for controlling the resource quantity of the service resource used by the target container group, and the initial resource quantity is determined according to the target resource parameter.
As an alternative embodiment, the configuration module comprises:
a first configuration submodule, configured to configure a first resource parameter for the target container group, where the first resource parameter is used to control a maximum resource amount of service resources used by the target container group, and the maximum resource amount is less than or equal to the target resource amount;
a second configuration submodule, configured to configure a second resource parameter for the target container group, where the second resource parameter is used to control a minimum resource amount of service resources used by the target container group, and the initial resource amount is greater than or equal to the minimum resource amount;
wherein the target resource parameter comprises a first resource parameter and a second resource parameter.
As an optional embodiment, the service deployment request carries a target time range, where the target time range is a preset use time of the target container group; the creating unit 706 includes:
and the creating module is used for creating a target container group by using the service resources on the first target host in the container resource pool according to the initial resource amount and the target time range, wherein the resource amount of the remaining available service resources on the first target host is greater than or equal to the initial resource amount, and the first target host does not create the container group with the preset use time overlapping with the target time range.
As an alternative embodiment, the apparatus further comprises:
and an adjusting unit, configured to, after a target container group is created using the service resources of the initial resource amount in the container resource pool, adjust, according to a load amount of the service load of the target service, a resource amount of the service resources used by the target container group in a process of processing, by the target container group, the service data associated with the target object and the target service, where the resource amount of the service resources used by the target container group is positively correlated with the load amount of the service load of the target service, and the resource amount of the service resources used by the target container group is less than or equal to the target resource amount.
As an alternative embodiment, the adjusting unit comprises:
a first adjusting module, configured to adjust a resource amount of a service resource used by a target container group to be greater than a resource amount of a service resource currently used by the target container group when a load amount of a service load of a target service is greater than or equal to a first load amount threshold and a resource amount of the service resource used by the target container group is less than the target resource amount;
and a second adjusting module, configured to adjust the resource amount of the service resource used by the target container group to be smaller than the resource amount of the service resource currently used by the target container group when a load amount of a service load of the target service is smaller than or equal to the first load amount threshold and a resource amount of the service resource used by the target container group is larger than a minimum resource amount allowed to be used by the target container group.
As an alternative embodiment, the apparatus further comprises:
a second determining unit, configured to, after creating a target container group using a service resource of an initial resource amount in the container resource pool, determine to adjust a resource amount of the service resource used by the target container group from a first resource amount to a second resource amount in a process of processing, by the target container group, business data associated with a target object and a target service, where the second resource amount is greater than the first resource amount;
and the migration unit is used for migrating the target container group to a second target host under the condition that the resource quantity of the remaining available service resources on the target host where the target container group is located is less than the difference value between the second resource quantity and the first resource quantity, wherein the resource quantity of the remaining available service resources on the second target host is greater than or equal to the second resource quantity.
It should be noted here that the modules described above are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the disclosure of the above embodiments. It should be noted that the modules described above as a part of the apparatus may be operated in a hardware environment as shown in fig. 1, and may be implemented by software, or may be implemented by hardware, where the hardware environment includes a network environment.
According to another aspect of the embodiments of the present application, there is also provided an electronic device for implementing the deployment method of the service, where the electronic device may be a server, a terminal, or a combination thereof.
Fig. 8 is a block diagram of an alternative electronic device according to an embodiment of the present application, as shown in fig. 8, including a processor 802, a communication interface 804, a memory 806, and a communication bus 808, where the processor 802, the communication interface 804, and the memory 806 are in communication with each other via the communication bus 808, where,
a memory 806 for storing a computer program;
the processor 802, when executing the computer program stored in the memory 806, performs the following steps:
s1, receiving a service deployment request sent by a target object, wherein the service deployment request is used for requesting that the target service is deployed for the target object through service resources up to the target resource amount;
s2, determining an initial resource amount of service resources required by creating a target container group, wherein the target container group is used for deploying target services, the initial resource amount is less than or equal to the target resource amount, and the target container group allows the service resources of the target resource amount to be used at most;
and S3, creating a target container group by using the service resources of the initial resource amount in the container resource pool, wherein the target container group is deployed with target services, the container resource pool comprises available service resources on a plurality of target hosts, and each target host is allowed to create a plurality of container groups.
Alternatively, in this embodiment, the communication bus may be a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 8, but this is not intended to represent only one bus or type of bus. The communication interface is used for communication between the electronic equipment and other equipment.
The memory may include RAM, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory. Alternatively, the memory may be at least one memory device located remotely from the processor.
As an example, the above-mentioned memory 806 may include, but is not limited to, the receiving unit 702, the first determining unit 704, and the creating unit 706 in the deploying apparatus including the above-mentioned service. In addition, other module units in the deployment apparatus of the above-mentioned service may also be included, but are not limited to this, and are not described in detail in this example.
The processor may be a general-purpose processor, and may include but is not limited to: CPU, NP (Network Processor), and the like; but also a DSP (Digital Signal Processing), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment is not described herein again.
It can be understood by those skilled in the art that the structure shown in fig. 8 is only an illustration, and the device implementing the service deployment method may also be a terminal device, and the terminal device may be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palmtop computer, a Mobile Internet Device (MID), a PAD, and the like. Fig. 8 is a diagram illustrating a structure of the electronic device. For example, the electronic device may also include more or fewer components (e.g., network interfaces, display devices, etc.) than shown in FIG. 8, or have a different configuration than shown in FIG. 8.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disk, ROM, RAM, magnetic or optical disk, and the like.
According to still another aspect of an embodiment of the present application, there is also provided a storage medium. Optionally, in this embodiment, the storage medium may be configured to execute a program code of a deployment method of any service in this embodiment of the present application.
Optionally, in this embodiment, the storage medium may be located on at least one of a plurality of network devices in a network shown in the above embodiment.
Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps:
s1, receiving a service deployment request sent by a target object, wherein the service deployment request is used for requesting that the target service is deployed for the target object through service resources up to the target resource amount;
s2, determining an initial resource amount of service resources required by creating a target container group, wherein the target container group is used for deploying target services, the initial resource amount is less than or equal to the target resource amount, and the target container group allows the service resources of the target resource amount to be used at most;
and S3, creating a target container group by using the service resources of the initial resource amount in the container resource pool, wherein the target container group is deployed with target services, the container resource pool comprises available service resources on a plurality of target hosts, and each target host is allowed to create a plurality of container groups.
Optionally, the specific example in this embodiment may refer to the example described in the above embodiment, which is not described again in this embodiment.
Optionally, in this embodiment, the storage medium may include, but is not limited to: various media capable of storing program codes, such as a U disk, a ROM, a RAM, a removable hard disk, a magnetic disk, or an optical disk.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a storage medium, and including instructions for causing one or more computer devices (which may be personal computers, servers, network devices, or the like) to execute all or part of the steps of the method described in the embodiments of the present application.
In the above embodiments of the present application, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, and may also be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution provided in the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or at least two units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The foregoing is only a preferred embodiment of the present application and it should be noted that those skilled in the art can make several improvements and modifications without departing from the principle of the present application, and these improvements and modifications should also be considered as the protection scope of the present application.

Claims (10)

1. A method for deploying a service, comprising:
receiving a service deployment request sent by a target object, wherein the service deployment request is used for requesting that a target service is deployed for the target object through service resources up to a target resource amount;
determining an initial resource amount of service resources required for creating a target container group, wherein the target container group is used for deploying the target service, the initial resource amount is smaller than or equal to the target resource amount, and the target container group at most allows the service resources of the target resource amount to be used;
and creating the target container group by using the service resources of the initial resource amount in a container resource pool, wherein the target service is deployed on the target container group, the container resource pool comprises available service resources on a plurality of target hosts, and each target host is allowed to create a plurality of container groups.
2. The method of claim 1, wherein determining an initial amount of resources of service resources required to create the target group of containers comprises:
configuring a target resource parameter for the target container group, wherein the target resource parameter is used for controlling the resource amount of the service resource used by the target container group, and the initial resource amount is determined according to the target resource parameter.
3. The method of claim 2, wherein configuring the target container group with target resource parameters comprises:
configuring a first resource parameter for the target container group, wherein the first resource parameter is used for controlling a maximum resource amount of service resources used by the target container group, and the maximum resource amount is smaller than or equal to the target resource amount;
configuring a second resource parameter for the target container group, wherein the second resource parameter is used for controlling a minimum resource amount of service resources used by the target container group, and the initial resource amount is greater than or equal to the minimum resource amount;
wherein the target resource parameter comprises the first resource parameter and the second resource parameter.
4. The method according to claim 1, wherein the service deployment request carries a target time range, and the target time range is a preset usage time of the target container group;
the creating the target container group using the service resource of the initial resource amount in the container resource pool comprises:
and according to the initial resource amount and the target time range, using the service resources on the first target host in the container resource pool to create the target container group, wherein the resource amount of the remaining available service resources on the first target host is greater than or equal to the initial resource amount, and the first target host does not create the container group with the preset use time overlapping with the target time range.
5. The method of claim 1, wherein after the creating the target group of containers using the service resource of the initial amount of resources in the container resource pool, the method further comprises:
in the process of processing the business data of the target object and the target service through the target container group, adjusting the resource amount of the service resources used by the target container group according to the load amount of the service load of the target service, wherein the resource amount of the service resources used by the target container group is positively correlated with the load amount of the service load of the target service, and the resource amount of the service resources used by the target container group is less than or equal to the target resource amount.
6. The method according to claim 5, wherein the adjusting the resource amount of the service resource used by the target container group according to the load amount of the service load of the target service comprises:
when the load capacity of the service load of the target service is greater than or equal to a first load capacity threshold and the resource amount of the service resource used by the target container group is less than the target resource amount, adjusting the resource amount of the service resource used by the target container group to be greater than the resource amount of the service resource currently used by the target container group;
and when the load capacity of the service load of the target service is less than or equal to a first load capacity threshold and the resource amount of the service resource used by the target container group is greater than the minimum resource amount allowed to be used by the target container group, adjusting the resource amount of the service resource used by the target container group to be less than the resource amount of the service resource currently used by the target container group.
7. The method according to any of claims 1 to 6, wherein after creating the target group of containers using the service resources of the initial amount of resources in the container resource pool, the method further comprises:
in the process of processing the business data of the target object and the target service through the target container group, determining to adjust the resource quantity of the service resource used by the target container group from a first resource quantity to a second resource quantity, wherein the second resource quantity is greater than the first resource quantity;
and migrating the target container group to a second target host under the condition that the resource quantity of the remaining available service resources on the target host where the target container group is located is less than the difference value between the second resource quantity and the first resource quantity, wherein the resource quantity of the remaining available service resources on the second target host is greater than or equal to the second resource quantity.
8. An apparatus for deploying a service, comprising:
the system comprises a receiving unit, a service deployment unit and a service deployment unit, wherein the receiving unit is used for receiving a service deployment request sent by a target object, and the service deployment request is used for requesting that a target service is deployed for the target object through service resources up to a target resource amount;
a first determining unit, configured to determine an initial resource amount of service resources required to create a target container group, where the target container group is used to deploy the target service, the initial resource amount is less than or equal to the target resource amount, and the target container group allows at most to use the service resources of the target resource amount;
a creating unit, configured to create the target container group using the service resource of the initial resource amount in a container resource pool, where the target container group is deployed with the target service, the container resource pool includes available service resources on a plurality of target hosts, and each target host allows creation of a plurality of container groups.
9. An electronic device comprising a processor, a communication interface, a memory and a communication bus, wherein said processor, said communication interface and said memory communicate with each other via said communication bus,
the memory for storing a computer program;
the processor for performing the method steps of any one of claims 1 to 7 by running the computer program stored on the memory.
10. A computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to carry out the method steps of any one of claims 1 to 7 when executed.
CN202110541989.7A 2021-05-18 2021-05-18 Service deployment method and device, electronic equipment and storage medium Active CN113254152B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110541989.7A CN113254152B (en) 2021-05-18 2021-05-18 Service deployment method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110541989.7A CN113254152B (en) 2021-05-18 2021-05-18 Service deployment method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113254152A true CN113254152A (en) 2021-08-13
CN113254152B CN113254152B (en) 2024-09-13

Family

ID=77182600

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110541989.7A Active CN113254152B (en) 2021-05-18 2021-05-18 Service deployment method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113254152B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180131723A1 (en) * 2016-11-10 2018-05-10 International Business Machines Corporation Security Policy Inclusion with Container Deployment
CN109040156A (en) * 2017-06-08 2018-12-18 中国移动通信集团浙江有限公司 A kind of soft load resource processing method and processing device based on container cloud
CN109791504A (en) * 2016-09-21 2019-05-21 埃森哲环球解决方案有限公司 For the dynamic BTS configuration of application container
CN112214330A (en) * 2020-11-04 2021-01-12 腾讯科技(深圳)有限公司 Method and device for deploying master nodes in cluster and computer-readable storage medium
US20210141655A1 (en) * 2019-11-13 2021-05-13 Vmware, Inc. Unified resource management for containers and virtual machines
CN112799854A (en) * 2021-04-15 2021-05-14 腾讯科技(深圳)有限公司 Task processing method and device, electronic equipment and readable storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109791504A (en) * 2016-09-21 2019-05-21 埃森哲环球解决方案有限公司 For the dynamic BTS configuration of application container
US20180131723A1 (en) * 2016-11-10 2018-05-10 International Business Machines Corporation Security Policy Inclusion with Container Deployment
CN109040156A (en) * 2017-06-08 2018-12-18 中国移动通信集团浙江有限公司 A kind of soft load resource processing method and processing device based on container cloud
US20210141655A1 (en) * 2019-11-13 2021-05-13 Vmware, Inc. Unified resource management for containers and virtual machines
CN112214330A (en) * 2020-11-04 2021-01-12 腾讯科技(深圳)有限公司 Method and device for deploying master nodes in cluster and computer-readable storage medium
CN112799854A (en) * 2021-04-15 2021-05-14 腾讯科技(深圳)有限公司 Task processing method and device, electronic equipment and readable storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
王少萍;顾乃杰;沈婕;: "基于云平台的高并发WebGIS服务", 计算机系统应用, no. 11, 15 November 2016 (2016-11-15) *
耿贞伟;权鹏宇;李少华;: "基于容器技术的电力系统业务应用资源池系统设计研究", 数字技术与应用, no. 01, 15 January 2017 (2017-01-15) *

Also Published As

Publication number Publication date
CN113254152B (en) 2024-09-13

Similar Documents

Publication Publication Date Title
US10834178B2 (en) Provisioning a bare-metal server
US8713147B2 (en) Matching a usage history to a new cloud
JP6609696B2 (en) Network service life cycle management method and device
US9645840B2 (en) User-defined pools
US20140297868A1 (en) Burst capacity for user-defined pools
US11064041B2 (en) Apparatus for providing cloud service using cloud service brokerage based on multiple clouds and method thereof
CN114244717B (en) Configuration method and device of virtual network card resources, computer equipment and medium
CN108462592A (en) Resource allocation methods based on SLA and NFVO
US10481921B2 (en) Cloud platform, application running method, and access network unit
CN109495584B (en) Internet of things equipment access method, device, equipment and medium
US10834220B2 (en) Apparatus for providing cloud brokerage service based on multiple clouds and method thereof
US11461147B2 (en) Liaison system and method for cloud computing environment
WO2013082742A1 (en) Resource scheduling method, device and system
CN105099997A (en) Virtual infrastructure-based multimedia desktop delivery method and system
CN111143023A (en) Resource changing method and device, equipment and storage medium
CN113260067B (en) Service bearing method, system and equipment of service level agreement SLA based on SD-WAN
US20240073111A1 (en) Cloud Service Deployment Method of Cloud Platform and Related Device
CN109660575B (en) Method and device for realizing NFV service deployment
CN113254152B (en) Service deployment method and device, electronic equipment and storage medium
US11017417B1 (en) Using incentives to manage computing resources
CN115695210A (en) Cloud server deployment method and device, electronic equipment and storage medium
CN115469961A (en) Method and device for creating container group, electronic equipment and storage medium
CN112015515B (en) Instantiation method and device of virtual network function
CN109257201B (en) License sending method and device
US11423377B1 (en) Lendable computing resources

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