Updated on 2024-11-29 GMT+08:00

Creating an RTDService Tenant

Scenario

The real-time decision-making platform supports multiple tenants (a tenant is a resource sets for a business). The system can manage multiple tenants. Each tenant needs to be configured with a basic Farmer cluster, an active/standby (active-active) MOTService cluster based on service requirements. For stream processing, a Redis and a Kafka cluster are additionally needed. RTD Executors of different tenants run in different containers and are isolated by groups.

The system administrator can manage tenants on the RTD web UI, including creating, querying, and deleting tenants.

By default, when a tenant is created, all containers are occupied. Idle containers are required for creating multiple tenants. If there are no sufficient containers, release some containers or apply for more containers.

Prerequisites

If a Redis cluster is required, the Redis cluster must be created in advance and is running properly.

Procedure

  1. Log in to the RTD web UI as a service user. For details, see section Accessing the RTDService Web UI.
  2. Choose System > Tenant Management and click Add. On the displayed page, configure basic tenant information and configure the Farmer, MOT, Redis, or Kafka cluster as required.

    Table 1 Basic information

    Parameter

    Description

    Name

    Name of the current tenant.

    DB Type

    Type of the database selected by the tenant. Select MOT.

    Description

    Description of the tenant.

  3. Configure Farmer clusters.

    Table 2 Farmer cluster parameters

    Parameter

    Description

    Manager IP Address

    IP address of FusionInsight Manager, for example, 192.168.1.100

    Manager Port

    Service port of FusionInsight Manager, for example, 28443

    Manager OM Port

    Port of FusionInsight Manager for SSO, for example, 20009

    Manager User

    Username for logging in to FusionInsight Manager, for example, admin

    Manager Password

    Password for logging in to FusionInsight Manager

    Container Group Name

    Name of the group where the RTD Executor BLU is deployed corresponding to the tenant.

    • At least one Farmer cluster is configured for a tenant. To improve reliability and share loads, select Configure Farmer Cluster 2 and set related parameters based on service requirements.
    • If the user password is updated on FusionInsight Manager, RTDService cannot synchronize the password. In this case, you need to update the password of Farmer as a tenant. After the update is complete, the event source can be brought online or taken offline.

  4. Configure the MOT cluster group information.

    Table 3 Cluster group information

    Parameter

    Description

    MOT Cluster Group Name

    Name of the MOT cluster group

    Database Invoking Timeout (ms)

    Timeout interval for invoking a stored procedure, in milliseconds.

    Configure MOT Cluster

    DB Username

    Username for logging in to MOTService of the current tenant, for example, dttest.

    On FusionInsight Manager, choose Cluster > Services > MOTService and click User Management. On the displayed page, create a user.

    • System administrator: No additional permission is required.
    • Common users need the following permissions. For details, see Creating a User and Allocating Permissions.
      grant all on foreign server mot_server to dttest;
      grant all ON FOREIGN DATA WRAPPER mot_fdw to dttest;

    DB Password

    Password of the user for logging in to MOTService of the current tenant.

    DB Address

    Floating IP address of MOTService, for example, 192.168.1.100.

    DB Port

    Port number of the MOTService, for example, 20105.

    DB Database

    Name of the MOTService database. The value can contain 1 to 30 characters, including letters, digits, and underscores (_), and must start with a letter or an underscore.

    Enable SSL

    Whether SSL is enabled. This option is selected by default.

    You can click Add to add more MOT cluster groups.

  5. (Optional) In the stream processing scenario, configure Redis or Kafka cluster information based on service requirements.

    1. Click the Redis Cluster tab, click Add, and configure Redis cluster information by referring to the following table.
      Table 4 Redis cluster information

      Parameter

      Description

      Redis Cluster Name

      Name of the Redis cluster

      To obtain the information:

      1. Log in to FusionInsight Manager of the cluster where Redis is deployed.
      2. Choose Cluster > Services > Redis and click Redis Manager to view the Redis cluster name.

      Redis Link Address

      Link address of the Redis cluster. The format is IP address:Port number. Use commas (,) to separate multiple addresses, for example, 192.168.1.100:22400,192.168.1.101:22402.

      To obtain the information:

      1. Log in to FusionInsight Manager of the cluster where Redis is deployed.
      2. Choose Cluster > Services > Redis and click Instances. The value of Service IP Address corresponding to the instance is the IP address of the Redis server, and the value of Instance index + 22400-1 is the port of the server.

      Redis Client Max Connections' Number

      Maximum number of connections to the Redis client. The value is of the numeral type, range from 1 to 100. Set the value to a number ranging from 20 to 30. The default value is 20.

      Redis Client Timeout (ms)

      Redis invocation timeout interval, in milliseconds. The value is a number greater than 1. Set this value to a number ranging from 1000 to 3000. The default value is 2000.

      Redis Cluster Mode

      Redis cluster authentication mode. There are three types of authentication: Normal Mode, User Password Authentication, and Kerberos Authentication.

      Username

      Username used for authentication

      This parameter is mandatory when the Redis cluster requires user password authentication or Kerberos authentication.

      Password

      User password used for authentication

      This parameter is mandatory when the Redis cluster requires user password authentication.

      Authentication Credential

      Authentication credential file

      To obtain the information:

      1. Log in to FusionInsight Manager of the cluster where Redis is deployed.
      2. Choose System > Permission > User, locate a user with the Redis operation permission from the user list. Choose More > Download Authentication Credential in the Operation column. The downloaded file is the authentication credential file to be uploaded.

      Enable SSL

      If SSL is enabled for the Redis cluster, select this option. Otherwise, deselect this option.

      You can view the Redis service configuration parameter REDIS_SSL_ON to check whether SSL is enabled for Redis.

      Multiple Redis clusters can be configured. The names and addresses of different Redis clusters must be different.

  6. (Optional) Click the Kafka Cluster tab, select Information About Kafka Cluster 1 or Information About Kafka Cluster 2, and configure Kafka cluster information by referring to the following table.

    Table 5 Kafka cluster information

    Parameter

    Description

    Kafka Connection Urls

    Kafka cluster address. The format is IP address:Port number. Use commas (,) to separate multiple addresses, for example, 192.168.1.100:21005,192.168.1.101:21005,192.168.1.102:21005.

    To obtain the information:

    1. Log in to FusionInsight Manager of the cluster where Kafka is deployed.
    2. Choose Cluster > Services > Kafka and click Instances. The value of Service IP corresponding to the Broker instance is the IP address of the Kafka server. If the Kafka cluster is in common mode, the port number is 21005. If the Kafka cluster is in security mode, the port number is 21007.

    Kafka Cluster Mode

    Kafka cluster authentication mode. There are three types of authentication: Normal Mode, User Password Authentication, and Kerberos Authentication.

    Username

    Username used for authentication. This parameter is mandatory when the Kafka cluster mode is username and password authentication or Kerberos authentication.

    If Local Domain of the cluster is not the default value hadoop.com, the username must be in the format of Username@Cluster local domain name.

    For example, if the username used for authentication is kafkauser and Local Domain of the cluster is test.com, this username is kafkauser@test.com.

    Password

    User password used for authentication

    This parameter is mandatory when the Kafka cluster requires user password authentication.

    Authentication Credential

    Authentication credential file This parameter is mandatory when the Kafka cluster requires Kerberos authentication.

    To obtain the information:

    1. Log in to FusionInsight Manager of the cluster where Kafka is deployed.
    2. Choose System > Permission > User. Locate a user with the Kafka operation permission from the user list, and choose More > Download Authentication Credential in the Operation column. The downloaded file is the authentication credential file you need to upload.
    • You can configure 0 to 2 Kafka clusters. The Farmer1 cluster corresponds to Kafka1, and the Farmer2 cluster corresponds to Kafka2. That is, one Farmer can use only one Kafka cluster.
    • If Kafka Cluster Mode is set to User Password Authentication, ensure that user password authentication has been enabled on the Kafka cluster server. The configuration is as follows:

      Choose Cluster > Services > Kafka and choose Configurations > All Configurations. Search for sasl.enabled.mechanisms, change Value to GSSAPI,PLAIN,

  7. Click OK to save the settings.

    • After the tenant is added, you can view the tenant list and details on the Tenant Management page. You can click Delete to delete a tenant.
    • To delete a tenant, take all event source variables and rules of the tenant offline and delete them (except system variables and dimension mapping variables), take dimension mappings offline and delete them, and delete all event sources and dimensions of the tenant.