ユーザ用ツール

サイト用ツール


01_linux:12_ツール:01_cloudmonkey

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

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