You can create an RDS Custom instance in the ApsaraDB RDS console or using OpenAPI to access and customize the database environment and operating system. This topic describes how to create an RDS Custom instance in the console.
Prerequisites
Before you can create an RDS Custom instance, you must submit a ticket to add your Alibaba Cloud account to the whitelist.
Limits
The supported regions are China (Beijing), China (Hangzhou), China (Shanghai), China (Shenzhen), China (Chengdu), Singapore, Indonesia (Jakarta), and Germany (Frankfurt).
Billing
Creating an RDS Custom instance incurs fees that vary based on the instance type and storage space. For specific pricing, see the information on the console.
Procedure
Go to the .
Select a Billing Method.
Subscription: You pay before you use. This method is suitable for long-term, stable workloads.
Pay-as-you-go: You pay after you use. This method is suitable for workloads with significant fluctuations.
Select a Database Type, Region, and Engine.
Set Database Type to RDS Custom.
Select a Region.
You cannot change the region of an RDS Custom instance after it is purchased. Select the region carefully.
ImportantYou can create RDS Custom instances only in the China (Beijing), China (Hangzhou), China (Shanghai), China (Shenzhen), China (Chengdu), Singapore, Indonesia (Jakarta), and Germany (Frankfurt) regions.
If you have an existing RDS Custom deployment set and want to add the new instance to it, select the region where the deployment set is located.
Set Engine to MySQL.
Grant SLR Authorization.
If authorization is already granted, you can skip this step.
If authorization is not granted, click Go To Authorize and complete the authorization. For more information about the service-linked role (SLR), see RDS Custom service-linked role.
Configure the VPC and VSwitch for the instance.
If you have a VPC that meets your network planning needs, select it.
If you do not have a suitable VPC, you can use the default VPC and vSwitch. For more information, see Default VPCs and vSwitches.
If the default VPC and vSwitch do not meet your requirements, you must first create a VPC and a vSwitch. For more information, see Create and manage a VPC.
ImportantIf you use other Alibaba Cloud services, such as Elastic Compute Service (ECS) or AnalyticDB for MySQL, ensure that the RDS Custom instance is in the same VPC as the other services. Otherwise, they cannot communicate with each other over the internal network, which degrades performance.
Configure the Instance Type, Image, System Disk, and Data Disk.
Configure the Product Type, Instance Architecture, and then select a specific instance type.
For more information about RDS Custom instance types, see RDS Custom instance types.
Product Type: Standard Edition, Yitian Edition, AI Node are supported.
Instance Architecture: Local Disk and Disk are supported.
NoteInstances of the Standard Edition, AI Node types support only disks.
Configure the system Image for the instance.
Default Image: Base images officially provided by Alibaba Cloud. These images are licensed and include images for mainstream Linux operating systems.
Custom Image:
If you have created a custom image, click Image Catalog and select the image.
If you have not created a custom image, you must first create one. For more information, see Create a custom image from an instance.
NoteIf your custom image is not Alibaba Cloud Linux 3, Alibaba Cloud Linux 2, CentOS 8, CentOS 7, Ubuntu 22, Ubuntu 20, or Ubuntu 16, you must manually create a network initialization script in the source instance before you create the custom image. For more information, see Configure network initialization for a custom image.
Configure the specifications and performance levels for the System Disk and Data Disk. Enterprise SSDs (ESSDs) and premium performance disks are supported. For more information, see ESSDs and Premium performance disks.
The system disk is used to install the operating system. The default capacity is 40 GiB.
The data disk is used to store application data. You can attach a maximum of six data disks to an instance.
Configure the Security Group and Logon Credential.
You can select Custom Security Group or Create Security Group. If you select Create Security Group, you must configure Security Group Name, Security Group Type, and Open IPv4 Port/Protocol. For more information about security group configurations, see Create a security group.
Select and configure a Logon Credential. The following options are available:
Custom Password: Enter and confirm the password.
Key Pair:
If you have created a key pair in the same region as the instance, you can select it.
If you have not created a key pair, click Create Key Pair to go to the ECS console. Create a key pair in the same region as the instance, and then return to this page to select it. For more information about how to create a key pair, see Create an SSH key pair.
Set After Creation: You can attach a key pair or reset the instance password after the instance is created.
(Optional) Configure more custom parameters.
Hostname
Set the hostname. A hostname is a name used to uniquely identify a computer or device in a local area network.
ImportantIf you want to create instances in a batch (Number Of Instances is 2 or more), select Custom Sequential Hostname. Then, enter the hostname in the specified format name_prefix[begin_number,bits]name_suffix. For more information, see Appendix: Create sequential hostnames in a batch.
Instance Release Protection
Select this option to enable release protection for the instance. This prevents the instance from being accidentally deleted or released in the console or using an API operation.
Instance Name
Enter a name for the instance to identify it.
The name must be 2 to 255 characters in length. It must start with a letter or a Chinese character and can contain digits, underscores (_), and hyphens (-).
If you leave the instance name empty, the system uses the custom hostname or the instance ID as the default value, in that order of priority.
Resource Group
Select a default or custom resource group to facilitate instance management.
Tag
If you have many instances, you can attach tags to them for categorization and management.
Deployment Set
If you have created a deployment set in the same region as the instance, you can select it.
If you have not created a deployment set in the same region, click Manage Deployment Set to create one. For more information about how to create a deployment set, see Create an RDS Custom deployment set.
User Data
In the input box, enter the instance user data that you have prepared.
Instance user data can be run as a script when the instance starts to automate instance configuration. It can also be passed to the instance as regular data. For more information, see Use user data to initialize an instance.
Configure Number Of Instances. You can purchase a maximum of 20 instances at one time.
If the Billing Method is Subscription, you must also configure the following parameters.
Subscription Duration
Select a subscription duration as needed.
Auto-renewal
Auto-renewal is enabled by default. You can change this setting as needed.
Coupon
A coupon is automatically selected by default.
Click Confirm Order and complete the payment.
ImportantWhen you click Confirm Order, you are agreeing to the corresponding terms of service. You can click the links to the terms of service on the console to view the details.
View the instance.
Return to the management console. In the navigation pane on the left, click RDS Custom > Custom Instance List. In the top navigation bar, select the region where you created the instance. View the newly created instance.
NoteThe instance creation process takes approximately 1 to 10 minutes. You can refresh the page to check the status.
Appendix: Create sequential hostnames in a batch
When you create multiple RDS Custom instances at once, they are assigned the same hostname by default. To differentiate each RDS Custom instance or to categorize and manage instances, you can customize the hostnames based on a sorting rule. This helps you standardize the naming, sorting, and classification of RDS Custom instances and improves management efficiency.
The format for sequential hostnames is name_prefix[begin_number,bits]name_suffix. The following sections describe the parameters and provide examples.
Parameter description for sequential hostnames
Field | Description | Example |
name_prefix | The prefix of the hostname. Note The prefix is required for the sequential naming rule. Otherwise, the name is treated as a regular name. | rc-node- |
[begin_number,bits] | The sequential number in the hostname. After you set this, the number in the hostname increments.
Important
| [0,6] |
name_suffix | The suffix of the hostname. | -rchost |
Examples of sequential hostnames
Example input parameter | Generated names (for three RDS Custom instances) |
rc-node-[]-rchost or rc-node-[,]-rchost |
|
rc-node-[99]-rchost or rc-node-[99,]-rchost |
|
rc-node-[99,1]-rchost |
|
rc-node-[999998]-rchost |
|
rc-node-[0,4] |
|
Related API operations
Create an RDS Custom instance in a specified region: RunRCInstances
Query a list of RDS Custom instances: DescribeRCInstances
Query the attributes of a single RDS Custom instance: DescribeRCInstanceAttribute
References
For more information about RDS Custom, see Introduction to RDS Custom.