There have been a series of previous articles on ourmulti-cloud systemThe multi-cloud system can centralize the management of resources under different cloud vendors with different cloud accounts and different cloud regions. Through the multi-cloud system, users can use multi-clouds as if they were one cloud, which greatly enhances the convenience of multi-cloud usage. Although today has entered the cloud era, the use of multi-cloud is very extensive, but the IDC server room still exists, many enterprises are still IDC server room hosting mode, especially some traditional industries or financial institutions. In view of this, we have comprehensively upgraded our multi-cloud system into a new asset system, which not only manages multi-cloud resources, but also accesses IDC server room resources, realizing unified management on and off the cloud!
Asset system for the resource management provides three ways, respectively: multi-cloud automatic synchronization, Agent active reporting and manual addition, this article will introduce the design, usage and difference of these three ways. This article will introduce the design, usage and difference of these three methods in detail. The approximate diagrams are as follows:
There's aresource poolThe notion that before"Resource Management for Multi-Cloud SystemsAs described in the article, a resource pool is a virtual pool that is used totemporary storageThe main reason why resources synchronized on the cloud are temporarily stored is because the resources in the resource pool are not attributed to the project and are unclaimed or unclaimed resources, while all resources should eventually be attributed to the project in order to facilitate project maintenance and cost accounting. It can be seen that a resource either belongs to the project, or temporarily stored in the resource pool, under normal circumstances, all resources should be attributed to the project, then the resource pool should also be empty. There are two ways to attribute the resources in the pool to the project, one is through the dynamic rules of automatic processing, and the other is manually claimed manually, here we certainly recommend the dynamic rules of automatic processing to reduce human intervention, everything is automated!
There's another one.resource tree nodeThe concept of resource tree is what we usually call the service tree, or CI tree, are the same thing, just different places called different, here on the unified call resource tree well, the resource tree is a tree structure, there will be a lot of nodes, the project under the resources belong to different nodes, through the way the tree to organize the resources, you can clearly understand the relationship between the resources, the use of it is also very convenient, the application is particularly wide. The application is especially wide. Like the left side of the figure below is a resource tree, resources belong to different tree nodes, according to different resource nodes can be dynamically accessed under the node resource data, clear and easy to use!
With this basic concept in mind let's talk about these three ways to manage resources
multi-cloud synchronization
First of all, multi-cloud synchronization, multi-cloud synchronization is through the cloud platform's API or SDK, automatic synchronization of cloud resource data to the resource pool, here you only need to add the account of the cloud platform can be automatically synchronized program will automatically go to the cloud according to the configuration of the time period to pull resource data and then into the pool, into the pool will automatically determine whether to update the resource attributes or to create a new resource. The main basis for judging whether to add or update is: the cloud account + cloud region + resource ID joint unique, under normal circumstances the same cloud account under the same cloud region resource ID is unique, so when you encounter these three consistent resources will be updated, otherwise, new. The overall logic is shown in the figure below
Dynamic rules automatically match the need for resources with a certain degree of regularity, the most commonly used is to distinguish between the resource name, for example, a project A formal environment using the Nginx server, we want to give the resource tree node attributed to the project under the A nodeProjectA/PROD/Nginx
under, then we'd better make the same in resource naming, e.g. all conform to theProjectA-PROD-Nginx-{number}
With a format like this, then dynamic rules are better created, with all names starting withProjectA-PROD-Nginx-
resources are automatically assigned to a resource tree node.ProjectA/PROD/Nginx
arrive at (a decision, conclusion etc)
Of course, resource naming is not so standardized and the number is not a lot of cases, you can also directly in the resource list page, directly add the resource pool resources to the resource tree node, manually add a premise, that is, the resources are already in the resource pool, resources to the resource pool in addition to multi-cloud synchronization, there is also a way that we will talk about the next Agent initiative to report!
Multi-cloud synchronization is relatively simple, if you use the cloud, the first recommended is this way to resource management, where the cloud can be a public cloud, such as Ali Cloud, Tencent Cloud, Huawei Cloud, etc., or private cloud, such as VMWare, OpenStack, OpenShift, etc.
Agent Reporting
In addition to multi-cloud synchronization for resource management, we also provide Agent, can be deployed on the server to achieve the resources actively reported to the unified management, this approach is very effective for IDC and so on does not provide an API/SDK to obtain resources, through the installation of client-side Agent, automatically reported to the cloud resource data, here you only need to install the server Agent can be. As long as the Agent is connected to the server, it will automatically report resource data to the resource pool, and then with the dynamic rules automatically attribute the resources to the resource tree node, this process is consistent with the logic of the multi-cloud to the automatic nano-pipe
For the server installed Agent, in addition to the resource first to the resource pool with dynamic rules automatically attributed to the resource tree node management, Agent also provides direct attribution to the resource tree node without going through the resource pool. This involves the Agent's advanced configuration, the Agent's configuration file by default only need to configure a Server server address to start, like the following
SERVER-ADDRESS: "wss:///api/v1/agent"
After the Agent starts, it establishes a connection with the Server, and the Server pools the resources reported by the Agent through a periodic task, which is also advanced to the resource pool by default, but when the Agent is configured with the parameterBIZ-ID
When the Server is inbound, it first goes to match theBIZ-ID
Whether the corresponding resource tree node exists or not, if it exists, it will be directly attributed to the resource tree node, if it does not exist, it will go into the resource pool. In this way, when the user knows exactly which resource tree node his resource belongs to, he can add the following to the Agent's configuration fileBIZ-ID
Configuration, like the following
SERVER-ADDRESS: "wss:///api/v1/agent"
BIZ-ID: "37"
When Server inbound data will first check whether the resource tree node with ID 37 exists, if it exists, it will be directly attributed to the node, so that the Agent is directly attributed to the node without going through the steps of the resource pool, in this case, there is no need for dynamic rules to automatically match and then attributed to the resource tree node, which is more convenient.
Add manually
The above two ways either multi-cloud automatic synchronization or Agent active reporting, can be achieved automatically into the resource library, automatically attributed to the resource tree nodes, both ways have certain preconditions, either belong to the cloud resources can be automatically synchronized, or installed Agent can be actively reported, if not belong to the cloud resources, also do not want to install Agent, how to manage resources? The system provides the most primitive way, users manually enter their own, or through Excel batch import resources.
These two ways are relatively primitive, the update of resource attributes rely on manual operation, unlike multi-cloud synchronization or Agent uploading, the update of resource attributes can be done automatically, all are not special circumstances are not recommended to use, here I will not go into more details
At this point, the three types of resource management supported by the asset system have been introduced