共用方式為


CycleCloud CLI

Azure CycleCloud CLI 允許你從主控台或腳本檔管理安裝。

全域 CLI 參數

這些參數適用於所有指令。

-h, --help

顯示幫助訊息並退出。

-v, --version

顯示 CLI 的版本。

--config=CONFIG_FILE

指定此指令所使用的非預設設定檔路徑。

--loglevel=LOG_LEVEL

設定 CLI 的預設日誌等級。

Cyclecloud 帳號

管理雲端服務提供商帳戶。

cyclecloud account <command> [-o OUTPUT_FILE]
                             [--dry-run]
                             [-f INPUT_FILE]
                             [--force]
子指令 說明
list 列出帳號。
show <account_name> 顯示帳戶的詳細資料。
create 建立新帳戶。
edit <account_name> 編輯現有帳號。
delete <account_name> 刪除現有帳號。

Cyclecloud 帳號列表

列出帳號。

cyclecloud account list

Cyclecloud 帳戶顯示

顯示帳戶的詳細資料。

cyclecloud account show <account_name>

Cyclecloud 帳號建立

建立新帳戶。

cyclecloud account create [-o OUTPUT_FILE]
                          [--dry-run]
                          [-f INPUT_FILE]

-o OUTPUT_FILE

將設定參數寫入磁碟

--dry-run

提示並驗證資訊,但不執行任何改變

-f INPUT_FILE

而是從設定檔讀取定義,而非提示

Cyclecloud 帳號編輯

編輯現有帳號。

cyclecloud account edit <account_name> [-o OUTPUT_FILE]
                                       [--dry-run]
                                       [-f INPUT_FILE]

-o OUTPUT_FILE

將設定參數寫入磁碟。

--dry-run

提示並驗證資訊,但不執行任何改變。

-f INPUT_FILE

它會從設定檔讀取定義,而不是直接提示。

Cyclecloud 帳號刪除

刪除現有帳號。

cyclecloud account delete <account_name> [--force]

--force

如果是真的,則不會提示刪除帳號。

CycleCloud add_node

增加更多節點到叢集。

cyclecloud add_node <CLUSTER> [--template=TEMPLATE]
                              [--count=COUNT]
                              [--fixed]

-t TEMPLATE, --template=TEMPLATE

這個節點要用的範本。 若未指定,預設為使用唯一可用的範本,否則會錯誤。

-c COUNT, --count=COUNT

要從幾個節點開始。 如果未指定,則預設值為1。

-f, --fixed

若設定為此,該節點會永久加入(直到移除為止)到叢集模板中。 否則,該節點在終止時會自動移除。

Cyclecloud 設定

可以輕鬆切換 Cyclecloud 配置。

cyclecloud config <command>
Subcommand Description
show 顯示目前的配置。
list 列出可用的配置。
create <config_name> 建立一個新的配置。
rename <old_name> <new_name> 重新命名現有配置。
use <config_name> 切換到指定的配置。
remove <config_name> 移除一個命名的配置。

Cyclecloud 設定顯示

顯示目前的配置。

cyclecloud config show

Cyclecloud 設定列表

列出可用的配置。

cyclecloud config list

Cyclecloud 設定建立

建立一個新的配置。

cyclecloud config create <config_name>

Cyclecloud 設定重命名

重新命名現有配置。

cyclecloud config rename <old_name> <new_name>

Cyclecloud 設定使用

切換到指定的配置。

cyclecloud config use <config_name>

Cyclecloud 設定移除

移除一個命名的配置。

cyclecloud config remove <config_name>

Cyclecloud Connect

連線至叢集中運行中的實例。 自 7.8 版本起,名稱可以是節點名稱、主機名稱或 IP 位址。

cyclecloud connect <NAME> [--keyfile=KEYFILE]
                          [--cluster=CLUSTER]
                          [--user=USER]
                          [--bastion-host=BASTION-HOST]
                          [--bastion-port=BASTION-PORT]
                          [--bastion-user=BASTION-USER]
                          [--bastion-key=BASTION-KEY]

