Updated on 2022-11-18 GMT+08:00

Preparing the Development and Running Environment

Preparing the Development Environment

Table 1-2 describes the environment required for application development.

Table 1 Development environment

Preparation

Description

OS

  • Development environment: Windows OS. Windows 7 or later is supported.
  • Operating environment: Linux OSs.

    If the program needs to be commissioned locally, the running environment must be able to communicate with the cluster service plane network.

JDK Installation

Basic configurations of the development and operating environments. The version requirements are as follows:

The server and client support only built-in OpenJDK, version: 1.8.0_242, and therefore a JDK replacement is not allowed.

For customers' applications that need to reference the JAR files of SDK to run in the application processes:

  • x86 client: Oracle JDK 1.8 is supported.
  • TaiShan client: OpenJDK (1.8.0_242 version is supported).
NOTE:

For security purposes, the server supports only TLS V1.2 and later encryption protocols.

IntelliJ IDEA installation and configuration

It is the basic configuration for the development environment. The version must be 2019.1 or other compatible version.

NOTE:
  • If you use Oracle JDK, ensure that the JDK configured in IntelliJ IDEA is Oracle JDK.
  • If you use Open JDK, ensure that the JDK configured in IntelliJ IDEA is Open JDK.
  • Do not use the same workspace and the sample project in the same path for different IntelliJ IDEA programs.

Maven installation

Basic configurations of the development environment for project management throughout the lifecycle of software development.

Preparing a development user

Prepare a cluster user for application development and grant permissions to the user. For details, see Preparing a Developer Account.

7-zip

This tool is used to decompress *.zip and *.rar files. 7-zip 16.04 is supported.

Preparing the Operation Environment

During application development, you need to prepare the Linux environment for code running and commissioning to verify that the application is running properly.

  1. Install the client on the node. For example, the client installation directory is /opt/client.

    Ensure that the difference between the client time and the cluster time is less than 5 minutes.

    By default, the client has been installed on the Master or Core node in the cluster. You can directly use the client. For details about how to install the client outside the MRS cluster, see Using an MRS Client on Nodes Outside a Cluster.

  2. Log in to the FusionInsight Manager portal. Download the cluster client software package to the active management node and decompress it. Then, log in to the active management node as user root. Go to the directory where the cluster client is decompressed. Copy all configuration files in the FusionInsight_Cluster_1_Services_ClientConfig/Kudu/config directory to the conf directory where the JAR file to be compiled is stored, for example, /opt/client/conf, on the client node for subsequent commissioning.

    The keytab file obtained during development user preparation is also stored in this directory. Table 2 describes the main configuration files.

    For example, if the client software package is FusionInsight_Cluster_1_Services_Client.tar and the download path is /tmp/FusionInsight-Client on the active management node, run the following command:

    cd /tmp/FusionInsight-Client

    tar -xvf FusionInsight_Cluster_1_Services_Client.tar

    tar -xvf FusionInsight_Cluster_1_Services_ClientConfig.tar

    cd FusionInsight_Cluster_1_Services_ClientConfig

    scp Kudu/config/* root@IP address of the client node:/opt/client/conf

    Table 2 Configuration files

    File

    Function

    user.keytab

    Provides user information for Kerberos security authentication.

    krb5.conf

    Contains Kerberos Server configuration information.

  3. Check the network connection of the client node.

    During the client installation, the system automatically configures the hosts file on the client node. You are advised to check whether the /etc/hosts file contains the host names of the nodes in the cluster. If no, manually copy the content in the hosts file in the decompression directory to the hosts file on the node where the client resides. Ensure that the local host can communicate with each host in the cluster on the network.