When you use Resource Orchestration Service (ROS) to create stacks to manage multiple resources, you must configure all parameters relevant to these resources. These configured parameters may interfere with each other. In this case, you can use Metadata to group resources to batch configure parameters in the ROS console.
Background information
Metadata is used to group the parameters defined in the Parameters section and define tags for each group. The following example shows how to use Metadata to group parameters for different resources when you deploy a Harbor cluster in an existing virtual private cloud (VPC). For more information about how to deploy a Harbor cluster in an existing VPC, see Deploy a Harbor Cluster in an Existing VPC.
You can perform the following types of configurations to deploy a Harbor cluster in an existing VPC:
- Infrastructure configuration
- Harbor configuration
- DB configuration
- Redis configuration
- SLB configuration
You can add the parameters for each type of configuration to the Parameters section of the corresponding group. The following code snippet of Metadata is used:
Metadata:
ALIYUN::ROS::Interface:
ParameterGroups:
- Parameters:
- VSwitchZoneId
- VPC
- VSwitch
- SecurityGroup
Label:
default:
en: Infrastructure Configuration
- Parameters:
- ClusterAmount
- InstanceType
- SystemDiskCategory
- SystemDiskSize
- Password
- HarborAdminPassword
Label:
default:
en: Harbor Configuration
- Parameters:
- DBInstanceEngineAndVersion
- DBInstanceClass
- DBInstanceStorage
- DBUser
- DBPassword
Label:
default:
en: DB Configuration
- Parameters:
- RedisInstanceClass
- EvictionPolicy
- RedisPassword
Label:
default:
en: Redis Configuration
- Parameters:
- LoadBalancerSpec
- Bandwidth
Label:
default:
en: SLB Configuration
TemplateTags:
- Creates one ECS(Harbor) instance - Existing Vpc
Procedure
- Log on to the ROS console.
- In the left-side navigation pane, click Solution Center.
- Find the template Deploys a Harbor cluster (existing VPC).
- Click Create Stack.
- In the Configure Template Parameters step, set Stack Name and the parameters in the Infrastructure Configuration, Harbor Configuration, DB Configuration, Redis Configuration, and SLB Configuration sections.
- Click Create.