Create a Tablestore instance with ROS
This topic describes how to use a Resource Orchestration Service (ROS) template to create a Tablestore instance.
Prerequisites
You have activated Tablestore.
Procedure
-
Go to the Stacks page.
-
Log on to the ROS console.
-
In the left-side navigation pane, choose Deployment > Stacks.
-
In the top navigation bar, select a region.
-
-
Create a stack.
-
On the Stacks page, click Create Stack.
-
In the Specify Template section, click Select an Existing Template, and set Template Import Method to Enter Template Content.
-
In the Template Content section, on the ROS tab, enter the template in
YAMLorJSONformat, and then click Next.V2 (recommended)
The following template is an example of how to create a V2 Tablestore instance. For more information about the syntax, parameters, and examples, see ALIYUN::OTS::InstanceV2.
JSON{ "ROSTemplateFormatVersion": "2015-09-01", "Parameters": { "InstanceName": { "Type": "String", "Description": { "en": "Specifies the instance name. The name must meet the following requirements:\n- Be 3 to 16 characters long.\n- Contain only letters, numbers, and dashes (-).\n- Start with a letter.\n- Not end with a dash (-).\n- Be case-insensitive." }, "Required": true, "AllowedPattern": "[A-Za-z][A-Za-z0-9\\-]*[A-Za-z0-9]$", "MinLength": 3, "MaxLength": 16 }, "ClusterType": { "Type": "String", "Description": { "en": "The cluster type, which corresponds to the instance type.\nValid values:\n- SSD: High-performance\n- HYBRID: Capacity" }, "AllowedValues": [ "SSD", "HYBRID" ], "Required": true } }, "Resources": { "InstanceV2": { "Type": "ALIYUN::OTS::InstanceV2", "Properties": { "InstanceName": { "Ref": "InstanceName" }, "InstanceDescription": "The description of the instance.", "ClusterType": { "Ref": "ClusterType" }, "NetworkSourceACL": [ "TRUST_PROXY" ], "NetworkTypeACL": [ "INTERNET", "VPC", "CLASSIC" ], "Tags": [ { "Key": "environment", "Value": "testing" } ] } } }, "Outputs": { "InstanceName": { "Description": "The name of the Tablestore instance.", "Value": { "Fn::GetAtt": [ "InstanceV2", "InstanceName" ] } } } }YAMLROSTemplateFormatVersion: '2015-09-01' Parameters: InstanceName: Type: String Description: en: | Specifies the instance name. The name must meet the following requirements: - Be 3 to 16 characters long. - Contain only letters, numbers, and dashes (-). - Start with a letter. - Not end with a dash (-). - Be case-insensitive. Required: true AllowedPattern: '[A-Za-z][A-Za-z0-9\-]*[A-Za-z0-9]$' MinLength: 3 MaxLength: 16 ClusterType: Type: String Description: en: |- The cluster type, which corresponds to the instance type. Valid values: - SSD: High-performance - HYBRID: Capacity AllowedValues: - SSD - HYBRID Required: true Resources: InstanceV2: Type: ALIYUN::OTS::InstanceV2 Properties: InstanceName: Ref: InstanceName InstanceDescription: The description of the instance. ClusterType: Ref: ClusterType NetworkSourceACL: - TRUST_PROXY NetworkTypeACL: - INTERNET - VPC - CLASSIC Tags: - Key: "environment" Value: "testing" Outputs: InstanceName: Description: The name of the Tablestore instance. Value: Fn::GetAtt: - InstanceV2 - InstanceNameV1
The following template is an example of how to create a V1 Tablestore instance. For more information about the syntax, parameters, and examples, see ALIYUN::OTS::Instance.
JSON{ "ROSTemplateFormatVersion": "2015-09-01", "Parameters": { }, "Resources": { "Instance": { "Type": "ALIYUN::OTS::Instance", "Properties": { "InstanceName": "instance-demo", "Description": "The description of the instance.", "ClusterType": "SSD", "Network": "NORMAL" } } }, "Outputs": { "InstanceName": { "Description": "The instance name.", "Value": { "Fn::GetAtt": [ "Instance", "InstanceName" ] } }, "VpcEndpoint": { "Description": "The VPC endpoint.", "Value": { "Fn::GetAtt": [ "Instance", "VpcEndpoint" ] } }, "PublicEndpoint": { "Description": "The public endpoint.", "Value": { "Fn::GetAtt": [ "Instance", "PublicEndpoint" ] } }, "PrivateEndpoint": { "Description": "The private endpoint.", "Value": { "Fn::GetAtt": [ "Instance", "PrivateEndpoint" ] } } } }YAMLROSTemplateFormatVersion: '2015-09-01' Parameters: {} Resources: Instance: Type: ALIYUN::OTS::Instance Properties: InstanceName: instance-demo Description: The description of the instance. ClusterType: SSD Network: NORMAL Outputs: InstanceName: Description: The instance name. Value: Fn::GetAtt: - Instance - InstanceName VpcEndpoint: Description: The VPC endpoint. Value: Fn::GetAtt: - Instance - VpcEndpoint PublicEndpoint: Description: The public endpoint. Value: Fn::GetAtt: - Instance - PublicEndpoint PrivateEndpoint: Description: The private endpoint. Value: Fn::GetAtt: - Instance - PrivateEndpoint -
In the Configure Parameters step, enter a Stack Name. For V2 templates, also specify the InstanceName and ClusterType. For more information about stack configurations, see Stack configuration parameters.
-
Click Create.
When the stack is created, its Status on the Stack Information tab is Creation successful.
-
-
Verify the deployment.
Click the Resources tab to view the Resource ID , which is the name of the Tablestore instance.
You can log on to the Tablestore console to view the new instance.
On the Instance List page, find the new instance, such as
instance-demo, and confirm that its status is Running. The name in the Instance Alias/Name column is the resource ID from the stack.