WO2024164541A1 - 一种资源配置方法、系统及相关设备 - Google Patents

一种资源配置方法、系统及相关设备 Download PDF

Info

Publication number
WO2024164541A1
WO2024164541A1 PCT/CN2023/122003 CN2023122003W WO2024164541A1 WO 2024164541 A1 WO2024164541 A1 WO 2024164541A1 CN 2023122003 W CN2023122003 W CN 2023122003W WO 2024164541 A1 WO2024164541 A1 WO 2024164541A1
Authority
WO
WIPO (PCT)
Prior art keywords
cloud service
resource
batch
resources
traffic
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.)
Ceased
Application number
PCT/CN2023/122003
Other languages
English (en)
French (fr)
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.)
Huawei Cloud Computing Technologies Co Ltd
Original Assignee
Huawei Cloud Computing Technologies 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 Huawei Cloud Computing Technologies Co Ltd filed Critical Huawei Cloud Computing Technologies Co Ltd
Priority to EP23920733.5A priority Critical patent/EP4651469A4/en
Publication of WO2024164541A1 publication Critical patent/WO2024164541A1/zh
Priority to US19/291,925 priority patent/US20250358191A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/148Migration or transfer of sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0876Aspects of the degree of configuration automation
    • H04L41/0879Manual configuration through operator
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/5061Partitioning or combining of resources
    • G06F9/5072Grid computing
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/5061Partitioning or combining of resources
    • G06F9/5077Logical partitioning of resources; Management or configuration of virtualized resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/082Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0894Policy-based network configuration management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0895Configuration of virtualised networks or elements, e.g. virtualised network function or OpenFlow elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0896Bandwidth or capacity management, i.e. automatically increasing or decreasing capacities
    • H04L41/0897Bandwidth or capacity management, i.e. automatically increasing or decreasing capacities by horizontal or vertical scaling of resources, or by migrating entities, e.g. virtual resources or entities
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files

