安裝 Bob

選擇與你的網路環境相符的安裝方法,並使用 bobctl 將 IBM Bob 部署到你的 OpenShift 叢集。

在使用任何安裝方法之前,請使用具有 cluster-admin 權限的帳戶登入目標 OpenShift 叢集,並驗證正確的叢集內容處於活動狀態:

oc login <api-server> --token=<cluster-admin-token>

選擇安裝方法

方面直連氣隙(直接鏡像)氣隙(間接鏡像)
映像檔來源直接從 IBM Container Registry 提取鏡像到內部登錄鏡像到內部登錄
模型推論託管或本地推論服務僅本地推論服務僅本地推論服務
更新直接從外部來源下載透過離線更新套件組合匯入透過離線更新套件組合匯入
憑證頒發公共憑證授權單位(例如 ACME)內部或私有憑證授權單位內部或私有憑證授權單位
遙測預設啟用(可停用)已停用已停用

當 OpenShift 叢集可以直接存取 IBM Container Registry 時使用此方法。映像檔在安裝期間下載,不需要映像檔鏡像。

設定安裝

使用特定於你的環境的值建立並更新部署設定檔:

cp config-template.yaml config.yaml
# 使用你的具體值編輯 config.yaml

如需詳細資訊,請參閱設定叢集安裝。

產生叢集資源

產生安裝所需的叢集範圍資源。這讓你可以在將產生的成品套用到叢集之前對其進行檢閱。

./bobctl generate-cluster-resources

該指令會產生 work/cluster-resources.yaml 檔案。檢閱該檔案後,將其套用到叢集:

oc apply -f work/cluster-resources.yaml --force-conflicts --server-side

產生的 oc apply 指令也會顯示在指令輸出中。

安裝 Bob

使用設定值和登錄憑證部署 Bob:

./bobctl install --registry-creds <username:password> --accept-license

安裝期間,bobctl 會建立所需資源並將所有 Bob 元件部署到目標命名空間。

選項是否必要描述
--registry-creds <username:password>是用於建立映像檔提取 Secret 的登錄憑證。
--accept-license是確認接受 IBM 授權條款。除非指定此選項,否則安裝不會繼續。
--model-config <file>否模型閘道設定檔的路徑。若省略,Bob 將在沒有模型存取的情況下安裝;安裝後可使用 bobctl update-model-config 來新增。
--dry-run否顯示計畫的變更而不套用它們。

當你的工作站可以同時存取 IBM Container Registry 和目標私有登錄時使用此方法。映像檔直接在登錄之間複製,無需離線傳輸。

鏡像映像檔

將所需的 Bob 映像檔從 IBM Container Registry 鏡像到你的私有登錄:

./bobctl mirror-images \
  --dest-registry <your-registry> \
  --src-creds <username:password> \
  --dest-creds <username:password> \
  --arch amd64

此指令複製所有必要的映像檔並更新目標環境的儲存庫參考。

選項是否必要描述
--dest-registry <registry>是目標登錄。
--src-creds <username:password>是IBM 登錄憑證。
--dest-creds <username:password>否目標登錄憑證。
--arch amd64否依架構篩選映像檔。

驗證鏡像映像檔

鏡像完成後,請驗證所有必要的映像檔都可在目標登錄中存取:

./bobctl verify-images \
  --creds <username:password> \
  --arch amd64

bobctl verify-images 從 config.yaml 的 global.imagePullPrefix 讀取目標登錄位置。此指令不能與 IBM 公共登錄(icr.io)搭配使用。

選項描述
--creds <username:password>目標登錄的憑證。使用與 mirror-images 指令中 --dest-creds 相同的值。
--arch amd64依叢集架構篩選映像檔。

產生叢集資源

./bobctl generate-cluster-resources

檢閱產生的 work/cluster-resources.yaml 檔案,然後將其套用到叢集:

oc apply -f work/cluster-resources.yaml --force-conflicts --server-side

安裝 Bob

更新 config.yaml 以參照你的私有登錄。請參閱設定叢集安裝。

設定更新後,安裝產品:

./bobctl install --registry-creds <username:password> --accept-license

若要包含模型閘道設定,請加入 --model-config <file>。若省略,安裝後可使用 bobctl update-model-config 新增模型存取。請參閱設定模型閘道。

當你的工作站無法同時存取 IBM Container Registry 和私有登錄時使用此方法。映像檔在連線網際網路的工作站上下載,傳輸到氣隙環境,然後上傳到私有登錄。

下載映像檔

從連線網際網路的工作站執行以下指令:

./bobctl download-images \
  --to-dir /path/to/images \
  --src-creds <username:password> \
  --arch amd64
選項是否必要描述
--to-dir <directory>是本地映像檔下載位置。
--src-creds <username:password>是IBM 登錄憑證。
--arch amd64否架構篩選器。

傳輸映像檔

使用你組織核准的傳輸機制(例如可攜式媒體或安全檔案傳輸設備)將下載的映像檔目錄傳輸到氣隙環境。

將映像檔上傳到私有登錄

./bobctl upload-images \
  --from-dir /path/to/images \
  --dest-registry <your-registry> \
  --dest-creds <username:password>
選項是否必要描述
--from-dir <directory>是包含已下載映像檔的目錄。
--dest-registry <registry>是目標登錄。
--dest-creds <username:password>否登錄憑證。

驗證已上傳的映像檔

上傳完成後,請驗證所有必要的映像檔都可在目標登錄中存取:

./bobctl verify-images \
  --creds <username:password> \
  --arch amd64

bobctl verify-images 從 config.yaml 的 global.imagePullPrefix 讀取目標登錄位置。此指令不能與 IBM 公共登錄(icr.io)搭配使用。

選項描述
--creds <username:password>目標登錄的憑證。使用與 upload-images 指令中 --dest-creds 相同的值。
--arch amd64依叢集架構篩選映像檔。

產生叢集資源

./bobctl generate-cluster-resources

檢閱產生的 work/cluster-resources.yaml 檔案,然後將其套用到叢集:

oc apply -f work/cluster-resources.yaml --force-conflicts --server-side

安裝 Bob

更新 config.yaml 以參照你的私有登錄。請參閱設定叢集安裝。

設定更新後,安裝產品:

./bobctl install --registry-creds <username:password> --accept-license

若要包含模型閘道設定,請加入 --model-config <file>。若省略,安裝後可使用 bobctl update-model-config 新增模型存取。請參閱設定模型閘道。

這個主題如何?