Updated on 2025-06-30 GMT+08:00

Installing KooCLI

KooCLI is used to call CAE APIs to upgrade components.

Install and initialize KooCLI to use it.

Method 1: Online Installation

  1. Log in to the VM where Jenkins is located.
  2. Run the following command:

    curl -sSL https://hwcloudcli.obs.cn-north-1.myhuaweicloud.com/cli/latest/hcloud_install.sh -o ./hcloud_install.sh && bash ./hcloud_install.sh -y

    By default, KooCLI is downloaded to the /usr/local/hcloud/ directory. A symbolic link is created for KooCLI in the /usr/local/bin/ directory.

Method 2: Using Software Package

  1. Log in to the VM where Jenkins is located and run the following command to check the OS to be installed:

    echo $HOSTTYPE
    • If the command output is x86_64, download the AMD 64-bit OS.
    • If the command output is aarch64, download the Arm 64-bit OS.

  2. Run the following command to download the software package:

    • AMD
      wget "https://hwcloudcli.obs.cn-north-1.myhuaweicloud.com/cli/latest/huaweicloud-cli-linux-amd64.tar.gz" -O huaweicloud-cli-linux-amd64.tar.gz
    • Arm
      wget "https://hwcloudcli.obs.cn-north-1.myhuaweicloud.com/cli/latest/huaweicloud-cli-linux-arm64.tar.gz" -O huaweicloud-cli-linux-arm64.tar.gz

  3. Run the following command to decompress the software package:

    • AMD
      tar -zxvf huaweicloud-cli-linux-amd64.tar.gz
    • Arm
      tar -zxvf huaweicloud-cli-linux-arm64.tar.gz

  4. Run the following command in the decompressed directory to create a soft link to the /usr/local/bin directory:

    ln -s $(pwd)/hcloud /usr/local/bin/

  5. Run the following command to check whether the installation is successful:

    hcloud version

    If information similar to "KooCLI version: 3.4.1.1" is displayed, the installation is successful.

Verifying the Installation

  1. After KooCLI is installed, run the hcloud CAE command to check whether the CAE service is supported.

  2. If "Unsupported service: CAE" is displayed, change the language of KooCLI to Chinese.

    hcloud configure set --cli-lang=cn

  3. Run the hcloud CAE command again.
  4. If no "ERROR" is displayed, KooCLI supports the CAE service.

Initializing KooCLI

  1. Log in to the Linux VM where Jenkins is located.
  2. Enter the command and press Enter to enter the interactive mode, and set the parameters as prompted. For details, see Table 1.

    hcloud configure init
    Table 1 Initial configurations

    Parameter

    Description

    Access Key ID

    Mandatory. For details, see Access Keys.

    Secret Access Key

    Mandatory. For details, see Access Keys.

    Region

    Optional. Region where CAE is deployed. For details, see Regions and Endpoints.