-k KEYFILE, --keyfile=KEYFILE

若節點未提供或節點不存在,使用的金鑰組。

-c CLUSTER, --cluster=CLUSTER

節點所在的叢集,如果名稱是節點名稱。 除非有多個同名節點,否則為可選項。

-u USER, --user=USER

使用者要登入節點。

--bastion-host=BASTION-HOST

SSH 堡壘主機用來路由連線。

--bastion-port=BASTION-PORT

SSH 埠用來連接堡壘。

--bastion-user=BASTION-USER

連接堡壘的使用者名稱。

--bastion-key=BASTION-KEY

連接堡壘的私鑰檔案。

Cyclecloud 複製集群

建立叢集的複本。

cyclecloud copy_cluster <source_cluster_name> <new_cluster_name> [--parameters=PARAMETERS]

-p PARAMETERS, --parameters=PARAMETERS

要使用的參數檔案。

cyclecloud create_cluster

從現有範本建立叢集。

cyclecloud create_cluster <TEMPLATE> <NAME> [--force]
                                            [--parameters=PARAMETERS]
                                            [--parameter-override=PARAMETER_OVERRIDE]

--force

若有指定,則若叢集存在則被替換。

-p PARAMETERS, --parameters=PARAMETERS

用於的參數檔案。

-P PARAMETER_OVERRIDE, --parameter-override=PARAMETER_OVERRIDE

新增或覆蓋特定參數。 此選項優先於 中 -p指定的值。

Cyclecloud 憑證

管理雲端服務提供者帳號憑證。

cyclecloud credential <command>
Subcommand Description
list 列出資歷。
create 建立新的認證。
edit <account_name> 編輯現有的憑證。
delete <account_name> 刪除現有的憑證。

Cyclecloud 憑證清單

列出資歷。

cyclecloud credential list

Cyclecloud 憑證創建

建立新的認證。

cyclecloud credential create

Cyclecloud 憑證編輯

編輯現有的憑證。

cyclecloud credential edit <account_name>

Cyclecloud 憑證刪除

刪除現有的憑證。

cyclecloud credential delete <account_name>

Cyclecloud delete_cluster

刪除一個無法運行的叢集。

cyclecloud delete_cluster <CLUSTER> [--recursive]
                                    [--force]

-r, --recursive

遞迴地刪除這個叢集及其所有子叢集。

--force

強制刪除這個叢集。 只有當你雲端供應商的所有資源都已經終止時,才使用這個選項。

cyclecloud delete_template

刪除叢集範本。

cyclecloud delete_template <TEMPLATE>

CycleCloud 匯出參數

匯出給定叢集的參數。

cyclecloud export_parameters <cluster_name> [-o OUTPUT_FILE]
                                            [--format=OUTPUT_FORMAT]

-o OUTPUT_FILE

創建時,會將叢集參數寫入磁碟。

--format=OUTPUT_FORMAT

輸出格式。

循環雲影像

管理自訂圖片。

cyclecloud image <command> [--account=ACCOUNTS]
                           [--name=NAME]
                           [--label=LABEL]
                           [--package-version=PACKAGE_VERSION]
                           [--bump-version=BUMP_VERSION]
                           [--os=OS]
                           [--jetpack-version=JETPACK_VERSION]
                           [--install-jetpack]
                           [--jetpack-platform=JETPACK_PLATFORM]
                           [--dry-run]
Subcommand Description
add <image_name> [...] 新增一張或多張圖片。

Cyclecloud 映像 新增

新增一張或多張圖片。

cyclecloud image add <image_name> [...] [--account=ACCOUNTS]
                                        [--name=NAME]
                                        [--label=LABEL]
                                        [--package-version=PACKAGE_VERSION]
                                        [--bump-version=BUMP_VERSION]
                                        [--os=OS]
                                        [--jetpack-version=JETPACK_VERSION]
                                        [--install-jetpack]
                                        [--jetpack-platform=JETPACK_PLATFORM]
                                        [--dry-run]

