EC2 インスタンスに Facebook の Scribe をインストールする詳細な手順を知っている人はいますか?
検索を実行して見つかった手順のほとんどは、少し古くなっています。
EC2 インスタンスに Facebook の Scribe をインストールする詳細な手順を知っている人はいますか?
検索を実行して見つかった手順のほとんどは、少し古くなっています。
ここでは、過去6か月間にAmazonLinuxAMIとFedoraイメージの両方でレシピを使用しました。そのレシピがある限り、それは本当に多くの努力を必要とします。独自のスクライブRPMを構築している企業がいくつあるのか、それでも私はショックを受けますが、実際には優れたRPMは存在しません。
これらの古いインストール手順を見つけて、それらを出発点として使用しました。
http://www.design-ireland.net/?http%3A//www.design-ireland.net/article/Installing_Facebook_Scribe_on_Fedora_8 http://boost.2283326.n4.nabble.com/1-42-0-Release -candidates-available-td2626376.html
インストール
# download scribe code (I opted for /local)
cd /local
git clone https://github.com/facebook/scribe.git scribe
# install libevent
yum install libevent
yum install libevent-devel
# install boost - the version installed by 'yum boost' didn't seem to be work with scribe
# had to build my own from one revision back, v1.45, as there was a bug with current version
mkdir boost
cd boost
wget http://sourceforge.net/projects/boost/files/boost/1.45.0/boost_1_45_0.tar.gz
tar zxvf boost_1_45_0.tar.gz
boostrap.sh
./bjam -sNO_COMPRESSION=1
# Install thrift and apply patch (see below)
mkdir thrift
cd thrift
yum install python-devel
wget http://mirror.olnevhost.net/pub/apache//thrift/0.6.1/thrift-0.6.1.tar.gz
tar -zxvf thrift-0.6.1.tar.gz
cd thrift-0.6.1
# Thrift patch applied: https://issues.apache.org/jira/browse/THRIFT-1060
make
make install
# Install fb303
cd contrib/fb303
./bootstrap
./configure
make
make install
# scribe
cd /local/scribe
export LD_LIBRARY_PATH="/usr/local/lib"
/sbin/ldconfig
./bootstrap.sh
./configure
make
テスト
scribe/example/example1.conf を環境に合わせて変更します
次の短期実行スクリプトを作成します
export LD_LIBRARY_PATH="/usr/local/lib"
scribed -c ./modified_example.conf
MAC範囲をセキュリティグループのインバウンドTCPポートに追加して、EC2ボックスでThriftポート1463を開く必要がありました
scribe と thrift_client gem を使用して簡単な ruby テスト アプリを作成しました
require 'scribe'
client = Scribe.new("xxx-xxx-xx-xxx-xxx.compute-1.amazonaws.com:1463", "default" ,false, {:connect_timeout => 3, :retries => 3})
(0..100).each do |x|
n = Time.now
begin
client.log("#{n} #{"%10.6f" % n.to_f} - testing loop #{x}", "bucket-#{x % 10}")
rescue Exception => e
puts e.message
puts e.backtrace.inspect
end
sleep 0.01
end
このgist bash スクリプトを使用して、EC2 ubuntu ボックスにスクライブと依存関係をインストールしています。