向承租人授與存取權之前,您必須設定自動縮放群組解決方案。

對於多儲存格環境,可以在單一儲存格上執行命令。VMware Cloud Director 將組態儲存在所有其他儲存格均可使用的資料庫中。

  1. root 身分直接登入或使用 SSH 用戶端登入叢集中任何儲存格的作業系統。
  2. 若要啟用度量資料收集,請選擇具有或不具有度量資料持續性的資料。
    • 若要收集具有度量資料持續性的度量,請在 Cassandra 資料庫中設定度量收集。請參閱設定 Cassandra 資料庫以儲存歷史度量資料
    • 若要在沒有資料持續性的情況下收集度量資料,請執行下列命令:
      $VCLOUD_HOME/bin/cell-management-tool manage-config -n statsFeeder.metrics.collect.only -v true
      備註: 此選項不需要設定 Cassandra 資料庫。
  3. 啟用度量發佈。
    $VCLOUD_HOME/bin/cell-management-tool manage-config -n statsFeeder.metrics.publishing.enabled -v true
  4. /tmp 資料夾中建立 metrics.groovy 檔案,並包含下列內容。
    configuration {
        metric("cpu.ready.summation") {
            currentInterval=20
            historicInterval=20
            entity="VM"
            instance=""
            minReportingInterval=300
            aggregator="AVERAGE"
        }
    }
  5. 匯入檔案。
    $VCLOUD_HOME/bin/cell-management-tool configure-metrics --metrics-config /tmp/metrics.groovy
  6. 如果您已在步驟 2 中設定 Cassandra,請提供正確的節點位址、資料庫驗證詳細資料、連接埠和度量存留時間 (以天為單位) 來更新 Cassandra 架構。
    $VCLOUD_HOME/bin/cell-management-tool cassandra –configure –cluster-nodes nodes_IP_addresses –username cassandra –password cassandra_password –port port_number –ttl TTL_days –update-schema
  7. 啟用自動縮放。
    1. 建立自動縮放系統使用者。
    2. 若要設定自動縮放功能,請使用步驟 7 中的使用者名稱。
      $VCLOUD_HOME/bin/cell-management-tool configure-autoscale --set enabled=true
      $VCLOUD_HOME/bin/cell-management-tool configure-autoscale --set username=<user_name> 
      $VCLOUD_HOME/bin/cell-management-tool configure-autoscale --encrypt --set password=<password>

    從終端機執行命令時,使用反斜線 (\) 符號逸出任何特殊字元。

  8. 如果您的環境用於開發或測試目的,並且您使用自我簽署的憑證執行儲存格,請執行下列命令。
    $VCLOUD_HOME/bin/cell-management-tool configure-autoscale --set enableHostnameVerification=false 
  9. 重新啟動儲存格。
    service vmware-vcd restart
  10. 向組織發佈或解除發佈外掛程式。