--account=ACCOUNTS

僅搜尋此帳戶。 你可以對多個帳號重複這個選項。

--name=NAME

要建立的套件名稱。 這是必要參數。

--label=LABEL

要建立的套件標籤。

--package-version=PACKAGE_VERSION

新映像檔請使用此版本,而非預設的 1.0.0。

--bump-version=BUMP_VERSION

使用--bump-version minor來將最新的次要版本遞增 1(例如 1.1 到 1.2),或使用--bump-version major--bump-version patch

--os=OS

--os linux/windows 來指定映像上的作業系統。

--jetpack-version=JETPACK_VERSION

安裝在映像檔上或應安裝的 Jetpack 版本。

--install-jetpack

在此映像檔上於執行階段安裝 Jetpack。

--jetpack-platform=JETPACK_PLATFORM

圖片中使用的 Jetpack 平台(例如 centos-7、ubuntu-14.04、windows)。

--dry-run

會尋找匹配圖片,但不儲存任何圖片資訊。

Cyclecloud 匯入群集

從文字檔建立叢集。 如果沒有提供 CLUSTER,且檔案中只有一個叢集,則會使用該叢集的名稱。

cyclecloud import_cluster [CLUSTER] [-c TEMPLATE]
                                    [--force]
                                    [--as-template]
                                    [--file=FILE]
                                    [--parameters=PARAMETERS]
                                    [--parameter-override=PARAMETER_OVERRIDE]
                                    [--recursive]

-c TEMPLATE

要從檔案匯入的叢集。 若未指定,則使用新叢集名稱。

--force

若有指定,則若叢集存在則被替換。

-t, --as-template

若指定,叢集會儲存為模板,僅可用於建立其他叢集。

-f FILE, --file=FILE

匯入範本的檔案。

-p PARAMETERS, --parameters=PARAMETERS

要使用的參數檔案。

-P PARAMETER_OVERRIDE, --parameter-override=PARAMETER_OVERRIDE

新增或覆蓋特定參數。 優先於 中 -p指定的值。

-r, --recursive

匯入命名的叢集以及該檔案中所有作為父叢集的叢集。

cyclecloud import_template

從文字檔匯入叢集範本。 如果沒有給出 NAME,且檔案只有一個叢集,則會使用該叢集的名稱。

cyclecloud import_template [NAME] [-c TEMPLATE]
                                  [--force]
                                  [--file=FILE]

-c TEMPLATE

要匯入的檔案範本。 若未指定,則使用新範本名稱。

--force

若指定,模板若存在則被替換。

-f FILE, --file=FILE

匯入範本的檔案。

CycleCloud 初始化

初始化 CycleCloud 設定。

cyclecloud initialize [--batch]
                      [--force]
                      [--url=URL]
                      [--username=USERNAME]
                      [--password=PASSWORD]
                      [--verify-ssl=VERIFY-SSL]
                      [--name=NAMED_CONFIG]

--batch

若指定參數,必須在命令列中提供參數。 問題假設為「否」。

--force

即使有有效的設定檔,也要強制重新初始化。

--url=URL

CycleServer 安裝的基礎網址。

--username=USERNAME

這是 CycleServer 安裝的使用者名稱。

--password=PASSWORD

CycleServer 安裝的密碼。

--verify-ssl=VERIFY-SSL

是否要驗證 CycleServer 安裝的 SSL 憑證(true 為驗證,false 為不驗證)。

--name=NAMED_CONFIG

建立一個命名的設定,可以用 config 指令使用。

Cyclecloud Locker

管理 CycleCloud 置物櫃。

cyclecloud locker <command>
Subcommand Description
list 列出置物櫃。
show <locker> 展示置物櫃細節。

cyclecloud 保存庫清單

列出置物櫃。

cyclecloud locker list

cyclecloud 保存庫顯示

顯示置物櫃的細節。

