Resource change method and apparatus, and device and computer-readable storage medium
By grouping and batching IT service resource changes, combined with post-operation, the problems of low flexibility in resource changes and uncontrollable risks in the existing technology are solved, and a more efficient and controllable resource change method is achieved.
Patent Information
- Application Number
- PCT/CN2024/122691
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-03-15
- Filing Date
- 2024-09-30
- Publication Date
- 2025-08-07
AI Technical Summary
In the prior art, the resource change method of IT services is fully automatic, with low flexibility and uncontrollable change risks, resulting in large-scale impacts on resources during the overall change process.
By obtaining the IaC file submitted by the user, grouping resources and processing them in batches, first change the first resource group, inserting a post-operation to control the change risk, flexibly control the change granularity and order, and ensuring that the abnormal impact is minimized.
It realizes flexible control of the granularity and order of resource changes, reduces the number of resources affected during the overall change process, and improves the controllability and interactivity of the change process.
Smart Images

Figure CN2024122691_07082025_PF_FP_ABST
Abstract
Description
Resource change method, device, equipment and computer-readable storage medium
[0001] This application claims priority to Chinese patent application No. 202410118254.7, filed on January 29, 2024, with the invention name “Resource processing method, device, equipment and computer-readable storage medium”, and claims priority to Chinese patent application No. 202410305673.1, filed on March 15, 2024, with the invention name “Resource change method, device, equipment and computer-readable storage medium”, the entire contents of which are incorporated into this application by reference. Technical Field
[0002] The present application relates to the field of information technology, and in particular to a resource change method, apparatus, device, and computer-readable storage medium. Background Art
[0003] In the field of information technology, the operation of internet technology (IT) services relies on resources, which in some cases can be referred to as IT infrastructure. Resources include a series of physical and virtual components, such as servers, virtual machines, storage, networks, security groups, and containers. When using resources to run IT services, changes may be made to these resources based on the operational requirements of the IT services, such as adding, modifying, or deleting resources.
[0004] In related technologies, for resources to be changed, the management engine will use the resource's infrastructure-as-code (IaC) file to read the resource. Based on the status of the management engine, the IaC file will be combined to generate a directed acyclic graph of resource additions, modifications, and deletions. The changes to the corresponding resources will be executed according to the directed acyclic graph until all changes to all resources are completed.
[0005] The above method is fully automated, changing all resources as a whole, with low flexibility and low controllability of change risks.
[0006] Summary of the Invention
[0007] This application provides a resource modification method, apparatus, device, and computer-readable storage medium to solve the problems existing in the related art. The technical solution is as follows:
[0008] In a first aspect, a resource change method is provided, which is applied to a cloud management platform, wherein the cloud management platform is deployed with an IaC service, and the method includes: obtaining an IaC file submitted by a user, 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, and the IaC file includes a code for describing the attributes of each resource in the multiple resources; grouping the multiple resources according to the IaC file to obtain multiple resource groups, the attributes including target attributes, and the target attributes of the resources included in each resource group in the multiple resource groups have the same value; changing the resources included in a first resource group among the multiple resource groups based on the IaC file; and changing the resources included in a second resource group among the multiple resource groups based on the IaC file, wherein the change batch of the first resource group precedes the change batch of the second resource group.
[0009] For resources to be changed, this application will first group the resources, then process them in batches according to the resource groups, and make overall changes based on the resource groups as the change granularity, effectively controlling the number of resources changed overall. Even if an abnormality occurs during the overall change process, the number of affected resources is small.
[0010] In one possible implementation, the attributes described in the IaC file include at least one of the resource's native attributes and managed attributes, and the target attributes include at least one of the native attributes and managed attributes. Managed attributes include non-native attributes configured based on user settings. The attributes described in the IaC file are not limited to native attributes, managed attributes, or both, providing broad versatility. Furthermore, at least one of the native and managed attributes can be used as the target attribute, providing high flexibility.
[0011] In one possible implementation, the method further includes: receiving a management attribute configuration request, the management attribute configuration request being used to request configuration of a value of a management attribute of at least one of the multiple resources; and assigning a value to the management attribute of the at least one resource based on the management attribute configuration request. Triggering the assignment of the management attribute based on the management attribute configuration request precisely aligns the timing of configuration of the management attribute, thereby increasing the accuracy of the configuration process.
[0012] In one possible implementation, the native attributes include at least one of a configuration area, a service, a type, a code syntax, and a change impact range. This application does not limit the native attributes described in the IaC file, and can include one or more, which is highly flexible.
[0013] In one possible implementation, the method further includes: receiving a target attribute definition request, the target attribute definition request being used to request defining one or more attributes from the attributes described in the IaC file as target attributes; and, based on the target attribute definition request, defining the one or more attributes from the attributes described in the IaC file as target attributes. The target attributes are identified based on the target attribute definition request, and the target attributes can subsequently be directly determined from the attributes described in the IaC file based on the target attribute definition request, resulting in a simple and efficient determination process.
[0014] In one possible implementation, multiple resources are grouped according to an IaC file to obtain multiple resource groups, including: adding a grouping tag for each resource in the IaC file, wherein the grouping tag of any resource is used to mark the resource group in which any resource is located, and resources with the same target attribute value have the same grouping tag; based on the IaC file, the resources included in the first resource group of the multiple resource groups are changed, including: determining from at least one resource, based on the grouping tags of each resource, that the change batch is the resources included in the first resource group of the current change batch; and changing the determined resources based on the IaC file. By adding the grouping tag, the resource group in which each resource is located is clarified. Subsequently, in the process of making changes at the resource group granularity, the resources included in the resource group can be determined based on the grouping tag, ensuring that the changed resources are the resources included in the first resource group of the current change batch, and the change process is highly accurate.
[0015] In one possible implementation, the method further includes: inserting a post-operation after the change process for 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 multiple 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 for different resource groups, providing high flexibility. By inserting post-operations, control and intervention in the change process of the first resource group are achieved, thereby mitigating change risks and ensuring a high degree of control over the change process.
[0016] In one possible implementation, post-configuration operations for the first resource group are performed before resources included in the second resource group are modified. Performing post-configuration operations for the first resource group before modifying the second resource group allows for timely intervention if an anomaly occurs during the modification of the first resource group, thereby preventing the anomaly from affecting the modification of the second resource group.
[0017] In one possible implementation, before inserting a post-operation after the change process of the first resource group, the method further includes: obtaining a business indicator for the first resource group, where the business indicator indicates the operational status of a business running based on the first resource group during the change process of the resources included in the first resource group; and determining a corresponding post-operation for the first resource group based on the business indicator for the first resource group. The business indicator indicates the operational status of the business during the change process of the first resource group, reflecting the actual change status of the first resource group. Post-operations determined based on the actual change status are more targeted and provide more precise intervention in the change of the first resource group.
[0018] In one possible implementation, the method further includes providing a change interface for displaying the change process of resources included in the first resource group and the second resource group, and / or the execution process of post-operations of the first resource group. This method can provide the change interface to synchronize resource changes to the interacting user, allowing the user to manually determine whether intervention is necessary based on the displayed changes. If intervention is necessary, timely intervention can be performed, resulting in a high degree of timeliness and a superior interactive experience.
[0019] In one possible case, the post-operation includes at least one of suspending processing, detecting processing, requesting resources, and providing an interactive interface. The method is not limited to the post-operation inserted after the change process of the first resource group, and has high flexibility and wide applicability.
[0020] In a second aspect, a resource change device is provided, which is applied to a cloud management platform, and the cloud management platform is deployed with an IaC service. The device includes: an acquisition module, which is used to obtain 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 a code for describing the attributes of each resource in the multiple resources; a grouping module, which is used 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 in the multiple resource groups have the same value; a change module, which is used to change the resources included in the first resource group among the multiple resource groups based on the IaC file; the change module is also used to change the resources included in the second resource group among the multiple resource groups based on the IaC file, wherein the change batch of the first resource group precedes the change batch of the second resource group.
[0021] In one possible implementation, the attributes described in the IaC file include at least one of native attributes and management attributes of the resource, the target attributes include at least one of native attributes and management attributes, and the management attributes include non-native attributes obtained based on user settings.
[0022] In a possible implementation, the acquisition module is further used to receive a management attribute configuration request, which is used to request configuration of a value of a management attribute of at least one resource among multiple resources; and assign a value to the management attribute of at least one resource based on the management attribute configuration request.
[0023] In a possible implementation, the native attribute includes at least one of a configuration area, a business, a type, a code syntax, and a change impact scope.
[0024] In one possible implementation, the acquisition module is further used to receive a target attribute definition request, which is used to request to define one or more attributes in the attributes described in the IaC file as target attributes; the grouping module is further used to use one or more attributes in the attributes described in the IaC file as target attributes based on the target attribute definition request.
[0025] 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 configured 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.
[0026] In a possible implementation, the post-operation of the first resource group is performed before the resources included in the second resource group are changed.
[0027] In one possible implementation, the acquisition module is also used to obtain business indicators of the first resource group, where the business indicators indicate the operating status of the business running based on the first resource group during the process of changing the resources included in the first resource group; and determine the post-operation corresponding to the first resource group based on the business indicators of the first resource group.
[0028] In a possible implementation, the device further includes: a providing module for providing a change interface, the change interface being used to display the change process of 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.
[0029] In a possible implementation, the post-operation includes at least one of pausing processing, detecting processing, requesting resources, and providing an interactive interface.
[0030] In a third aspect, a computing device cluster is provided, which includes at least one computing device, each computing device including a processor and a memory; the processor of at least one computing device is used to execute instructions stored in the memory of at least one computing device, so that the computing device cluster executes any one of the resource change methods in the above-mentioned first aspect.
[0031] In a fourth aspect, a computer-readable storage medium is provided, which includes computer program instructions. When the computer program instructions are executed by a computing device cluster, the computing device cluster executes any one of the resource change methods in the first aspect.
[0032] In a fifth aspect, a computer program (product) comprising instructions is provided. When the instructions are executed by a computing device cluster, the computing device cluster executes any one of the resource change methods of the first aspect.
[0033] In a sixth aspect, a communication device is provided, comprising: a transceiver, a memory, and a processor. The transceiver, the memory, and the processor communicate with each other via 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. When the processor executes the instructions stored in the memory, it performs the method according to the first aspect or any possible implementation of the first aspect. Optionally, the communication device may be a chip.
[0034] Optionally, there are one or more processors and one or more memories.
[0035] Optionally, the memory may be integrated with the processor, or the memory may be provided separately from the processor.
[0036] In the specific implementation process, the memory can be a non-transitory memory, such as a read-only memory (ROM), which can be integrated on the same chip as the processor or be set on different chips. This application does not limit the type of memory and the setting method of the memory and the processor.
[0037] In a seventh aspect, a chip is provided, comprising a processor for calling and executing instructions stored in a memory, so that a communication device equipped with the chip executes the methods in the above aspects.
[0038] In an eighth aspect, another chip is provided, comprising: an input interface, an output interface, a processor and a memory, wherein the input interface, the output interface, the processor and the memory are connected through an internal connection path, and the processor is used to execute the code in the memory. When the code is executed, the processor is used to execute the methods in the above aspects.
[0039] It should be understood that the above-mentioned resource change device can be a chip or a communication device. The beneficial effects achieved by the technical solutions of the second to eighth aspects of this application and the corresponding possible implementation methods can be referred to the above-mentioned technical effects of the first aspect and its corresponding possible implementation methods, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] FIG1 is a schematic diagram of an implementation environment provided by an embodiment of the present application;
[0041] FIG2 is a flow chart of a resource change method provided in an embodiment of the present application;
[0042] FIG3 is a flow chart of another resource change method provided in an embodiment of the present application;
[0043] FIG4 is a schematic diagram of a resource change process provided by an embodiment of the present application;
[0044] FIG5 is a schematic diagram of another resource change process provided by an embodiment of the present application;
[0045] FIG6 is a schematic diagram of the structure of a resource changing device provided in an embodiment of the present application;
[0046] FIG7 is a schematic diagram of the structure of a computing device provided in an embodiment of the present application;
[0047] FIG8 is a schematic diagram of the structure of a computing device cluster provided in an embodiment of the present application;
[0048] FIG9 is a connection diagram of a computing device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0049] The terms used in the embodiments of this application are only used to explain the specific embodiments of this application and are not intended to limit this application. To make the purpose, technical solutions and advantages of this application clearer, the embodiments of this application will be further described in detail below with reference to the accompanying drawings.
[0050] In the information technology field, Infrastructure as a Construction (IaC) services manage infrastructure through code rather than manual processes. The managed infrastructure includes physical or virtual components, such as virtual machines, storage, networks, security groups, containers, load balancers (LBs), or application programming interfaces (APIs). In some cases, the code written in IaC technology is often stored in files, called IaC files. These files are used to define the various components, configurations, and dependencies of the infrastructure. Based on IaC files, these components can be automatically deployed and managed. For example, changes to the infrastructure can be implemented by modifying the infrastructure's IaC files.
[0051] 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 the IaC file that describes multiple resources, and based on the status of the management engine, generates a directed acyclic graph of the addition, modification, and deletion of each resource. The directed acyclic graph indicates the priority and dependency relationships of the addition, deletion, modification, and other change operations. Afterwards, the management engine changes each resource based on the directed acyclic graph of each resource until all changes to all resources are completed. The multiple resources in the above method are changed as a whole, which has low flexibility. When an abnormality occurs in the change process, all resources of the overall change may be affected, which may cause large-scale failures and uncontrollable change risks.
[0052] The embodiment of the present application provides a resource change method for changing the 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 connected to each other by means of a wired or wireless network. In one possible case, the change device runs a cloud management platform, and the cloud management platform is deployed with an IaC service 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 only takes two change devices as an example for illustration.
[0053] Exemplarily, the change device 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 that provides cloud computing services. In some embodiments, the change device included in the computing device cluster 10 can be a terminal device such as a desktop computer, a laptop computer, or a smart phone. In the case where the change device included in the computing device cluster 10 provides cloud services, the change device can be referred to as a cloud management service platform. Optionally, in addition to being an independent device, the change device can also be a component on the device, such as a transceiver, a processor, or a chip.
[0054] An embodiment of the present application provides a resource change method, which can be applied to the implementation environment shown in Figure 1 above. Taking the method being independently executed by a change device as an example, the flowchart of the method is shown in Figure 2, including S201-S204.
[0055] S201 , obtaining 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. The IaC file includes a code for describing the attributes of each resource in the multiple resources.
[0056] In one possible scenario, a resource is a business unit in a computer system that has a unique identifier and can be produced and allocated. Resources can be cloud resources, which refer to various computing resources provided through the cloud computing model, or resources can be local resources. Resources can be any infrastructure that runs on an instance. An instance can be any device including a central processing unit (CPU), memory, operating system, network, and disk. The device can be, for example, at least one of a physical host (computing device), a virtual machine (VMs), and a container, which can be used to provide cloud services. In addition, resources can run based on one instance or on a cluster including multiple instances. For example, resources run based on a server cluster, which includes multiple servers.
[0057] Optionally, infrastructure refers to various physical facilities that support applications and services, which can constitute the basic framework of the 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, virtual machines are virtual servers used to run applications, and 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 balancing (LB) or application programming interfaces (APIs), etc. Security components are, for example, firewall rules, access control policies, etc. Optionally, resources can also be in addition to infrastructure. For example, resources include instances extended to databases, message queues, or multi-tenant cloud services and other systems that combine software and hardware. A tenant refers to an account created on the cloud platform, which has a corresponding identity document (ID) and corresponding permissions.
[0058] For example, a resource provides an interface, which refers to a resource-type service that can be called or connected. This interface can be called through an API, command line, or external interface, utilizing the resource's externally exposed capabilities to run IT services. For resource applications in IaC technology scenarios, calling the resource's interface can be implemented through IaC services.
[0059] The embodiments of the present application do not limit the IaC service used to call resources. It can be an imperative IaC service or a declarative IaC service. Among them, the imperative IaC service first emphasizes the specific commands when the required configuration is executed, and then executes the commands in sequence. The declarative IaC service first clearly defines the expected state to achieve the required configuration, including which resources are required and what attributes each resource should have, and then configures it according to the defined expected state. Regardless of the type of IaC service, resources can be edited and distributed based on the IaC service to manage resources.
[0060] Optionally, an IaC service manages resources through an IaC file. An IaC file contains IaC code describing resources. The code in the IaC file describes resource attributes in a human-readable domain-specific language (DSL). After reading the code in the IaC file, the IaC engine performs resource operations based on the resource attributes described in the code, bringing the resources in the system to the state described in the IaC code. For example, the system is a computer system that provides cloud services.
[0061] In one possible scenario, resource attributes can be divided into native attributes and managed attributes. Native attributes refer to the attributes of a resource at the time of its creation, including at least one of configuration area, business, type, code syntax, and change impact scope. If the resource is a physical component, the configuration area describes the physical location of the resource. If the resource is a virtual component, such as a component involved in a cloud service, the configuration area can refer to the network location of the resource. Business refers to the business that runs on the resource and can be any application, such as a game application, video player, or social networking software. Businesses can also be other businesses implemented based on IT services. Type indicates the function of the resource. For example, a resource type could be a server that provides data processing functions or a gateway that provides data forwarding functions. Code syntax refers to the code structure of the resource's IaC file. Change impact scope describes the number of components or businesses affected by a resource change. Components affected by a resource change can refer to components included in the resource or components that have dependencies on the resource. Businesses affected by a resource change can refer to businesses that run on the resource or businesses associated with businesses that run on the resource.
[0062] Optionally, the management attributes include non-native attributes obtained based on user settings, which are acquired attributes. The device that interacts with the user to set the management resources is, for example, a terminal used by the user, or a change device used to execute the resource change method. In one possible implementation, 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 the configuration of a value for the management attribute of at least one resource among multiple resources; and assigns a value to the management attribute of the at least one resource based on the management attribute definition request.
[0063] For example, the change device provides an information input control, through which the user enters a management attribute definition request. The management attribute definition request includes the resource identifier of the resource for which the management attribute is to be set. The resource identifier can be, for example, a resource name or resource number, or any other information that distinguishes one resource from another. The change device then 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 the resource's management attributes in the IaC file based on the management attribute definition request.
[0064] For example, resources include network devices and computers. Since network devices do not include displays, human-computer interaction requires the use of displays included in computers. Therefore, the user determines that the network devices and computers are two devices with a dependent relationship, carries the resource identifiers of the network devices and computers 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 to be added with management attributes are network devices and computers based on the management attribute definition request, and assigns the management attributes of the network devices and computers in the IaC file. For example, the tag of the network device and computer is assigned to 1, that is, tag=1. Since the tag values of the network device and computer are the same, there is a dependent relationship between the network device and the computer. Optionally, the above assignment process can be automatically executed by the change device, or it can be implemented by the user interacting with 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.
[0065] In one possible implementation, if a user interacts with another device, for example, by adding management attributes through a terminal, the change device can obtain the user-added management attributes sent by the terminal based on the communication connection between the change device and the terminal. Furthermore, the user adding management attributes can occur before or after the change device obtains the IaC file, though this is not limited in this embodiment of the present application.
[0066] In one possible implementation, the attributes described in the IaC file may be differentiated not only in type but also in state. For example, the attributes include historical attributes at historical moments, current attributes at the current moment, or ideal attributes under ideal conditions. With respect to the various native attributes and management attributes shown in the above embodiments, the native attributes and management attributes may be historical attributes, current attributes, or ideal attributes, and the states of different types of attributes may be different. For example, the native attributes of a resource include the business at historical moments and the type at the current moment, etc.
[0067] Regardless of the above-mentioned conditions for the attributes described in the IaC file, the change device can obtain the IaC file when there is a change requirement for the resource to perform the resource change operation according to the attributes described in the IaC file. The embodiment of the present application does not limit the way in which the resource change requirement is generated, and it can be generated by a business change. For example, resource A is used to forward the received traffic data at a historical moment to realize the operation of business A. After business A ends its operation, the operating state of resource A remains in the state of forwarding data. Afterwards, business B needs to reuse resource A based on operational requirements and use resource A for data processing. The business running based on resource A is changed from business A to business B, and the operating state of resource A needs to be changed from the state of forwarding data to the state of data processing. In some cases, the resource change requirement can also be generated by upgrading the resource. For example, the user will upgrade the resource in stages to improve the operating performance of the resource by upgrading the resource, thereby improving the quality of the business based on the resource operation. Optionally, the resource change requirement can be a change requirement at the current moment or a change requirement at a future moment.
[0068] The embodiments of the present application do not limit the number of resources to be changed, which can be any number, and the resources to be changed can be used to support one business or multiple businesses. 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 a stack can be all resources within the boundary of a business. Since the IaC files stored in a stack are indivisible, similar to the concept of transactions 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, the stack is a linear data structure, which only allows insertion and deletion operations at one end of the table.
[0069] Regardless of the situation of the resources to be changed, the user can obtain an IaC file describing the multiple resources to be changed based on the resource change requirements and provide the IaC file to the change device. Optionally, the user can obtain the code describing the attributes of each resource based on the resources to be changed and write the code in the IaC file. It is also possible to obtain an IaC file that was 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 multiple resources through two IaC files.
[0070] S202 , grouping multiple resources according to the IaC file to obtain multiple resource groups, wherein the attributes include a target attribute, and the target attributes of the resources included in each resource group in the multiple resource groups have the same value.
[0071] For example, after obtaining the IaC file, the change device may directly group the resources according to the IaC file, or it may provide the obtained IaC file to the user, who may review the IaC file and, after the review, group the resources according to the reviewed IaC file. For example, the change device displays the IaC file on a display screen, and the user reviews the IaC file, adding at least one resource management tag to the IaC file during the review process. Because the IaC file is a readable code, users who use the resources can perform operations such as previewing, comparing, detecting deviations, or version management on the IaC file, thereby achieving manual configuration based on automated resource management based on the IaC file.
[0072] Furthermore, in cases where the change device requires user interaction, such as in the above embodiment where the change device provides the acquired IaC file to the user for review, the change device includes not only an IaC engine or processor for executing the resource change method but also interactive components for user interaction. These interactive components can be, for example, interactive interfaces or visualization components for implementing visualization functions, such as display screens and voice players.
[0073] In one possible scenario, the change device may also proactively review the IaC file, for example, reviewing whether the code in the IaC file has syntax errors, etc. Regardless of whether the change device reviews the obtained IaC file, multiple resources can be grouped and changed based on the IaC file.
[0074] Exemplarily, the change device can directly group multiple resources to obtain multiple resource groups, and then perform changes based on the resource groups. The change device can also select resources to be grouped from the multiple resources. In one possible scenario, the change device determines the change impact scope of each resource based on the IaC file; compares the change impact scope with the corresponding threshold; if 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; conversely, if the change impact scope is less than the corresponding threshold, it is determined that the change impact scope of the resource is small and no grouping is required.
[0075] Taking the number of components indicated by the scope of change impact as an example, the corresponding threshold for the number of components is the first threshold. Resource B includes multiple components with dependencies. Changing any component in resource B may cause abnormal operation of other components in resource B. If the number of components in resource B exceeds the first threshold, the number of affected components is greater than the first threshold. The scope of change impact of resource B is large, and grouped changes are required to avoid excessive impact and large-scale failures. The first threshold can be an arbitrary value set based on experience and implementation environment.
[0076] For example, the threshold corresponding to the number of services indicated by the scope of the change is the second threshold. If the number of services associated with resource C exceeds the second threshold, resource C has been changed, and the number of affected services exceeds the second threshold. The scope of the change is large, and a group change is required. The second threshold can be any value set based on experience and implementation environment.
[0077] The change device filters out resources to be grouped from multiple resources, and groups the filtered resources. Referring to the description of resources in S201, for the case where resources include native attributes and management attributes, the target attributes used for grouping may include at least one of the native attributes and management attributes. The change device may first determine whether to use native attributes or management attributes to group resources, and then select target attributes from the attributes used for grouping. Exemplarily, the change device may randomly select attributes for grouping from native attributes and management attributes. It is also possible to obtain the weights of the native attributes and the weights of the management attributes; use the attributes with higher weights in the native attributes and management attributes as candidate attributes; determine the number of groups corresponding to the candidate attributes, and determine whether to use the candidate attributes as attributes for grouping based on the number of groups and the reference threshold.
[0078] Optionally, the weights of native attributes and management attributes can be set based on experience. For example, since native attributes are innate attributes of resources and are objective attributes based on the existence of resources, while management attributes are subjective attributes defined manually, the accuracy of native attributes is higher than the accuracy of user-defined management attributes. Therefore, the weight of native attributes is higher than the weight of management attributes. Alternatively, since management attributes are user-defined attributes, they are information manually added to the IaC file, and changes to management attributes are also user operations, while native attributes are associated with the local situation of the resource. When the local situation of the resource changes, for example, the business supported by the resource changes, the business included in the native attributes of the resource will also change. Therefore, the stability of management attributes is higher than that of native attributes, and the weight of management attributes can be determined to be higher than that of native attributes based on stability.
[0079] Regardless of how the weights of managed and native attributes are determined, the device that changes the attribute selects the attribute with the higher weight as a candidate attribute and further determines the number of groups for the candidate attribute. Based on the number of groups, the device determines whether the candidate attribute can be used as the target attribute. Because the process for determining the number of groups for managed attributes is similar to that for candidate attributes, the following example illustrates the process of determining the number of groups, using a case where the weight of the native attribute is higher than that of the managed attribute and the native attribute is selected as a candidate attribute.
[0080] Optionally, the number of groups of native attributes refers to the number of resource groups obtained when multiple resources are grouped based on the 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 the native attribute can be used to indicate the number of different values of the native attribute in multiple resources. For example, if the multiple resources to be changed are five resources and the native attribute is the type, 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 resource groups obtained 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 types is 4.
[0081] If a native attribute includes multiple types, the modification device may use the smallest number of groups among the numbers of groups corresponding to each type as the number of groups for the native attribute. Alternatively, the modification device may use the largest number of groups among the numbers of groups corresponding to each type as the number of groups for the native attribute. Alternatively, the modification device may process the numbers of groups corresponding to each type, such as averaging or selecting the median, and use the result as the number of groups for the native attribute.
[0082] 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. The reference threshold is an arbitrary value set based on experience or implementation environment. The reference threshold is used to reflect the minimum requirements for 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, performing batch changes based on the granularity of resource groups 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 grouping based on native attributes meet the minimum requirements for grouping granularity, and then determine whether grouping can be performed based on native attributes.
[0083] If the number of groups for the native attribute exceeds the reference threshold, the device will determine that the native attribute does not meet the minimum grouping granularity requirement and will choose to group based on the managed attribute. If the number of groups for the native attribute does not exceed the reference threshold, the device will determine that the native attribute meets the minimum grouping granularity requirement and will choose to group based on the native attribute.
[0084] Optionally, the change device may also, after obtaining the number of groups of native attributes and the number of groups of management attributes, select an attribute with fewer groups from the native attributes and management attributes as the attribute for grouping. The change device may select any of the above methods to select the attribute for grouping from the native attributes and management attributes, select the target attribute from the attributes for grouping, and group multiple resources based on the target attribute. Since the process of using native attributes as target attributes and using management attributes as target attributes is similar, the process of determining the target attribute will be explained below using native attributes as an example. The process of selecting the target attribute from the management attributes can be referred to as the process of selecting the target attribute from the original attributes, which will not be repeated here.
[0085] In one possible implementation, since the native attributes include at least one attribute, for example, the native attributes in S201 include at least one of the configuration area, business, type, code syntax and change impact range. In this case, the change device can use all native attributes as target attributes, or select some native attributes as target attributes. 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 attribute. Alternatively, the change device determines the native attribute selected by the user as the target attribute. For example, the change device provides an information input control, and the user inputs the code syntax and business based on the information input control, and the change device thereby determines the code syntax and business as the target attribute for grouping. In addition, in 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, displaying the name or image identifier of each native attribute on the display screen, or announcing each native attribute by voice.
[0086] In one possible scenario, the change device can also obtain the change weights of each native attribute and select a target attribute from the native attributes based on the change weights. The change weights can be set based on experience and the implementation environment. In one possible scenario, the change weights can be determined based on the number of groups corresponding to each native attribute. The change weight and the number of groups are inversely proportional: the more different values a native attribute has, the more groups it has, and the lower its change weight. For example, there are five resources to be changed: Resource 1, Resource 2, Resource 3, Resource 4, and Resource 5. Resource 1's native attributes are Region A, Service A, and Server; Resource 2's native attributes are Region B, Service A, and Gateway; Resource 3's native attributes are Region C, Service A, and Terminal; Resource 4's native attributes are Region D, Service B, and Server; and Resource 5's native attributes are Region D, Service B, and Gateway. The five resources include four regions, two services, and three categories. The number of groups corresponding to regions is four, the number of groups corresponding to services is two, and the number of groups corresponding to categories is three. Because regions correspond to the largest number of groups, when grouping by region, the number of resource groups is the largest, each resource group contains the fewest resources, and batch changes to the resources in each resource group are the slowest. Therefore, regions have the lowest change weight. Conversely, when grouping by business, the number of resource groups is the smallest, and each resource group contains more resources. Even when making resource changes at the resource group granularity, more resources can be changed at once, improving change efficiency. Therefore, business changes have the highest change weight.
[0087] The change device can select the target attribute from at least one native attribute in any of the above-mentioned ways. Optionally, the change device can first select the attribute that can be used for grouping from the original attributes and the management attributes as shown in the above-mentioned embodiment, and then determine the target attribute from the selected attributes. The change device can also comprehensively select the native attributes and the management attributes, that is, the management attributes and the native attributes can work together. In one possible case, the change device may also not distinguish between the native attributes and the management attributes, but directly select the target attribute from the attributes described in the IaC file. Exemplarily, the change device receives a target attribute definition request, and the target attribute definition request is used to request to define one or more attributes in the attributes described in the IaC file as target attributes; based on the target attribute definition request, one or more attributes in the attributes described in the IaC file are used as target attributes.
[0088] Optionally, the acquisition process of the target attribute definition request is similar to the acquisition process of the management attribute configuration request, and reference may be made to the relevant description of obtaining the management attribute configuration request in S201. In one possible case, the target attribute definition request includes an attribute identifier, which is used to indicate the attribute selected as the target attribute. The attribute identifier can be an attribute name, a serial number corresponding to the attribute, etc. After receiving the target attribute definition request, the change device can use the attribute indicated by the attribute identifier as the target attribute based on the attribute identifier included in the target attribute definition request. For example, the attributes described in the IaC file include configuration area, business, type and label, where the configuration area, business and type are native attributes, and the label is a management attribute. The attribute names carried in the target attribute definition request input by the user are area and label, and the change device selects the configuration area and label as the target attributes from the configuration area, business, type and label based on the attribute name.
[0089] Regardless of how the change device selects the target attribute, multiple resources can be grouped based on the target attribute. In one possible scenario, the target attribute selected by the change device can be one or more. That is, when grouping resources based on the target attribute, the change device can group them based on one target attribute or multiple target attributes. Because the process of grouping resources based on different numbers of target attributes is similar, the following uses region and type as examples to illustrate the process of grouping based on two target attributes. The grouping process for other numbers of target attributes is similar and will not be repeated.
[0090] The change device obtains the target attribute value of each resource from the IaC file and can add grouping tags to the IaC file based on the target attribute value to implement grouping. In one possible scenario, the change device adds grouping tags to each resource in the IaC file. The grouping tag of each resource is used to identify the resource group in which the resource is located. Resources with the same target attribute value have the same grouping tag.
[0091] Exemplarily, the resources to be grouped include resource A, resource B, resource C, and resource D. All four resources are located in area A, and area in the IaC file is 1. Resource A and resource B are servers, and type in the IaC file is 1. Resource C and resource D are gateways, and type in the IaC file is 2. Since the area value of resource A and resource B is both 1 and the type value is both 1, the change device determines that resource A and resource B are in the same resource group, adds a grouping tag, and assigns a value, for example, group = 1. Furthermore, the area value of resource C and resource D is both 1 and the type value is both 2. The change device determines that resource C and resource D are in the same resource group and adds a grouping tag, group = 2. Optionally, the grouping tag can be any information that can identify different resource groups, including but not limited to the resource group name, serial number, etc. The change device can add a new code in the IaC file to indicate the resource group as the resource grouping tag. Alternatively, the original code in the IaC file can be modified to obtain a code for indicating the resource group. The number of resources included in multiple resource groups can be the same or different. The difference can be partial or completely different.
[0092] Furthermore, in cases where the change device filters out resources to be grouped from multiple resources before grouping them, the change device can group resources that do not need to be grouped into a single resource group. Because the change impact range of resources that do not need to be grouped is small, even if a failure occurs during the overall change process, the resulting blast radius is manageable, and the change risk is low. In this case, the change impact ranges of the resources that do not need to be grouped and are included in the resource group are the same, for example, all less than the corresponding threshold. Therefore, the aforementioned process of filtering out resources to be grouped from multiple resources can also be referred to as a grouping process based on the change impact range.
[0093] In one possible case, the above-mentioned grouping process can be performed 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, and adds grouping tags corresponding to each resource, and provides the added IaC file to the change device. After receiving the IaC file, the subsequent change device can determine the resource group where each resource is located based on the grouping tags in the IaC file. In some cases, the grouping tags added by the user can also be used as management attributes. Figure 3 is a resource change method provided by an embodiment of the present application. The four resources to be changed in Figure 3 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 based on 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 the change device with a resource package including the IaC file. Afterwards, the change device can determine the resource group where each resource is located based on the grouping tags in the IaC file by performing multiple operations such as pre-processing the resource package and unpacking and parsing the resource package.
[0094] S203: Change resources included in a first resource group among the multiple resource groups based on the IaC file.
[0095] Optionally, the change device can directly change the resources according to the grouping label, or store the IaC file in the storage space, and when the resource arrives at the change batch, extract the IaC file in the storage space, so as to change the resource 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 storage space for the code corresponding to one resource in a stack, the code corresponding to one resource in the IaC file can be stored in the remaining storage space, and then the remaining code in the IaC file can be stored in another stack to avoid the situation where the remaining storage space is less than the storage space required by the resource group, resulting in the remaining storage space being unable to store the IaC file, thereby improving the utilization of the storage space.
[0096] Regardless of how the IaC file is stored in the storage space, the change device can perform batch changes on 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 partial difference, for example, some resource groups are changed in parallel, and there are resource groups that are changed serially before or after the resource groups that are changed in parallel. The embodiment of the present application does not limit the method for determining the change batches of each resource group. It can be determined based on experience and implementation environment, or it can be determined based on the number of resources included in each resource group. The change batch of the resource group and the number of resources included are positively correlated or inversely correlated. Optionally, the change device can also be based on the description order of each resource group in the IaC file. The earlier the description order of the resource group is, the earlier the change batch of the resource group is.
[0097] Continuing with Figure 3 as an example, in Figure 3, since the description order of resources 1 and 2 is before the description order of resources 3 and 4, when the change device reads the IaC file, it also reads resources 1 and 2 first, and then reads resources 3 and 4. The change device determines that the change batch of the resource group including resources 1 and 2 is prior to the change batch including resources 3 and 4. Optionally, the change batch of each resource group can also be set manually. For example, the change device displays the display information of each resource group. The display information can be the grouping label corresponding to the resource group, or the icon, name, etc. of each resource included in the resource group. The user selects the change batch of each resource group based on 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.
[0098] Regardless of the method used by the change device to determine the change batches of each resource group, the resources included in the resource group can be changed according to the change batches of each resource group. Since the batch change process of multiple resource groups is similar, the following takes the first resource group and the second resource group as an example to illustrate the process of batch changes of different resource groups. Among them, the first resource group and the second resource group are intended to distinguish different resource groups. Any two resource groups in the multiple resource groups with different change batches can be called 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.
[0099] Exemplarily, the change device may determine from the IaC file the code corresponding to the resources included in the first resource group of the current change batch whose change batch is the current change batch. The embodiment of the present application does not limit the position 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 may be adjacent. For example, the IaC file first describes the resources included in one resource group, and then describes the resources included in another resource group. The codes corresponding to the resources included in different resource groups may also be interlaced. Continuing with the example of resource 1 and resource 2 belonging to the same resource group and resource 3 and resource 4 belonging to another resource group in FIG3, the description order of the four resources in the IaC file may also be resource 1, resource 3, resource 2, and resource 4.
[0100] Regardless of the code describing each resource in the IaC file, in one possible scenario, the change device can determine, from at least one resource, the resources included in the first resource group of the current change batch based on the grouping tags of each resource group; and then make changes to the determined resources based on the IaC file. The change device parses the IaC file, reads the grouping tags in the IaC file, and selects each resource included in the first resource group based on the grouping tags. In some cases, this process of parsing the IaC file can be referred to as group-by-group traversal, as shown in Figure 3.
[0101] In one possible case, in addition to determining the various resources 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 the grouping label to implement the batch pre-processing shown in Figure 3. In the subsequent process of changing the resource group according to the change batch, there is no need to execute the process of selecting the resources included in the resource group from multiple resources, and the resources included in each divided resource group can be directly changed.
[0102] Regardless of the method used by the change device to determine the resource group in which each resource is located, the resources included in the first resource group of the current change batch can be changed based on the IaC file. 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, you can first change the capacity of the instance on which the resource is based, and you can also modify the code corresponding to the resource in the IaC file, and then run the resource based on the modified IaC code. By changing the code of the IaC file, you can change the resources, and the change process is simple. In one possible case, when changing the resources included in the first resource group, the change device changes the resources included in the first resource group as a whole, that is, starting from the first resource included in the first resource group to the end of the change of the last resource included in the first resource group, the change process of multiple resources is fully automatic, and the change device cannot control or intervene in the change process.
[0103] Although the change device cannot intervene in resource changes within a resource group, it can intervene in changes between resource groups. For example, this intervention might involve inserting a post-operation after the change process for the first resource group. The post-operation further processes the resources within the first resource group. After the change to the first resource group is complete, the change device can perform post-operations on the resources within the first resource group to intervene in changes between resource groups.
[0104] The embodiment of the present application is not limited to the post-operation inserted after the change process of the first resource group, and includes at least one of the suspension processing, detection processing, resource application, etc. shown in Figure 3. Among them, the suspension processing refers to temporarily stopping the change of the resource group whose change batch is after any resource group after changing any resource group. By suspending the processing, the operation of the system or business based on any resource group after the change can be observed to determine whether the change to any resource group introduces problems, such as memory leaks or resource leaks. In some cases, the suspension processing can also be called suspension soaking, etc.
[0105] 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. Resource application is used to obtain resource configuration permissions or change permissions, etc. In some cases, there are some high-value resources among the resources, such as expensive resources or highly confidential resources. Due to the high value of resources, resources are not allowed to be created automatically. It is necessary to apply to the department corresponding to the resource. Only after the application is passed and the permission is obtained can they be used and created normally. In one possible case, other operations may also include providing an interactive interface. The interactive interface provided by the change device is used to wait for manual access. For example, the change results of any resource group can also be manually detected. The user reads and checks the changes of any resource group to obtain the audit results. After that, the user accesses the interactive interface and inputs the audit results through the interactive interface.
[0106] The embodiment of the present application does not limit the way of determining the post-operation of the resource group, which can be determined based on 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, thereby meeting the soaking requirements and ensuring that the changes of each resource group do not introduce problems. Figure 4 is a schematic diagram of the process of resource change provided by the embodiment of the present application. In Figure 4, the change device pre-processes the IaC package of 9 resources and divides the 9 resources into three resource groups according to the pre-processing results. Among them, resource group 1 includes resource 1, resource 2 and resource 3, resource group 2 includes resource 4, resource 5 and resource 6, and resource group 3 includes resource 7, resource 8 and resource 9. In Figure 4, the change batches of each resource group are different, and pause processing is included between each resource group. By setting a pause between changes in resource groups, the change explosion radius of IaC is effectively controlled, thereby achieving the effect of controlling the risk of changes.
[0107] In one possible scenario, the change device can determine the post-operations corresponding to each resource group based on the target attributes corresponding to the resource group. For example, the resources can be divided into two resource groups based on the scope of impact of the change to each resource. The scope of impact of the change to resource group 1 is greater than that of resource group 2. Since the scope of impact of the change to the resources included in resource group 1 is large, the change to resource group 1 is considered a major change. After the change, the resource group must be inspected and processed to prevent the introduction of change issues. Optionally, the change device can also interact with the user and determine the post-operations corresponding to the resource group based on the user's settings.
[0108] Furthermore, the determination of the post-operation corresponding to the resource group can be performed before the resource group is changed. For example, after the change device determines the resources included in each resource group, it opens the process of determining the post-operation to the user, allowing the user to customize it. The user can flexibly configure the post-operation corresponding to the resource group. In one possible implementation, the determination of the user operation corresponding to the resource group can be performed during the process of changing the resource group. For example, the change device obtains the business indicators of the first resource group, which indicate the operating status of the business running based 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 based on the business indicators of the first resource group.
[0109] Optionally, the business indicator can be a series of observation data based on time series formed by the 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 in a unit of time. Optionally, the change device can compare the observation data of each business, and determine whether each business is running normally based on the observation data of each business and the corresponding third threshold. Taking the observation indicator including the business response time as an example, when the response time is not less than the third threshold, the operation status of the business is determined to be abnormal operation, and the change device determines that other operations corresponding to any resource group are suspended.
[0110] Exemplarily, the change device can also determine whether each business is operating normally based on business indicators, count the number of businesses that are operating normally among the multiple businesses running based on the first resource group, and determine the post-operation of the first resource group based on the number of businesses. The change device counts the total number of businesses based on the multiple businesses running based on the first resource group and the number of businesses that are operating normally during the change process of the first resource group, divides the number of businesses and the total number of businesses to obtain a first proportion, and the change device compares the first proportion with the fourth threshold. If the first proportion 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 of the next change batch can continue. If the first proportion 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 any resource group is detection processing. Among them, the third threshold and the fourth threshold can be set based on experience and implementation environment. In some cases, the third threshold and the fourth threshold can be called target values. In the process of changing the first resource group, the change process of the first resource group is detected to achieve a rapid response to the abnormality, thereby avoiding the expansion of the abnormality.
[0111] In one possible implementation, the above-mentioned process of determining the post-operation during the change process of the first resource group can also be implemented by interaction between the change device and the user. For example, the change device provides a change interface, which 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.
[0112] Exemplarily, the change interface provided by the change device may include any one of the change process or post-operation, or may display the change process and post-operation at the same time. For example, the change interface includes two pages, the first page displays the change process of the first resource group in full screen, and the second page is displayed in the lower right corner or other corner of the first page, including the change batches of each resource group and the post-operation of the first resource group currently changed. The second page is, for example, the page shown in Figure 4. The user can monitor whether there is a change anomaly 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 based on the monitoring results. For example, based on the existence of a change anomaly in the change process of the first resource group, the post-operation of the first resource group is determined to be detection processing. 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.
[0113] Optionally, the post-operation of the first resource group can be one operation or multiple operations. FIG5 is a schematic diagram of another resource change process provided by an embodiment of the present application. In FIG5 , the first resource group is resource group 1. Resource group 1 will undergo business observation and manual approval after the change is completed. Among them, business observation corresponds to the detection processing in the above embodiment, and manual approval is used to review the detection results. By double checking the change device and the user (double check), the change of the first resource group is detected multiple times to improve the accuracy of the detection results, so that in the case of abnormal changes, they can be discovered and controlled in time to avoid the expansion of abnormal changes, so as to achieve the effect of intercepting risks in advance and minimizing change risks.
[0114] In one possible scenario, manual approval can also be understood as providing an interactive interface, providing users with an interface for human-computer interaction, and users input the review results based on the provided interface to complete manual approval. The pre-processing steps before group execution in Figure 5 are the same as those in Figure 4. Please refer to the relevant description of the pre-processing steps in Figure 4 and will not be explained here.
[0115] Exemplarily, regardless of the post-operation of the first resource group, the change device can perform the post-operation after the change of the first resource group is completed. Optionally, the post-operation can be performed before the second resource group or after the second resource group, and the embodiment of the present application does not limit this. When the post-operation of the first resource group is performed 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 Figures 4 and 5, or they can be different. For example, the other operations corresponding to resource group 1 are suspension processing, and the other operations corresponding to resource group 2 are resource application, etc. Optionally, the post-operation of the resource is embodied by code, which is added to the outer layer of the IaC file by the change device.
[0116] S204 : Change resources included in a second resource group among the multiple resource groups based on the IaC file, wherein the change batch of the first resource group is earlier than the change batch of the second resource group.
[0117] In one possible implementation, the process of modifying the resources included in the second resource group based on the IaC file is similar to the process of modifying the resources included in the first resource group based on the IaC file. For details, see S203 regarding the modification of the first resource group, which will not be repeated here. Furthermore, the second resource group may also have corresponding post-operations, and these post-operations may be the same as or different from those of the first resource group. This is not limited in this embodiment of the present application.
[0118] In one possible case, the change device executes the resource change method, which may be that the IaC engine included in the change device performs the above operations, for example, the IaC engine completes the grouping of multiple resources, unpacks the resource package, obtains the IaC file in the resource package, changes the resource based on the IaC file, and inserts post-operations, etc. Among them, the insertion of post-operations can be implemented by graphical dragging of the user interface (UI) or code. The above-mentioned IaC engine that supports the execution of multiple operations can be called a broad IaC engine. Optionally, the IaC engine can also be used only to change resources based on the IaC file, that is, the above-mentioned grouping, unpacking, and insertion of post-operations are performed by other components included in the change device. The IaC engine that is only used to change resources can be called a narrow IaC engine. For example, other components pre-process the IaC file, extract the code corresponding to each resource group in the IaC file in groups and send them to the IaC engine, and the IaC engine processes the code of the resources included in each resource group.
[0119] In summary, the resource change method provided in the embodiment of the present application will first group the resources to be changed, 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 to control the number of resources included in each resource group. After that, the resource groups are used for overall changes, which effectively controls the number of resources for the overall change. Even if an abnormality occurs in the change process, the number of resources affected is small. Post-operations can be inserted between resource groups in different change batches, which is highly flexible. By inserting post-operations, the change process of the resource group can be controlled or intervened, thereby controlling the risk of change. The present application does not limit the method for determining the post-operations corresponding to the resource groups. It can be unified management of the change equipment or customized by the user, and the determination method is more flexible. Pause processing is inserted between resource groups in different change batches to achieve unmanned immersion, which greatly reduces the manpower overhead of the change process.
[0120] The resource change method of the embodiment of the present application is introduced above. Corresponding to the above method, the embodiment of the present application also provides a resource change device. Figure 6 is a structural diagram of a resource change device provided by the embodiment of the present application. Based on the following multiple modules shown in Figure 6, the resource change device shown in Figure 6 can perform all or part of the operations shown in Figure 2 above. It should be understood that the device may include more additional modules than the modules shown or omit some of the modules shown therein, and the embodiment of the present application does not limit this. As shown in Figure 6, the device is applied to a cloud management platform, and the cloud management platform is deployed with IaC services. The device includes:
[0121] An acquisition module 601 is configured to acquire an IaC file submitted by a user. The IaC file is used to modify multiple resources to be modified. The multiple resources are IT resources managed by the IaC service. The IaC file includes code for describing attributes of each of the multiple resources.
[0122] A grouping module 602 is configured to group multiple resources according to the IaC file to obtain multiple resource groups, wherein the attributes include a target attribute, and the target attributes of the resources included in each resource group in the multiple resource groups have the same value;
[0123] A changing module 603 is configured to change resources included in a first resource group among the multiple resource groups based on the IaC file;
[0124] The changing 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, wherein the change batch of the first resource group is earlier than the change batch of the second resource group.
[0125] In one possible implementation, the attributes described in the IaC file include at least one of native attributes and management attributes of the resource, the target attributes include at least one of native attributes and management attributes, and the management attributes include non-native attributes obtained based on user settings.
[0126] In one possible implementation, the acquisition module 601 is further used to receive a management attribute configuration request, which is used to request configuration of a value of a management attribute of at least one resource among multiple resources; and assign a value to the management attribute of at least one resource based on the management attribute configuration request.
[0127] In a possible implementation, the native attribute includes at least one of a configuration area, a business, a type, a code syntax, and a change impact scope.
[0128] In one possible implementation, the acquisition module 601 is further used to receive a target attribute definition request, where the target attribute definition request is used to request to define one or more attributes in the attributes described in the IaC file as target attributes; the grouping module 602 is further used to use one or more attributes in the attributes described in the IaC file as target attributes based on the target attribute definition request.
[0129] 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.
[0130] In a possible implementation, the post-operation of the first resource group is performed before the resources included in the second resource group are changed.
[0131] In one possible implementation, the acquisition module 601 is also used to obtain business indicators of the first resource group, where the business indicators indicate the operating status of the business running based on the first resource group during the process of changing the resources included in the first resource group; and determine the post-operation corresponding to the first resource group based on the business indicators of the first resource group.
[0132] In a possible implementation, the device further includes: a providing module for providing a change interface, the change interface being used to display the change process of 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.
[0133] In a possible implementation, the post-operation includes at least one of pausing processing, detecting processing, requesting resources, and providing an interactive interface.
[0134] For 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 to be changed as a whole. Even if an abnormality occurs during the change process, the number of resources affected is small.
[0135] Among them, the acquisition module 601, the grouping module 602, and the change module 603 can all be implemented by software or by hardware. For example, the implementation of the acquisition module 601 will be described below using the acquisition module 601 as an example. Similarly, the implementation of the grouping module 602 and the change module 603 can refer to the implementation of the acquisition module 601.
[0136] As an example of a software functional unit, the acquisition module 601 may include code running on a computing instance. The computing instance may include at least one of a physical host (computing device), a virtual machine, and a container. Furthermore, the computing instance may be one or more. For example, the acquisition module 601 may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the code may be distributed in the same region or in different regions. Furthermore, the multiple hosts / virtual machines / containers used to run the code may be distributed in the same availability zone (AZ) or in different AZs, each AZ including one data center or multiple geographically close data centers. Typically, a region may include multiple AZs.
[0137] Similarly, multiple hosts / virtual machines / containers running the code can be distributed within the same virtual private cloud (VPC) or across multiple VPCs. Typically, a VPC is set up within a region. Cross-region communication between two VPCs within the same region, or between VPCs in different regions, requires a communication gateway within each VPC to interconnect the VPCs.
[0138] As an example of a hardware functional unit, the acquisition module 601 may include at least one computing device, such as a server. Alternatively, the acquisition module 601 may be implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD may be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0139] The multiple computing devices included in acquisition module 601 can be distributed in the same region or in different regions. The multiple computing devices included in acquisition module 601 can be distributed in the same AZ or in different AZs. Similarly, the multiple computing devices included in acquisition module 601 can be distributed in the same VPC or in multiple VPCs. The multiple computing devices can be any combination of servers, ASICs, PLDs, CPLDs, FPGAs, GALs, and other computing devices.
[0140] It should be noted that, in other embodiments, the acquisition module 601, grouping module 602, and change module 603 can be used to execute any step in the resource change method. The steps that the acquisition module 601, grouping module 602, and change module 603 are responsible for implementing can be specified as needed. By having the acquisition module 601, grouping module 602, and change module 603 respectively implement different steps in the resource change method, the full functionality of the resource change device can be achieved. In addition, the resource change device provided in FIG6 can be a chip or a communication device. For example, the resource change device can be the computing device described below.
[0141] This application also provides a computing device 700. As shown in Figure 7, computing device 700 includes a bus 702, a processor 704, a memory 706, and a communication interface 708. Processor 704, memory 706, and communication interface 708 communicate with each other via bus 702. Computing device 700 can be a server or a terminal device. It should be understood that this application does not limit the number of processors and memories in computing device 700.
[0142] Bus 702 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, among others. Buses may be classified as address buses, data buses, control buses, and the like. For ease of illustration, FIG7 illustrates a single bus line, but this does not imply a single bus or type of bus. Bus 702 may include a path for transmitting information between various components of computing device 700 (e.g., memory 706, processor 704, and communication interface 708).
[0143] The processor 704 may include any one or more processors such as a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).
[0144] The memory 706 may include volatile memory, such as random access memory (RAM). The processor 704 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD).
[0145] The memory 706 stores executable program codes, and the processor 704 executes the executable program codes to respectively implement the functions of the acquisition module, the grouping module, or the change module, thereby implementing the resource change method. That is, the memory 706 stores instructions for executing the resource change method.
[0146] 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.
[0147] 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 smartphone.
[0148] As shown in Figure 8, the computing device cluster includes at least one computing device 700. The memory 706 in one or more computing devices 700 in the computing device cluster may store the same instructions for executing the resource change method.
[0149] In some possible implementations, the memory 706 of one or more computing devices 700 in the computing device cluster may also store partial instructions for executing the resource modification method. In other words, the combination of one or more computing devices 700 can jointly execute the instructions for executing the resource modification method.
[0150] It should be noted that the memory 706 in different computing devices 700 in the computing device cluster can store different instructions, each for executing a portion of the functions of the resource change apparatus. In other words, the instructions stored in the memory 706 in different computing devices 700 can implement the functions of one or more of the acquisition module, the change module, or the grouping module.
[0151] In some possible implementations, one or more computing devices in a computing device cluster may be connected via a network. The network may be a wide area network or a local area network, etc. FIG. 9 shows a possible implementation. As shown in FIG. 9 , two computing devices 900A and 900B are connected via a network. Specifically, the network is connected via a communication interface in each computing device. In this type of possible implementation, computing device 900A and computing device 900B include a bus 902, a processor 904, a memory 906, and a communication interface 908. The memory 906 in computing device 900A stores instructions for executing the functions of an acquisition module. At the same time, the memory 906 in computing device 900B stores instructions for executing the functions of a grouping module and a change module.
[0152] The connection method between the computing device clusters shown in Figure 9 can be considered to be that the resource change method provided in this application needs to be changed based on the grouped resource group, 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.
[0153] It should be understood that the functions of the computing device 900A shown in Figure 9 may also be completed by multiple computing devices. Similarly, the functions of the computing device 900B may also be completed by multiple computing devices.
[0154] An embodiment of the present application further provides a communication device comprising: a transceiver, a memory, and a processor. The transceiver, the memory, and the processor communicate with each other via 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. When the processor executes the instructions stored in the memory, the processor executes the resource modification method shown in FIG2 .
[0155] It should be understood that the processor may be a central processing unit (CPU), or 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. It is worth noting that the processor may be a processor that supports the Advanced RISC Machine (ARM) architecture.
[0156] Furthermore, in an optional embodiment, the 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 device type information.
[0157] The memory may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. Non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory may be random access memory (RAM), which is used as an external cache memory. By way of example and 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), synchronous link DRAM (SLDRAM), and direct rambus RAM (DR RAM).
[0158] The present application also provides a computer program (product) comprising instructions. The computer program (product) may be software or a program (product) comprising instructions that can be run on a computing device or stored in any available medium. When the computer program (product) is run on at least one computing device, the at least one computing device executes the resource modification method shown in FIG2 .
[0159] The present application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that can be stored by a computing device or a data storage device such as a data center that contains one or more available media. The available medium can 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). The computer-readable storage medium includes instructions that instruct the computing device to execute the resource change method shown in FIG2.
[0160] An embodiment of the present application also provides a chip, including a processor, for calling and executing instructions stored in a memory from the memory, so that a communication device equipped with the chip executes the resource change method shown in FIG2 .
[0161] An embodiment of the present application also provides another chip, including: an input interface, an output interface, a processor and a memory, wherein the input interface, the output interface, the processor and the memory are connected via an internal connection path, and the processor is used to execute the code in the memory. When the code is executed, the processor is used to execute the resource change method shown in Figure 2.
[0162] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments may be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described herein are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated therein. 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).
[0163] To clearly illustrate the interchangeability of hardware and software, the above description has generally described the steps and components of each embodiment according to their functions. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0164] The computer program code for realizing the method for the embodiment of the application can be written in one or more programming languages.These computer program codes can be provided to the processor of general-purpose computer, special-purpose computer or other programmable rule-finding device, so that program code, when being executed by computer or other programmable rule-finding device, causes the function / operation specified in flow chart and / or block diagram to be implemented.Program code can be executed completely on computer, partly on computer, as an independent software package, partly on computer and partly on remote computer or completely on remote computer or server.
[0165] In the context of the embodiments of the present application, computer program code or related data may be carried by any suitable carrier to enable a device, apparatus, or processor to perform the various processes and operations described above. Examples of carriers include signals, computer-readable media, and the like. Examples of signals may include electrical, optical, radio, acoustic, or other forms of propagated signals, such as carrier waves, infrared signals, and the like.
[0166] Those skilled in the art will clearly understand that, for the sake of convenience and brevity of description, the specific working processes of the above-described systems, devices, and modules can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0167] In the several embodiments provided in this 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 schematic. For example, the division of the modules is merely a logical function division. In actual implementation, there may be other division methods, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, or can be electrical, mechanical or other forms of connection.
[0168] The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the embodiments of the present application.
[0169] In addition, the functional modules in the various embodiments of the present application may be integrated into a processing module, or each module may exist physically separately, or two or more modules may be integrated into a single module. The above-mentioned integrated modules may be implemented in the form of hardware or software functional modules.
[0170] 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 used for analysis, storage, display, 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 must comply with the relevant laws, regulations, and standards of the relevant countries and regions. For example, the IaC files involved in this application were obtained with full authorization.
[0171] In this application, the terms "first", "second", etc. are used to distinguish between identical or similar items with substantially the same effects and functions. It should be understood that there is no logical or temporal dependency between "first", "second", and "nth", nor is there a limit on the quantity and execution order. It should also be understood that although the following description uses the terms first, second, etc. 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 the various described examples, a first link can be referred to as a second link, and similarly, a second link can be referred to as a first link.
[0172] It should also be understood that in the various embodiments of the present application, the size of the serial number 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 the present application.
[0173] In this application, the term "at least one" means one or more, and the term "plurality" means two or more. For example, "plurality of second messages" means two or more second messages. The terms "system" and "network" are often used interchangeably herein.
[0174] It should be understood that the terminology used in the description of the various examples herein is for the purpose of describing particular examples only and is not intended to be limiting. As used in the description of the various examples and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
[0175] It will also be understood that the term “comprise” (also known as “includes,” “including,” “comprises,” and / or “comprising”) when used in this specification specifies the presence of stated features, integers, steps, operations, elements, and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.
[0176] It should also be understood that, depending on the context, the phrase “if it is determined that…” or “if [stated condition or event] is detected” may be interpreted to mean “upon determining…” or “in response to determining…” or “upon detecting [stated condition or event]” or “in response to detecting [stated condition or event]”.
[0177] It should be understood that determining B based on A does not mean determining B based solely on A. B can also be determined based on A and / or other information.
[0178] It should also be understood that references throughout this specification to "one embodiment," "an embodiment," or "one possible implementation" mean that specific features, structures, or characteristics associated with that embodiment or implementation are included in at least one embodiment of the present application. Therefore, the appearance of "in one embodiment," "in an embodiment," or "one possible implementation" throughout this specification does not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0179] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions 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, where an Infrastructure as Code (IaC) service is deployed. The method includes: Obtaining an Infrastructure as Code (IaC) file submitted by a user, the IaC file being used to modify a plurality of resources to be modified, the plurality of resources being information technology (IT) resources managed by the IaC service, the IaC file including code for describing attributes of each of the plurality of resources; Grouping the multiple resources according to the IaC file to obtain multiple resource groups, wherein the attributes include a target attribute, and the target attribute of the resources included in each resource group in the multiple resource groups has the same value; Changing resources included in a first resource group among the multiple resource groups based on the IaC file; The resources included in the second resource group among the multiple resource groups are changed based on the IaC file, wherein the change batch of the first resource group is earlier than the change batch of the second resource group.
2. The method according to claim 1, characterized in that 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 the management attributes, and 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 comprises: receiving a management attribute configuration request, the management attribute configuration request being used to request configuration of a value of a management attribute of at least one resource among the plurality of resources; Based on the management attribute configuration request, a value is assigned to the management attribute of the at least one resource.
4. The method according to claim 2 or 3, characterized in that The native attributes include at least one of a configuration area, a service, a type, a code syntax, and a change impact scope.
5. The method according to any one of claims 2 to 4, characterized in that: The method further comprises: receiving a target attribute definition request, wherein the target attribute definition request is used to request defining one or more attributes described in the IaC file as target attributes; Based on the target attribute definition request, one or more attributes among the attributes described in the IaC file are used as target attributes.
6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: inserting a post-operation after the change process of the first resource group, wherein 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 multiple resource groups based on the IaC file, the method further includes: The post-operation is performed on the resources included in the first resource group.
7. The method according to claim 6, characterized in that The post-operation of the first resource group is performed before the resources included in the second resource group are changed.
8. The method according to claim 6 or 7, characterized in that Before inserting a post-operation after the change process of the first resource group, the method further includes: Acquire a service indicator of the first resource group, where the service indicator indicates an operation status of a service running based on the first resource group during a process in which resources included in the first resource group are changed; The post-operation corresponding to the first resource group is determined according to the business indicator of the first resource group.
9. The method according to any one of claims 1 to 8, characterized in that: The method further comprises: 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.
10. The method according to any one of claims 6 to 9, characterized in that: The post-processing includes at least one of pausing processing, detecting processing, requesting resources, and providing a user interaction interface.
11. A resource changing 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, wherein the IaC file is used to modify a plurality of resources to be modified, wherein the plurality of resources are information technology (IT) resources managed by the IaC service, and the IaC file includes a code for describing attributes of each of the plurality of resources; a grouping module, configured to group the plurality of resources according to the IaC file to obtain a plurality of resource groups, wherein the attributes include a target attribute, and the target attribute of the resources included in each resource group in the plurality of resource groups has the same value; a change module, configured to change resources included in a first resource group among the multiple resource groups based on the IaC file; The change module is further configured to change resources included in a second resource group among the multiple resource groups based on the IaC file, wherein a change batch of the first resource group precedes a 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 resource, the target attributes include at least one of the native attributes and the management attributes, and 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, wherein the management attribute configuration request is used to request configuration of a value of a management attribute of at least one resource among 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 a configuration area, a service, a type, a code syntax, and a change impact scope.
15. The device according to any one of claims 12 to 14, characterized in that: The acquisition module is further used to receive a target attribute definition request, where the target attribute definition request is used to request to define one or more attributes in the attributes described in the IaC file as target attributes; the grouping module is further used to use one or more attributes in the attributes described in the IaC file as target attributes based on the target attribute definition request.
16. The device according to any one of claims 11 to 15, characterized in that: The change module is further configured to insert a post-operation after the change process of the first resource group, wherein the post-operation is configured 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.
17. The device according to claim 16, characterized in that The post-operation of the first resource group is performed before the resources included in the second resource group are changed.
18. The device according to any one of claims 16 or 17, characterized in that The acquisition module is also used to obtain the business indicators of the first resource group, where the business indicators indicate the operating status of the business 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 based on the business indicators of the first resource group.
19. The device according to any one of claims 11 to 18, characterized in that: The apparatus further includes a providing module configured to provide a change interface, wherein the change interface is configured to display a change process of resources included in the first resource group and the second resource group, and / or an execution process of a post-operation of the first resource group.
20. The device according to any one of claims 16 to 19, characterized in that: The post-processing includes at least one of pausing processing, detecting processing, requesting resources, and providing a user interaction interface.
21. A computing device cluster, characterized in that: The computing device cluster includes at least one computing device, each computing device including a processor and a memory; The processor of the at least one computing device is configured to execute instructions stored in a 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 to 10.
22. A computer-readable storage medium, characterized in that The computer-readable storage medium includes computer program instructions. When the computer program instructions are executed by a computing device cluster, the computing device cluster executes the resource change method according to any one of claims 1 to 10.
23. A computer program product, characterized in that The computer program product includes a computer program / instruction, and the computer program / instruction is executed by a processor to enable a computer to execute the resource change method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Visual resource arrangement method based on Terraform
CN110764864A
Resource metadata construction method and device, control equipment and storage medium
CN114925240A
Object arrangement method and device
CN116244009A
Resource adjustment method and device, computing device cluster and readable storage medium
CN117290083A
Deployment of virtual computing resources with repeatable configuration as a resource set
US11086685B1