Definitions

  • the present application relates to the field of cloud computing technology, and in particular to a resource configuration method, system and related equipment.
  • K8S Kubernetes, or K8S for short, is an open source cluster system based on container technology.
  • Cloud services implemented based on K8S resources support final configuration for users (that is, the final configuration result is completely consistent with the configuration information provided by the user). Therefore, in cloud native scenarios, cloud services (such as cloud native microservices, etc.) and the resource collection allocated to the cloud service can usually be managed uniformly through final configuration.
  • the Terraform IaC system can only implement rolling upgrades of cloud services based on this method of updating resource configurations, that is, when an exception occurs after the cloud service completes the final configuration, the resource configuration of the cloud service is rolled back to the resource configuration before the update, and does not support other more advanced update methods to update the resource configuration of the cloud service.
  • the embodiment of the present application provides a resource configuration method to realize the updating of cloud service resource configuration by adopting a more advanced updating method such as grayscale upgrade or batch rolling upgrade.
  • the present application also provides a corresponding resource configuration system, a computing device cluster, a computer-readable storage medium and a computer program product.
  • the present application provides a resource configuration method, which can be executed by a corresponding resource configuration system to implement a high-level update method to update the resource configuration of a cloud service.
  • the resource configuration system obtains configuration information provided by a user, and the configuration information is used to describe a variety of cloud resources configured for a first cloud service, such as obtaining a final configuration information provided by a user, etc. Then, the resource configuration system creates a second cloud service based on the configuration information and the original resources allocated to the first cloud service.
  • the second cloud service shares environment-type resources with the second cloud service, and the workload-type resources of the second cloud service are isolated from the workload-type resources of the first cloud service, that is, the workload of the first cloud service and the workload of the second cloud service run independently of each other and do not affect each other, so that the resource configuration system migrates the traffic on the first cloud service to the second cloud service according to the target deployment strategy.
  • the target deployment strategy can be, for example, advanced deployment strategies such as grayscale deployment and batch rolling deployment.
  • the created second cloud service shares environment-type resources with the first cloud service and the workload-type resources of the two cloud services are isolated from each other, the first cloud service and the second cloud service can coexist during the process of updating the resource configuration of the cloud service. Therefore, based on the two coexisting cloud services, the traffic on the first cloud service can be migrated to the second cloud service by adopting grayscale deployment or batch rolling deployment, which means that more advanced update methods such as grayscale deployment or batch rolling deployment can be supported to update the resource configuration of the cloud service.
  • the resource configuration system may specifically split the configuration information first to obtain first configuration information for describing environment type resources and second configuration information for describing workload type resources. Then, the resource configuration system determines the first resource based on the first configuration information and the original resources allocated to the first cloud service. The first resource is an environment type resource described by the first configuration information and not included in the original resources. The resource configuration system also determines the second resource. The second resource is a workload type resource described by the second configuration information. Thus, the resource configuration system creates a second cloud service based on the original resources allocated to the first cloud service, the first resource, and the second resource.
  • the created second cloud service can share environment type resources with the first cloud service, and the workload type resources corresponding to the two cloud services are isolated from each other. This enables the first cloud service and the second cloud service to run simultaneously in the computing device cluster 100 , thereby establishing a foundation for implementing a high-level resource configuration method.
  • the environment type resources included in the first resource and the original resource are recorded in the same stack, and the workload type resources included in the second resource and the original resource are recorded in different stacks.
  • the created second cloud service can share the environment type resources in the same stack with the first cloud service, and the two cloud services are established based on the workload type resources in different stacks, so that the workloads of the first cloud service and the second cloud service can be isolated from each other.
  • the target deployment strategy includes a blue-green deployment strategy, a grayscale deployment strategy, or a batch rolling deployment strategy.
  • the resource configuration system can support the implementation of a variety of high-level resource deployment capabilities and realize a variety of complex resource change control processes.
  • the target deployment strategy is a grayscale deployment strategy
  • the resource configuration system when the target deployment strategy is a grayscale deployment strategy, it specifically divides the traffic on the first cloud service to obtain a first traffic slice and a second traffic slice, and migrates the first traffic slice to the second cloud service, so that when the first traffic slice passes the abnormality check on the second cloud service, the second traffic slice is migrated to the second cloud service.
  • the grayscale deployment of the cloud service can be achieved, and the security and smoothness of the cloud service upgrade/resource configuration update can be improved.
  • the target deployment strategy is specifically a batch rolling deployment strategy.
  • the resource configuration system performs traffic migration, it specifically first obtains the batch information provided by the user.
  • the allocation information is used to indicate the number of container groups reduced by the first cloud service and the number of container groups increased by the second cloud service in each batch.
  • the number of container groups included in the second cloud service when it is created is a preset value.
  • the resource configuration system reduces the number of container groups included in the first cloud service and increases the number of container groups included in the second cloud service in batches according to the batch information.
  • the traffic on the first cloud service can be gradually migrated to the second cloud service, that is, the traffic on the container groups in the first cloud service is migrated to the container groups in the second cloud service, thereby realizing batch rolling deployment of cloud services and improving the security and smoothness of cloud service upgrades/resource configuration updates.
  • the resource configuration system may first obtain the user's confirmation information for the target batch, where the target batch is one of the multiple batches indicated by the batch information, so that the resource configuration system reduces the number of container groups included in the first cloud service and increases the number of container groups included in the second cloud service in batches according to the allocation information and the confirmation information for the target batch.
  • the resource configuration system may reduce the number of container groups in the first cloud service corresponding to the next batch of the target batch and increase the number of container groups in the second cloud service corresponding to the next batch.
  • the first cloud service and the second cloud service are cloud services of different versions, so the resource configuration system can use a high-level resource deployment method to upgrade the cloud service version.
  • the first cloud service and the second cloud service are cloud services of the same version, so the resource configuration system can use a high-level resource deployment method to update the resource configuration of the cloud service.
  • the present application provides a resource configuration system, which includes: an interaction module, used to obtain configuration information provided by a user, wherein the configuration information is used to describe a variety of resources configured for a first cloud service; a creation module, used to create a second cloud service based on the configuration information and the original resources allocated to the first cloud service, wherein the second cloud service shares environment-type resources with the first cloud service, and workload-type resources of the second cloud service are isolated from workload-type resources of the first cloud service; and a traffic management module, used to migrate traffic on the first cloud service to the second cloud service according to a target deployment strategy.
  • an interaction module used to obtain configuration information provided by a user, wherein the configuration information is used to describe a variety of resources configured for a first cloud service
  • a creation module used to create a second cloud service based on the configuration information and the original resources allocated to the first cloud service, wherein the second cloud service shares environment-type resources with the first cloud service, and workload-type resources of the second cloud service are isolated from workload-type resources of the first
  • a creation module is used to: split the configuration information to obtain first configuration information for describing environment type resources and second configuration information for describing workload type resources; determine a first resource based on the first configuration information and the original resources allocated to the first cloud service, where the first resource is an environment type resource described by the first configuration information and not included in the original resources; determine a second resource, where the second resource is a workload type resource described by the second configuration information; and create a second cloud service based on the original resources allocated to the first cloud service, the first resource, and the second resource.
  • the environment type resources included in the first resource and the original resource are recorded in the same stack, and the workload type resources included in the second resource and the original resource are recorded in different stacks.
  • the target deployment strategy includes a blue-green deployment strategy, a grayscale deployment strategy, or a batch rolling deployment strategy.
  • the target deployment strategy is a grayscale deployment strategy
  • the traffic management module is used to: divide the traffic on the first cloud service to obtain a first traffic slice and a second traffic slice; migrate the first traffic slice to the second cloud service; when the first traffic slice passes the anomaly check on the second cloud service, migrate the second traffic slice to the second cloud service.
  • the target deployment strategy is a batch rolling deployment strategy
  • the traffic management module is used to: obtain the user's
  • the batch information provided is used to indicate the number of container groups reduced by the first cloud service and the number of container groups increased by the second cloud service in each batch, wherein the number of container groups included in the second cloud service when it is created is a preset value; according to the batch information, the number of container groups included in the first cloud service is reduced batch by batch, and the number of container groups included in the second cloud service is increased.
  • the traffic management module is used to: obtain confirmation information from a user for a target batch, where the target batch is one of multiple batches indicated by the batch information; and reduce the number of container groups included in the first cloud service and increase the number of container groups included in the second cloud service batch by batch based on the batch information and the confirmation information.
  • the first cloud service and the second cloud service are cloud services of different versions; or, the first cloud service and the second cloud service are cloud services of the same version.
  • the resource configuration system provided in the second aspect corresponds to the resource configuration method provided in the first aspect. Therefore, the technical effects of the second aspect and any implementation method of the second aspect can refer to the technical effects of the first aspect or the corresponding implementation method of the first aspect.
  • the present application provides a computing device, comprising: a processor and a memory; wherein the processor is used to execute instructions stored in the memory so that the computing device executes the resource configuration method in the above-mentioned first aspect or any possible implementation of the first aspect.
  • the present application provides a computing device cluster, wherein the computing device includes at least one computing device, and the at least one computing device includes at least one processor and at least one memory; the at least one memory is used to store instructions, and the at least one processor executes the instructions stored in the at least one memory, so that the computing device cluster executes the resource configuration method in the above-mentioned first aspect or any possible implementation of the first aspect.
  • the memory can be integrated into the processor or can be independent of the processor.
  • the at least one computing device may also include a bus.
  • the processor is connected to the memory via a bus.
  • the memory may include a readable memory and a random access memory.
  • the present application provides a computer-readable storage medium, which stores instructions.
  • the computer-readable storage medium is executed on at least one computing device, the at least one computing device executes the resource configuration method in the above-mentioned first aspect or any possible implementation of the first aspect.
  • the present application provides a computer program product comprising instructions, which, when executed on at least one computing device, enables the at least one computing device to execute the resource configuration method in the above-mentioned first aspect or any possible implementation of the first aspect.
  • FIG1 is a schematic diagram of an exemplary application scenario provided by the present application.
  • FIG2 is a schematic diagram of a flow chart of a resource configuration method provided by the present application.
  • FIG3 is a schematic diagram of an exemplary interactive interface provided by the present application.
  • FIG4 is a schematic diagram of configuration resources provided by the present application.
  • FIG5 is a schematic diagram of migrating traffic on a first cloud service based on a grayscale deployment strategy provided by the present application
  • the resource configuration system 200 directly performs a final state modification on the K8S resources that can be allocated to the cloud service according to the final state configuration defined by the user 302, the resource configuration system 200 usually directly creates a new version of the cloud service in the computing device cluster 100 and deletes the old version of the cloud service, thereby realizing the version update and resource configuration update of the cloud service.
  • the new version of the cloud service and the old version of the cloud service will not coexist in the computing device cluster 100, which makes the resource configuration system 200 only able to implement rolling upgrades of the cloud service, and does not support upgrade methods that modify the resource configuration of the cloud service multiple times during one upgrade process, such as grayscale upgrades, batch rolling upgrades, etc., thereby limiting the upgrade method of the cloud service and reducing the user experience.
  • the creation module 202 is used to create a second cloud service (such as a new version of a cloud service) based on the configuration information and the original resources allocated to the first cloud service, the second cloud service sharing the resources of the environment type with the first cloud service, and the resources of the workload type of the second cloud service being isolated from the resources of the workload type of the first cloud service, and then instruct the traffic management module 203 that the creation of the second cloud service is complete.
  • the traffic management module 203 is used to migrate the traffic on the first cloud service to the second cloud service according to the target deployment strategy, so as to update the resource configuration of the cloud service, so that the second cloud service after the resource configuration is updated can continue to provide services.
  • the resource configuration system 200 When the resource configuration system 200 is deployed independently of the computing device cluster 100, the resource configuration system 200 can be connected to multiple computing device clusters 100 at the same time. In this way, based on a set of resource configuration systems, the update process of resource configuration of cloud services for multiple computing device clusters 100 can be implemented, without the need to set up a separate resource configuration system 200 in each computing device cluster 100 to manage the resource configuration of cloud services.
  • the source configuration process can not only reduce the overall resource consumption and reduce the complexity of operation and maintenance management, but also avoid the resource occupation of the computing device cluster 100 and reduce the performance impact on the computing device cluster 100.
  • the resource configuration system 200 shown in FIG. 1 is only used as an implementation example.
  • the resource configuration system 200 may also include more modules with other functions; or, the functional division of each module in the resource configuration system 200 is not limited to the example shown in FIG. 1, such as merging multiple modules in the resource configuration system 200 into one module, or splitting the creation module 202, the traffic management module 203, etc. in the resource configuration system 200 into multiple modules, etc., and this embodiment does not limit the specific structure of the resource configuration system 200 to the example shown in FIG. 1.
  • the resource configuration system 200 may also be deployed inside the computing device cluster 100, so that the resource configuration system 200 can manage the update process of the resource configuration of the cloud service for the computing device cluster 100 alone.
  • the computing device cluster 100 may also be replaced by other types of clusters, etc.
  • the resource configuration system 200 may be deployed in the cloud to update the resource configuration of the cloud service for the user 302.
  • the resource configuration system 200 may be implemented by a computing device or a computing device cluster in the cloud.
  • the resource configuration system 200 may be deployed on the user side, so that the resource configuration of the cloud service can be updated for the user 302 on the user side.
  • each functional module in the resource configuration system 200 may be implemented by software or hardware.
  • VPC virtual private cloud
  • multiple hosts/virtual machines/containers used to run the code can be distributed in the same virtual private cloud (VPC) or in multiple VPCs.
  • VPC virtual private cloud
  • a VPC is set up in a region.
  • a communication gateway needs to be set up in each VPC to achieve interconnection between VPCs through the communication gateway.
  • Each functional module in the resource configuration system 200 is taken as an example of a hardware functional unit.
  • the resource configuration system 200 may include at least one computing device, such as a server, etc.
  • Each functional module in the resource configuration system 200 may be implemented by one or more computing devices.
  • each functional module in the resource configuration system 200 may also be implemented by a device implemented by an application-specific integrated circuit (ASIC) or a programmable logic device (PLD).
  • ASIC application-specific integrated circuit
  • PLD programmable logic device
  • the above-mentioned PLD may be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), a data processing unit (DPU), an artificial intelligence (AI) chip or any combination thereof.
  • CPLD complex programmable logical device
  • FPGA field-programmable gate array
  • GAL generic array logic
  • DPU data processing unit
  • AI artificial intelligence
  • the multiple computing devices included in the resource configuration system 200 can be distributed in the same region or in different regions.
  • the multiple computing devices included in the resource configuration system 200 can be distributed in the same AZ or in different AZs.
  • the multiple computing devices included in the resource configuration system 200 can be distributed in the same VPC or in multiple VPCs.
  • the multiple computing devices included in the resource configuration system 200 can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.
  • Figure 2 is a schematic diagram of a flow chart of a resource configuration method in an embodiment of the present application.
  • the method can be applied to the application scenario shown in Figure 1 above, or can also be applied to other applicable application scenarios.
  • the following is an example of applying to the application scenario shown in Figure 1.
  • the resource configuration method shown in FIG2 may specifically include:
  • the interaction module 201 obtains configuration information provided by the user 302, where the configuration information is used to describe various resources configured for the first cloud service.
  • user 302 may need to upgrade the cloud service provided by computing device cluster 100 and The cloud service resources will be reconfigured when the new version of the cloud service is updated, such as changing the communication protocol used by the new version of the cloud service from communication protocol A to communication protocol B (communication protocol A is the communication protocol used by the old version of the cloud service).
  • communication protocol A is the communication protocol used by the old version of the cloud service.
  • user 302 may need to improve the performance of the cloud service.
  • resources can be added (or modified) based on the original resource configuration of the cloud service, such as adding multiple processes to the cloud service to improve the response speed of the cloud service.
  • the client 301 provided by the resource configuration system 200 can present an interactive interface to the user 302, for example, it can be the interactive interface shown in FIG3, on which the identifiers of multiple cloud services run by the computing device cluster 100 are displayed, so that the user 302 can select at least one cloud service from the multiple cloud services to update its resource configuration. It is assumed that the user 302 chooses to update the resource configuration of the first cloud service among the multiple cloud services.
  • the user can further configure the resources of the first cloud service in the interactive interface shown in FIG3, such as configuring the resources of the deployment type, the resources of the task type, the resources of the scheduled task type, the resources of the configuration mapping type, etc. corresponding to the first cloud service.
  • the client 301 generates configuration information for the first cloud service according to the configuration operation performed by the user 302, and the configuration information is used to describe the multiple resources configured by the user 302 for the first cloud service, as shown in FIG4. Then, the client 301 can send the generated configuration information to the interaction module 201.
  • user 302 may also pre-write a configuration file for the first cloud service, in which the information used to describe various resources configured for the first cloud service is defined, so that user 302 can upload the configuration file on client 301, and client 301 forwards the configuration file to interaction module 201.
  • the interaction module 201 may provide the configuration information (or configuration file) to the creation module 202 .
  • the creation module 202 creates a second cloud service according to the configuration information and the original resources allocated to the first cloud service.
  • the second cloud service shares environment type resources with the first cloud service, and the workload type resources of the second cloud service are isolated from the workload type resources of the first cloud service.
  • the creation module 202 can create two cloud services in the computing device cluster 100, one of which is a first cloud service before the resource configuration is updated, and the other is a second cloud service after the resource configuration is updated.
  • the first cloud service and the second cloud service can be cloud services of different versions of the same type in an upgrade scenario; or, the first cloud service and the second cloud service can be cloud services of the same version (with different configurations) in an operation and maintenance scenario, or can be cloud services of different types, etc.
  • the two cloud services can coexist in the computing device cluster 100.
  • the creation module 202 can create a second cloud service based on the environment type resources included in the original resources allocated to the first cloud service.
  • the first cloud service and the second cloud service can share the environment type resources.
  • the workload type resources allocated to the first cloud service and the second cloud service are isolated from each other, so that both the first cloud service and the second cloud service can operate normally.
  • the creation module 202 may split the configuration information according to the resource type to obtain first configuration information for describing environment type resources and second configuration information for describing workload type resources.
  • environment type resources may include, for example, PVC storage, service/ingress network configuration, RBAC authentication and other types of resources that the workload depends on, as shown in FIG4.
  • Workload type resources may include, for example, deployment, job, cron job, configuration map, encryption and other types of resources, as shown in FIG4.
  • workload refers to an application running on a computing device cluster 100 (such as kubernetes, etc.).
  • the creation module 202 obtains the original resources allocated to the first cloud service from the computing device cluster 100 or the local cache, and determines the first resource based on the first configuration information and the original resources, and the first resource is the environment type resource described by the first configuration information but not included in the original resource. For example, assuming that the original resources allocated to the first cloud service include port a and port b, and the resources configured for the second cloud service to be created include port b and port c, then the creation module 202 can determine that the first resource is port c not included in the original resource by comparing the first configuration information and the original resources. In this way, the environment type resources included in the first resource and the original resources corresponding to the first cloud service can meet the requirements of the second cloud service to be created for the environment type resources. Generally, the original resources allocated to the first cloud service include environment type resources and workload type resources, and the workload type resources are used to support the operation of the workload included in the first cloud service.
  • the creation module 202 further determines a second resource based on the second configuration information.
  • the second resource is a workload type resource described in the second configuration information.
  • the second resource is isolated from the workload type resource in the original resource so that the workload included in the first cloud service and the workload included in the second cloud service to be generated can run independently of each other.
  • the original resources allocated to the first cloud service include process set a
  • the process set a includes process 1, process 2, and process 3.
  • These three processes belong to workload type resources
  • the creation module 202 can schedule the second resource for the second cloud service.
  • the second resource can be process set b.
  • the process set b It includes process 4, process 5 and process 6, and the process set a of the first cloud service and the process set b of the second cloud service can run independently of each other.
  • the creation module 202 can create a second cloud service based on the original resources allocated to the first cloud service (specifically, the environment type resources included in the original resources), the first resources and the second resources. At this time, the created second cloud service shares the environment type resources with the first cloud service, and the workload type resources corresponding to the two cloud services are isolated from each other. In this way, the first cloud service and the second cloud service can run simultaneously in the computing device cluster 100.
  • the first cloud service can be configured with two resource stacks, namely resource stack 1 and resource stack 2, wherein resource stack 1 is used to record the environment type resources in the original resources, and resource stack 2 is used to record the workload type resources in the original resources, as shown in FIG4.
  • using the resource stack to record resources can specifically refer to using the resource stack to store the identifier corresponding to the resource (such as the identifier of the environment type resource and the identifier of the workload type resource).
  • resource stack 1 and resource stack 2 can be created by the resource configuration system 200 when creating the first cloud service, and the first cloud service is associated with the two resource stacks.
  • the creation module 202 can use the resource stack 1 associated with the first cloud service to record the determined first resource in the process of updating the resource configuration for the first cloud service. In this way, based on the original resources currently allocated to the first cloud service and the environment type resources recorded in the resource stack 1, the requirements of the second cloud service to be created for the environment type resources can be supported.
  • the creation module 202 can also create a resource stack 3 for the second cloud service to be created, and the resource stack 3 is isolated from the resource stack 2. After determining the second resource, the creation module 202 can record the second resource using the newly created resource stack 3, as shown in FIG4. In this way, the workload type resources recorded in the newly created resource stack 3 can support the requirements of the second cloud service to be created for the workload type resources.
  • the creation module 202 can generate an execution plan for configuring the environment type resources for the second cloud service based on the environment type resources recorded in the resource stack 1, the environment type resources currently configured for the first cloud service, and the dependencies between different environment type resources, for example, the execution plan 1 in the form of a directed acyclic graph (DAG), so that the environment type resources can be configured for the second cloud service according to the execution plan 1, for example, the created resources can be allocated to the second cloud service according to the execution plan 1, or new resources can be created for the second cloud service according to the execution plan 1.
  • DAG directed acyclic graph
  • the creation module 202 can generate an execution plan 2 for configuring the workload type resources for the second cloud service based on the workload type resources recorded in the resource stack 3 and the dependencies between different workload type resources, so that the workload type resources can be configured for the second cloud service according to the execution plan 2. Furthermore, the creation module 202 may create a second cloud service according to the configured environment type resources and workload type resources.
  • the multiple resources described by the configuration information provided by the user 302 may have strong dependencies, which makes it difficult for the workload of the second cloud service created by the creation module 202 to meet the isolation characteristics of the workload of the first cloud service; or, the environment type resources described in the configuration information are based on the environment type resources allocated to the first cloud service. The resources are deleted or modified, etc., which causes the first cloud service to be unable to coexist with the second cloud service due to the change of the environment type resources.
  • the creation module 202 can verify whether the configuration information meets the preset deployment conditions, such as verifying whether the reference relationship between the multiple resources described in the configuration information meets the deployment conditions, and verifying whether the environment type information described in the configuration information is incrementally configured based on the environment type resources of the first cloud service.
  • the creation module 202 creates a second cloud service that coexists with the first cloud service based on the configuration information.
  • the creation module 202 may stop the process of updating the resource configuration of the cloud service, and may send a configuration error warning to the user 302 through the client 301 .
  • the traffic management module 203 migrates the traffic on the first cloud service to the second cloud service according to the target deployment strategy.
  • the target deployment strategy used by the management module 203 in the process of migrating the traffic running on the first cloud service traffic to the second cloud service can be, for example, a blue-green deployment strategy, a grayscale deployment strategy, or a high-level deployment strategy such as batch rolling deployment (relative to the rolling deployment strategy), as shown in FIG4.
  • the traffic management module 203 can gradually migrate the traffic on the first cloud service to the second cloud service according to the set ratio, and specifically can migrate the traffic to the workload included in the second cloud service.
  • the traffic management module 203 can reduce the container groups (pods) included in the first cloud service in batches according to the batch information defined by the user, and create a corresponding number of container groups for the second cloud service, so as to gradually migrate the traffic on the first cloud service to the corresponding container groups in the second cloud service.
  • the resource configuration system 200 can support a deployment method that can modify the resource configuration of the cloud service multiple times during a final configuration process, thereby getting rid of the limitations of the resource deployment method of the cloud service and improving the user experience.
  • the resource configuration system 200 can also support blue-green deployment strategies, rolling Other deployment methods such as automatic deployment strategies can be used to increase the diversity of deployment methods supported by the resource configuration system 200.
  • the first cloud service and the second cloud service coexist in the computing device cluster 100, during the process of updating the resource configuration of the cloud service, the first cloud service and the second cloud service can collaborate to continuously provide cloud services, thereby achieving resource configuration updates for the cloud service without interrupting the cloud service.
  • the traffic management module 203 migrates the traffic on the first cloud service to the second cloud service based on the grayscale deployment strategy and the batch rolling deployment strategy in conjunction with the accompanying drawings.
  • the traffic migration process may specifically include:
  • the traffic management module 203 divides the traffic on the first cloud service to obtain multiple traffic slices.
  • Each traffic slice is part of the traffic on the first cloud service, for example, it may be the traffic of some types of services, or it may be the traffic of some users, etc.
  • the traffic management module 203 migrates a first traffic slice among multiple traffic slices to a second cloud service.
  • the creation module 202 when creating the second cloud service, can simultaneously allocate multiple container groups to the second cloud service (the number of container groups is determined according to the configuration information provided by the user 302). In this way, the traffic management module 203 can directly migrate each traffic slice on the first cloud service to the corresponding container group in the second cloud service, and the container group processes the traffic slice.
  • the traffic management module 203 checks whether the first traffic slice carried by the second cloud service is abnormal, and verifies whether the second cloud service operates normally when carrying the first traffic slice.
  • the traffic management module 203 deletes the workload in the first cloud service (and the workload type resources in the first cloud service).
  • the traffic management module 203 deletes the workload in the second cloud service (and the workload type resources in the second cloud service).
  • the traffic management module 203 rolls back the environment type resources configured for the second cloud service, that is, rolls back the environment type resources to the resource configuration corresponding to the first cloud service.
  • the traffic management module 203 After migrating part of the traffic (i.e., the first traffic slice) on the first cloud service to the second cloud service, the traffic management module 203 will check whether there is any abnormality in the part of the traffic on the second cloud service, such as whether there is traffic congestion, excessive traffic processing delay, and other abnormalities. At the same time, the traffic management module 203 will also check whether the second cloud service has any operational abnormalities in the process of carrying the part of the traffic, such as whether there is an operational error, whether there is an alarm of insufficient resources, and other abnormalities.
  • the traffic management module 203 can continue to migrate the next portion of traffic on the first cloud service (i.e., the second traffic slice) to the second cloud service, and check whether there is an abnormality when the second cloud service continues to carry the second traffic slice. If there is still no abnormality, the traffic management module 203 can migrate the traffic on the first cloud service to the second cloud service according to the above process. The remaining traffic of each part is migrated to the second cloud service in turn until all traffic on the first cloud service is migrated to the second cloud service, thereby achieving (version upgrade and) resource configuration update of the cloud service.
  • the traffic management module 203 can continue to migrate the next portion of traffic on the first cloud service (i.e., the second traffic slice) to the second cloud service, and check whether there is an abnormality when the second cloud service continues to carry the second traffic slice. If there is still no abnormality, the traffic management module 203 can migrate the traffic on the first cloud service to the second cloud service according to the above process. The remaining traffic of each part is migrated to the second cloud service in turn until all
  • the traffic management module 203 can delete the workload in the first cloud service, and delete the workload type resources occupied by the workload at the same time, so as to release the resources in the computing device cluster 100 and avoid resource waste as much as possible.
  • the traffic management module 203 can also notify the user 302 through the client 301 that the resource configuration update for the cloud service is successful.
  • the traffic management module 203 can roll back all the traffic on the second cloud service to the first cloud service to ensure that the cloud service provided by the computing device cluster 100 is not interrupted and avoid affecting the business of the user 302. Furthermore, the traffic management module 203 can delete the workload of the second cloud service, and delete the workload type resources in the second cloud service at the same time, and roll back the environment type resources configured for the second cloud service, so as to release the resources in the computing device cluster 100 and avoid resource waste as much as possible. In actual application, the traffic management module 203 can also notify the user 302 through the client 301 that the resource configuration update for the cloud service has failed.
  • the grayscale deployment method supported by the traffic management module 203 realizes more flexible and configurable traffic migration control compared to the native rolling deployment of the computing device cluster 100, and has the ability to roll back quickly, thereby improving the efficiency and security of changes to resource configurations for cloud services.
  • the traffic migration process may specifically include:
  • the traffic management module 203 obtains the batch information provided by the user 302 and the target batch specified by the user 302 that requires manual confirmation.
  • the batch information is used to indicate the number of container groups reduced by the first cloud service and the number of container groups increased by the second cloud service in each batch, wherein the number of container groups included in the second cloud service when it is created is a preset value.
  • the client 301 can present a configuration interface for the target deployment strategy to the user 302, for example, it can be a configuration interface as shown in FIG8, and the configuration interface can present multiple deployment strategies such as grayscale deployment strategy, blue-green deployment strategy, rolling deployment strategy, batch rolling deployment strategy supported by the resource configuration system 200, so that the user 302 can select the batch rolling deployment strategy on the configuration interface.
  • the user 302 can further configure the batch logic for the first cloud service on the configuration interface, including the total number of batches divided by the number of container groups included in the first cloud service, and the number of container groups required to be reduced in the first cloud service and the number of container groups required to be increased in the second cloud service in each batch, as shown in FIG8.
  • the traffic on the first cloud service is carried by the container group in the first cloud service. Therefore, in each batch of traffic migration, when some container groups in the first cloud service are deleted and a container group is created for the second cloud service, the traffic carried by the deleted container group in the first cloud service will be migrated to the container group created in the second cloud service.
  • the user 302 can also set the target batches (which can be part or all of the batches) that need to be manually confirmed, as shown in Figure 8.
  • the user 302 (or the operation and maintenance personnel) needs to manually confirm the traffic migration result of the target batch, and only after obtaining manual confirmation will the next batch of traffic be migrated.
  • the interaction module 201 can obtain the batch information provided by the user 302 and the target batch specified by the user 302 in advance, such as obtaining the batch information provided by the user 302 and the specified target batch before obtaining the configuration information provided by the user 302; or the user 302 can input the configuration information, batch information and target batch on the same interaction interface, which is not limited in this embodiment. Then, the interaction module 201 provides the batch information and the target batch to the traffic management module 203.
  • the second cloud service created by the creation module 202 based on the configuration information may include a preset number of container groups.
  • the preset number may be 0, i.e., a second cloud service with an empty workload is created; or the preset number may be other values, which are not limited.
  • step S702 The traffic management module 203 determines a batch to be processed that has not undergone traffic migration from multiple batches. If there is no batch that has not undergone traffic migration, step S711 is directly executed.
  • the batch to be processed refers to the batch currently selected for traffic migration.
  • the traffic management module 203 can continue to select a batch from the remaining batches that have not completed traffic migration as a batch to be processed, and start executing step S703 and subsequent steps.
  • the traffic management module 203 determines the batch information corresponding to the batch to be processed.
  • the traffic management module 203 deletes a first number of container groups in the first cloud service according to the batch information corresponding to the batch to be processed. A second number of container groups are created in the second cloud service.
  • step S705 The traffic management module 203 determines whether the batch to be processed is a target batch that requires manual confirmation. If so, step S706 is executed; if not, step S702 is executed.
  • the traffic management module 203 obtains confirmation information from the user 302 for the batch to be processed.
  • the traffic management module 203 can present a confirmation interface to the user 301 through the client 301, and present the operation data of the second cloud service processing the traffic of the batch to be processed on the confirmation interface.
  • the user 302 can analyze and judge whether there is an abnormality when the second cloud service carries the traffic of the batch to be processed based on the presented operation data, and input the confirmation information for the target batch on the confirmation interface, and finally the client 301 provides the confirmation information to the traffic management module 203.
  • the traffic management module 203 determines whether there is an abnormality in the batch to be processed based on the confirmation information. If not, it returns to execute step S702; if so, it executes step S708.
  • S708 The traffic management module 203 rolls back the number of container groups in the first cloud service to the number before the change.
  • the traffic management module 203 deletes the workload in the second cloud service (and the workload type resources in the second cloud service).
  • the traffic management module 203 rolls back the environment type resources configured for the second cloud service, that is, rolls back the environment type resources to the resource configuration corresponding to the first cloud service.
  • the traffic management module 203 deletes the workload in the first cloud service and ends the process.
  • the traffic management module 203 can complete the migration of traffic on the first cloud service to the second cloud service in combination with the manual confirmation information of the user 302 for some or all batches, or roll back when an abnormality occurs in the traffic migration of some batches.
  • it compared with the native rolling deployment of the computing device cluster 100, it has stronger planability before change and control capability during change, that is, the number of batches, the number of container groups involved in each batch, and the timing of manual intervention can be planned in advance.
  • planability before change and control capability during change that is, the number of batches, the number of container groups involved in each batch, and the timing of manual intervention can be planned in advance.
  • it can be paused and manually confirmed at any time to ensure the controllability and security of the resource configuration change.
  • the traffic management module 203 may not need to perform a manual confirmation process when migrating traffic from the first cloud service to the second cloud service in batches, that is, the traffic management module 203 may automatically migrate multiple batches of traffic from the first cloud service to the second cloud service.
  • the resource configuration system (including the above-mentioned interaction module 201, creation module 202, and traffic management module 203) involved in the resource configuration process can be software configured on a computing device or a computing device cluster, and by running the software on the computing device or computing device cluster, the computing device or computing device cluster can realize the functions of the above-mentioned resource configuration system 200.
  • the resource configuration system 200 involved in the resource configuration process is introduced in detail.
  • Figure 9 shows a structural diagram of a computing device, on which the resource configuration system 200 can be deployed.
  • the computing device can be a computing device in a cloud environment (such as a server), or a computing device in an edge environment, or a terminal device, etc., which can be specifically used to implement the functions of the interaction module 201, the creation module 202, and the traffic management module 203 in the embodiments shown in Figures 2, 5 and 7.
  • the computing device 900 includes a processor 910, a memory 920, a communication interface 930, and a bus 940.
  • the processor 910, the memory 920, and the communication interface 930 communicate with each other through the bus 940.
  • the bus 940 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc.
  • the bus may be divided into an address bus, a data bus, a control bus, etc.
  • FIG9 is represented by only one thick line, but it does not mean that there is only one bus or one type of bus.
  • the communication interface 930 is used to communicate with the outside, such as receiving configuration information and batch information provided by the user.
  • the processor 910 can be a central processing unit (CPU), an application specific integrated circuit (ASIC), a graphics processing unit (GPU) or one or more integrated circuits.
  • the processor 910 can also be an integrated circuit chip with signal processing capabilities.
  • the functions of each module in the resource configuration system 200 can be completed by the hardware integrated logic circuit in the processor 910 or the instructions in the form of software.
  • the processor 910 can also be a general processor, a digital signal process (DSP), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, and can implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of the present application.
  • DSP digital signal process
  • FPGA field programmable gate array
  • the general processor can be a microprocessor or the processor can also be any conventional processor, etc., and the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor for execution, or it can be executed by a combination of hardware and software modules in the decoding processor.
  • the software module can be located in a random access memory, a flash memory, a read-only storage
  • the processor 910 reads the information in the memory 920 and completes part or all of the functions in the resource configuration system 200 in combination with its hardware.
  • the memory 920 may include a volatile memory, such as a random access memory (RAM).
  • the memory 920 may also include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a HDD, or a SSD.
  • the memory 920 stores executable codes, and the processor 910 executes the executable codes to execute the method executed by the aforementioned resource configuration system 200 (specifically, each module in the resource configuration system 200).
  • FIG10 is a schematic diagram of the structure of a computing device cluster.
  • the computing device cluster 10 shown in FIG10 includes multiple computing devices, and the resource configuration system 200 can be distributedly deployed on multiple computing devices in the computing device cluster 10.
  • the computing device cluster 10 includes multiple computing devices 1000, each computing device 1000 includes a memory 1020, a processor 1010, a communication interface 1030 and a bus 1040, wherein the memory 1020, the processor 1010, and the communication interface 1030 are connected to each other through the bus 1040.
  • the processor 1010 may be a CPU, a GPU, an ASIC, or one or more integrated circuits.
  • the processor 1010 may also be an integrated circuit chip with signal processing capabilities. In the implementation process, some functions of the resource configuration system 200 may be completed by hardware integrated logic circuits or software instructions in the processor 1010.
  • the processor 1010 may also be a DSP, an FPGA, a general-purpose processor, other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and may implement or execute some of the methods, steps, and logic block diagrams disclosed in the embodiments of the present application.
  • the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc., and the steps of the method disclosed in the embodiments of the present application may be directly embodied as a hardware decoding processor for execution, or may be executed by a combination of hardware and software modules in the decoding processor.
  • the software module may be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc.
  • the storage medium is located in the memory 1020.
  • the processor 1010 reads the information in the memory 1020 and can complete part of the functions of the resource configuration system 200 in combination with its hardware.
  • the memory 1020 may include ROM, RAM, static storage device, dynamic storage device, hard disk (such as SSD, HDD), etc.
  • the memory 1020 may store program codes, for example, part or all of the program codes for implementing the interaction module 201, part or all of the program codes for implementing the creation module 202, part or all of the program codes for implementing the traffic management module 203, etc.
  • the processor 1010 executes part of the method executed by the resource configuration system 200 based on the communication interface 1030, such as a part of the computing devices 1000 may be used to execute the methods executed by the above-mentioned interaction module 201 and creation module 202, and another part of the computing devices 1000 is used to execute the method executed by the above-mentioned traffic management module 203.
  • the memory 1020 may also store data, for example: intermediate data or result data generated by the processor 1010 during the execution process, for example, the above-mentioned first configuration information, second configuration information, etc.
  • the communication interface 1003 in each computing device 1000 is used for external communication, such as interacting with other computing devices 1000 .
  • the bus 1040 may be a peripheral component interconnect standard bus or an extended industry standard architecture bus, etc.
  • the bus 1040 in each computing device 1000 in FIG. 10 is represented by only one thick line, but this does not mean that there is only one bus or one type of bus.
  • Any computing device can be a computing device in a cloud environment (eg, a server), or a computing device in an edge environment, or a terminal device.
  • an embodiment of the present application also provides a computer-readable storage medium, which stores instructions.
  • the computer-readable storage medium When the computer-readable storage medium is run on one or more computing devices, the one or more computing devices execute the methods executed by the various modules in the resource configuration system 200 of the above embodiment.
  • the present application also provides a computer program product, wherein the computer program product is executed by one or more computing devices. When executed, the one or more computing devices execute any of the aforementioned resource configuration methods.
  • the computer program product may be a software installation package, and when any of the aforementioned resource configuration methods is needed, the computer program product may be downloaded and executed on a computer.
  • the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment.
  • the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines.
  • the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer floppy disk, a U disk, a mobile hard disk, a ROM, a RAM, a disk or an optical disk, etc., including a number of instructions to enable a computer device (which can be a personal computer, a training device, or a network device, etc.) to execute the methods described in each embodiment of the present application.
  • a computer device which can be a personal computer, a training device, or a network device, etc.
  • all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof.
  • all or part of the embodiments may be implemented in the form of a computer program product.
  • the computer program product includes one or more computer instructions.
  • the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
  • the computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium.
  • the computer instructions may be transmitted from a website site, a computer, a training device, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, training device, or data center.
  • the computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integrations.
  • the available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)), etc.
  • a magnetic medium e.g., a floppy disk, a hard disk, a tape
  • an optical medium e.g., a DVD
  • a semiconductor medium e.g., a solid-state drive (SSD)

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Automation & Control Theory (AREA)
  • Stored Programmes (AREA)

