Updated on 2023-10-30 GMT+08:00

Installing and Initializing KooCLI

KooCLI is used to call ServiceStage APIs to upgrade components.

Install and initialize KooCLI to use it.

Method 1: Online Installation

  1. Log in to the Linux 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

Method 2: Using Software Package

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

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

  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.

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 ServiceStage is deployed. For details, see Regions and Endpoints.

  3. Add configuration parameters.

    The corresponding CLI upgrade command may not be found. In this case, you need to add additional configuration.

    hcloud configure set --cli-lang=cn