DeltaCloudでEC2を操作する
前回はDeltaCloudのモックを動かす手順(http://d.hatena.ne.jp/ike-dai/20110419/1303215935)を記載しましたが、
今回はもう少し実用的なEC2の操作ができるように設定してみます。
ドライバーにec2を指定してdeltaclouddを起動してみる
# deltacloudd -i ec2 -r xxx.xxx.xxx.xxx
起動しようとすると失敗する。
どうやらawsのgemのインストールが必要らしい。
# gem install aws Fetching: uuidtools-2.1.2.gem (100%) Fetching: http_connection-1.4.1.gem (100%) Fetching: xml-simple-1.0.15.gem (100%) Fetching: aws-2.5.2.gem (100%) Successfully installed uuidtools-2.1.2 Successfully installed http_connection-1.4.1 Successfully installed xml-simple-1.0.15 Successfully installed aws-2.5.2 4 gems installed Installing ri documentation for uuidtools-2.1.2... Installing ri documentation for http_connection-1.4.1... Installing ri documentation for xml-simple-1.0.15... Installing ri documentation for aws-2.5.2... Installing RDoc documentation for uuidtools-2.1.2... Installing RDoc documentation for http_connection-1.4.1... Installing RDoc documentation for xml-simple-1.0.15... Installing RDoc documentation for aws-2.5.2...
それでもまだエラーが発生しているのでよくよく見ると、deltacloudのバージョンがかなり古かったみたい。
# gem listgemのawsのバージョンに対してdeltacloudのバージョンが古すぎたようで、 awsをrequireしているところでエラーが出たりしてました。 そこで、最新のdeltacloudをインストールLOCAL GEMS ***
aws (2.5.2) deltacloud-core (0.1.2) haml (3.0.25) http_connection (1.4.1) json (1.5.1) minitest (1.6.0) rack (1.1.0) rack-accept (0.4.3) rake (0.8.7) rdoc (2.5.8) sinatra (1.2.3) tilt (1.2.2) uuidtools (2.1.2) xml-simple (1.0.15)deltacloud 0.3をインストール
# gem install deltacloud-core -v 0.3.0 Fetching: haml-3.1.1.gem (100%) Fetching: rack-1.1.0.gem (100%) Fetching: tilt-1.3.gem (100%) Fetching: sinatra-1.2.6.gem (100%) Fetching: rack-accept-0.4.4.gem (100%) Fetching: json-1.5.1.gem (100%) Building native extensions. This could take a while... Fetching: net-ssh-2.1.4.gem (100%) Fetching: deltacloud-core-0.3.0.gem (100%) Successfully installed haml-3.1.1 Successfully installed rack-1.1.0 Successfully installed tilt-1.3 Successfully installed sinatra-1.2.6 Successfully installed rack-accept-0.4.4 Successfully installed json-1.5.1 Successfully installed net-ssh-2.1.4 Successfully installed deltacloud-core-0.3.0 8 gems installedちゃんとバージョン指定してインストールすれば入りました。 deltacloud 0.3に付随して他にもhamlだとかrackだとかsinatraだとかいろいろインストールされました。 最終的には下記のバージョン動かしました。
- deltacloud-core 0.3.0
- aws 2.5.2