Abstract

本申请提供了一种资源配置方法,包括:获取用户提供的配置信息,该配置信息用于描述针对第一云服务所配置的多种云资源,并根据配置信息以及第一云服务所分配到的原始资源,创建第二云服务,该第二云服务与第二云服务共享环境类型的资源,该第二云服务的工作负载类型的资源与第一云服务的工作负载类型的资源相互隔离,从而根据目标部署策略,将第一云服务上的流量迁移至第二云服务。由于第二云服务与第一云服务共享环境类型的资源,同时工作负载类型的资源相互隔离,这使得第一云服务与第二云服务能够共存,从而能够实现采用灰度部署/分批滚动部署等高阶更新方式对云服务进行资源配置更新。此外,本申请还提供了对应的资源配置系统及相关设备。

Description

一种资源配置方法、系统及相关设备
本申请要求于2023年02月07日提交国家知识产权局、申请号为202310080442.0、发明名称为“一种资源配置方法、装置及相关设备”的中国专利申请的优先权,并要求于2023年06月02日提交国家知识产权局、申请号为202310651407.X、发明名称为“一种资源配置方法、系统及相关设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及云计算技术领域,尤其涉及一种资源配置方法、系统及相关设备。
背景技术
Kubernetes,简称K8S,是一个开源的、基于容器技术的集群系统。基于K8S资源所实现的云服务,支持面向用户进行终态配置(即最终的配置结果与用户提供的配置信息完全一致)。因此,在云原生场景下,通常可以通过终态配置的方式去统一管理云服务(如云原生微服务等)以及该云服务所分配到的资源集合。
目前,在云服务升级等运维场景中,用户通常是向开源的Terraform IaC系统提供用于更新云服务资源的终态配置信息,从而Terraform IaC系统通过执行一次配置变更操作,将云服务的资源直接更新为用户指定的终态配置。但是,Terraform IaC系统仅能基于这种更新资源配置的方式,实现对云服务进行滚动升级,即当云服务完成终态配置后存在异常时,将云服务的资源配置回滚至更新之前的资源配置情况,并不支持采用其它更加高阶的更新方式来更新云服务的资源配置。
发明内容
有鉴于此,本申请实施例提供了一种资源配置方法,以实现采用灰度升级或者分批滚动升级等更加高阶的更新方式来更新云服务的资源配置。本申请还提供了对应的资源配置系统、计算设备集群、计算机可读存储介质以及计算机程序产品。
第一方面,本申请提供一种资源配置方法,该方法可以由相应的资源配置系统执行,以实现采用高阶的更新方式来更新云服务的资源配置。具体实现时,资源配置系统获取用户提供的配置信息,该配置信息用于描述针对第一云服务所配置的多种云资源,如可以获取用户提供的一次终态配置信息等,然后,资源配置系统根据配置信息以及第一云服务所分配到的原始资源,创建第二云服务,该第二云服务与第二云服务共享环境类型的资源,该第二云服务的工作负载类型的资源与第一云服务的工作负载类型的资源相互隔离,即第一云服务的工作负载与第二云服务的工作负载相互独立运行,互不影响,从而资源配置系统根据目标部署策略,将第一云服务上的流量迁移至第二云服务,该目标部署策略例如可以是灰度部署、分批滚动部署等高级的部署策略。
由于所创建的第二云服务与第一云服务共享环境类型的资源,同时,这两个云服务的工作负载类型的资源相互隔离,这使得在更新云服务的资源配置的过程中,第一云服务与第二云服务能够共存,从而基于共存的两个云服务能够实现采用灰度部署或者分批滚动部署等方式将第一云服务上的流量迁移到第二云服务,也即能够支持灰度部署或者分批滚动部署等更加高阶的更新方式对云服务的资源配置进行更新。
在一种可能的实施方式中,在根据配置信息以及第一云服务所分配到的原始资源创建第二云服务时,资源配置系统具体可以先对配置信息进行拆分,得到用于描述环境类型资源的第一配置信息以及用于描述工作负载类型资源的第二配置信息,然后,资源配置系统根据该第一配置信息以及第一云服务所分配到的原始资源,确定第一资源,该第一资源为第一配置信息描述的、且该原始资源未包括的环境类型资源,并确定第二资源,该第二资源为第二配置信息描述的工作负载类型资源,从而资源配置系统根据该第一云服务所分配到的原始资源、第一资源以及第二资源,创建第二云服务。如此,所创建出的第二云服务与第一云服务能够共享环境类型资源,并且,这两个云服务对应的工作负载类型资源相互隔离,这 使得第一云服务以及第二云服务能够在计算设备集群100中同时运行,从而为实现高阶的资源配置方式建立基础。
在一种可能的实施方式中,第一资源与原始资源包括的环境类型资源记录于同一堆栈中,第二资源与原始资源包括的工作负载类型资源记录于不同的堆栈中。如此,可以使得所创建出的第二云服务能够与第一云服务共享同一堆栈中的环境类型资源,并且,这两个云服务基于不同堆栈中的工作负载类型资源进行建立,以此可以实现第一云服务与第二云服务的工作负载相互隔离。
在一种可能的实施方式中,目标部署策略包括蓝绿部署策略、灰度部署策略、或分批滚动部署策略,如此,资源配置系统可以支持实现多种高阶的资源部署能力,实现多种复杂的资源变更的控制流程。
在一种可能的实施方式中,当目标部署策略为灰度部署策略时,资源配置系统在进行流量迁移时,具体是对第一云服务上的流量进行切分,得到第一流量分片以及第二流量分片,并将该第一流量分片迁移至第二云服务,从而当第一流量分片在第二云服务上通过异常校验,将第二流量分片迁移至第二云服务。如此,通过逐个将各个流量分片由第一云服务迁移至第二云服务,可以实现对云服务的灰度部署,提高云服务升级/资源配置更新的安全性以及平滑性。
在一种可能的实施方式中,目标部署策略具体为分批滚动部署策略,则资源配置系统在进行流量迁移时,具体是先获取用户提供的分批信息,该分配信息用于指示每个批次中该第一云服务减少的容器组数量、第二云服务增加的容器组数量,其中,第二云服务在创建时所包括的容器组的数量为预设值,从而资源配置系统根据该分批信息、逐批减少第一云服务包括的容器组的数量、并增加第二云服务包括的容器组的数量。如此,通过逐批减少第一云服务中的容器组以及增加第二云服务中的容器组,可以实现将第一云服务上的流量逐步迁移至第二云服务,也即将第一云服务中的容器组上的流量迁移至第二云服务中的容器组上,从而实现对云服务的分批滚动部署,提高云服务升级/资源配置更新的安全性以及平滑性。
在一种可能的实施方式中,资源配置系统在逐批减少第一云服务包括的容器组数量、增加第二云服务包括的容器组数量时,具体可以是先获取用户针对目标批次的确认信息,该目标批次为分批信息所指示的多个批次中的一个批次,从而资源配置系统根据该分配信息以及针对该目标批次的确认信息,逐批减少第一云服务包括的容器组数量、增加第二云服务包括的容器组数量,具体可以是减少目标批次的下一批次所对应的第一云服务中的容器组数量、增加该下一批次对应的第二云服务中的容器组数量。
在一种可能的实施方式中,第一云服务与第二云服务,属于不同版本的云服务,如此,资源配置系统可以采用高阶的资源部署方式,实现对云服务的版本升级。或者,第一云服务与第二云服务,属于同一版本的云服务,如此,资源配置系统可以采用高阶的资源部署方式,实现对云服务的资源配置的更新。
第二方面,本申请提供一种资源配置系统,该资源配置系统包括:交互模块,用于获取用户提供的配置信息,该配置信息用于描述针对第一云服务所配置的多种资源;创建模块,用于根据配置信息以及第一云服务所分配到的原始资源,创建第二云服务,该第二云服务与第一云服务共享环境类型的资源,第二云服务的工作负载类型的资源与第一云服务的工作负载类型的资源相互隔离;流量管理模块,用于根据目标部署策略,将第一云服务上的流量迁移至第二云服务。
在一种可能的实施方式中,创建模块,用于:对配置信息进行拆分,得到用于描述环境类型资源的第一配置信息、用于描述工作负载类型资源的第二配置信息;根据第一配置信息以及第一云服务所分配到的原始资源,确定第一资源,第一资源为第一配置信息描述的、且原始资源未包括的环境类型资源;确定第二资源,第二资源为第二配置信息描述的工作负载类型资源;根据第一云服务所分配到的原始资源、第一资源以及第二资源,创建第二云服务。
在一种可能的实施方式中,第一资源与原始资源包括的环境类型资源记录于同一堆栈中,第二资源与原始资源包括的工作负载类型资源记录于不同堆栈。
在一种可能的实施方式中,目标部署策略包括蓝绿部署策略、灰度部署策略、或分批滚动部署策略。
在一种可能的实施方式中,目标部署策略为灰度部署策略,流量管理模块,用于:对第一云服务上的流量进行切分,得到第一流量分片以及第二流量分片;将第一流量分片迁移至第二云服务;当第一流量分片在第二云服务上通过异常校验,将第二流量分片迁移至第二云服务。
在一种可能的实施方式中,目标部署策略为分批滚动部署策略,流量管理模块,用于:获取用户提 供的分批信息,分批信息用于指示每个批次中第一云服务减少的容器组数量、第二云服务增加的容器组数量,其中,第二云服务在创建时所包括的容器组的数量为预设值;根据分批信息,逐批减少第一云服务包括的容器组数量、增加第二云服务包括的容器组数量。
在一种可能的实施方式中,流量管理模块,用于:获取用户针对目标批次的确认信息,目标批次为分批信息所指示的多个批次中的一个批次;根据分批信息以及确认信息,逐批减少第一云服务包括的容器组数量、增加第二云服务包括的容器组数量。
在一种可能的实施方式中,第一云服务与第二云服务,属于不同版本的云服务;或者,第一云服务与第二云服务,属于同一版本的云服务。
值得注意的是,第二方面提供的资源配置系统,对应于第一方面提供的资源配置方法,故第二方面以及第二方面中任一实施方式所具有的技术效果,可参见第一方面或者第一方面的相应实施方式所具有的技术效果。
第三方面,本申请提供一种计算设备,计算设备包括:处理器和存储器;其中,处理器用于执行所述存储器中存储的指令,以使得所述计算设备执行上述第一方面或第一方面任一种可能实现方式中的资源配置方法。
第四方面,本申请提供一种计算设备集群,所述计算设备包括至少一个计算设备,所述至少一个计算设备包括至少一个处理器和至少一个存储器;所述至少一个存储器用于存储指令,所述至少一个处理器执行所述至少一个存储器存储的该指令,以使所述计算设备集群执行上述第一方面或第一方面任一种可能实现方式中的资源配置方法。需要说明的是,该存储器可以集成于处理器中,也可以是独立于处理器之外。所述至少一个计算设备还可以包括总线。其中,处理器通过总线连接存储器。其中,存储器可以包括可读存储器以及随机存取存储器。
第五方面,本申请提供一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,当其在至少一个计算设备上运行时,使得所述至少一个计算设备执行上述第一方面或第一方面任一种可能实现方式中的资源配置方法。
第六方面,本申请提供了一种包含指令的计算机程序产品,当其在至少一个计算设备上运行时,使得所述至少一个计算设备执行上述第一方面或第一方面任一种可能实现方式中的资源配置方法。
本申请在上述各方面提供的实现方式的基础上,还可以进行进一步组合以提供更多实现方式。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请中记载的一些实施例,对于本领域普通技术人员来讲,还可以根据这些附图获得其他的附图。
图1为本申请提供的一示例性应用场景的示意图;
图2为本申请提供的一种资源配置方法的流程示意图;
图3为本申请提供的一示例性交互界面的示意图;
图4为本申请提供的配置资源的示意图;
图5为本申请提供的基于灰度部署策略迁移第一云服务上的流量的示意图;
图6为本申请提供的一示例性配置界面的示意图;
图7为本申请提供的基于分批滚动部署策略迁移第一云服务上的流量的示意图;
图8为本申请提供的一示例性配置界面的示意图;
图9为本申请提供的一种计算设备的硬件结构示意图;
图10为本申请提供的一种计算设备集群的结构示意图。
具体实施方式
下面将结合本申请中的附图,对本申请提供的实施例中的方案进行描述。
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的术语在适当情况下可以互换,这仅仅是描述 本申请的实施例中对相同属性的对象在描述时所采用的区分方式。
参见图1,为一示例性资源配置场景的示意图。在图1所示的应用场景中,计算设备集群100中可以包括计算、存储、网络等多个设备(图1中未示出),用于提供相应的多种类型的资源,如用于提供图1中的部署(deployment)、任务(job)、定时任务(cron job)、配置映射(config map)、持久化卷声明(persistent volume claim,PVC)存储、服务(service)、服务角色(service role)、服务角色绑定(service role binding)、服务账号(service account)等多种类型对应的资源。实际应用时,计算设备集群100中还可以包括其它类型对应的资源,如接入(ingress)、加密(secret)、基于角色的访问控制(role based access control,RBAC)鉴权等类型对应的资源。
基于计算设备集群100中的多种类型对应的资源,可以构建一个或者多个云服务,如云查询服务、云存储服务、云计算服务、云会议服务等。需要说明的是,本申请中所描述的云服务,包括部署于云端的任意类型、任意粒度的服务,如可以是较小粒度的微服务(microservice),或者可以是基于多个微服务所构建的、较大粒度的服务等。
实际应用时,可能存在对计算设备集群100提供的云服务更新资源配置的需求,比如,需要对云服务进行版本升级等,此时,资源配置系统200可以将云服务的资源配置更新为新版本的云服务所需的资源。具体实现时,资源配置系统200可以对外提供客户端301,客户端301例如可以是网络浏览器,或者可以是运行在用户终端上的应用程序(application),用于与用户302进行交互,如资源配置系统200可以通过客户端301获取用户302针对待升级的云服务的资源所定义的终态配置。同时,资源配置系统200还与计算设备集群100建立通信连接,例如可以通过有线或者无线等方式建立通信连接等,并将该云服务在计算设备集群100中的资源配置更新为用户302所定义的终态配置。
如果资源配置系统200直接根据用户302定义的终态配置,对云服务所能分配到的K8S资源执行一次终态修改,则资源配置系统200通常是直接在计算设备集群100中创建新版本的云服务,并删除旧版本的云服务,以此实现对云服务的版本更新以及资源配置更新。这样,在更新云服务的资源配置的过程中,新版本的云服务与旧版本的云服务不会在计算设备集群100中共存,这使得资源配置系统200仅能实现对云服务进行滚动升级,并不支持一次升级过程中对云服务进行多次修改资源配置的升级方式,如灰度升级、分批滚动升级等,从而限制了云服务的升级方式,降低了用户体验。
基于此,本申请实施例提供的资源配置系统200,旨在实现支持一次升级过程中能够对云服务进行多次修改资源配置的升级方式,以此摆脱云服务的升级方式的限制,提高用户体验。
具体实现时,如图1所示,资源配置系统200可以包括交互模块201、创建模块202、流量管理模块203。其中,交互模块201,用于获取用户提供的配置信息,该配置信息用于描述针对第一云服务(如旧版本的云服务等)所配置的多种资源,并将该配置信息提供给创建模块202。创建模块202,用于根据配置信息以及第一云服务所分配到的原始资源,创建第二云服务(如新版本的云服务),该第二云服务与第一云服务共享环境类型的资源,并且,第二云服务的工作负载类型的资源与第一云服务的工作负载类型的资源相互隔离,然后指示流量管理模块203第二云服务创建完成。流量管理模块203,用于根据目标部署策略,将第一云服务上的流量迁移至第二云服务,以此实现对云服务进行资源配置的更新,以便利用资源配置完成更新后的第二云服务继续提供服务。
由于所创建的第二云服务与第一云服务共享环境类型的资源,同时,这两个云服务的工作负载类型的资源相互隔离,这使得在更新云服务的资源配置的过程中,第一云服务与第二云服务能够共存,从而基于共存的两个云服务能够实现采用灰度部署或者分批滚动部署等方式将第一云服务上的流量迁移到第二云服务,也即能够支持灰度部署或者分批滚动部署等更加高阶的更新方式对云服务的资源配置进行更新。
并且,针对云服务的一次终态配置修改过程,可以覆盖云服务对应的多种功能的资源,无需针对每种功能的资源,单独执行一次终态配置修改过程,从而可以提高资源配置系统200针对云服务对应的资源配置的更新效率。
当资源配置系统200独立于计算设备集群100进行部署时,该资源配置系统200可以同时连接多个计算设备集群100,这样,基于一套资源配置系统,可以实现为多个计算设备集群100管理云服务的资源配置的更新过程,无需在每个计算设备集群100中单独设置一套资源配置系统200来管理云服务的资 源配置过程,从而不仅可以减少总体的资源占用消耗、降低运维管理的复杂度,也能避免对于计算设备集群100的资源占用,减小对于计算设备集群100的性能影响。
值得注意的是,图1所示的资源配置系统200的具体结构仅作为一种实现示例,在其它可能的实施方式中,资源配置系统200中还可以包括更多其它功能的模块;或者,资源配置系统200中各个模块的功能划分并不局限于图1所示示例,如可以将资源配置系统200中的多个模块合并为一个模块,或者,可以将资源配置系统200中的创建模块202、流量管理模块203等拆分成多个模块等,本实施例并不限定资源配置系统200的具体结构仅限于图1所示示例。并且,在其它应用场景中,资源配置系统200也可以部署于计算设备集群100内部,从而资源配置系统200能够单独为计算设备集群100管理云服务的资源配置的更新过程。计算设备集群100也可以被替换成其它类型的集群等。
作为一些示例,资源配置系统200中可以被部署于云端,用于为用户302更新云服务的资源配置,此时,资源配置系统200例如可以是由云端的计算设备或者计算设备集群实现。或者,资源配置系统200可以被部署于用户侧,从而可以在用户侧为用户302请求更新云服务的资源配置。
实际应用时,上述资源配置系统200中的各个功能模块,可以通过软件实现,或者可以通过硬件实现。
资源配置系统200中的各个功能模块作为软件功能单元的一种举例,可以包括运行在计算实例上的代码。其中,计算实例可以包括主机、虚拟机、容器中的至少一种。进一步地,上述计算实例可以是一台或者多台。例如,资源配置系统200中的各个功能模块可以包括运行在多个主机/虚拟机/容器上的代码。需要说明的是,用于运行该代码的多个主机/虚拟机/容器可以分布在相同的区域(region)中,也可以分布在不同的region中。进一步地,用于运行该代码的多个主机/虚拟机/容器可以分布在相同的可用区(availability zone,AZ)中,也可以分布在不同的AZ中,每个AZ包括一个数据中心或多个地理位置相近的数据中心。其中,通常一个region可以包括多个AZ。
同样,用于运行该代码的多个主机/虚拟机/容器可以分布在同一个虚拟私有云(virtual private cloud,VPC)中,也可以分布在多个VPC中。其中,通常一个VPC设置在一个region内,同一region内两个VPC之间,以及不同region的VPC之间跨区通信需在每个VPC内设置通信网关,经通信网关实现VPC之间的互连。
资源配置系统200中的各个功能模块作为硬件功能单元的一种举例,资源配置系统200可以包括至少一个计算设备,如服务器等,资源配置系统200中的每个功能模块可以由一个或者多个计算设备实现。或者,资源配置系统200中的每个功能模块也可以是利用专用集成电路(application-specific integrated circuit,ASIC)实现、或可编程逻辑器件(programmable logic device,PLD)实现的设备等。其中,上述PLD可以是复杂程序逻辑器件(complex programmable logical device,CPLD)、现场可编程门阵列(field-programmable gate array,FPGA)、通用阵列逻辑(generic array logic,GAL)、数据处理单元(data processing unit,DPU)、人工智能(artificial intelligence,AI)芯片或其任意组合实现。
资源配置系统200包括的多个计算设备可以分布在相同的region中,也可以分布在不同的region中。资源配置系统200包括的多个计算设备可以分布在相同的AZ中,也可以分布在不同的AZ中。同样,资源配置系统200包括的多个计算设备可以分布在同一个VPC中,也可以分布在多个VPC中。其中,资源配置系统200所包括的多个计算设备可以是服务器、ASIC、PLD、CPLD、FPGA和GAL等计算设备的任意组合。
接下来,对更新资源配置的过程的各种非限定性的具体实施方式进行详细描述。
参阅图2,为本申请实施例中一种资源配置方法的流程示意图。该方法可以应用于上述图1所示的应用场景中,或者也可以是应用于其它可适用的应用场景中。下面以应用于图1所示的应用场景为例进行说明。
图2所示的资源配置方法具体可以包括:
S201:交互模块201获取用户302提供的配置信息,该配置信息用于描述针对第一云服务所配置的多种资源。
在版本升级场景中,用户302可能需要对计算设备集群100中所提供的云服务进行版本升级,并同 时会对云服务的资源进行重新配置,如将新版本的云服务所使用的通信协议由通信协议A修改为通信协议B(通信协议A为旧版本的云服务所使用的通信协议)。或者,在云服务运维场景中,用户302可能需要提高云服务的性能,具体可以在云服务原有的资源配置的基础上新增资源(或者修改资源),如可以为云服务新增多个进程来提高云服务的响应速度等。
作为一种实现示例,资源配置系统200对外提供的客户端301可以面向用户302呈现交互界面,例如可以是图3所示的交互界面,该交互界面上显示有计算设备集群100所运行的多种云服务的标识,以便用户302可以从多种云服务中选择至少一种云服务来更新其资源配置,假设用户302选择对多种云服务中的第一云服务进行资源配置更新。并且,用户在选择第一云服务后,还可以进一步在图3所示的交互界面上对该第一云服务的资源进行终态配置,如可以配置该第一云服务所对应的部署类型的资源、任务类型的资源、定时任务类型的资源、配置映射类型的资源等。如此,客户端301以根据用户302所执行的配置操作,生成针对第一云服务的配置信息,该配置信息用于描述用户302针对该第一云服务所配置的多种资源,如图4所示。然后,客户端301可以将生成的配置信息发送给交互模块201。
在另一种实现示例中,用户302也可以预先编写好针对第一云服务的配置文件,该配置文件中定义了用于描述为第一云服务配置的多种资源的信息,从而用户302可以在客户端301上传该配置文件,并由客户端301将该配置文件转发给交互模块201。
然后,交互模块201可以将配置信息(或者配置文件)提供给创建模块202。
S202:创建模块202根据配置信息以及第一云服务所分配到的原始资源,创建第二云服务,该第二云服务与第一云服务共享环境类型的资源,并且,第二云服务的工作负载类型的资源与第一云服务的工作负载类型的资源相互隔离。
本实施例中,创建模块202可以在计算设备集群100中创建两个云服务,其中一个为资源配置发生更新之前的第一云服务,另一个为资源配置更新后的第二云服务。示例性地,第一云服务与第二云服务,可以是升级场景中同一类型的不同版本的云服务;或者,第一云服务与第二云服务,可以是运维场景中属于同一版本的云服务(配置不同),或者可以是属于不同类型的云服务等。正在更新云服务的资源配置的过程中,两个云服务可以在计算设备集群100中共存。
其中,创建模块202可以基于第一云服务所分配到的原始资源中包括的环境类型的资源,创建第二云服务,如此,第一云服务与第二云服务可以共享环境类型的资源,同时,第一云服务与第二云服务所分配到的工作负载类型的资源相互隔离,以使得第一云服务与第二云服务均能正常运行。
在一种可能的实施方式中,创建模块202可以按照资源类型对配置信息进行拆分,得到用于描述环境类型资源的第一配置信息、以及用于描述工作负载类型资源的第二配置信息。其中,环境类型资源,例如可以包括工作负载所依赖的PVC存储、服务(service)/接入(ingress)网络配置、RBAC鉴权等类型的资源,如图4所示。工作负载类型资源,例如可以是部署(deployment)、任务(job)、定时任务(cron job)、配置映射(config map)、加密(secret)等类型的资源,如图4所示。其中,工作负载(workload),是指在计算设备集群100(如kubernetes等)上运行的应用程序。
然后,创建模块202从计算设备集群100或者本地缓存中获取第一云服务所分配到的原始资源,并根据该第一配置信息、原始资源,确定第一资源,该第一资源即为第一配置信息描述的、但是原始资源未包括的环境类型资源。比如,假设第一云服务所分配到的原始资源中包括端口a、端口b,而针对所要创建的第二云服务所配置的资源包括端口b、端口c,则,创建模块202可以通过比较第一配置信息以及原始资源,确定第一资源为原始资源未包括的端口c。如此,综合该第一资源以及第一云服务对应的原始资源所包括的环境类型资源,即可满足所要创建的第二云服务对于环境类型资源的要求。通常情况下,第一云服务所分配到的原始资源,包括环境类型资源以及工作负载类型资源,工作负载类型资源用于支持第一云服务包括的工作负载的运行。
并且,创建模块202还根据第二配置信息确定第二资源,该第二资源即为第二配置信息所描述的工作负载类型资源,该第二资源与原始资源中的工作负载类型资源相互隔离,以便于第一云服务包括的工作负载与所要生成的第二云服务包括的工作负载能够相互独立运行。比如,假设第一云服务所分配到的原始资源中包括进程集合a,该进程集合a包括进程1、进程2、进程3,这3个进程属于工作负载类型资源,而创建模块202可以为第二云服务调度第二资源,该第二资源可以是进程集合b,该进程集合b 包括进程4、进程5以及进程6,并且,第一云服务的进程集合a与第二云服务的进程集合b之间能够相互独立运行。
这样,创建模块202可以基于第一云服务所分配到的原始资源(具体可以是原始资源包括的环境类型资源)、上述第一资源以及第二资源,创建第二云服务。此时,所创建出的第二云服务与第一云服务共享环境类型资源,而这两个云服务对应的工作负载类型资源相互隔离。如此,第一云服务以及第二云服务,可以在计算设备集群100中同时运行。
实际应用时,第一云服务可以配置有两个资源堆栈,分别为资源堆栈1、资源堆栈2,其中,资源堆栈1用于记录原始资源中的环境类型资源,资源堆栈2用于记录原始资源中的工作负载类型资源,如图4所示。本实施例中,利用资源堆栈记录资源,具体可以是指利用资源堆栈存储该资源所对应的标识(如环境类型资源的标识、工作负载类型资源的标识)。其中,资源堆栈1以及资源堆栈2可以由资源配置系统200在创建第一云服务时完成创建,并将第一云服务与这两个资源堆栈进行关联。在此基础上,创建模块202在为第一云服务更新资源配置的过程中,可以利用与第一云服务关联的资源堆栈1记录所确定出的第一资源。如此,基于第一云服务当前所分配到的原始资源以及资源堆栈1中所记录的环境类型资源,即可支持所要创建的第二云服务对于环境类型资源的要求。并且,创建模块202还可以为所要创建的第二云服务创建资源堆栈3,该资源堆栈3与资源堆栈2相互隔离。在确定出第二资源后,创建模块202可以利用新创建的资源堆栈3记录第二资源,如图4所示。如此,新创建的资源堆栈3所记录的工作负载类型资源可以支持所要创建的第二云服务对于工作负载类型资源的要求。然后,创建模块202可以基于资源堆栈1中记录的环境类型资源、当前为第一云服务所配置的环境类型资源、以及不同环境类型资源之间的依赖关系,为第二云服务生成针对环境类型资源进行配置的执行计划,例如可以是有向无环图(directed acyclic graph,DAG)形式的执行计划1,从而可以根据该执行计划1,为第二云服务配置环境类型资源,例如可以是根据执行计划1将已创建的资源分配给该第二云服务,或者可以是根据执行计划1为第二云服务创建新的资源。并且,创建模块202可以基于资源堆栈3中记录的工作负载类型资源、以及不同工作负载类型资源之间的依赖关系,为第二云服务生成针对工作负载类型资源进行配置的执行计划2,从而根据该执行计划2,为第二云服务配置工作负载类型资源。进而,创建模块202可以根据所配置的环境类型资源以及工作负载类型资源,创建第二云服务。
由于部分场景中,用户302所提供的配置信息所描述的多种资源之间可能具有较强的依赖关系,这使得创建模块202所创建出的第二云服务的工作负载与第一云服务的工作负载之间难以满足相互隔离的特性;或者,配置信息所描述的环境类型资源是在第一云服务所分配到的环境类型资源的基础上进行部分资源的删除或者修改等,从而导致第一云服务因为环境类型资源变化而导致不能与第二云服务共存。因此,在进一步可能的实施方式中,创建模块202在获取到用户302提供的配置信息后,可以校验该配置信息是否符合预设的部署条件,如校验配置信息所描述的多种资源之间的引用关系是否满足部署条件,以及校验配置信息所描述的环境类型信息是否在第一云服务的环境类型资源的基础上进行增量配置等。当确定配置信息满足该部署条件时,创建模块202再基于该配置信息创建与第一云服务共存的第二云服务。而当配置信息不满足该部署条件时,创建模块202可以停止更新云服务的资源配置的流程,并可以通过客户端301向用户302进行配置错误告警。
S203:流量管理模块203根据目标部署策略,将第一云服务上的流量迁移至第二云服务。
在创建第一云服务以及第二云服务后,第一云服务与第二云服务可以在计算设备集群100中共存。此时,管理模块203在将第一云服务流量上运行的流量迁移至第二云服务的过程中所使用的目标部署策略,例如可以是蓝绿部署策略、灰度部署策略、或者分批滚动部署等高阶部署策略(相对于滚动部署策略而言),如图4所示。其中,在基于灰度部署策略迁移第一云服务上流量的过程中,流量管理模块203可以将第一云服务上的流量按照设定的比例逐步迁移至第二云服务上,具体可以是将流量迁移至第二云服务包括的工作负载。而在基于分批滚动部署策略迁移第一云服务上流量的过程中,流量管理模块203可以根据用户定义的分批信息,逐批减少第一云服务包括的容器组(pod),并为第二云服务创建相应数量的容器组,从而实现将第一云服务上的流量逐渐迁移至第二云服务中的相应容器组。如此,资源配置系统200可以支持在一次终态配置过程中能够对云服务进行多次修改资源配置的部署方式,以此摆脱云服务的资源部署方式的限制,提高用户体验。另外,资源配置系统200同样可以支持蓝绿部署策略、滚 动部署策略等其它部署方式,以此可以提高资源配置系统200所支持的部署方式的多样性。
另外,由于第一云服务与第二云服务在计算设备集群100中共存,这使得在对云服务进行资源配置进行更新的过程中,第一云服务与第二云服务可以协同持续提供云服务,以此实现在不中断云云服务的情况下,实现对该云服务的资源配置更新。
为便于理解,下面结合附图,分别对流量管理模块203基于灰度部署策略、分批滚动部署策略将第一云服务上的流量迁移至第二云服务的过程进行示例性说明。
如图5所示,为流量管理模块203基于灰度部署策略进行流量迁移的流程示意图。如图5所示,该流量迁移过程具体可以包括:
S501:流量管理模块203对第一云服务上的流量进行切分,得到多个流量分片。
每个流量分片即为第一云服务上的部分流量,例如可以是部分类型业务的流量,或者可以是部分用户的流量等。
实际应用时,流量管理模块203可以按照预设的流量比例,将第一云服务上的流量切分成多个相同或者不同占比的流量分片。例如,流量管理模块203可以按照同一流量比例,将第一云服务上的流量切分成占比均为25%的4个流量分片;或者,流量管理模块203可以按照不同流量比例,将第一云服务上的流量切分成占比分别为10%、20%、30%、40%的流量分片,本实施例对此并不进行限定。
其中,预设的流量比例,可以是由用户302进行指定。比如,客户端301可以向用户302呈现针对目标部署策略的配置界面,例如可以是如图6所示的配置界面,该配置界面上可以呈现资源配置系统200所支持的多种部署策略,如图6中的灰度部署策略、蓝绿部署策略、滚动部署策略、分批滚动部署策略等。从而,用户302可以在该配置界面上对目标部署策略进行选择,并且,当用户302选择灰度部署策略时,配置界面可以进一步呈现针对第一云服务上的流量的切分数量以及切分比例。相应地,用户302可以在该配置界面上指定流量的切分数量,并选择等比例切分方式来对该流量进行等比例切分,或者选择自定义切分方式,由用户302定义对该流量进行切分的比例,并输入各个流量分片的比例。然后,客户端301可以将用户302指定的流量比例提供给资源配置系统200。实际应用时,流量管理模块203也可以是根据第一云服务上流量的类型或者其它因素,自定义流量比例等,本实施例对此并不进行限定。
S502:流量管理模块203将多个流量分片中的第一流量分片迁移至第二云服务。
在资源配置系统200提供的灰度部署方式中,创建模块202在创建出第二云服务时,可以同时为该第二云服务分配多个容器组(容器组的数量根据用户302提供的配置信息进行确定)。这样,流量管理模块203可以直接将第一云服务上的各个流量分片迁移至第二云服务中相应的容器组,由该容器组处理该流量分片。
S503:流量管理模块203校验第二云服务承载的第一流量分片是否异常,以及验证第二云服务在承载第一流量分片时是否正常运行。
S504:当第一流量分片在第二云服务上通过异常校验,流量管理模块203将多个流量分片中的第二流量分片迁移至第二云服务。
S505:流量管理模块203删除第一云服务中的工作负载(以及第一云服务中的工作负载类型资源)。
S506:当第一流量分片在第二云服务上未通过异常校验,流量管理模块203将第二云服务上的流量全部回退至第一云服务。
S507:流量管理模块203删除第二云服务中的工作负载(以及第二云服务中的工作负载类型资源)。
S508:流量管理模块203回滚为第二云服务配置的环境类型资源,也即将环境类型资源回滚至第一云服务对应的资源配置。
在灰度部署策略中,流量管理模块203在将第一云服务上的部分流量(即第一流量分片)迁移至第二云服务后,会校验该部分流量是否在第二云服务上是否出现异常,如判断是否出现流量堵塞、流量处理时延过大等异常,同时,流量管理模块203也会校验第二云服务在承载该部分流量的过程中,是否出现运行异常,如判断是否出现运行错误、是否出现资源不足告警等异常。
如果第二云服务在承载迁移过来的流量后,并未发生异常,则流量管理模块203可以继续将第一云服务上的下一部分流量(即第二流量分片)也迁移至第二云服务,并校验该第二云服务继续承载第二流量分片时是否存在异常。如果仍未出现异常,则流量管理模块203可以按照上述过程,将第一云服务上 剩余的各个部分的流量依次迁移至第二云服务上,直至将第一云服务上的所有流量全部迁移至第二云服务,以此实现对云服务的(版本升级以及)资源配置更新。此时,第一云服务中的工作负载可以无需继续运行,从而流量管理模块203可以删除该第一云服务中的工作负载,且一并删除该工作负载所占用的工作负载类型资源,以释放计算设备集群100中的资源,尽可能避免出现资源浪费。实际应用时,流量管理模块203还可以通过客户端301通知用户302,此次针对云服务的资源配置更新成功。
而若第二云服务在承载多个流量分片中的任意一个流量分片的过程中出现异常,则,流量管理模块203可以将第二云服务上的全部流量回退至第一云服务,以保证计算设备集群100所提供的云服务不发生中断,避免对用户302的业务产生影响。进一步地,流量管理模块203可以删除第二云服务的工作负载,且一并删除该第二云服务中的工作负载类型资源,并回滚为第二云服务所配置的环境类型资源,以此释放计算设备集群100中的资源,尽可能避免出现资源浪费。实际应用时,流量管理模块203还可以通过客户端301通知用户302,此次针对云服务的资源配置更新失败。
如此,流量管理模块203所能支持的灰度部署方式,相较于计算设备集群100原生的滚动部署,实现了更加灵活可配置的流量迁移控制,且具备快速回滚的能力,以此可以提升针对云服务的资源配置进行变更的效率和安全性。
如图7所示,为流量管理模块203基于分批滚动部署策略进行流量迁移的流程示意图。如图7所示,该流量迁移过程具体可以包括:
S701:流量管理模块203获取用户302提供的分批信息以及用户302指定的需要人工确认的目标批次,该分批信息用于指示每个批次中第一云服务所减少的容器组数量、第二云服务所增加的容器组数量,其中,第二云服务在创建时所包括的容器组的数量为预设值。
示例性地,客户端301可以向用户302呈现针对目标部署策略的配置界面,例如可以是如图8所示的配置界面,该配置界面上可以呈现资源配置系统200所支持的灰度部署策略、蓝绿部署策略、滚动部署策略、分批滚动部署策略等多种部署策略,从而用户302可以在该配置界面上选择分批滚动部署策略。此时,用户302可以在该配置界面进一步配置针对第一云服务的分批逻辑,包括将第一云服务包括的容器组的数量所划分的批次总数,以及每个批次中第一云服务中所需减少的容器组数量、第二云服务中所需增加的容器组的数量,如图8所示。可以理解,第一云服务上的流量由第一云服务中的容器组进行承载,因此,在每个流量迁移的批次中,当删除第一云服务中的部分容器组时,并为第二云服务创建容器组时,第一云服务中所删除的容器组所承载的流量,会被迁移至第二云服务中所创建的容器组中。另外,用户302在设置流量迁移的批次时,还可以设置需要人工确认的目标批次(可以是部分或者全部批次),如图8所示。如此,当目标批次对应的流量由第一云服务迁移至第二云服务时,需要由用户302(或者运维人员)对该目标批次的流量迁移结果进行人工确认,并在得到人工确认的情况下,才会继续迁移下一批次的流量。
需要说明的是,在创建第二云服务之前,交互模块201可以预先获取用户302提供的分批信息以及用户302指定的目标批次,如在获取用户302提供的配置信息之前,可以先获取用户302提供的分批信息以及所指定的目标批次;或者,用户302可以在同一交互界面上,输入配置信息、分批信息以及目标批次等,本实施例对此并不进行限定。然后,交互模块201再将该分批信息以及目标批次提供给流量管理模块203。
在分批滚动部署场景中,创建模块202基于配置信息所创建的第二云服务可以包括预设数量的容器组。其中,该预设数量可以为0,即创建空工作负载的第二云服务;或者,预设数量也可以是其它数值,对此并不进行限定。
S702:流量管理模块203从多个批次中确定未进行流量迁移的待处理批次,若不存在未进行流量迁移的批次,则直接执行步骤S711。
本实施例中,待处理批次,用于指代当前选择进行流量迁移的批次。在当前批次完成流量迁移后,流量管理模块203可以从剩余未完成流量迁移的批次中继续选择一个批次作为待处理批次,并开始执行步骤S703以及后续步骤。
S703:流量管理模块203确定待处理批次对应的分批信息。
S704:流量管理模块203根据待处理批次对应的分批信息,在第一云服务删除第一数量的容器组, 并在第二云服务中创建第二数量的容器组。
S705:流量管理模块203判断待处理批次是否为需要人工确认的目标批次,若是,则执行步骤S706,若不是,则执行步骤S702。
S706:流量管理模块203获取用户302针对待处理批次的确认信息。
实际应用时,在第二云服务承载待处理批次的流量时,流量管理模块203可以通过客户端301向用户301呈现确认界面,并在该确认界面呈现第二云服务处理该待处理批次的流量的运行数据。如此,用户302可以根据呈现的运行数据分析判断第二云服务承载待处理批次的流量时是否存在异常,并在该确认界面上输入针对目标批次的确认信息,最后再由客户端301将该确认信息提供给流量管理模块203。
S707:流量管理模块203根据该确认信息,判断待处理批次是否存在异常,若不存在,则返回执行步骤S702,若存在,则执行步骤S708。
S708:流量管理模块203将第一云服务中容器组的数量回滚至变更之前的数量。
S709:流量管理模块203删除第二云服务中的工作负载(以及第二云服务中的工作负载类型资源)。
S710:流量管理模块203回滚为第二云服务配置的环境类型资源,也即将环境类型资源回滚至第一云服务对应的资源配置。
S711:流量管理模块203删除第一云服务中的工作负载,结束流程。
本实施例中,流量管理模块203可以结合用户302针对部分或者全部批次的人工确认信息,完成将第一云服务上的流量迁移至第二云服务,或者在部分批次的流量迁移出现异常时进行回滚。如此,相较于计算设备集群100原生的滚动部署具有更强的变更前可规划性和变更中控制能力,即,可以提前规划批次数量、每个批次涉及的容器组数量和人工介入的时机。这样,在对云服务进行资源配置变更的过程中,可以随时暂停并进行人工确认,以此保证资源配置变更的可控性以及安全性。
在其它实施例中,流量管理模块203在将第一云服务上的流量分批迁移至第二云服务的过程中,也可以无需进行人工确认过程,即流量管理模块203可以自动将第一云服务上多个批次的流量逐渐迁移至第二云服务。
上述图2、图5以及图7所示实施例中,针对资源配置过程中所涉及到的资源配置系统(包括上述交互模块201、创建模块202、流量管理模块203)可以是配置于计算设备或者计算设备集群上的软件,并且,通过在计算设备或者计算设备集群上运行该软件,可以使得计算设备或者计算设备集群实现上述资源配置系统200所具有的功能。下面,基于硬件设备实现的角度,对资源配置的过程中所涉及的资源配置系统200进行详细介绍。
图9示出了一种计算设备的结构示意图,上述资源配置系统200可以部署在该计算设备上,该计算设备可以是云环境中的计算设备(如服务器),或边缘环境中的计算设备,或终端设备等具体可以用于实现上述图2、图5以及图7所示实施例中交互模块201、创建模块202、流量管理模块203的功能。
如图9所示,计算设备900包括处理器910、存储器920、通信接口930和总线940。处理器910、存储器920和通信接口930之间通过总线940通信。总线940可以是外设部件互连标准(peripheral component interconnect,PCI)总线或扩展工业标准结构(extended industry standard architecture,EISA)总线等。总线可以分为地址总线、数据总线、控制总线等。为便于表示,图9中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。通信接口930用于与外部通信,例如接收用户提供的配置信息、分批信息等。
其中,处理器910可以为中央处理器(central processing unit,CPU)、专用集成电路(application specific integrated circuit,ASIC)、图形处理器(graphics processing unit,GPU)或者一个或多个集成电路。处理器910还可以是一种集成电路芯片,具有信号的处理能力。在实现过程中,资源配置系统200中各个模块的功能可以通过处理器910中的硬件的集成逻辑电路或者软件形式的指令完成。处理器910还可以是通用处理器、数据信号处理器(digital signal process,DSP)、现场可编程逻辑门阵列(field programmable gate array,FPGA)或者其他可编程逻辑器件,分立门或者晶体管逻辑器件,分立硬件组件,可以实现或者执行本申请实施例中公开的方法、步骤及逻辑框图。其中,通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等,结合本申请实施例所公开的方法可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器、闪存、只读存储 器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器920,处理器910读取存储器920中的信息,结合其硬件完成资源配置系统200中的部分或全部功能。
存储器920可以包括易失性存储器(volatile memory),例如随机存取存储器(random access memory,RAM)。存储器920还可以包括非易失性存储器(non-volatile memory),例如只读存储器(read-only memory,ROM),快闪存储器,HDD或SSD。
存储器920中存储有可执行代码,处理器910执行该可执行代码以执行前述资源配置系统200(具体为资源配置系统200中的各个模块)所执行的方法。
具体地,在实现图2、图5以及图7所示实施例的情况下,且图2、图5以及图7所示实施例中所描述的交互模块201、创建模块202、流量管理模块203为通过软件实现的情况下,执行图2、图5以及图7的交互模块201、创建模块202、流量管理模块203的功能所需的软件或程序代码存储在存储器920中,交互模块201与其它设备的交互通过通信接口930实现,处理器用于执行存储器920中的指令,实现上述资源配置系统200所执行的方法。
图10示出的一种计算设备集群的结构示意图。其中,图10所示的计算设备集群10包括多个计算设备,上述资源配置系统200可以分布式地部署在该计算设备集群10中的多个计算设备上。如图10所示,计算设备集群10包括多个计算设备1000,每个计算设备1000包括存储器1020、处理器1010、通信接口1030以及总线1040,其中,存储器1020、处理器1010、通信接口1030通过总线1040实现彼此之间的通信连接。
处理器1010可以采用CPU、GPU、ASIC或者一个或多个集成电路。处理器1010还可以是一种集成电路芯片,具有信号的处理能力。在实现过程中,资源配置系统200的部分功能可用通过处理器1010中的硬件的集成逻辑电路或者软件形式的指令完成。处理器1010还可以是DSP、FPGA、通用处理器、其他可编程逻辑器件,分立门或者晶体管逻辑器件、分立硬件组件,可以实现或者执行本申请实施例中公开的部分方法、步骤及逻辑框图。其中,通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等,结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器、闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器1020,在每个计算设备1000中,处理器1010读取存储器1020中的信息,结合其硬件可以完成资源配置系统200的部分功能。
存储器1020可以包括ROM、RAM、静态存储设备、动态存储设备、硬盘(例如SSD、HDD)等。存储器1020可以存储程序代码,例如,用于实现交互模块201的部分或者全部程序代码、用于实现创建模块202的部分或者全部程序代码、用于实现流量管理模块203的部分或者全部程序代码等。针对每个计算设备1000,当存储器1020中存储的程序代码被处理器1010执行时,处理器1010基于通信接口1030执行资源配置系统200所执行的部分方法,如其中一部分计算设备1000可以用于执行上述交互模块201、创建模块202所执行的方法,另一部分计算设备1000用于执行上述流量管理模块203所执行的方法。存储器1020还可以存储数据,例如:处理器1010在执行过程中产生的中间数据或结果数据,例如,上述第一配置信息、第二配置信息等。
每个计算设备1000中的通信接口1003用于与外部通信,例如与其它计算设备1000进行交互等。
总线1040可以是外设部件互连标准总线或扩展工业标准结构总线等。为便于表示,图10中每个计算设备1000内的总线1040仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
上述多个计算设备1000之间通过通信网络建立通信通路,以实现资源配置系统200的功能。任一计算设备可以是云环境中的计算设备(例如,服务器),或边缘环境中的计算设备,或终端设备。
此外,本申请实施例还提供了一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当其在一个或者多个计算设备上运行时,使得该一个或者多个计算设备执行上述实施例资源配置系统200中的各个模块所执行的方法。
此外,本申请实施例还提供了一种计算机程序产品,所述计算机程序产品被一个或者多个计算设备 执行时,所述一个或者多个计算设备执行前述资源配置方法中的任一方法。该计算机程序产品可以为一个软件安装包,在需要使用前述资源配置方法的任一方法的情况下,可以下载该计算机程序产品并在计算机上执行该计算机程序产品。
另外需说明的是,以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。另外,本申请提供的装置实施例附图中,模块之间的连接关系表示它们之间具有通信连接,具体可以实现为一条或多条通信总线或信号线。
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的术语在适当情况下可以互换,这仅仅是描述本申请的实施例中对相同属性的对象在描述时所采用的区分方式。
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到本申请可借助软件加必需的通用硬件的方式来实现,当然也可以通过专用硬件包括专用集成电路、专用CPU、专用存储器、专用元器件等来实现。一般情况下,凡由计算机程序完成的功能都可以很容易地用相应的硬件来实现,而且,用来实现同一功能的具体硬件结构也可以是多种多样的,例如模拟电路、数字电路或专用电路等。但是,对本申请而言更多情况下软件程序实现是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在可读取的存储介质中,如计算机的软盘、U盘、移动硬盘、ROM、RAM、磁碟或者光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,训练设备,或者网络设备等)执行本申请各个实施例所述的方法。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。
所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、训练设备或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、训练设备或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存储的任何可用介质或者是包含一个或多个可用介质集成的训练设备、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘(Solid State Disk,SSD))等。

