In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
How to analyze the new Tag function of ECS, in view of this problem, this article introduces the corresponding analysis and solution in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible method.
With the continuous development of ECS products and increasingly mature market environment, more and more users use Aliyun's ECS products. With the continuous increase of users' own business, more and more ECS resources need to be kept, which leads to the inconvenience and difficulty for these users to manage these resources.
In order to solve the problem of resource management, many users often manage groups by naming the same kind of resources with the same resource name. Although this achieves the function of grouping, it loses the function of identifying the resource name itself.
To sum up, users urgently need a product function specifically for resource grouping. Under this background, the resource tag system (hereinafter referred to as Tag) arises at the historic moment.
Specially designed for group operation
The Tag function is designed for users to group resources. A user can use the console or Open API to assign Tag to a resource.
The Tag we define consists of a pair of Key / Value, and the restrictions on Tag are as follows:
Key can be up to 64 characters long and Value can be up to 128 characters long.
Key cannot be empty in Tag, and Value can be empty.
Tag with the same Key is not allowed on the same resource. That is, if the user's Tag Key to the resource is the same as a Tag Key that already exists on the resource, the Tag of this operation will overwrite the previous Tag.
There is no constraint on Tag between different resources, that is, different resources can have the same Tag with the same Key.
Key for Tag does not allow it to start with aliyun, which is a reserved field for the system.
For an ECS user, the account itself has no limit on the number of Tag, but for each resource, you can only call a maximum of 10 Tag.
Currently, there are four types of resources that support Tag in ECS: instance (Instance), disk (Disk), Snapshot (snapshot) and Image (mirror). More types of resources will be considered later.
By putting a different Tag on each resource, users can more easily manage their own resources through Tag.
At present, Aliyun provides users with the following features based on Tag:
By specifying Tag as the filter condition for the query, you can find all the resources associated with this Tag for the purpose of grouping and managing resources.
The Tag information associated with the resource will also be included in the returned result of the query resource information.
Suitable for large enterprises and game business
There is such a user who does mobile game business, due to the rapid development of the company's business, it needs a large number of ECS instances as support.
The user's company has a number of games, all of which have achieved good results and have a wide user base. But because the company uses the same Aliyun account, it needs to group all its ECS according to different games. This requires the Tag function provided by Aliyun.
For example, if a user's mobile game is called An and another game is called B, then:
For the resources that support the game A, you can type Tag with "game" for Key and "A" for Value.
For resources that support the game B, you can type Tag with Key as "game" and Value as "B".
In this way, when users need to query the resources that support game A, they only need to filter with the filter condition of Tag (Key=game,Value=A); on the contrary, if they want to query the resources belonging to game B, they need to filter with the filter condition of Tag (Key=game,Value=B).
There is also a customer of a large enterprise. There are many business departments under the enterprise, and different business departments have their own technical teams. Each division has an independent batch of ECS instances to support its own business.
The enterprise users also use the same Aliyun account, so resources need to be grouped according to different business departments, and because there are different products in each business department, so all the machines in each business department should further distinguish the resources from the product dimension.
Suppose that the enterprise has two products A1 and A2 in Business Department An and Business Department BMaga, and three products B1, B2 and B3 in Business Division. So if you want to group the resources under the enterprise, you can use the following ways:
For A1 products in Division A, the resources that support A1 products can be labeled with Tag whose Key is AMagneValue A1.
For A2 products in Division A, you can use Tag with Key of A _ MagneValue and A _ 2 for resources that support A2 products.
For B1 products in Division B, you can use Tag with BMageValue B1 as Key for the resources that support B1 products.
For B2 products in Division B, you can use Tag with BMageValue B2 for the resources that support B2 products.
For B3 products in Division B, you can use Tag with Key of BMagneValue and B3 for resources that support B3 products.
In this way, the administrator responsible for managing resources in an enterprise can directly take Tag-Key as A when querying the resources belonging to Division A, while not specifying Tag-Value, and put all Tag-Key as A, that is, all the resources belonging to Division A can be queried; on the contrary, all the resources of Division B can also be queried.
If you want to query the resources used to support a specific product in a business unit, such as the A1 product of Division A, you only need to use Tag-Key as A Magi Tagmurue value as A1 as the filter condition.
For a console user, he can assign Tag to resources through the console, so as to achieve the purpose of grouping management and operation of resources through Tag function.
Easy to operate, efficient and easy to worry about
Examples of specific operations are as follows.
Figure 1
As shown in figure 1, users can find the Tag they want as a filter condition for a query in the tag library on the left, and after selecting the tag to be used as a filter condition, they can add it to the selected list on the right.
Currently, users are allowed to select up to 5 Tag as filtering criteria for a query.
Figure 2
The result of selecting five Tag as filter criteria is shown in figure 2. Click OK to filter out all the instances associated with the selected Tag among all the instances in the region.
For users using Open API, Aliyun also provides the function of assigning Tag operation to resources through Open API and managing resources through Tag.
Figure 3
As shown in figure 3, users can use the DescribeTags interface to query the Tag related to all resources in a region.
Figure 4
As shown in figure 4, you can specify to query all Tag that have the same Key of Tag in a certain region as the specified Key.
Figure 5
As shown in figure 5, all the Tag information related to the resource is added to the returned result of DescribeInstances.
At present, the Tag function is just in its infancy, which only meets the most basic user functions. Then there will be plans for continuous improvement, such as:
Support more resources to support Tag
RAM authorizes / authenticates resources through Tag
Batch operation of resources through Tag is supported.
This is the answer to the question on how to analyze the new Tag function of ECS. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel to learn more about it.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.