A tenant is a logical concept in OceanBase Database and serves as the unit for resource allocation. It is the foundation for managing database objects and resources. After logging in to the obshell Dashboard, you can click Tenants in the left-side navigation pane to go to the Tenants page, which displays the list of all tenants in the cluster by default. On this page, you can view the basic information of all tenants and create a tenant.
Tenant list
The Tenant list page displays information about tenants, including the Tenant name, Tenant mode, Connection string, whether it is Read-only, whether it is Locked, Status, and Creation time, along with the Actions you can perform.
Click the Tenant name to view the specific information of the tenant on the Overview page. You can also manage databases, users, and parameters within the tenant. For more information, see the Database Management, User Management, and Parameter Management sections.
Click the
icon in the Connection string column to copy the connection string for the tenant.Click the
icon next to Status to filter tenants by their status.Click the
icon next to Creation time to sort tenants by their creation time in ascending or descending order, making it easier to view cluster tenants.Click the Lock field in the Actions column to lock the tenant. Locking a tenant prevents users from accessing it, so proceed with caution.
Create a new tenant
Click Create Tenant in the upper-right corner of the page to go to the Create Tenant page. You need to set Basic Information, Zone Information, Security Settings, and Parameter Settings when you create a new tenant. This section will introduce each part.
Basic Information
The Basic Information section is used to set the tenant mode, name, password, and other information. The content is as follows.
Parameter Description Tenant mode You can select the tenant mode from the drop-down list. Note
Currently, you can only create MySQL-compatible mode tenants in the obshell Dashboard.
Tenant name Specify the name of the tenant to be created. The tenant name must meet the following requirements: - The length must be 2 to 32 characters.
- It can contain uppercase and lowercase letters, digits, and underscores. It must start with a letter and end with a letter or digit.
Initial administrator password You can click Randomly Generate to let the obshell Dashboard generate a random string, or you can set a custom password. If you set a custom password, it must meet the following requirements: - The length must be 8 to 32 characters.
- It must contain at least two of each of the following character types: digits (0 to 9), uppercase letters (A to Z), lowercase letters (a to z), and special characters (~!@#%^&*_-+=|(){}[]:;,.?/).
Character set The default value is utf8mb4. You can select another character set from the drop-down list. Collation (Optional) You can select a suitable collation from the drop-down list. Case sensitivity of table names You can select a value from the drop-down list. Valid values: 0,1, and2.0: The table name is stored in the specified case and compared in a case-sensitive manner.1: The table name is stored in lowercase and compared in a case-insensitive manner.2: The table name is stored in the specified case and compared in a case-insensitive manner.
Time zone The default value is (GMT+08:00) China Standard Time. You can select another time zone from the drop-down list. Remarks (Optional) The description of the tenant. This field is optional. Load type You can click the drop-down list under Load Type and select an appropriate load type based on your business requirements. Valid values: - COMPLEX_OLAP: This load type is suitable for workloads such as those in banking and insurance systems. These workloads typically involve complex joins, complex correlated subqueries, batch jobs written in PL, and long or large transactions. Parallel execution is sometimes used for short-running queries.
- OLAP: This load type is suitable for real-time data warehouse analysis scenarios.
- KV: This load type is suitable for key-value workloads and wide-column workloads similar to HBase. These workloads typically have very high throughput and are sensitive to latency.
- HTAP: This load type is suitable for hybrid OLAP and OLTP workloads. It is typically used to obtain real-time insights from operational data, fraud detection, and personalized recommendations.
- EXPRESS_OLTP: This load type is suitable for workloads such as those in trade and payment core systems and high-throughput internet applications. These workloads have no foreign key constraints, no stored procedures, no long or large transactions, no complex joins, and no complex subqueries.
Zone information
The Zone Information section is used to set the number of units in each zone, the replica type, unit specification, and zone priority. The content is as follows.
Parameter Description Number of Units per Zone The maximum number of units that can be set in a zone is determined by the minimum number of OBServer nodes in that zone. Zone Name The default value is the name of the zone in the cluster, and it cannot be modified. You can click the checkbox before the zone to specify which zones to create units in. Replica Type You can select the replica type from the dropdown menu. The options are Universal Replica and Read-Only Replica. Unit Specifications Set the CPU and memory specifications for the unit. The available range depends on the cluster resources. Set it according to the range provided in the input box. Number of Units Displays the number of units in each zone. Zone Priority Order Specifies the priority for the distribution of the primary replica of the tenant. The zone with the highest priority is considered the primary zone, and there can only be one. The priority order can be set as follows: - Select one or more zones from the list on the left. The list on the left shows all available zones in the current cluster.
- Click the > button in the middle. The selected zones will be moved to the Priority Order list. Zones selected together have the same priority.
- Repeat steps a and b to add zones with lower priority.
- To adjust the priority, you can drag and drop the zones in the Priority Order list. The priority decreases from top to bottom in the list.
- Click the delete button next to the zone or click Restore to Default to move the zones back to the list on the left.
Security Settings
The Security Settings section allows you to set up an IP address whitelist. You can choose to allow access from specific IP addresses or allow access from all IP addresses. If you choose to allow access from specific IP addresses, you can specify the list of allowed client IPs in the Custom IP field. After entering an IP address, you can press the Enter key on your keyboard or use a comma (
,) to add multiple client IP addresses. Hovering over View Configuration Instructions will show you the configuration instructions for the IP address. The supported formats for configuring the IP address are as follows:IP address, example: 127.0.0.10,127.0.0.11
Subnet/mask, example: 127.0.0.0/24
Fuzzy match, example: 127.0.0.% or 127.0.0._
Mixed formats, example: 127.0.0.10,127.0.0.11,127.0.0.%,127.0.0._,127.0.0.0/24
Note
Setting it to
%means that all clients can connect, which poses a security risk. Please proceed with caution.Parameter Settings
Click the button next to Parameter Settings to set tenant parameters. You can click +Add Tenant Parameter to set multiple tenant parameters. In the Parameter Name field, you can manually enter or select the tenant parameter from the dropdown menu. In the Parameter Value field, enter the corresponding value for the parameter. To delete a set parameter, click the Delete option in the Actions column.
Submit
After completing the configuration, click the Submit button in the lower-right corner to initiate the new tenant task. You can choose to Return to Tenant List or View Task Details.
Lock a tenant
Click Lock in the Actions column of the row of the tenant you want to lock, and then click Lock in the dialog box that appears. After a tenant is locked, users cannot access the tenant. Proceed with caution.