Lucent Sky AVM CLI Core 管理者指南

2024/8/4 |

這個文章說明如何安裝、設定、管理、移除 Lucent Sky AVM CLI。

這個文章是關於建構於 .NET 的跨平台 CLI,亦稱為 CLI Core。要參考關於建構於 .NET Framework 的 CLI 的相對文章,請參考 Lucent Sky 知識庫:
Lucent Sky AVM CLI 管理者指南

在這個文章中,你將會學習如何:

  • 安裝 Lucent Sky AVM CLI
  • 設定 Lucent Sky AVM CLI
  • 更新 Lucent Sky AVM CLI
  • 移除 Lucent Sky AVM CLI

本文結束時,你將能夠安裝、設定及移除 CLI。

系統需求

處理器、記憶體和硬碟空間的需求:

  • 處理器: 1.6 GHz 處理器
  • 記憶體: 1 GB
  • 硬碟空間: 200 MB

Lucent Sky AVM CLI 可被安裝在以下的作業系統中:

  • Windows
  • macOS
  • Linux

Lucent Sky AVM CLI 包含了其所需要的 .NET Runtime。

安裝 Lucent Sky AVM CLI

Lucent Sky AVM CLI 提供使用者和系統層級的安裝。使用者層級的安裝不需要管理者權限,CLI 會被安裝至使用者的家目錄下的一個目錄。系統層級的安裝需要管理者權限,CLI 會被安裝至一個系統目錄,因此系統上的所有使用者皆可使用。

Lucent Sky AVM CLI 亦可被安裝至其他位置。

Windows

使用者層級的安裝

  1. 建立 %USERPROFILE%\AppData\Local\Programs\CLEAR CLI 目錄,如果此目錄不存在的話。
  2. 將 Lucent Sky AVM CLI 安裝檔案的內容解壓縮到 %USERPROFILE%\AppData\Local\Programs\CLEAR CLI 目錄下。

系統層級的安裝

  1. 建立 C:\Program Files\Lucent Sky\CLEAR CLI 目錄,如果此目錄不存在的話。
  2. 將 Lucent Sky AVM CLI 安裝檔案的內容解壓縮到 C:\Program Files\Lucent Sky\CLEAR CLI 目錄下。

macOS

使用者層級的安裝

  1. 建立 $HOME/Applications/CLEAR CLI 目錄,如果此目錄不存在的話。
  2. 將 Lucent Sky AVM CLI 安裝檔案的內容解壓縮到 $HOME/Applications/CLEAR CLI 目錄下。

系統層級的安裝

  1. 建立 /Applications/CLEAR CLI 目錄,如果此目錄不存在的話。
  2. 將 Lucent Sky AVM CLI 安裝檔案的內容解壓縮到 /Applications/CLEAR CLI 目錄下。

Linux

使用者層級的安裝

  1. 建立 $HOME/clear-cli 目錄,如果此目錄不存在的話。
  2. 將 Lucent Sky AVM CLI 安裝檔案的內容解壓縮到 $HOME/clear-cli 目錄下。

系統層級的安裝

  1. 建立 opt/clear-cli 目錄,如果此目錄不存在的話。
  2. 將 Lucent Sky AVM CLI 安裝檔案的內容解壓縮到 opt/clear-cli 目錄下。

設定 Lucent Sky AVM CLI

CLI 需要被設定以使用一個遠端的 CLEAR Engine 實體。這可以透過 config 介面或是編輯設定檔案。

可編寫腳本的設定

  1. 開啟 PowerShell 並輸入以下命令:

     # Replace <InstanceFqdn> with the FQDN or IP address of the CLEAR Engine instance
     $InstanceFqdn = "<InstanceFqdn>"
     ./SkyAnalyzer.Interface.Cli --Interface config --Method set --Value "endpoint = ${InstanceFqdn}:5759"
    

設定檔案

  1. 瀏覽至 Lucent Sky AVM CLI 的安裝目錄。
  2. 使用文字編輯器開啟 appsettings.json
  3. <endpoint/address> 元素的值更新為遠端 CLEAR Engine 實體的位址。

在預設的 TCP 端點組態中,CLEAR Engine 和 CLI 之間的通訊是不安全的。要深入了解關於如何為 CLEAR Engine 和 CLI 開啟 Transport Layer Security,請參考 Lucent Sky 知識庫:
Configure Transport Layer Security

更新 Lucent Sky AVM CLI

  1. 要更新 Lucent Sky AVM CLI,首先將目前的版本從系統中移除,再安裝新的版本。

移除 Lucent Sky AVM CLI

  1. 刪除 Lucent Sky AVM CLI 安裝的目錄。

Configure Lucent Sky AVM CLI

The CLI needs to be configured to use a remote CLEAR Engine instance. This can be done either with the config interface or by editing the configuration file.

Scriptable configuration

  1. Open PowerShell and enter the following command:

     # Replace <InstanceFqdn> with the FQDN or IP address of the CLEAR Engine instance
     $InstanceFqdn = "<InstanceFqdn>"
     ./SkyAnalyzer.Interface.Cli --Interface config --Method set --Value "endpoint = ${InstanceFqdn}:5759"
    

Configuration file

  1. Navigate to the install directory of the CLI.
  2. Open appsettings.json with a text editor.
  3. Update the value of the <endpoint/address> element to the address of the remote Lucent Sky AVM instance.

In the default TCP endpoint configuration, the communication between CLEAR Engine and the CLI is not secure. To learn more about enabling Transport Layer Security for CLEAR Engine and the CLI, view the following article in the Lucent Sky Knowledge Base:
Configure Transport Layer Security

Update Lucent Sky AVM CLI

  1. To update Lucent Sky AVM CLI, uninstall the current version from the system, and install the new version.

Uninstall Lucent Sky AVM CLI

  1. Delete the directory where Lucent Sky AVM CLI is installed.