Claims (18)

  1. 一种资源配置方法,其特征在于,所述方法包括:
    获取用户提供的配置信息,所述配置信息用于描述针对第一云服务所配置的多种资源;
    根据所述配置信息以及所述第一云服务所分配到的原始资源,创建第二云服务,所述第二云服务与所述第一云服务共享环境类型的资源,所述第二云服务的工作负载类型的资源与所述第一云服务的工作负载类型的资源相互隔离;
    根据目标部署策略,将所述第一云服务上的流量迁移至所述第二云服务。
  2. 根据权利要求1所述的方法,其特征在于,所述根据所述配置信息以及所述第一云服务所分配到的原始资源,创建第二云服务,包括:
    对所述配置信息进行拆分,得到用于描述环境类型资源的第一配置信息、用于描述工作负载类型资源的第二配置信息;
    根据所述第一配置信息以及所述第一云服务所分配到的原始资源,确定第一资源,所述第一资源为所述第一配置信息描述的、且所述原始资源未包括的环境类型资源;
    确定第二资源,所述第二资源为所述第二配置信息描述的工作负载类型资源;
    根据所述第一云服务所分配到的原始资源、所述第一资源以及所述第二资源,创建所述第二云服务。
  3. 根据权利要求2所述的方法,其特征在于,所述第一资源与所述原始资源包括的环境类型资源记录于同一堆栈中,所述第二资源与所述原始资源包括的工作负载类型资源记录于不同堆栈。
  4. 根据权利要求1至3任一项所述的方法,其特征在于,所述目标部署策略包括蓝绿部署策略、灰度部署策略、或分批滚动部署策略。
  5. 根据权利要求4所述的方法,其特征在于,所述目标部署策略为所述灰度部署策略,所述根据目标部署策略,将所述第一云服务上的流量迁移至所述第二云服务,包括:
    对所述第一云服务上的流量进行切分,得到第一流量分片以及第二流量分片;
    将所述第一流量分片迁移至所述第二云服务;
    当所述第一流量分片在所述第二云服务上通过异常校验,将所述第二流量分片迁移至所述第二云服务。
  6. 根据权利要求4所述的方法,其特征在于,所述目标部署策略为所述分批滚动部署策略,所述根据目标部署策略,将所述第一云服务上的流量迁移至所述第二云服务,包括:
    获取用户提供的分批信息,所述分批信息用于指示每个批次中所述第一云服务减少的容器组数量、所述第二云服务增加的容器组数量,其中,所述第二云服务在创建时所包括的容器组的数量为预设值;
    根据所述分批信息,逐批减少所述第一云服务包括的容器组数量、增加所述第二云服务包括的容器组数量。
  7. 根据权利要求6所述的方法,其特征在于,所述根据所述分批信息,逐批减少所述第一云服务包括的容器组数量、增加所述第二云服务包括的容器组数量,包括:
    获取用户针对目标批次的确认信息,所述目标批次为所述分批信息所指示的多个批次中的一个批次;
    根据所述分批信息以及所述确认信息,逐批减少所述第一云服务包括的容器组数量、增加所述第二云服务包括的容器组数量。
  8. 根据权利要求1至7任一项所述的方法,其特征在于,所述第一云服务与所述第二云服务,属于不同版本的云服务;或者,所述第一云服务与所述第二云服务,属于同一版本的云服务。
  9. 一种资源配置系统,其特征在于,所述资源配置系统包括:
    交互模块,用于获取用户提供的配置信息,所述配置信息用于描述针对第一云服务所配置的多种资源;
    创建模块,用于根据所述配置信息以及所述第一云服务所分配到的原始资源,创建第二云服务,所述第二云服务与所述第一云服务共享环境类型的资源,所述第二云服务的工作负载类型的资源与所述第一云服务的工作负载类型的资源相互隔离;
    流量管理模块,用于根据目标部署策略,将所述第一云服务上的流量迁移至所述第二云服务。
  10. 根据权利要求9所述的系统,其特征在于,所述创建模块,用于:
    对所述配置信息进行拆分,得到用于描述环境类型资源的第一配置信息、用于描述工作负载类型资源的第二配置信息;
    根据所述第一配置信息以及所述第一云服务所分配到的原始资源,确定第一资源,所述第一资源为所述第一配置信息描述的、且所述原始资源未包括的环境类型资源;
    确定第二资源,所述第二资源为所述第二配置信息描述的工作负载类型资源;
    根据所述第一云服务所分配到的原始资源、所述第一资源以及所述第二资源,创建所述第二云服务。
  11. 根据权利要求10所述的系统,其特征在于,所述第一资源与所述原始资源包括的环境类型资源记录于同一堆栈中,所述第二资源与所述原始资源包括的工作负载类型资源记录于不同堆栈。
  12. 根据权利要求9至11任一项所述的系统,其特征在于,所述目标部署策略包括蓝绿部署策略、灰度部署策略、或分批滚动部署策略。
  13. 根据权利要求12所述的系统,其特征在于,所述目标部署策略为所述灰度部署策略,所述流量管理模块,用于:
    对所述第一云服务上的流量进行切分,得到第一流量分片以及第二流量分片;
    将所述第一流量分片迁移至所述第二云服务;
    当所述第一流量分片在所述第二云服务上通过异常校验,将所述第二流量分片迁移至所述第二云服务。
  14. 根据权利要求12所述的系统,其特征在于,所述目标部署策略为所述分批滚动部署策略,所述流量管理模块,用于:
    获取用户提供的分批信息,所述分批信息用于指示每个批次中所述第一云服务减少的容器组数量、所述第二云服务增加的容器组数量,其中,所述第二云服务在创建时所包括的容器组的数量为预设值;
    根据所述分批信息,逐批减少所述第一云服务包括的容器组数量、增加所述第二云服务包括的容器组数量。
  15. 根据权利要求14所述的系统,其特征在于,所述流量管理模块,用于:
    获取用户针对目标批次的确认信息,所述目标批次为所述分批信息所指示的多个批次中的一个批次;
    根据所述分批信息以及所述确认信息,逐批减少所述第一云服务包括的容器组数量、增加所述第二云服务包括的容器组数量。
  16. 根据权利要求9至15任一项所述的系统,其特征在于,所述第一云服务与所述第二云服务,属于不同版本的云服务;或者,所述第一云服务与所述第二云服务,属于同一版本的云服务。
  17. 一种计算设备集群,其特征在于,包括至少一个计算设备,每个计算设备包括处理器和存储器;
    所述处理器用于执行所述存储器中存储的指令,以使得所述计算设备集群执行权利要求1至8中任一项所述的方法。
  18. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有指令,当其在至少一个计算设备上运行时,使得所述至少一个计算设备执行如权利要求1至8任一项所述的方法。
