クラウドインフラ構築記

現在AWSの構築支援に携わっております。今注視しているのは、GKE、BigQuery、Google Dataflowなどサービスを展開しているGoolge Cloud Platformです。

Riak CSをEC2で構築トライ中


分散ストレージソフトウェアであるRiak CSをEC2上への導入。(トライ中)

rpmも公開されていますが、chefから構築をあえて試してみました。

対象AWS EC2の環境は下記となります。

OS Ubuntu Server 12.04.3 LTS
AMI ami-3f32ac3e
インスタンスタイプ m1.small

ここ に記載されている通り、libssl0.9.8をインストールをします。

sudo apt-get install libssl0.9.8

ファイルディスクリプタの上限変更。

vi /etc/security/limits.conf

 


root soft nofile 65536
root hard nofile 65536
riak soft nofile 65536
riak hard nofile 65536

まずは、githubから、Riak CSのCookbookを取得します。

git clone https://github.com/basho/riak-cs-chef-cookbook.git

次に、chef-soloをEC2にインストールします。

knife solo prepare -i ~/ec2-riak-cs-key.pem ec2-user@xx.xx.xx.xx

次に、実行するレシピを編集します。

vi nodes/xx.xx.xxx.xx.json

 


{
 "run_list":[
 "recipe[yum]",
 "recipe[riak]",
 "recipe[riak-cs]",
 "recipe[riak-cs::stanchion]"
 ]
}

※同じレシピを、Amazon Linuxで実行するとyumのレシピのところで中断してしまいました。

次に、cookbookをドライラン。

knife solo cook -i ~/ec2-riak-cs-key.pem ubuntu@xx.xx.xx.xx -W

いよいよ、cookbooksの実行を行います。

knife solo cook -i ~/ec2-riak-cs-key.pem ubuntu@xx.xx.xx.xx

Riak CS起動時に、エラー発生。


[2014-01-19T07:41:43+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
Chef Client failed. 2 resources updated
[2014-01-19T07:41:43+00:00] ERROR: service[riak-cs] (riak-cs::default line 56) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of /etc/init.d/riak-cs start ----
STDOUT: sudo: unable to resolve host ip-172-16-60-47
Node 'riak-cs@172.16.60.47' not responding to pings.
riak-cs failed to start within 15 seconds,
see the output of 'riak-cs console' for more information.
If you want to wait longer, set the environment variable
WAIT_FOR_ERLANG to the number of seconds to wait.
STDERR: sudo: unable to resolve host ip-172-16-60-47
---- End output of /etc/init.d/riak-cs start ----
Ran /etc/init.d/riak-cs start returned 1
[2014-01-19T07:41:43+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
ERROR: RuntimeError: chef-solo failed. See output above.

そこで、Riak-CSの基盤であるRiakの動作確認をしました。

 sudo riak start

 

 sudo riak attach

Riakのコンソールを表示できましたので、Riakは問題ないようです。

</pre>
Remote Shell: Use "Ctrl-C a" to quit. q() or init:stop() will terminate the riak node.
Erlang R15B01 (erts-5.9.1) [source] [64-bit] [async-threads:0] [kernel-poll:false]

Eshell V5.9.1 (abort with ^G)
(riak@172.16.60.47)1>

riak、riak-cs自体は正常にインストールされているようでした。riak-admin member-statusとか表示できるところまでは確認しました。

コメントは受け付けていません。