このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン前のリビジョン次のリビジョン | 前のリビジョン | ||
01_linux:12_ツール:01_cloudmonkey [2014/03/26 01:03] – [CentOS 5の場合] matsui | 01_linux:12_ツール:01_cloudmonkey [2014/12/10 02:28] (現在) – [CentOS 5などで証明書のエラーが出る場合] matsui | ||
---|---|---|---|
行 1: | 行 1: | ||
+ | ====== 01 cloudmonkey ====== | ||
+ | CloudStackのAPIを簡単に叩けるツール | ||
+ | |||
+ | |||
+ | [[https:// | ||
+ | ===== ①pip用意 ===== | ||
+ | |||
+ | [[01_linux: | ||
+ | |||
+ | ==== CentOS 5の場合 ==== | ||
+ | |||
+ | === Python用意 === | ||
+ | |||
+ | ※Python 2.5以上が必要なので、CentOS 5の場合は、 | ||
+ | [[01_linux: | ||
+ | |||
+ | |||
+ | |||
+ | ===== ②インストール ===== | ||
+ | |||
+ | <code console> | ||
+ | # pip install cloudmonkey | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | ==== CentOS 5などで証明書のエラーが出る場合 ==== | ||
+ | |||
+ | こちらで対応 [[50_dialy: | ||
+ | |||
+ | < | ||
+ | # easy_install pip | ||
+ | Searching for pip | ||
+ | Reading https:// | ||
+ | Download error on https:// | ||
+ | Couldn' | ||
+ | Scanning index of all packages (this may take a while) | ||
+ | Reading https:// | ||
+ | Download error on https:// | ||
+ | No local packages or download links found for pip | ||
+ | error: Could not find suitable distribution for Requirement.parse(' | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== ③コマンド ===== | ||
+ | |||
+ | ==== 設定ファイル用意 ==== | ||
+ | |||
+ | |||
+ | |||
+ | === 1.一度コマンド実行 === | ||
+ | |||
+ | 一度コマンドを打ってあげると、ホームディレクトリに「.cloudmonkey」ディレクトリができる | ||
+ | |||
+ | <code console> | ||
+ | $ cloudmonkey | ||
+ | ☁ Apache CloudStack cloudmonkey 5.0.0. Type help or ? to list commands. | ||
+ | |||
+ | > quit | ||
+ | Bye! | ||
+ | |||
+ | |||
+ | $ ll ~/ | ||
+ | total 12 | ||
+ | -rw-rw-r-- 1 matsui matsui 354 Mar 26 10:30 config | ||
+ | -rw------- 1 matsui matsui | ||
+ | -rw-rw-r-- 1 matsui matsui 828 Mar 26 10:32 log | ||
+ | </ | ||
+ | |||
+ | |||
+ | === 2.コンフィグファイルを修正する === | ||
+ | |||
+ | <code console> | ||
+ | $ vi ~/ | ||
+ | [user] | ||
+ | secretkey = | ||
+ | apikey = | ||
+ | |||
+ | [server] | ||
+ | path = /client/api | ||
+ | host = localhost | ||
+ | protocol = http | ||
+ | port = 8080 | ||
+ | timeout = 3600 | ||
+ | </ | ||
+ | |||
+ | === 3.実行方法 === | ||
+ | |||
+ | コマンド式と、対話式両方で実行できる | ||
+ | == コマンド式 == | ||
+ | < | ||
+ | $ cloudmonkey list virtualmachines | ||
+ | </ | ||
+ | == 対話式 == | ||
+ | < | ||
+ | $ cloudmonkey | ||
+ | ☁ Apache CloudStack cloudmonkey 5.0.0. Type help or ? to list commands. | ||
+ | |||
+ | > list virtualmachines | ||
+ | </ |