cyclecloud locker show <locker>

CycleCloud 專案

管理 CycleCloud 專案。

cyclecloud project <command> [--skip-teardown]
                             [--output-json=JSON_FILE]
                             [--junit-xml=JUNIT_FILE]
                             [--extra-var=EXTRA_VARS]
                             [--template=TEMPLATE]
                             [--name=CLUSTER_NAME]
                             [--global]
                             [--project-version=PROJECT_VERSION]
                             [--build-dir=BUILD_DIR]
Subcommand Description
init <name> 建立一個新的空白專案。
fetch <url> <path> 從 GitHub <網址>將專案下載到路徑<path>。
info 顯示專案資訊。
add_spec <spec> 在專案中加入規格。
default_locker <locker> 設定預設的上傳儲存區。
test 對給定的叢集定義執行整合測試。
build 建置專案。
upload [locker] 建置並上傳指定的置物櫃(若未指定則使用預設值)。
download [locker] 從指定的保存庫下載專案 blob (若未指定則使用預設)。
generate_template <file> 為專案產生一個叢集範本,寫入 <檔案>。

CycleCloud 專案 init

建立一個新的空白專案。

cyclecloud project init <name>

Cyclecloud 專案擷取

從 GitHub <url> 抓取專案並將其寫入 <path>

cyclecloud project fetch <url> <path>

Cyclecloud 專案資訊

顯示專案資訊。

cyclecloud project info

Cyclecloud 專案 add_spec

為專案新增規格。

cyclecloud project add_spec <spec>

cyclecloud project default_locker

設定上傳的預設儲物櫃。

cyclecloud project default_locker <locker> [--global]

--global

設定全域預設值,而非專案特定值。

CycleCloud 專案測試

執行叢集定義的整合測試。

cyclecloud project test [--skip-teardown]
                        [--output-json=JSON_FILE]
                        [--junit-xml=JUNIT_FILE]
                        [--extra-var=EXTRA_VARS]
                        [--template=TEMPLATE]
                        [--name=CLUSTER_NAME]

--skip-teardown

跳過拆除為測試而建立的叢集。

--output-json=JSON_FILE

將結果輸出到指定的 json 檔案。

--junit-xml=JUNIT_FILE

將結果以 junit-xml 格式輸出到指定的 json 檔案。

-e EXTRA_VARS, --extra-var=EXTRA_VARS

任意鍵=值對,用於參數化被測試的叢集模板。

-t TEMPLATE, --template=TEMPLATE

叢集範本檔案的路徑。

-n CLUSTER_NAME, --name=CLUSTER_NAME

要測試的叢集定義名稱。

CycleCloud 專案建置

建置專案。

cyclecloud project build [--project-version=PROJECT_VERSION]
                         [--build-dir=BUILD_DIR]

--project-version=PROJECT_VERSION

覆蓋 project.ini 中現有的專案版本。

--build-dir=BUILD_DIR

建置目錄。

Cyclecloud 專案上傳

建置並上傳指定的置物櫃(若未指定則使用預設值)。

cyclecloud project upload [locker] [--project-version=PROJECT_VERSION]

--project-version=PROJECT_VERSION

將 project.ini 中已存在的專案版本覆寫。

Cyclecloud 專案下載

從指定的保存庫下載專案 blob。 如果你沒指定置物櫃,指令就會用預設的置物櫃。

cyclecloud project download [locker]

CycleCloud 專案 generate_template

為專案產生一個叢集範本。 指令將範本寫入 <file>

cyclecloud project generate_template <file>

Cyclecloud 重新啟動節點

重新啟動正在運行的節點。

cyclecloud reboot_node <CLUSTER> <NODE_NAME>

cyclecloud remove_node

從叢集中移除一個節點。 如果節點啟動,指令即終止該節點。

cyclecloud remove_node <CLUSTER> <NODE_NAME> [--filter=FILTER]
                                             [--instance-filter=INSTANCE_FILTER]
                                             [--creds=CREDS]
                                             [--no-prompt]
                                             [--force]

