Resource change method, device and equipment and computer readable storage medium
By grouping and batching resources, combined with post-operation, the problems of low flexibility and uncontrollable risks in the existing technology are solved, and a more efficient and controllable resource change process is achieved.
Patent Information
- Application Number
- CN202410305673.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2024-01-29
- Filing Date
- 2024-03-15
- Publication Date
- 2025-07-29
AI Technical Summary
In the prior art, resource change methods are fully automatic, with low flexibility, uncontrollable changes risks, and large-scale failures are easily caused during the overall change process.
By obtaining the IaC file, group resources into multiple resource groups and batch changes are made according to the resource group. First, process the first resource group, then process the second resource group, and insert the post-operation to control the change risk.
Effectively control the number of resources for the overall change, reduce the impact of abnormalities, improve the controllability and flexibility of the change process, and reduce the risk of large-scale failures.
Smart Images

Figure CN120386770A_ABST
Abstract
Description
[0001] This application claims the priority of a Chinese patent application with the application number 202410118254.7 and the invention title "Resource Processing Method, Device, Equipment and Computer Readable Storage Medium" filed on January 29, 2024, the entire content of which is incorporated herein by reference. Technical Field
[0002] This application relates to the field of information technology, and particularly to a resource change method, device, equipment and computer readable storage medium. Background Art
[0003] In the field of information technology, the operation of Internet technology (IT) services depends on resources. In some cases, resources can be referred to as IT infrastructure. Resources include a series of physical components and virtual components. For example, the physical components or virtual components are servers, virtual machines, storage, networks, security groups, containers, etc. When using resources to run IT services, resource changes may be made based on the operation requirements of the IT services, such as adding, modifying, deleting, etc.
[0004] In the related art, for the resources to be changed, the management engine is used to read the infrastructure-as-code (IaC) file of the resources, and based on the state of the management engine, a directed acyclic graph for adding, modifying, and deleting resources is generated in combination with the IaC file, and the corresponding resource changes are executed according to the directed acyclic graph until all changes to all resources are completed.
[0005] The above method is fully automated to change all resources as a whole, with low flexibility and low controllability of change risks. Summary of the Invention
[0006] This application provides a resource change method, device, equipment and computer readable storage medium to solve the problems existing in the related art. The technical solutions are as follows:
[0007] In a first aspect, a resource change method is provided. This method is applied to a cloud management platform where an IaC service is deployed. The method includes: obtaining an IaC file submitted by a user, where the IaC file is used to change multiple resources to be changed. The multiple resources are information technology (IT) resources managed by the IaC service. The IaC file includes code for describing the attributes of each of the multiple resources; grouping the multiple resources according to the IaC file to obtain multiple resource groups. The attributes include target attributes, and each resource group in the multiple resource groups includes resources with the same value of the target attribute; changing the resources included in the first resource group among the multiple resource groups based on the IaC file; changing the resources included in the second resource group among the multiple resource groups based on the IaC file, where the change batch of the first resource group precedes the change batch of the second resource group.
[0008] For the resources to be changed, this application will first group the resources and then process them in batches according to the resource groups, making overall changes with the resource groups as the change granularity, effectively controlling the number of resources for the overall change. Even if an exception occurs during the overall change process, the number of affected resources is small.
[0009] In a possible implementation, the attributes described in the IaC file include at least one of the native attributes and management attributes of the resources. The target attributes include at least one of the native attributes and management attributes. The management attributes include non-native attributes obtained based on user settings. The attributes described in the IaC file are not limited and can be native attributes, management attributes, or both native and management attributes, with a wide degree of generality. And at least one of the native attributes and management attributes can be used as the target attribute, with a high degree of flexibility.
[0010] In a possible implementation, the method further includes: receiving a management attribute configuration request, where the management attribute configuration request is used to request configuring the value of the management attribute of at least one of the multiple resources; based on the management attribute configuration request, assigning a value to the management attribute of at least one resource. Triggering the assignment of the management attribute based on the management attribute configuration request makes the configuration timing of the management attribute precise, and the configuration process has a high degree of accuracy.
[0011] In a possible implementation, the native attributes include at least one of the configuration area, business, type, code syntax, and change impact scope. This application does not limit the native attributes described in the IaC file, which can include one or more, with a high degree of flexibility.
[0012] In a possible implementation, the method further includes: receiving a target attribute definition request for requesting to define one or more attributes among the attributes described in the IaC file as target attributes; based on the target attribute definition request, taking one or more attributes among the attributes described in the IaC file as target attributes. The target attributes are identified based on the target attribute definition request, and subsequently, the target attributes can be directly determined from the attributes described in the IaC file according to the target attribute definition request. The determination process is simple and the determination efficiency is high.
[0013] In a possible implementation, grouping a plurality of resources according to the IaC file to obtain a plurality of resource groups includes: adding a grouping label for each resource in the IaC file, where the grouping label for any resource is used to mark the resource group where any resource is located, and the grouping labels for resources with the same target attribute value are the same; based on the IaC file, changing the resources included in the first resource group among the plurality of resource groups includes: determining, according to the grouping labels of each resource, the resources included in the first resource group whose change batch is the current change batch from at least one resource; changing the determined resources based on the IaC file. By adding grouping labels, it is clear which resource group each resource is located in. Subsequently, in the process of changing at the granularity of resource groups, the resources included in the resource group can be determined according to the grouping labels, ensuring that the resources to be changed are the resources included in the first resource group of the current change batch, and the change process has a high degree of accuracy.
[0014] In a possible implementation, the method further includes: inserting a post-operation after the change process of the first resource group, where the post-operation is used to further process the resources included in the first resource group; after changing the resources included in the first resource group among the plurality of resource groups based on the IaC file, the method further includes: performing the post-operation on the resources included in the first resource group. Post-operations can be inserted after the change processes of different resource groups, with a high degree of flexibility. By inserting post-operations, the control and intervention of the change process of the first resource group are realized, thereby controlling the change risk, and the controllability of the change process is high.
[0015] In a possible implementation, the post-operation of the first resource group is executed before changing the resources included in the second resource group. Executing the post-operation of the first resource group before changing the second resource group can timely intervene in case of an abnormality in the change process of the first resource group, thereby preventing the change abnormality of the first resource group from affecting the change of the second resource group.
[0016] In a possible implementation method, before inserting a post-operation after the change process of the first resource group, the method further includes: obtaining the business metrics of the first resource group, where the business metrics indicate the running status of the business running based on the first resource group during the change process of the resources included in the first resource group; determining the post-operation corresponding to the first resource group according to the business metrics of the first resource group. The business metrics can indicate the running status of the business during the change process of the first resource group, which reflects the actual change situation of the first resource group. The post-operation determined according to the actual change situation has higher pertinence and more accurate intervention in the change of the first resource group.
[0017] In a possible implementation manner, the method further includes: providing a change interface for displaying the change process of the resources included in the first resource group and the second resource group, and / or the execution process of the post-operation of the first resource group. The method can provide a change interface to synchronize the resource change situation to the interacting user, so as to manually determine whether intervention is needed according to the displayed change situation, and perform timely intervention in case of intervention, with high timeliness and good interaction experience.
[0018] In a possible case, the post-operation includes at least one of pause processing, detection processing, resource application, and providing an interaction interface. The method does not limit the post-operation inserted after the change process of the first resource group, with high flexibility and wide generality.
[0019] In a second aspect, a resource change device is provided. The device is applied to a cloud management platform where an IaC service is deployed. The device includes: an acquisition module for acquiring an IaC file submitted by a user, where the IaC file is used to change multiple resources to be changed, and the multiple resources are IT resources managed by the IaC service. The IaC file includes code for describing the attributes of each resource in the multiple resources; a grouping module for grouping the multiple resources according to the IaC file to obtain multiple resource groups, where the attributes include target attributes, and the target attributes of the resources included in each resource group in the multiple resource groups have the same value; a change module for changing the resources included in the first resource group among the multiple resource groups based on the IaC file; the change module is further used to change the resources included in the second resource group among the multiple resource groups based on the IaC file, where the change batch of the first resource group precedes the change batch of the second resource group.
[0020] In a possible implementation manner, the attributes described in the IaC file include at least one of the native attributes and management attributes of the resources, the target attributes include at least one of the native attributes and management attributes, and the management attributes include non-native attributes obtained based on user settings.
[0021] In a possible implementation, the obtaining module is further configured to receive a management attribute configuration request for requesting to configure values of management attributes of at least one of multiple resources; and assign values to the management attributes of at least one resource based on the management attribute configuration request.
[0022] In a possible implementation, the native attributes include at least one of a configuration area, a service, a category, a code syntax, and a change impact scope.
[0023] In a possible implementation, the obtaining module is further configured to receive a target attribute definition request for requesting to define one or more attributes described in the IaC file as target attributes; and the grouping module is further configured to, based on the target attribute definition request, use one or more attributes described in the IaC file as target attributes.
[0024] In a possible implementation, the change module is further configured to insert a post-operation after the change process of the first resource group, where the post-operation is used to further process the resources included in the first resource group; and perform the post-operation on the resources included in the first resource group.
[0025] In a possible implementation, the post-operation of the first resource group is executed before changing the resources included in the second resource group.
[0026] In a possible implementation, the obtaining module is further configured to obtain a service metric of the first resource group, where the service metric indicates the running status of the service running based on the first resource group during the change process of the resources included in the first resource group; and determine the post-operation corresponding to the first resource group according to the service metric of the first resource group.
[0027] In a possible implementation, the apparatus further includes: a providing module configured to provide a change interface for displaying the change process of the resources included in the first resource group and the second resource group, and / or the execution process of the post-operation of the first resource group.
[0028] In a possible implementation, the post-operation includes at least one of a pause process, a detection process, a resource application, and providing an interaction interface.
[0029] In a third aspect, a computing device cluster is provided, which includes at least one computing device, and each computing device includes a processor and a memory; the processors of at least one computing device are configured to execute instructions stored in the memory of at least one computing device, so that the computing device cluster executes the resource change method according to any one of the first aspects above.
[0030] Fourthly, a computer-readable storage medium is provided. The computer-readable storage medium includes computer program instructions. When the computer program instructions are executed by a cluster of computing devices, the cluster of computing devices executes the resource change method according to any one of the first aspects above.
[0031] Fifthly, a computer program (product) containing instructions is provided. When the instructions are run by a cluster of computing devices, the cluster of computing devices is caused to execute the resource change method according to any one of the first aspects above.
[0032] Sixthly, a communication device is provided. The device includes a transceiver, a memory, and a processor. Among them, the transceiver, the memory, and the processor communicate with each other through an internal connection path. The memory is used to store instructions, and the processor is used to execute the instructions stored in the memory to control the transceiver to receive signals and control the transceiver to send signals. And when the processor executes the instructions stored in the memory, the processor is caused to execute the method according to the first aspect or any possible implementation manner of the first aspect.
[0033] Optionally, there is one or more processors, and there is one or more memories.
[0034] Optionally, the memory can be integrated with the processor, or the memory is separately arranged from the processor.
[0035] In a specific implementation process, the memory can be a non-transitory memory, such as a read only memory (ROM). It can be integrated with the processor on the same chip, or can be separately arranged on different chips. The present application does not limit the type of the memory and the setting manner of the memory and the processor.
[0036] Seventhly, a chip is provided, including a processor for calling and running instructions stored in a memory, so that a communication device installed with the chip executes the methods according to the above aspects.
[0037] Eighthly, another chip is provided, including an input interface, an output interface, a processor, and a memory. The input interface, the output interface, the processor, and the memory are connected through an internal connection path. The processor is used to execute code in the memory. When the code is executed, the processor is used to execute the methods according to the above aspects.
[0038] It should be understood that for the beneficial effects obtained by the technical solutions of the second to eighth aspects of the present application and the corresponding possible implementation manners, reference can be made to the technical effects of the first aspect and its corresponding possible implementation manners above, which will not be elaborated here. Description of the Drawings
[0039] Figure 1 Schematic diagram of an implementation environment provided by an embodiment of the present application;
[0040] Figure 2 Flowchart of a resource change method provided by an embodiment of the present application;
[0041] Figure 3 Flowchart of another resource change method provided by an embodiment of the present application;
[0042] Figure 4 Schematic diagram of a resource change process provided by an embodiment of the present application;
[0043] Figure 5 Schematic diagram of another resource change process provided by an embodiment of the present application;
[0044] Figure 6 Schematic diagram of the structure of a resource change device provided by an embodiment of the present application;
[0045] Figure 7 Schematic diagram of the structure of a computing device provided by an embodiment of the present application;
[0046] Figure 8 Schematic diagram of the structure of a computing device cluster provided by an embodiment of the present application;
[0047] Figure 9 Schematic diagram of the connection of a computing device provided by an embodiment of the present application. Detailed implementation
[0048] The terms used in the implementation part of the present application are only used to explain the specific embodiments of the present application, rather than to limit the present application. To make the purpose, technical solution and advantages of the present application clearer, the following will further describe the implementation of the present application in detail with reference to the drawings.
[0049] In the field of information technology, the IaC service manages infrastructure through code rather than manual processes. The managed infrastructure includes physical components or virtual components, such as virtual machines, storage, networks, security groups, containers, load balancers (LB), or application programming interfaces (API), etc. In some cases, the code written in IaC technology is usually saved in a file, and this file storing the code can be called an IaC file, which is used to define various components, configurations, and dependencies of the infrastructure. Based on the IaC file, these components can be automatically deployed and managed. For example, changes to the infrastructure can be achieved by modifying the IaC file of the infrastructure.
[0050] In the related art, a management engine is used to change resources. The management engine used can be a declarative tool. The management engine reads an IaC file describing multiple resources, and based on the state of the management engine, generates a directed acyclic graph for adding, modifying, and deleting each resource, indicating the precedence and dependency relationships of change operations such as addition, deletion, and modification through the directed acyclic graph. Then, the management engine changes each resource based on the directed acyclic graph of each resource until all changes to all resources are completed. Multiple resources in the above method are changed as a whole, with low flexibility. When an exception occurs during the change process, all resources changed as a whole may be affected, which may cause large-scale failures and the change risk is uncontrollable.
[0051] The embodiment of the present application provides a resource change method for changing resources involved in IT services. Please refer to Figure 1 , which shows a schematic diagram of the implementation environment of the resource change method provided by the embodiment of the present application. The implementation environment includes a computing device cluster 10, and the computing device cluster 10 includes at least one change device. The change devices can be communicatively connected by wired or wireless networks. In a possible case, a cloud management platform runs on the change device, and an IaC service is deployed on the cloud management platform for executing the resource change method provided by the embodiment of the present application. Optionally, the cloud management platform can run based on one change device, and the resource change method can be independently executed by one change device. The cloud management platform can also run based on multiple change devices included in the computing device cluster 10, and the resource change method can also be interactively executed by multiple change devices included in the computing device cluster 10. The embodiment of the present application does not limit the number of change devices included in the computing device cluster 10, Figure 1 and only two change devices are taken as an example for illustration.
[0052] Exemplarily, the change devices included in the computing device cluster 10 can be any network device with data processing capabilities. The change device can be a server, such as a central server, an edge server, or a local server in a local data center. The server can be a physical server or a cloud server providing cloud computing services. In some embodiments, the change devices included in the computing device cluster 10 can be terminal devices such as desktop computers, laptop computers, or smart phones. When the change devices included in the computing device cluster 10 provide cloud services, the change devices can be referred to as cloud management service platforms. Optionally, the change device can be not only an independent device but also a certain component on the device, such as a transceiver, a processor, or a chip.
[0053] The embodiment of the present application provides a resource change method, which can be applied to the above Figure 1 shown implementation environment. Taking the case where the method is independently executed by one change device as an example, the flowchart of the method is asFigure 2 As shown, it includes S201 - S204.
[0054] S201, obtain the IaC file submitted by the user. The IaC file is used to make changes to multiple resources to be changed. The multiple resources are IT resources managed by the IaC service. The IaC file includes code for describing the attributes of each of the multiple resources.
[0055] In a possible case, a resource is a business unit in a computer system that has a unique identifier and can be produced and allocated. A resource can be a cloud resource, referring to various computing resources provided through the cloud computing model. A resource can also be a local resource. A resource can be any infrastructure that runs based on an instance. The instance can be any device including a central processing unit (CPU), memory, operating system, network, and disk. The device is, for example, at least one of a physical host (computing device), virtual machines (VMs), and containers, and can be used to provide cloud services. In addition, a resource can run based on one instance or based on a cluster including multiple instances. For example, a resource runs based on a server cluster, and the server cluster includes multiple servers.
[0056] Optionally, infrastructure refers to various physical facilities that support applications and services and can form the basic framework of a computing environment. Infrastructure includes hardware and software, and includes but is not limited to virtual machines, storage resources, network components, security components, containers, and servers. Among them, a virtual machine is a virtual server used to run applications. Storage resources are, for example, cloud storage, databases, file systems, etc. Network components include but are not limited to virtual networks, subnets, routing tables, load balancers (LBs), or application programming interfaces (APIs), etc. Security components are, for example, firewall rules, access control policies, etc. Optionally, a resource can also be in addition to infrastructure. For example, a resource includes a system that combines software and hardware such as an instance extended to a database, a message queue, or a multi - tenant cloud service. A tenant refers to an account created on a cloud platform, and the account has a corresponding identity document (ID) and corresponding permissions.
[0057] Exemplarily, a resource provides an interface. The interface refers to a resource - type service that can be called or connected. The interface provided by the resource can be called through methods such as APIs, command lines, or external interfaces, and the capabilities provided by the resource can be used to run IT services. For a resource applied in the IaC technology scenario, the process of calling the interface provided by the resource can be implemented through the IaC service.
[0058] In the embodiments of the present application, the IaC service used to invoke resources is not limited. It can be an imperative IaC service or a declarative IaC service. Among them, the imperative IaC service first emphasizes specific commands to be executed when achieving the required configuration, and then sequentially executes the commands in order. The declarative IaC service first clearly defines the expected state of achieving the required configuration, including which resources are needed and what attributes each resource should have, and then configures according to the defined expected state. Regardless of the type of IaC service, resource editing and distribution configuration can be performed based on the IaC service, thereby managing resources.
[0059] Optionally, the IaC service manages resources through IaC files. The IaC files store IaC codes used to describe resources. The codes in the IaC files describe the attributes of resources in a human-readable domain specified language (DSL). After the IaC engine reads the codes in the IaC files, it performs resource operations according to the resource attributes described in the codes, so that the resources in the system reach the state described in the IaC codes. Among them, the system is, for example, a computer system that provides cloud services.
[0060] In a possible case, the attributes of resources can be divided into native attributes and management attributes. Native attributes refer to the attributes that resources have when they are generated, including at least one of configuration area, business, type, code syntax, and change impact scope. When the resource is a physical component, the configuration area is used to describe the physical location where the resource is located. When the resource is a virtual component, such as a component involved in cloud services, the configuration area can refer to the network location where the resource is located. Business refers to the business based on which the resource runs, which can be any application, such as a game application, a video playback software, or a social software, etc. The business can also be other businesses implemented based on IT services. Type is used to indicate the function of the resource. For example, the type of the resource is a server that provides data processing functions, or a gateway that provides data forwarding functions, etc. Code syntax refers to the code structure of the IaC file of the resource. The change impact scope is used to describe the number of components or the number of businesses affected by the resource change. The components affected by the resource change can refer to the components included in the resource, and can also refer to the components that have a dependency relationship with the resource. The businesses affected by the resource change can refer to the businesses based on which the resource runs, or the businesses associated with the businesses based on which the resource runs.
[0061] Optionally, the management attributes include non-native attributes obtained based on user settings and belong to attributes defined later. Among them, the device for interacting with the user to set the managed resources is, for example, the terminal used by the user or the change device for executing the resource change method. In a possible implementation manner, taking the interaction between the user and the change device to set the management attributes as an example, the change device receives a management attribute definition request, which is used to request to configure the value of the management attributes of at least one of multiple resources; based on the management attribute definition request, assign values to the management attributes of at least one resource.
[0062] Exemplarily, the change device provides an information input control, and the user inputs a management attribute definition request through the information input control. The management attribute definition request includes the resource identifier of the resource for which the management attribute is to be set. The resource identifier is, for example, any information that can distinguish different resources such as the resource name or resource number. Then, the change device parses the resource identifier in the management attribute definition request to determine the resource for which the management attribute is requested to be set, and assigns values to the management attributes of the resource in the IaC file based on the management attribute definition request.
[0063] For example, the resources include a network device and a computer. Since the network device does not include a display and human-computer interaction needs to be carried out using the display included in the computer, the user determines that the network device and the computer are two devices with a dependency relationship, and carries the resource identifiers of the network device and the computer in the management attribute definition request, and inputs the management attribute definition request through the information input control provided by the change device. The change device parses the received management attribute definition request, and determines that the resources for which the management attributes are to be added are the network device and the computer according to the management attribute definition request, and assigns values to the management attributes of the network device and the computer in the IaC file. For example, assign the tag of the network device and the computer to 1, that is, tag = 1. Since the tag values of the network device and the computer are the same, there is a dependency relationship between the network device and the computer. Optionally, the above assignment process can be automatically executed by the change device or implemented through the interaction between the user and the change device. For example, the change device displays the IaC file, and the user adds or modifies the code after reading the IaC file.
[0064] In a possible implementation manner, for the case where the user interacts through other devices, for example, the user adds management attributes through a terminal, the change device can obtain the management attributes added by the user sent by the terminal based on the communication connection with the terminal. In addition, the process of the user adding management attributes can be before the change device obtains the IaC file or after the change device obtains the IaC file. The embodiments of the present application do not limit this.
[0065] In a possible implementation, the attributes described in the IaC file can be distinguished not only in type but also in state. For example, the attributes include historical attributes at a historical moment, current attributes at the current moment, or ideal attributes in an ideal state. For the various native attributes and management attributes shown in the above embodiments, the native attributes and management attributes can be historical attributes, current attributes, or ideal attributes, and the states of different types of attributes can be different. For example, the native attributes of a resource include the service at a historical moment and the type at the current moment, etc.
[0066] Regardless of the above situations of the attributes described in the IaC file, the change device can obtain the IaC file when there is a change requirement for the resource, so as to perform the operation of resource change according to the attributes described in the IaC file. The embodiments of the present application do not limit the generation method of the change requirement of the resource, which can be generated by service change. For example, resource A was used to forward the received traffic data at a historical moment to implement the operation of service A. After service A ended its operation, the running state of resource A remained in the state of forwarding data. Subsequently, based on the running requirements, service B needs to reuse resource A and use resource A for data processing. The service running on resource A changes from service A to service B, and the running state of resource A needs to change from the state of forwarding data to the state of data processing. In some cases, the change requirement of the resource can also be generated by upgrading the resource. For example, users will upgrade the resource periodically to improve the running performance of the resource through upgrading, and then improve the quality of the service running on the resource. Optionally, the change requirement of the resource can be a change requirement at the current moment or a change requirement at a future moment.
[0067] The embodiments of the present application also do not limit the number of resources to be changed, which can be any number, and the resources to be changed can support one service or multiple services. For the implementation scenario where the IaC file is stored in a stack, multiple instances of multiple resources are combined through the stack, and the resources described by the IaC file stored in one stack can be all the resources within a service boundary. Since the IaC file stored in one stack is indivisible, similar to the concept of a transaction in a database, in this case, the resources to be changed can be the resources described by the IaC file stored in one stack, or the resources described by the IaC files stored in multiple stacks. Among them, a stack is a linear data structure, and this linear data structure only allows insertion and deletion operations at one end of the table, etc.
[0068] Regardless of the situation of the resources to be changed, the user can, based on the change requirements of the resources, obtain the IaC file describing the multiple resources to be changed and provide the IaC file to the change device. Optionally, the user can, based on the resources to be changed, obtain the code describing the attributes of each resource and write the code in the IaC file. The user can also obtain the IaC file that was completed and written at a historical moment, use the resources described in the IaC file as the resources to be changed, and provide the IaC file to the change device. In addition, the multiple resources to be changed can be described by one IaC file or by multiple IaC files. For example, due to the large number of resources, the user describes the multiple resources using two IaC files.
[0069] S202. Group the multiple resources according to the IaC file to obtain multiple resource groups. The attributes include target attributes, and for each resource group in the multiple resource groups, the resources included have the same value for the target attribute.
[0070] Exemplarily, after obtaining the IaC file, the change device can directly group the resources according to the IaC file, or can provide the obtained IaC file to the user for the user to review the IaC file. After the review is completed, the resources are grouped according to the reviewed IaC file. For example, the change device displays the IaC file on the display screen, and the user reviews the IaC file and adds management tags for at least one resource in the IaC file during the review process. Since the IaC file is readable code, the user using the resources can perform operations such as previewing, comparing, deviation detection, or version management on the IaC file, thereby realizing manual configuration on the basis of automatically managing the resources based on the IaC file.
[0071] In addition, for the situation where there is an interaction requirement between the change device and the user, for example, in the above embodiment, the change device provides the obtained IaC file to the user for the user to review. In addition to including the IaC engine or processor for executing the resource change method, the change device also includes an interaction component for interacting with the user. The interaction component is, for example, an interaction interface, or can also refer to a visualization component for implementing the visualization function, such as a display screen, a voice player, etc.
[0072] In a possible situation, the change device can also actively review the IaC file. For example, review whether there are syntax errors in the code in the IaC file. Regardless of whether the change device reviews the obtained IaC file, the multiple resources can be grouped and changed based on the IaC file.
[0073] Exemplarily, the change device can directly group multiple resources to obtain multiple resource groups, and then make changes according to the resource groups. The change device can also select the resources to be grouped from multiple resources. In a possible case, the change device determines the change impact scope of each resource according to the IaC file; compares the change impact scope with the corresponding threshold. When the change impact scope is not less than the corresponding threshold, it is determined that the change impact scope of the resource is large and grouping is required. On the contrary, when the change impact scope is less than the corresponding threshold, it is determined that the change impact scope of the resource is small and grouping is not required.
[0074] Taking the change impact scope indicating the number of components as an example, the corresponding threshold for the number of components is the first threshold. There are dependency relationships among multiple components included in resource B. Changing any one of the components in resource B may cause the operation of other components in resource B to be abnormal. When the number of components included in resource B is greater than the first threshold, the number of affected components is greater than the first threshold, and the change impact scope of resource B is large, so grouping changes are required to avoid an overly large change impact scope causing large-scale failures. Among them, the first threshold can be any value set based on experience and the implementation environment.
[0075] Taking the change impact scope indicating the number of services as an example, the corresponding threshold for the number of services is the second threshold. When the number of services associated with resource C is greater than the second threshold, a change occurs in resource C, and the number of affected services is greater than the second threshold, and the change impact scope of resource C is large, so grouping changes are required. Among them, the second threshold can be any value set based on experience and the implementation environment.
[0076] The change device screens out the resources to be grouped from multiple resources and groups the screened resources. Referring to the description of resources in S201, for the case where a resource includes native attributes and management attributes, the target attributes for grouping can include at least one of the native attributes and management attributes. The change device can first determine whether to use native attributes or management attributes to group the resources, and then select the target attributes from the attributes for grouping. Exemplarily, the change device can randomly select the attributes for grouping from the native attributes and management attributes. It is also possible to obtain the weights of the native attributes and the management attributes; use the attribute with the higher weight among the native attributes and the management attributes as the candidate attribute; determine the number of groups corresponding to the candidate attribute, and determine whether to use the candidate attribute as the attribute for grouping according to the number of groups and the reference threshold.
[0077] Optionally, the weights of native attributes and managed attributes can be set based on experience. For example, since native attributes are inherent attributes of resources and objective attributes based on the existence of resources, while managed attributes are subjective attributes defined manually, the accuracy of native attributes is higher than that of user-defined managed attributes. Therefore, the weight of native attributes is higher than that of managed attributes. Or, since managed attributes are user-defined attributes and information manually added to the IaC file, and the changes of managed attributes are also user operations, while native attributes are associated with the local conditions of resources. When the local conditions of resources change, for example, the services supported by the resources change, the services included in the native attributes of the resources will also change. Therefore, the stability of managed attributes is higher than that of native attributes, and the weight of managed attributes can be determined to be higher than that of native attributes based on stability.
[0078] Regardless of how the weights of managed attributes and native attributes are determined, the change device can select the attribute with a higher weight as the candidate attribute and further obtain the number of groups of the candidate attribute to determine whether the candidate attribute can be used as the target attribute based on the number of groups. Since the process of determining the number of groups of managed attributes is similar to that of determining the number of groups of candidate attributes, next, taking the case where the weight of native attributes is higher than that of managed attributes and native attributes are used as candidate attributes as an example, the process of determining the number of groups will be illustrated.
[0079] Optionally, the number of groups of native attributes refers to the number of resource groups obtained when grouping multiple resources based on native attributes. Since the principle followed in the process of grouping resources is to divide resources with the same attributes into the same resource group, for any type of native attribute, the number of groups of this native attribute can be used to indicate the number of different values of the native attributes in multiple resources. Taking five resources to be changed and the native attribute being type as an example, the five resources are server 1, server 2, router, terminal, and switch. In this case, the five resources include four types: server, router, terminal, and switch, and the number of different values is equal to 4. Therefore, the obtained resource groups include resource group 1 for servers, resource group 2 for routers, resource group 3 for terminals, and resource group 4 for switches, and the number of groups corresponding to the type is 4.
[0080] When the native attributes include multiple types, the change device can use the smallest number of groups corresponding to each type as the number of groups of the native attributes. Or, the change device can also use the largest number of groups corresponding to each type as the number of groups of the native attributes, or process the number of groups corresponding to each type, such as averaging or selecting the median, and use the processing result as the number of groups of the native attributes.
[0081] Exemplarily, after determining the number of groups of native attributes, the change device can compare the number of groups of native attributes with a reference threshold. Herein, the reference threshold is any value set based on experience or the implementation environment. The reference threshold is used to reflect the minimum requirement for the grouping granularity. If the grouping granularity is too fine, the number of resource groups is too large, and the number of resources included in each resource group is small, and the change is performed in batches with the resource group as the granularity, which will result in low change efficiency. Therefore, the change device can compare the number of groups with the reference threshold to determine whether the resource groups obtained by division meet the minimum requirement for the grouping granularity if grouped based on native attributes, and further determine whether grouping can be performed according to native attributes.
[0082] When the number of groups of native attributes is greater than the reference threshold, the change device determines that the native attributes do not meet the minimum requirement for the grouping granularity and selects to group according to management attributes. When the number of groups of native attributes is not greater than the reference threshold, the change device determines that the native attributes meet the minimum requirement for the grouping granularity and determines to group according to native attributes.
[0083] Optionally, the change device can also, when obtaining the number of groups of native attributes and the number of groups of management attributes, select the attribute with the smaller number of groups from the native attributes and management attributes as the attribute for grouping. The change device can select any of the above methods to select the attribute for grouping from the native attributes and management attributes, select a target attribute from the attributes for grouping, and group multiple resources based on the target attribute. Since the processes of using native attributes as the target attribute and using management attributes as the target attribute are similar, hereinafter, taking the native attributes as an example, the process of determining the target attribute will be illustrated by way of example. For the process of selecting the target attribute from management attributes, reference can be made to the process of selecting the target attribute from original attributes below, and it will not be repeated here for the time being.
[0084] In a possible implementation manner, since the native attributes include at least one attribute, for example, the native attributes in S201 include at least one of configuration area, service, type, code syntax, and change impact scope. In this case, the change device can use all native attributes as the target attribute or select some native attributes as the target attribute. During the selection process, the change device can randomly select the target attribute from at least one native attribute. For example, the change device selects type and area as the target attributes. Alternatively, the change device determines the native attributes selected by the user as the target attributes. For example, the change device provides an information input control, and the user inputs code syntax and service based on the information input control, and the change device thereby determines code syntax and service as the target attributes for grouping. In addition, during the process of providing the information input control, the change device can also display at least one native attribute included in the resource. For example, the names or image identifiers of each native attribute are displayed on the display screen, or each native attribute is announced by voice.
[0085] In a possible scenario, the change device can also obtain the change weights of each native attribute, and select target attributes from the native attributes according to the change weights. The change weights can be set based on experience and the implementation environment. In a possible scenario, the change weights can be determined according to the number of groups corresponding to each native attribute. There is an inverse proportional relationship between the change weights and the number of groups. The more different values a native attribute includes, the more groups the native attribute has, and the lower the change weight of the native attribute. For example, the resources to be changed are five resources, namely Resource 1, Resource 2, Resource 3, Resource 4, and Resource 5. The native attributes of Resource 1 are Region A, Service A, and Server. The native attributes of Resource 2 are Region B, Service A, and Gateway. The native attributes of Resource 3 are Region C, Service A, and Terminal. The native attributes of Resource 4 are Region D, Service B, and Server. The native attributes of Resource 5 are Region D, Service B, and Gateway. The five resources include four regions, two services, and three types. The number of groups corresponding to the region is four, the number of groups corresponding to the service is two, and the number of groups corresponding to the type is three. Since the number of groups corresponding to the region is the largest, when grouping based on the region, the number of resource groups divided is the largest, the number of resources included in each resource group is the smallest, and the efficiency of changing the resources included in each resource group batch by batch is the slowest. Therefore, the change weight of the region is the lowest. On the contrary, when grouping based on the service, the number of resource groups divided is the smallest, the number of resources included in each resource group is large, and even if the resources are changed at the granularity of the resource group, more resources can be changed at one time, and the change efficiency is high. Therefore, the change weight of the service is the highest.
[0086] The change device can select target attributes from at least one native attribute in any of the above ways. Optionally, the change device can first select the attributes that can be used for grouping from the original attributes and management attributes as shown in the above embodiments, and then determine the target attributes from the selected attributes. The change device can also comprehensively select native attributes and management attributes, that is, the management attributes and native attributes can work together. In a possible scenario, the change device can also not distinguish between native attributes and management attributes, but directly select target attributes from the attributes described in the IaC file. Exemplarily, the change device receives a target attribute definition request, which is used to request to define one or more attributes described in the IaC file as target attributes; based on the target attribute definition request, one or more attributes described in the IaC file are used as target attributes.
[0087] Optionally, the acquisition process of the target attribute definition request is similar to that of the management attribute configuration request. For relevant descriptions of acquiring the management attribute configuration request, refer to S201. In a possible scenario, the target attribute definition request includes an attribute identifier for indicating the attribute selected as the target attribute. The attribute identifier can be the attribute name, the corresponding serial number of the attribute, etc. After receiving the target attribute definition request, the change device can use the attribute indicated by the attribute identifier in the target attribute definition request as the target attribute. Taking the attributes described in the IaC file, including the configuration area, service, category, and label as an example, among them, the configuration area, service, and category belong to native attributes, and the label belongs to the management attribute. The attribute names carried in the target attribute definition request input by the user are the area and the label. The change device selects the configuration area and the label as the target attributes from the configuration area, service, category, and label according to the attribute names.
[0088] Regardless of the method by which the change device selects the target attribute, it can group multiple resources based on the target attribute. In a possible scenario, the target attribute selected by the change device can be one or multiple. That is to say, when grouping resources based on the target attribute, the change device can group based on one target attribute or multiple target attributes. Since the process of grouping resources based on different numbers of target attributes is similar, next, taking the area and type as an example, the process of grouping according to two target attributes is illustrated. The grouping processes for other numbers of target attributes are similar and will not be repeated.
[0089] The change device obtains the values of the target attributes of each resource according to the IaC file, and can add grouping labels to the IaC file according to the values of the target attributes to achieve grouping. In a possible scenario, the change device adds grouping labels for each resource in the IaC file. The grouping label of any resource is used to mark the resource group where any resource is located, and the grouping labels of resources with the same target attribute value are the same.
[0090] Exemplarily, the resources to be grouped include Resource A, Resource B, Resource C, and Resource D. All four resources are located in Region A, and the area in the IaC file = 1. Among them, Resource A and Resource B are servers, and the type in the IaC file = 1. Resource C and Resource D are gateways, and the type in the IaC file = 2. Since the values of area for Resource A and Resource B are both 1 and the values of type are both 1, the change device determines that Resource A and Resource B are in the same resource group, adds a grouping label and assigns a value, for example, group = 1. In addition, since the values of area for Resource C and Resource D are both 1 and the values of type are both 2, the change device determines that Resource C and Resource D are in the same resource group, and adds the grouping label group = 2. Optionally, the grouping label can be any information that can identify different resource groups, including but not limited to the name, serial number, etc. of the resource group. The change device can add a new section of code in the IaC file to indicate the resource group as the grouping label of the resource. It can also modify the original code in the IaC file to obtain the code for indicating the resource group, etc. The number of resources included in multiple resource groups can be the same or different. The difference can be partial or complete.
[0091] In addition, for the case where the change device filters out the resources to be grouped from multiple resources before grouping multiple resources, the change device can divide the resources that do not need to be grouped among the multiple resources into a resource group. Since the change impact range of the resources that do not need to be grouped is small, even if a failure occurs during the overall change process, the explosion radius caused by the failure is within the controllable range, and the change risk is small. In this case, the change impact ranges of the resources that do not need to be grouped included in the resource group are the same. For example, they are all less than the corresponding threshold. Therefore, the above process of filtering out the resources to be grouped from multiple resources can also be referred to as a grouping process based on the change impact range.
[0092] In a possible case, the above grouping process can be executed by the change device or by the user. For example, before providing the IaC file, the user groups multiple resources based on the attributes described in the IaC file, adds the grouping labels corresponding to each resource, and provides the modified IaC file to the change device. Subsequently, after receiving the IaC file, the change device can determine the resource group where each resource is located according to the grouping labels in the IaC file. In some cases, the grouping labels added by the user can also be used as management attributes. Figure 3 A resource change method provided by an embodiment of this application Figure 3The four resources to be changed are Resource 1, Resource 2, Resource 3, and Resource 4. The user divides Resource 1 and Resource 2 into one resource group, and divides Resource 3 and Resource 4 into one resource group according to the target attributes of the four resources. The user adds the grouping results of multiple resources to the IaC file through grouping tags, and provides a resource package including the IaC file to the change device. After that, the change device can perform multiple operations such as preprocessing the resource package and unpacking and parsing the resource package, and determine the resource group where each resource is located according to the grouping tags in the IaC file.
[0093] S203. Change the resources included in the first resource group among multiple resource groups based on the IaC file.
[0094] Optionally, the change device can directly change the resources according to the grouping tags, or store the IaC file in the storage space, and extract the IaC file in the storage space when the resources reach the change batch, so as to change the resources according to the IaC file. The IaC files submitted by the user can be stored in the same storage space or not. For example, when there is only enough storage space for the code corresponding to one resource left in a stack, the code corresponding to one resource in the IaC file can be stored in the remaining storage space, and the remaining code in the IaC file can be stored in another stack, avoiding the situation that the remaining storage space is less than the storage space required by the resource group and the IaC file cannot be stored in the remaining storage space, thus improving the utilization rate of the storage space.
[0095] Regardless of how the IaC file is stored in the storage space, the change device can batch-change each resource group according to the IaC file. In one possible implementation, the change batches of multiple resource groups are different. The difference can be completely different, that is, multiple resource groups are changed serially. The difference can also be partially different. For example, there are some resource groups that are changed in parallel, and there are also resource groups that are changed serially before or after the resource groups that are changed in parallel. The embodiments of the present application do not limit the determination method of the change batches of each resource group, which can be determined based on experience and the implementation environment, or according to the number of resources included in each resource group. The change batch of the resource group and the number of included resources are in a positive or negative correlation relationship. Optionally, the change device can also determine according to the description order of each resource group in the IaC file. The earlier the description order corresponding to the resource group, the earlier the change batch of the resource group.
[0096] Continuing with Figure 3 as an example, Figure 3In this case, since the description order of Resource 1 and Resource 2 is before that of Resource 3 and Resource 4, when the change device reads the IaC file, it also reads Resource 1 and Resource 2 first, and then Resource 3 and Resource 4. The change device determines that the change batch of the resource group including Resource 1 and Resource 2 precedes the change batch of the resource group including Resource 3 and Resource 4. Optionally, the change batches of each resource group can also be set manually. For example, the change device displays the display information of each resource group, and the display information can be the grouping label corresponding to the resource group, or the icons, names, etc. of each resource included in the resource group. The user selects the change batch of each resource group according to the display information of each resource group. For example, the user clicks on the display information of each resource group in sequence, and the change device determines the click order of the display information of each resource group as the change batch of each resource group.
[0097] Regardless of the method by which the change device determines the change batches of each resource group, it can change the resources included in the resource group according to the change batches of each resource group. Since the process of batch change of multiple resource groups is similar, next, taking two resource groups, the first resource group and the second resource group, as an example, the process of batch change of different resource groups will be illustrated. Among them, the first resource group and the second resource group are intended to distinguish different resource groups. Any two change batches in multiple resource groups with different resource groups can be referred to as the first resource group and the second resource group. Optionally, the change batch of the first resource group precedes the change batch of the second resource group.
[0098] Exemplarily, the change device can determine the code corresponding to the resources included in the first resource group whose change batch is the current change batch from the IaC file. The embodiments of the present application do not limit the location of the code describing the attributes of each resource in the IaC file. The codes corresponding to the resources included in the same resource group can be adjacent. For example, in the IaC file, the resources included in one resource group are described first, and then the resources included in another resource group are described. The codes corresponding to the resources included in different resource groups can also be interleaved. Continuing with Figure 3 the example where Resource 1 and Resource 2 belong to the same resource group, and Resource 3 and Resource 4 belong to another resource group, the description order of the four resources in the IaC file can also be Resource 1, Resource 3, Resource 2, and Resource 4.
[0099] Regardless of the situation of the code describing each resource in the IaC file, in one possible case, the change device can determine the resources included in the first resource group whose change batch is the current change batch from at least one resource according to the grouping label of each resource group; and change the determined resources based on the IaC file. The change device parses the IaC file, reads the grouping label in the IaC file, and selects each resource included in the first resource group according to the grouping label. The process of parsing the IaC file can be referred to as traversing by grouping in some cases as Figure 3 shown.
[0100] In a possible scenario, in addition to determining each resource included in the first resource group of the current change batch, the change device can also divide the resources included in each resource group according to grouping tags to achieve Figure 3 the batch preprocessing shown. During the subsequent process of changing the resource group according to the change batch, there is no need to perform the process of selecting the resources included in the resource group from multiple resources again, and the resources included in each divided resource group can be directly changed.
[0101] Regardless of the method by which the change device determines the resource group where each resource is located, the resources included in the first resource group of the current change batch can be changed according to the IaC file. The change operations performed based on the IaC file include adding, modifying, or deleting the code of the IaC file, etc. For example, for any resource to be changed included in the first resource group, the capacity of the instance on which the resource runs can be changed first, and the code corresponding to the resource in the IaC file can also be modified. Subsequently, the resource can be run based on the modified IaC code. By changing the code of the IaC file, the change of the resource can be achieved, and the change process is simple. In a possible scenario, when the change device changes the resources included in the first resource group, the resources included in the first resource group are changed as a whole. That is, during the process of starting to change the first resource included in the first resource group to ending the change of the last resource included in the first resource group, the change process of multiple resources is automatically executed, and during the change process, the change device cannot perform control and intervention.
[0102] Although the change device cannot intervene in the change process of the resources within the resource group, for the change process between resource groups, the change device can intervene. The intervention process is, for example, inserting a post-operation after the change process of the first resource group, and the post-operation is used to further process the resources included in the first resource group. The change device can perform a post-operation on the resources included in the first resource group after the change of the first resource group ends to achieve the intervention in the change process between resource groups.
[0103] The embodiments of the present application do not limit the post-operations inserted after the change process of the first resource group, including Figure 3 at least one of the pause processing, detection processing, resource application, etc. shown. Among them, the pause processing means that after changing any resource group, the change of the resource groups after any resource group in the change batch is temporarily stopped. Through the pause processing, the running situation of the system or business, etc. based on any changed resource group can be observed to determine whether the change of any resource group introduces problems, such as memory leakage or resource leakage. In some cases, the pause processing can also be called pause soaking, etc.
[0104] The detection process is used to detect whether there are any abnormal changes in any resource group. The detection can be that the change device detects the IaC code of each resource included in any resource group to determine whether there are errors in the changed code. The resource application is used to obtain the configuration permission or change permission of the resource, etc. In some cases, there are some resources with high value in the resource, such as expensive cost or high confidentiality level. Due to the high value of the resource, the resource is not allowed to be automatically created and needs to be applied to the corresponding department of the resource. Only after the application is approved and the permission is obtained can it be used and created normally. In a possible case, other operations may also include providing an interaction interface. The interaction interface provided by the change device is used to wait for manual access. For example, the change result of any resource group can also be detected manually. The user reads and checks the change of any resource group to obtain the review result. Then, the user accesses the interaction interface and inputs the review result through the interaction interface.
[0105] The embodiments of the present application do not limit the method for determining the post-operation of the resource group, which can be determined according to experience and the implementation environment. For example, the change device determines that each resource group needs to perform a pause process after the change is completed, so as to meet the soaking requirements and ensure that no problems are introduced in the change of each resource group. Figure 4 It is a schematic diagram of the process of resource change provided by the embodiments of the present application. Figure 4 In it, the change device preprocesses the IaC packages of 9 resources and divides the 9 resources into three resource groups according to the preprocessing results. Among them, resource group 1 includes resources 1, 2, and 3, resource group 2 includes resources 4, 5, and 6, and resource group 3 includes resources 7, 8, and 9. Figure 4 In it, the change batches of each resource group are different, and there is a pause process between each resource group. By setting a pause between the changes of the resource groups, the change explosion radius of IaC is effectively controlled, and thus the effect of controlling the change risk is achieved.
[0106] In a possible case, the change device can determine the post-operation corresponding to each resource group according to the target attribute corresponding to the resource group. For example, according to the change influence range of each resource, each resource is divided into two resource groups. Among them, the change influence range of resource group 1 is greater than that of resource group 2. Since the change influence range of the resources included in resource group 1 is large, the change of resource group 1 is a major change, and the resource group needs to be detected after the change to prevent the introduction of change problems. Optionally, the change device can also interact with the user to determine the post-operation corresponding to the resource group according to the user's settings.
[0107] In addition, determining the post-operation corresponding to the resource group can be done before changing the resource group. For example, after determining the resources included in each resource group for a device change, the process of determining the post-operation can be opened to the user for customization. The user can flexibly configure the post-operation corresponding to the resource group. In a possible implementation, determining the user operation corresponding to the resource group can be done during the process of changing the resource group. For example, a device change obtains the business metrics of the first resource group, where the business metrics indicate the running status of the business running on the first resource group during the change process of the first resource group; and determines the post-operation corresponding to the first resource group according to the business metrics of the first resource group.
[0108] Optionally, the business metrics can be a series of time-series based observation data formed by a monitoring system collecting business operation data. The observation data can be any data that can reflect the business operation status, including but not limited to throughput, response time, or completion volume, etc. Taking the e-commerce business as an example, the completion volume can be the number of orders completed within a unit of time. Optionally, the device change can compare the observation data of each business and determine whether each business is running normally according to the observation data of each business and the corresponding third threshold. Taking the observation metric including the business response time as an example, when the response time is not less than the third threshold, it is determined that the running status of the business is abnormal operation, and the device change determines that the other operation corresponding to any resource group is a suspension process.
[0109] Exemplarily, the device change can also determine whether each business is running normally according to the business metrics, count the number of businesses running normally among the multiple businesses running on the first resource group, and determine the post-operation of the first resource group according to the number of businesses. The device change counts the total number of businesses running on the first resource group and the number of businesses running normally during the change process of the first resource group, divides the number of businesses by the total number of businesses to obtain the first ratio, the device change compares the first ratio with the fourth threshold. When the first ratio is not less than the fourth threshold, it is determined that there is no abnormality in the change process of the first resource group, and the change of the resource group in the next change batch can be continued. When the first ratio is less than the fourth threshold, it is determined that there is an abnormality in the change process of any resource group, and the post-operation of the any resource group is a detection process. Among them, the third threshold and the fourth threshold can be set based on experience and the implementation environment. In some cases, the third threshold and the fourth threshold can be called target values. During the process of changing the first resource group, the change process of the first resource group is detected to achieve a quick response to abnormalities and thus avoid the expansion of abnormalities.
[0110] In a possible implementation, the process of determining the post-operation during the change of the first resource group can also be implemented through interaction between the change device and the user. For example, the change device provides a change interface for displaying the change process of the resources included in the first resource group and the second resource group, and / or the execution process of the post-operation of the first resource group.
[0111] Exemplarily, the change interface provided by the change device may include either the change process or the post-operation, or may display both the change process and the post-operation simultaneously. For example, the change interface includes two pages. The first page displays the change process of the first resource group full screen, and the second page is displayed in the lower right corner or other corners of the first page, including the change batches of each resource group and the post-operation of the currently changed first resource group. The second page is, for example, Figure 4 the page shown. The user can monitor whether there is an abnormal change in the first resource group based on the change process displayed on the first page, and adjust the post-operation of the first resource group at any time according to the monitoring result. For example, based on the existence of an abnormal change in the first resource group during the change process, it is determined that the post-operation of the first resource group is a detection process. After the user sets the post-operation of the first resource group, the change device can display the updated post-operation on the second page.
[0112] Optionally, the post-operation of the first resource group can be one operation or multiple operations. Figure 5 FIG. is a schematic diagram of another resource change process provided by an embodiment of the present application. Figure 5 In this figure, the first resource group is Resource Group 1. After the change of Resource Group 1 is completed, business observation and manual approval will be performed. Among them, business observation corresponds to the detection process in the above embodiment, and manual approval is used to review the detection results. Through double check by the change device and the user, the change situation of the first resource group is detected multiple times, improving the accuracy of the detection results. Thus, in the case of an abnormal change, it can be discovered and controlled in a timely manner, avoiding the expansion of the abnormal change and achieving the effects of early risk interception and minimizing change risks.
[0113] In a possible situation, manual approval can also be understood as providing an interaction interface to provide an interface for human-computer interaction for the user, and the user inputs the review result based on the provided interface to complete the manual approval. Figure 5 The pre-step before the grouped execution and Figure 4 the pre-step are the same, and reference can be made to Figure 4 the relevant description of the pre-step in this figure, which will not be elaborated here.
[0114] Exemplarily, regardless of the post-operation of the first resource group, the change device can execute the post-operation after the change of the first resource group is completed. Optionally, the post-operation can be executed before or after the second resource group, and the embodiments of the present application do not limit this. When the post-operation of the first resource group is executed before the change of the second resource group, the post-operation of the first resource group can be referred to as the post-operation included between the first resource group and the second resource group. Optionally, the post-operations included between different resource groups can be the same as shown in Figure 4 and Figure 5 or different. For example, the other operation corresponding to resource group 1 is suspension processing, and the other operation corresponding to resource group 2 is resource application, etc. Optionally, the post-operation of the resource is reflected by code and added by the change device to the outer layer of the IaC file.
[0115] S204. Change the resources included in the second resource group among the multiple resource groups based on the IaC file, where the change batch of the first resource group precedes the change batch of the second resource group.
[0116] In a possible implementation manner, the process of changing the resources included in the second resource group based on the IaC file is similar to the process of changing the resources included in the first resource group based on the IaC file. Refer to the relevant description of changing the first resource group in S203, and details will not be repeated here. In addition, the second resource group may also have a corresponding post-operation, and the post-operation of the second resource group and the post-operation of the first resource group may be the same or different, and the embodiments of the present application do not limit this.
[0117] In a possible case, when the change device executes the resource change method, it may be that the IaC engine included in the change device executes the above operations. For example, through the IaC engine, grouping of multiple resources, unpacking of resource packages, obtaining the IaC file in the resource package, changing resources based on the IaC file, and inserting post-operations are completed. Among them, inserting the post-operation is, for example, graphical dragging of a user interface (UI) or code implementation, etc. The above IaC engine that supports executing multiple operations can be called a generalized IaC engine. Optionally, the IaC engine can also be only used to change resources based on the IaC file, that is, the above grouping, unpacking, inserting post-operations, etc. are executed by other components included in the change device. The IaC engine that is only used to change resources can be called a narrow-sense IaC engine. For example, other components preprocess the IaC file, extract the code corresponding to each resource group in the IaC file group by group and send it to the IaC engine, and the IaC engine processes the code of the resources included in each resource group.
[0118] In summary, for the resources to be changed in the resource change method provided by the embodiments of the present application, the resources will be grouped first, and then batch processing will be performed according to the resource groups. Even if the number of resources to be changed is large, the resources can be divided into different resource groups, and the number of resources included in each resource group can be controlled. Then, the overall change is carried out with the resource groups, effectively controlling the number of resources for the overall change. Even if an exception occurs during the change process, the number of affected resources is small. Post-operation can be inserted between the resource groups of different change batches, with high flexibility. By inserting post-operation, the change process of the resource group can be controlled or intervened, thereby controlling the change risk. The present application does not limit the determination method of the post-operation corresponding to the resource group, which can be unified management by the change device or user-defined, and the determination method is more flexible. Pause processing is inserted between the resource groups of different change batches to achieve unattended soaking, greatly reducing the labor cost during the change process.
[0119] The resource change method of the embodiments of the present application is introduced above. Corresponding to the above method, the embodiments of the present application also provide a resource change device. Figure 6 It is a schematic structural diagram of a resource change device provided by the embodiments of the present application. Based on Figure 6 the following multiple modules shown, the Figure 6 resource change device shown can execute all or part of the operations shown above. It should be understood that the device may include more additional modules than those shown or omit some of the modules shown. The embodiments of the present application do not limit this. As Figure 2 shown, the device is applied to a cloud management platform where an IaC service is deployed. The device includes: Figure 6
[0120] An acquisition module 601, configured to acquire an IaC file submitted by a user. The IaC file is used to change multiple resources to be changed. The multiple resources are IT resources managed by the IaC service, and the IaC file includes codes for describing the attributes of each resource in the multiple resources;
[0121] A grouping module 602, configured to group the multiple resources according to the IaC file to obtain multiple resource groups. The attributes include target attributes, and the target attributes of the resources included in each resource group among the multiple resource groups have the same value;
[0122] A change module 603, configured to change the resources included in the first resource group among the multiple resource groups based on the IaC file;
[0123] The change module 603 is further configured to change the resources included in the second resource group among the multiple resource groups based on the IaC file, where the change batch of the first resource group precedes the change batch of the second resource group.
[0124] In a possible implementation, the attributes described in the IaC file include at least one of the native attributes and management attributes of the resource, the target attributes include at least one of the native attributes and management attributes, and the management attributes include non-native attributes obtained based on user settings.
[0125] In a possible implementation, the obtaining module 601 is further configured to receive a management attribute configuration request, where the management attribute configuration request is used to request to configure the value of the management attribute of at least one resource among multiple resources; and based on the management attribute configuration request, assign a value to the management attribute of at least one resource.
[0126] In a possible implementation, the native attributes include at least one of the configuration area, service, category, code syntax, and change impact scope.
[0127] In a possible implementation, the obtaining module 601 is further configured to receive a target attribute definition request, where the target attribute definition request is used to request to define one or more attributes described in the IaC file as target attributes; and the grouping module 602 is further configured to, based on the target attribute definition request, use one or more attributes described in the IaC file as target attributes.
[0128] In a possible implementation, the change module 603 is further configured to insert a post-operation after the change process of the first resource group, where the post-operation is used to further process the resources included in the first resource group; and perform the post-operation on the resources included in the first resource group.
[0129] In a possible implementation, the post-operation of the first resource group is executed before changing the resources included in the second resource group.
[0130] In a possible implementation, the obtaining module 601 is further configured to obtain the business metrics of the first resource group, where the business metrics indicate the running status of the service running based on the first resource group during the change process of the resources included in the first resource group; and determine the post-operation corresponding to the first resource group according to the business metrics of the first resource group.
[0131] In a possible implementation, the device further includes: a providing module, configured to provide a change interface, where the change interface is used to display the change process of the resources included in the first resource group and the second resource group, and / or the execution process of the post-operation of the first resource group.
[0132] In a possible implementation, the post-operation includes at least one of pause processing, detection processing, resource application, and providing an interaction interface.
[0133] For the resources to be changed, the device will first group the resources and then process them in batches according to the resource groups. Even if the number of resources to be changed is large, the resources can be divided into different resource groups, and then the overall change can be made with the resource group as the change granularity, effectively controlling the number of resources for the overall change. Even if an exception occurs during the change process, the number of affected resources is small.
[0134] Among them, the acquisition module 601, the grouping module 602, and the change module 603 can all be implemented by software or by hardware. Exemplarily, next, taking the acquisition module 601 as an example, the implementation method of the acquisition module 601 will be introduced. Similarly, the implementation methods of the grouping module 602 and the change module 603 can refer to the implementation method of the acquisition module 601.
[0135] As an example of a software functional unit, the acquisition module 601 can include code running on a computing instance. Among them, the computing instance can include at least one of a physical host (computing device), a virtual machine, and a container. Further, the above computing instance can be one or more. For example, the acquisition module 601 can include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers for running this code can be distributed in the same region or in different regions. Further, the multiple hosts / virtual machines / containers for running this code can be distributed in the same availability zone (AZ) or in different AZs, and each AZ includes one data center or multiple geographically close data centers. Among them, usually one region can include multiple AZs.
[0136] Similarly, the multiple hosts / virtual machines / containers for running this code can be distributed in the same virtual private cloud (VPC) or in multiple VPCs. Among them, usually one VPC is set within one region. For cross-region communication between two VPCs within the same region and between VPCs in different regions, a communication gateway needs to be set in each VPC, and the interconnection between VPCs is realized through the communication gateway.
[0137] As an example of a hardware functional unit, the obtaining module 601 may include at least one computing device, such as a server, etc. Alternatively, the obtaining module 601 may also be a device implemented by an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). Among them, the above PLD may be implemented by a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0138] The multiple computing devices included in the obtaining module 601 may be distributed in the same region or in different regions. The multiple computing devices included in the obtaining module 601 may be distributed in the same availability zone (AZ) or in different AZs. Similarly, the multiple computing devices included in the obtaining module 601 may be distributed in the same virtual private cloud (VPC) or in multiple VPCs. Among them, the multiple computing devices may be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.
[0139] It should be noted that in other embodiments, the obtaining module 601, the grouping module 602, and the changing module 603 may be used to execute any steps in the resource change method. The steps to be implemented by the obtaining module 601, the grouping module 602, and the changing module 603 can be specified as needed. The full functions of the resource change device are realized by the obtaining module 601, the grouping module 602, and the changing module 603 respectively implementing different steps in the resource change method.
[0140] This application also provides a computing device 700. As Figure 7 shown, the computing device 700 includes: a bus 702, a processor 704, a memory 706, and a communication interface 708. The processor 704, the memory 706, and the communication interface 708 communicate with each other through the bus 702. The computing device 700 may be a server or a terminal device. It should be understood that this application does not limit the number of processors and memories in the computing device 700.
[0141] The bus 702 can be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of representation, Figure 7 only one line is used in Figure 7 , but it does not mean that there is only one bus or one type of bus. The bus 702 can include a path for transmitting information between various components of the computing device 700 (for example, the memory 706, the processor 704, the communication interface 708).
[0142] The processor 704 can include any one or more of a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).
[0143] The memory 706 can include volatile memory, such as random access memory (RAM). The processor 704 can also include non-volatile memory, such as read-only memory (ROM), flash memory, a hard disk drive (HDD), or a solid state drive (SSD).
[0144] The memory 706 stores executable program code, and the processor 704 executes the executable program code to respectively implement the functions of the foregoing acquisition module, grouping module, or change module, thereby implementing the resource change method. That is, the memory 706 stores instructions for executing the resource change method.
[0145] The communication interface 708 uses a transceiver module such as, but not limited to, a network interface card or a transceiver to implement communication between the computing device 700 and other devices or a communication network.
[0146] Embodiments of the present application also provide a computing device cluster. The computing device cluster includes at least one computing device. The computing device can be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device can also be a terminal device such as a desktop computer, a laptop computer, or a smart phone.
[0147] As Figure 8 shown, the computing device cluster includes at least one computing device 700. Instructions for executing the resource change method that are the same can be stored in the memory 706 of one or more computing devices 700 in the computing device cluster.
[0148] In some possible implementation manners, partial instructions for executing the resource change method can also be stored separately in the memory 706 of one or more computing devices 700 in the computing device cluster. In other words, a combination of one or more computing devices 700 can jointly execute the instructions for executing the resource change method.
[0149] It should be noted that different memories 706 in different computing devices 700 in the computing device cluster can store different instructions, respectively for executing partial functions of the resource change device. That is, the instructions stored in the memories 706 of different computing devices 700 can implement the functions of one or more of the acquisition module, the change module, or the grouping module.
[0150] In some possible implementation manners, one or more computing devices in the computing device cluster can be connected through a network. Among them, the network can be a wide area network or a local area network, etc. Figure 9 shows a possible implementation manner. As Figure 9 shown, two computing devices 900A and 900B are connected through a network. Specifically, they are connected to the network through the communication interfaces in each computing device. In this type of possible implementation manner, the computing device 900A and the computing device 900B include a bus 902, a processor 904, a memory 906, and a communication interface 908. Instructions for executing the function of the acquisition module are stored in the memory 906 of the computing device 900A. At the same time, instructions for executing the functions of the grouping module and the change module are stored in the memory 906 of the computing device 900B.
[0151] Figure 9 The connection manner between the computing device clusters shown can be considered because the resource change method provided in the present application needs to be based on the resource groups after grouping, so it is considered to hand over the functions implemented by the grouping module and the change module to the computing device 900B for execution.
[0152] It should be understood that Figure 9The functions of the computing device 900A shown can also be completed by multiple computing devices. Similarly, the functions of the computing device 900B can also be completed by multiple computing devices.
[0153] An embodiment of the present application further provides a communication device, which includes: a transceiver, a memory, and a processor. Among them, the transceiver, the memory, and the processor communicate with each other through an internal connection path. The memory is used to store instructions, and the processor is used to execute the instructions stored in the memory to control the transceiver to receive signals and control the transceiver to send signals. And when the processor executes the instructions stored in the memory, the processor is caused to execute Figure 2 the resource change method shown.
[0154] It should be understood that the above-mentioned processor may be a central processing unit (CPU), or may also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. It is worth noting that the processor may be a processor that supports the advanced RISC machines (ARM) architecture.
[0155] Furthermore, in an alternative embodiment, the above-mentioned memory may include a read-only memory and a random access memory, and provide instructions and data to the processor. The memory may also include a non-volatile random access memory. For example, the memory may also store information about the device type.
[0156] The memory may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available. For example, static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchlink DRAM (SLDRAM), and direct rambus RAM (DR RAM).
[0157] An embodiment of the present application also provides a computer program (product) containing instructions. The computer program (product) may be software or a program (product) containing instructions that can run on a computing device or be stored in any available medium. When the computer program (product) runs on at least one computing device, it causes at least one computing device to execute Figure 2 the resource change method shown.
[0158] An embodiment of the present application also provides a computer-readable storage medium. The computer-readable storage medium may be any available medium that a computing device can store or a data storage device such as a data center containing one or more available media. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive), etc. The computer-readable storage medium includes instructions that direct the computing device to execute Figure 2 the resource change method shown.
[0159] An embodiment of the present application further provides a chip, including a processor, configured to call and run instructions stored in the memory, such that a communication device installed with the chip executes Figure 2 the resource change method shown.
[0160] An embodiment of the present application further provides another chip, including: an input interface, an output interface, a processor, and a memory. The input interface, the output interface, the processor, and the memory are connected through an internal connection path. The processor is configured to execute code in the memory. When the code is executed, the processor is configured to execute Figure 2 the resource change method shown.
[0161] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in accordance with the present application are generated in whole or in part. 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. For example, the computer instructions may be transmitted from a website, a computer, a server, or a data center to another website, a computer, a server, or a data center in a wired manner (such as coaxial cable, optical fiber, digital subscriber line) or a wireless manner (such as infrared, wireless, microwave, etc.). The computer-readable storage medium may be any available medium accessible by a computer or a data storage device such as a server, a data center, etc. that includes one or more integrated available media. The available medium may be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk).
[0162] To clearly illustrate the interchangeability of hardware and software, the steps and components of each embodiment have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those of ordinary skill in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.
[0163] The computer program code for implementing the method of the embodiments of the present application can be written in one or more programming languages. These computer program codes can be provided to the processors of general-purpose computers, special-purpose computers, or other programmable rule-finding devices, such that when the program codes are executed by the computers or other programmable rule-finding devices, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The program codes can be executed entirely on the computer, partially on the computer, as an independent software package, partially on the computer and partially on a remote computer, or entirely on a remote computer or server.
[0164] In the context of the embodiments of the present application, the computer program code or relevant data can be carried by any suitable carrier, so that the devices, apparatuses, or processors can perform the various processes and operations described above. Examples of the carrier include signals, computer-readable media, and the like. Examples of signals can include electrical, optical, radio, acoustic, or other forms of propagated signals, such as carrier waves, infrared signals, etc.
[0165] Those skilled in the art can clearly understand that for the convenience and conciseness of description, the specific working processes of the systems, devices, and modules described above can refer to the corresponding processes in the foregoing method embodiments, and will not be elaborated herein.
[0166] In several embodiments provided in the present application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the modules is only a logical function division, and there can be other division methods in actual implementation. For example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed couplings or direct couplings or communication connections to each other can be indirect couplings or communication connections through some interfaces, devices, or modules, and can also be electrical, mechanical, or other forms of connections.
[0167] The modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they can be located in one place, or can be distributed to multiple network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of the embodiments of the present application.
[0168] In addition, the functional modules in the various embodiments of the present application can be integrated into one processing module, or each module can exist physically alone, or two or more modules can be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software functional modules.
[0169] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data for analysis, stored data, displayed data, etc.), and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with the relevant laws, regulations, and standards of relevant countries and regions. For example, the IaC files involved in this application are obtained under full authorization.
[0170] In this application, terms such as "first" and "second" are used to distinguish identical or similar items with basically the same functions. It should be understood that there is no logical or temporal dependence between "first", "second", and "nth", nor are the quantity and execution order limited. It should also be understood that although the following description uses terms such as first and second to describe various elements, these elements should not be limited by the terms. These terms are only used to distinguish one element from another. For example, without departing from the scope of various examples, the first link can be called the second link, and similarly, the second link can be called the first link.
[0171] It should also be understood that in various embodiments of this application, the magnitude of the serial numbers of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0172] In this application, the meaning of the term "at least one" refers to one or more, and the meaning of the term "multiple" refers to two or more. For example, multiple second messages refer to two or more second messages. The terms "system" and "network" are often used interchangeably herein.
[0173] It should be understood that the terms used in the description of various examples herein are only for describing specific examples and are not intended to be limiting. As used in the description of various examples and the appended claims, the singular forms "a", "an", and "the" are also intended to include the plural forms unless the context clearly indicates otherwise.
[0174] It should also be understood that the term "comprising" (also referred to as "includes", "including", "comprises", and / or "comprising") when used in this specification specifies the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or their groups.
[0175] It should also be understood that, depending on the context, the phrase "if it is determined that..." or "if [the stated condition or event] is detected" can be interpreted to mean "when it is determined that...", or "in response to determining...", or "when [the stated condition or event] is detected", or "in response to detecting [the stated condition or event]".
[0176] It should be understood that determining B based on A does not mean determining B solely based on A. B can also be determined based on A and / or other information.
[0177] It should also be understood that throughout the specification, the terms "one embodiment", "an embodiment", "a possible implementation" mean that a particular feature, structure, or characteristic related to the embodiment or implementation is included in at least one embodiment of the present application. Thus, the appearances of "in one embodiment" or "in an embodiment", "a possible implementation" throughout the specification do not necessarily refer to the same embodiment. Additionally, these particular features, structures, or characteristics can be combined in any suitable manner in one or more embodiments.
[0178] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application and are not intended to limit them. Although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features. However, such modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the embodiments of the present application.
Claims
1. A resource change method, characterized in that, The method is applied to a cloud management platform, and an Infrastructure as Code (IaC) service is deployed on the cloud management platform. The method includes: Obtain an IaC file submitted by a user, where the IaC file is used to make changes to multiple resources to be changed. The multiple resources are information technology (IT) resources managed by the IaC service, and the IaC file includes code for describing the attributes of each of the multiple resources. Group the multiple resources according to the IaC file to obtain multiple resource groups. The attributes include target attributes, and each resource group in the multiple resource groups includes resources with the same value of the target attribute. Make changes to the resources included in the first resource group among the multiple resource groups based on the IaC file. Make changes to the resources included in the second resource group among the multiple resource groups based on the IaC file, where the change batch of the first resource group precedes the change batch of the second resource group.
2. The method according to claim 1, wherein The attributes described in the IaC file include at least one of the native attributes and management attributes of the resources. The target attributes include at least one of the native attributes and the management attributes. The management attributes include non-native attributes obtained based on the user settings.
3. The method according to claim 2, characterized in that The method further includes: Receive a management attribute configuration request, where the management attribute configuration request is used to request configuring the value of the management attribute of at least one of the multiple resources. Assign a value to the management attribute of the at least one resource based on the management attribute configuration request.
4. The method according to claim 2 or 3, characterized in that The native attributes include at least one of configuration area, business, type, code syntax, and change impact scope.
5. The method according to any one of claims 2-4, characterized in that, The method further includes: Receive a target attribute definition request, where the target attribute definition request is used to request defining one or more of the attributes described in the IaC file as target attributes. Based on the target attribute definition request, use one or more of the attributes described in the IaC file as target attributes.
6. The method according to any one of claims 1-5, characterized in that, The method further includes: Insert a post-operation after the change process of the first resource group, where the post-operation is used to further process the resources included in the first resource group. After making changes to the resources included in the first resource group among the multiple resource groups based on the IaC file, the method further includes: Execute the post-operation on the resources included in the first resource group.
7. The method according to claim 6, wherein The post-operation of the first resource group is executed before making changes to the resources included in the second resource group.
8. The method according to claim 6 or 7, characterized in that, Before inserting the post-operation after the change process of the first resource group, the method further includes: Obtain the business metrics of the first resource group, where the business metrics indicate the running status of the business running based on the first resource group during the process of making changes to the resources included in the first resource group. Determine the post-operation corresponding to the first resource group according to the business metrics of the first resource group.
9. The method according to any one of claims 1-8, characterized in that, The method further includes: Provide a change interface, where the change interface is used to display the change process of the resources included in the first resource group and the second resource group, and / or the execution process of the post-operation of the first resource group.
10. The method according to any one of claims 6-9, characterized in that, The post - processing operations include at least one of pause processing, detection processing, resource application, and providing a user interaction interface.
11. A resource change device, characterized in that, The device is applied to a cloud management platform, where an Infrastructure as Code (IaC) service is deployed. The device includes: An acquisition module, configured to acquire an Infrastructure as Code (IaC) file submitted by a user. The IaC file is used to make changes to multiple resources to be changed. The multiple resources are information technology (IT) resources managed by the IaC service. The IaC file includes code for describing the attributes of each of the multiple resources. A grouping module, configured to group the multiple resources according to the IaC file to obtain multiple resource groups. The attributes include target attributes. Each resource group in the multiple resource groups includes resources with the same value of the target attribute. A change module, configured to change the resources included in the first resource group among the multiple resource groups based on the IaC file. The change module is further configured to change the resources included in the second resource group among the multiple resource groups based on the IaC file, where the change batch of the first resource group precedes the change batch of the second resource group.
12. The device according to claim 11, characterized in that, The attributes described in the IaC file include at least one of the native attributes and management attributes of the resources. The target attributes include at least one of the native attributes and the management attributes. The management attributes include non - native attributes obtained based on the user settings.
13. The device according to claim 12, characterized in that, The acquisition module is further configured to receive a management attribute configuration request, which is used to request configuring the value of the management attribute of at least one of the multiple resources; and assign a value to the management attribute of the at least one resource based on the management attribute configuration request.
14. The device according to claim 12 or 13, characterized in that, The native attributes include at least one of configuration area, service, type, code syntax, and change impact scope.
15. The device according to any one of claims 12-14, characterized in that, The acquisition module is further configured to receive a target attribute definition request, which is used to request defining one or more of the attributes described in the IaC file as target attributes; the grouping module is further configured to, based on the target attribute definition request, use one or more of the attributes described in the IaC file as target attributes.
16. The device according to any one of claims 11-15, characterized in that, The change module is further configured to insert post - processing operations after the change process of the first resource group. The post - processing operations are used to further process the resources included in the first resource group; and execute the post - processing operations on the resources included in the first resource group.
17. The device according to claim 16, characterized in that, The post - processing operations of the first resource group are executed before changing the resources included in the second resource group.
18. The device according to any one of claims 16 or 17, characterized in that The acquisition module is further configured to acquire the business metrics of the first resource group. The business metrics indicate the operation status of the service running based on the first resource group during the process of changing the resources included in the first resource group; and determine the corresponding post - processing operations of the first resource group according to the business metrics of the first resource group.
19. The device according to any one of claims 11-18, characterized in that, The device further includes: a providing module, configured to provide a change interface for displaying a change process of resources included in the first resource group and the second resource group, and / or an execution process of post-operations of the first resource group.
20. The device according to any one of claims 16-19, characterized in that, The post-operations include at least one of pause processing, detection processing, resource application, and providing a user interaction interface.
21. A cluster of computing devices, characterized in that, The computing device cluster includes at least one computing device, and each computing device includes a processor and a memory; The processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster executes the resource change method according to any one of claims 1-10.
22. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes computer program instructions, and when the computer program instructions are executed by the computing device cluster, the computing device cluster executes the resource change method according to any one of claims 1-10.
23. A computer program product, characterized in that, The computer program product includes a computer program / instructions, and the computer program / instructions are executed by a processor to cause a computer to execute the resource change method according to any one of claims 1-10.