我要评分
获取效率
正确性
完整性
易理解

Installing the HAF Library on an Offload Node

  1. Install the HAF software package on offload nodes. Select the offload nodes and configure them.

    Select all offload nodes and click Configure Service.

  2. Modify the installation configuration file.

    The certificate verification period is used as an example. The default period is 7 days. To change the period to 6 days, run the following commands:

    cd /home/omm/haf-software

    sed -i 's/\"cert_check_period_time\": 7/\"cert_check_period_time\": 6/g' install-config/haf_target_install.conf

    • Skip this step if the default configuration file haf_target_install.conf in Configuration Items for HAF Deployment meets your service requirements.
    • When installing HAF on an offload node, you can modify the haf_target_install.conf file to modify the installation configuration in a batch. For details about the options that can be modified, see Configuration Items for HAF Deployment.
    • You are advised to use the configuration file to modify the options that cannot be modified by haf-tool.
    • To modify other options, you can run related commands as required. The preceding example is for reference only.
    1. Select Custom and click Next.

    2. Select Command Execution and click Add a Task.

    3. Set task 1 parameters and click Save.
      Table 1 Parameter description

      Parameter

      Description

      Task Name

      Changing the certificate verification period

      Task Description

      Changing the certificate verification period

      Run Directory

      /home/omm/haf-software

      Run Command

      sed -i 's/\"cert_check_period_time\": 7/\"cert_check_period_time\": 6/g' install-config/haf_target_install.conf

      Whether to Check Return Code

      Yes

      Expected Return Code

      0

    4. Save the settings. Then, click Run Service to execute the service flow.

    • To modify multiple options, you can configure multiple commands in Run Command and separate them with semicolons (;).
    • Run the following command to change the certificate verification period:

      sed -i 's/\"cert_check_period_time\": 7/\"cert_check_period_time\": 6/g' install-config/haf_target_install.conf

  3. Install the HAF library on offload nodes.
    1. Select all offload nodes and click Configure Service.

    2. Select Custom and click Next.

    3. Select Command Execution and click Add a Task.

    4. Set task 1 parameters and click Save.
      Table 2 Parameter description

      Parameter

      Description

      Task Name

      Installing the HAF package on offload nodes

      Task Description

      Installing the HAF package on offload nodes and generating the key for initialization

      Run Directory

      /home/omm/haf-software

      Run Command

      ./haf_installer -m lib -p /home/omm/haf-software/haf-target-1.3.0.tar.gz -i listen_ip_duration -w ip_white_list -j java_home -t /home/omm/haf-install -s communication_port

      NOTE:
      • The script parameters are described as follows:
        • -m lib: installing the HAF library on the offload node. This parameter is mandatory.
        • -p /home/omm/haf-software/haf-target-1.3.0.tar.gz: path to the HAF installation package for the offload node. This parameter is mandatory.
        • -i listen_ip_duration: listening IP address segment of the offload node (format: 10.10.0.1/24). Use commas (,) to separate multiple values. During the installation, HAF matches and associates with the IP address of the offload node. This parameter is optional.
        • -w ip_white_list: IP address trustlist. The value can be an IP address or IP address segment. Use commas (,) to separate multiple values, for example, 127.0.0.1,10.10.0.2,10.10.10.0/24. This parameter is optional.
        • -j java_home: Java installation path on the node. If the default path is used, you can ignore this parameter.
        • -t install_dir: root directory for installing the software package on the offload node. This parameter is mandatory.
        • -s communication_port: service listening port. The default value is 17531. This parameter is optional and can be configured using haf-tool. The value must be the same as that of the host node.
        • If IP address trustlist verification is not required, the trustlist can be left blank, but you need to disable the function. For details, see Disabling the IP Address Trustlist Function.
      • SmartKit commands do not support long character strings. If the IP address trustlist is long, you need to manually run the IP address trustlist update command in the system. For details, see Updating the IP Address Trustlist or Listening IP Address Segment.

      Whether to Check Return Code

      Yes

      Expected Return Code

      0

    1. Execute the service flow. Click Finish in the lower right corner and then click Run Service to execute the service flow.