PCT/CN2023/122003 2023-02-07 2023-09-27 一种资源配置方法、系统及相关设备 Ceased WO2024164541A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP23920733.5A EP4651469A4 (en) 2023-02-07 2023-09-27 RESOURCE CONFIGURATION PROCESS, SYSTEM AND ASSOCIATED DEVICE
US19/291,925 US20250358191A1 (en) 2023-02-07 2025-08-06 Resource Configuration Method and System, and Related Device

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN202310080442 2023-02-07
CN202310080442.0 2023-02-07
CN202310651407.X 2023-06-02
CN202310651407.XA CN118509473A (zh) 2023-02-07 2023-06-02 一种资源配置方法、系统及相关设备

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US19/291,925 Continuation US20250358191A1 (en) 2023-02-07 2025-08-06 Resource Configuration Method and System, and Related Device

Publications (1)

Publication Number Publication Date
WO2024164541A1 true WO2024164541A1 (zh) 2024-08-15

Family

ID=92243919

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/122003 Ceased WO2024164541A1 (zh) 2023-02-07 2023-09-27 一种资源配置方法、系统及相关设备

Country Status (4)

Country Link
US (1) US20250358191A1 (zh)
EP (1) EP4651469A4 (zh)
CN (1) CN118509473A (zh)
WO (1) WO2024164541A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119484274A (zh) * 2024-12-05 2025-02-18 天翼云科技有限公司 专线上云系统、专线上云方法和专线上云装置

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN120704752A (zh) * 2024-03-25 2025-09-26 杭州阿里云飞天信息技术有限公司 资源配置方法、电子设备、计算机存储介质和计算机程序产品
CN119583335B (zh) * 2024-11-20 2026-04-21 天翼云科技有限公司 云计算平台部署方法、装置、计算机设备、介质和产品

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107046577A (zh) * 2017-04-28 2017-08-15 深信服科技股份有限公司 一种云混合方法以及系统
US20180167270A1 (en) * 2016-12-13 2018-06-14 International Business Machines Corporation Configuring and naming of cloud provisioning entities
CN109117650A (zh) * 2018-07-25 2019-01-01 华为技术有限公司 一种企业云的创建方法和管理平台
CN113645262A (zh) * 2020-05-11 2021-11-12 中兴通讯股份有限公司 云计算服务系统和方法
CN114024978A (zh) * 2020-07-15 2022-02-08 中移(苏州)软件技术有限公司 一种云资源的同步方法、装置、节点及存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180167270A1 (en) * 2016-12-13 2018-06-14 International Business Machines Corporation Configuring and naming of cloud provisioning entities
CN107046577A (zh) * 2017-04-28 2017-08-15 深信服科技股份有限公司 一种云混合方法以及系统
CN109117650A (zh) * 2018-07-25 2019-01-01 华为技术有限公司 一种企业云的创建方法和管理平台
CN113645262A (zh) * 2020-05-11 2021-11-12 中兴通讯股份有限公司 云计算服务系统和方法
CN114024978A (zh) * 2020-07-15 2022-02-08 中移(苏州)软件技术有限公司 一种云资源的同步方法、装置、节点及存储介质

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP4651469A1 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119484274A (zh) * 2024-12-05 2025-02-18 天翼云科技有限公司 专线上云系统、专线上云方法和专线上云装置

