You can group your resources based on usage, permissions, and regions. This achieves hierarchical resource management based on users and projects. Each resource belongs to only one resource group. Resource groups do not affect the association among resources. In E-MapReduce (EMR), you can specify resource groups only for clusters and projects. This topic describes how to specify resource groups for resources and provides related examples.
Background information
- You can create and manage a resource group and authorize RAM users to access a resource group only in the Resource Management console. For more information, see What is Resource Management?.
- In EMR, you can specify resource groups only for clusters and projects. When you create or scale out a cluster or move a cluster across resource groups, all nodes in the cluster are moved to the same resource group as the cluster. The following node resources can be managed in resource groups: Elastic Compute Service (ECS) instances, disks, images, Elastic Network Interfaces (ENIs), security groups, and key pairs.
- Resources can be moved only across resource groups under the same account.
Notice If you move a node resource to a different resource group, the resource group of the cluster to which the node belongs remains unchanged. To manage resources and grant permissions in a centralized manner, we recommend that you manage node resources in the same resource group as the cluster.
- A resource group can contain resources in different regions. For example, Resource Group A contains both clusters in China (Hangzhou) and clusters in China (Shanghai).
- A resource group can contain different types of resources. For example, Resource Group A contains clusters, ECS instances, and projects.
- Clusters and projects under the same account can be associated across resource groups if they reside in the same region. For example, your account can access both Resource Group A and Resource Group B. Resource Group A contains a project that resides in China (Beijing). Resource Group B contains a cluster that also resides in China (Beijing). In this case, you can run a job of this project in this cluster.
- RAM users have access to resource groups as authorized. For example, if you authorize a RAM user to manage all Alibaba Cloud resources under your Alibaba Cloud account, all resource groups under your Alibaba Cloud account are accessible to the RAM user.
Specify a resource group
A resource must belong to a resource group. If you do not specify a resource group when you create a resource, the resource is added to a default resource group. This section describes how to specify a resource group when you create a cluster and a project.
- Specify a resource group during cluster creation:
- Log on to the Alibaba Cloud E-MapReduce console.
- In the top navigation bar, select the region where you want to create a cluster.
- Click the Cluster Management tab. Then, click Cluster Wizard in the upper-right corner of the tab.
- In the Advance Settings section of the Basic Settings step, select a resource group from the Select Resource Group drop-down list.
If you want to create a new resource group, click the link below the Select Resource Group drop-down list. For more information, see Create a resource group.
Note For more information about how to create a cluster, see Create a cluster.
- Specify a resource group during project creation:
- Log on to the Alibaba Cloud E-MapReduce console.
- In the top navigation bar, select the region where you want to create a project.
- Click the Data Platform tab.
- Click Create Project in the upper-right corner of the tab.
- In the Create Project dialog box, specify Project Name and Project Description and select a resource group from the Select Resource Group drop-down list.
If you want to create a new resource group, click the link below the Select Resource Group drop-down list. For more information, see Create a resource group.
Note If you need to create a cluster to associate it with the project, see Create a cluster. - Click Create.
For more information about how to create a project, see Manage projects.
Scenarios
- Add resources for different purposes to different resource groups for separate management. For more information, see Scenario 1: Add resources for different purposes to different resource groups.
- Set an independent administrator for each resource group to manage users and their permissions by resource group. For more information, see Scenario 2: Manage users and their permissions by resource group.
Scenario 1: Add resources for different purposes to different resource groups
You can add clusters to be used in a test environment and those to be used in a production environment to different resource groups. During the test stage, select a cluster from the resource group for the test environment. This prevents misoperations that may occur on production clusters. When you launch a service, select a cluster from the resource group for the production environment to ensure that the service functions properly.
Scenario 2: Manage users and their permissions by resource group
You can add clusters and projects of a department to an independent resource group and set an independent administrator for each resource group. This helps achieve separated management of users and permissions. In the following procedure, resource groups for a development department and a test department are used as an example.