-f FILTER, --filter=FILTER

移除與完整類別廣告表達式相符的節點。

--instance-filter=INSTANCE_FILTER

移除具有與完整類別廣告表達式相符的活躍實例的節點。

--creds=CREDS

移除你用指定憑證組啟動的節點。

--no-prompt

如果已指定,則在根據篩選條件終止節點時,不會要求確認。

--force

強制移除這個節點,即使尚未終止。 只有在你的雲端供應商中該節點的資源已經終止時,才使用這個選項。

「Cyclecloud」重試

對指定名稱的叢集,重試先前失敗的初始化操作。

cyclecloud retry <CLUSTER> [--recursive]

-r, --recursive

在此叢集及其所有子叢集中遞迴重試這些選項。

Cyclecloud show_cluster

在 CycleCloud 中顯示一個或多個叢集。

cyclecloud show_cluster <CLUSTER> [--recursive]
                                  [--long]
                                  [--templates]

-r, --recursive

顯示這個星系團及其所有子星系團。

-l, --long

列出每個節點,而非顯示摘要。

-t, --templates

在輸出中包含叢集範本。

cyclecloud show_nodes

顯示所選節點或實例的詳細資訊。

cyclecloud show_nodes [NAME] [--attrs=ATTRS]
                             [--filter=FILTER]
                             [--instance-filter=INSTANCE_FILTER]
                             [--output=OUTPUT]
                             [--format=FORMAT]
                             [--creds=CREDS]
                             [--cluster=CLUSTER]
                             [--states=STATES]
                             [--long]
                             [--summary]

-a ATTRS, --attrs=ATTRS

顯示指定的屬性集合(逗號分隔列表)。

-f FILTER, --filter=FILTER

僅顯示符合完整類別廣告表達式的節點。

--instance-filter=INSTANCE_FILTER

僅顯示具有符合完整類別廣告表達式的活躍實例的節點。

--output=OUTPUT

輸出以 Python 風格命名參數格式字串描述的相符節點屬性。 例如: --output="Name: %(Name)s\t(ID: %(InstanceId)s)\n Cluster: %(ClusterName)s\n"

--format=FORMAT

更改輸出顯示格式 [xml | json | text]。

--creds=CREDS

只顯示使用指定憑證集合啟動的節點。

-c CLUSTER, --cluster=CLUSTER

只顯示指定叢集中的節點。

--states=STATES

僅顯示指定狀態下的節點(逗號分隔列表)。

-l, --long

顯示節點的完整 class-ad 表示。

-s, --summary

顯示節點的最小表示。

Cyclecloud start_cluster

啟動已命名的叢集。

cyclecloud start_cluster <CLUSTER> [--recursive]
                                   [--test]

-r, --recursive

遞迴地啟動這個叢集及其所有子叢集。

-t, --test

啟動叢集進入測試模式。

CycleCloud start_node

啟動正在執行的叢集中已終止的節點。

cyclecloud start_node <CLUSTER> <NODE_NAME>

Cyclecloud 終止叢集命令

終止指定叢集。

cyclecloud terminate_cluster <CLUSTER> [--recursive]

-r, --recursive

遞迴終止此叢集及其所有子叢集。

Cyclecloud terminate_node

終止一個正在執行的節點(但保留在叢集中)。

cyclecloud terminate_node <CLUSTER> <NODE_NAME> [--filter=FILTER]
                                                [--instance-filter=INSTANCE_FILTER]
                                                [--creds=CREDS]
                                                [--no-prompt]

-f FILTER, --filter=FILTER

終止符合完整 Class-Ad 表達式的節點。

--instance-filter=INSTANCE_FILTER

終止包含匹配完整 class-ad 表達式的活躍實例的節點。

--creds=CREDS

終止使用指定憑證組啟動的節點。

--no-prompt

如果已指定,則在根據篩選條件終止節點時,不會要求確認。