Also Published As

Publication number Publication date
CN118509473A (zh) 2024-08-16
EP4651469A1 (en) 2025-11-19
EP4651469A4 (en) 2026-04-22
US20250358191A1 (en) 2025-11-20

Similar Documents

Publication Publication Date Title
WO2024164541A1 (zh) 一种资源配置方法、系统及相关设备
CN103620578B (zh) 经由网络分割的本地云计算
US7716373B2 (en) Method, apparatus, and computer product for updating software
US9292350B1 (en) Management and provisioning of virtual machines
US10148657B2 (en) Techniques for workload spawning
US20200110552A1 (en) Migrating control of a multi-path logical device from a current mpio driver to a target mpio driver
US11886905B2 (en) Host upgrade method and device
CN112470119B (zh) 一种分布式系统中的业务升级方法、装置及分布式系统
US20240040002A1 (en) Managed connectivity between cloud service edge locations used for latency-sensitive distributed applications
CN108139944A (zh) 具有机器级隔离的多租户多会话目录
US20150372935A1 (en) System and method for migration of active resources
CN108319492B (zh) 复位物理机的方法、装置与系统
JP2024524398A (ja) コンテナクラスタのストレージリソースを管理するための方法および装置、ならびにシステム
CN118075107A (zh) 基于云计算技术的云服务部署方法及云管理平台
CN108345490B (zh) 一种nfv中部署虚拟机的方法和系统
WO2024198986A1 (zh) 一种数据处理的方法及相应装置
CN109783196B (zh) 一种虚拟机的迁移方法及装置
CN113572856B (zh) 为ovn架构配置七层负载均衡的方法、控制方法及介质
US11295018B1 (en) File system modification
CN116225616A (zh) 一种虚拟机控制方法、装置、介质
US12058001B2 (en) Control device, control method, control program and control system
EP4227802A1 (en) Method, apparatus and computing device for configuring compute mode
KR20220157026A (ko) 클라우드 인프라 서비스 제공 장치 및 이를 이용한 방법
US12333316B2 (en) Self-managed configuration of information technology assets in an information technology environment
US9304800B1 (en) Using virtual provisioning machines to provision devices

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23920733

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

WWP Wipo information: published in national office

Ref document number: 2023920733

Country of ref document: EP