UltraMonkey-L7でロードバランサー構築 その2

LB構築第2弾!に取りかかろうと思いましたが、とりあえずお絵描きして
なんかなえてしまったw

簡単に構成はこんな感じ。
LB

VMWare上に立てたVMには32bitのCentOS5.4(kernel-2.6.18-164.el5 )をインストールして
こいつにUltraMonkey-L7を入れます。
LBのメンバーにするのはOpenVZで立てたVPS2つ。実際にサーバを用意するにはちと厳しいのでVM使いまくりw

UltraMonkeyは32bit版のRPM(楽してw)でVer-2.1.3.0を使用します。

まずはsourceforgeからultramonkey-l7-2.1.3-0.i386.rpmをダウンロードしてきます。
そしてインストール

1
2
3
4
# cd /usr/local/src <--ここにrpmを保存
# rpm -ivh ultramonkey-l7-2.1.3-0.i386.rpm
準備中...                ########################################### [100%]
   1:ultramonkey-l7         ########################################### [100%]

サクっと終わったw
公式ドキュメントを鼻っから無視w

次は設定ファイルをいじらないといけないようだ
これはサーバ監視ツール(LBのメンバーの振り分け設定)の設定ファイルだったw
設定ファイルは以下にsampleとしてある。
/etc/ha.d/conf/l7directord.cf.sample

これを元にコピーして設定を行う。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# cd /etc/ha.d/conf
# cp -p l7directord.cf.sample l7directord.cf
# vi l7directord.cf
デフォルトはこんな感じ↓
-------------------------------------------------
##
## This is the l7directord configuration file.
## See `l7directord --help' for detailed information.
##
 
# = GLOBAL DIRECTIVES
 
# - Monitor Settings
checktimeout     = 5
negotiatetimeout = 5
checkinterval    = 10
retryinterval    = 5
checkcount       = 3
 
# - Logging
logfile          = /var/log/l7vs/l7directord.log
#logfile          = local0
#supervised
 
# - Real Server Operation
quiescent        = yes
#fallback         = 127.0.0.1:80
 
# - Monitor Configuration File
configinterval   = 10
autoreload       = no
#callback         = /opt/config_change.sh
 
# = VIRTUAL DIRECTIVES
# - A sample virual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual  = 192.168.0.50:80
        real = 192.168.0.51:8080 masq 1
        real = 192.168.0.52:8080 masq 2
        module      = sessionless
        scheduler   = rr
        sorryserver = 192.168.0.53:8080
        maxconn     = 1000
        qosup       = 100M
        qosdown     = 100M
        checktype   = negotiate
        service     = http
        request     = "index.html"
        receive     = "html"
        quiescent   = no
        checkcount  = 2
        #realdowncallback        = /opt/down.sh
        #realrecovercallback = /opt/recover.sh
    #customcheck = ping -c1 -w1 _IP_
-------------------------------------------------

起動までいきたかったけどいろんな意味で時間切れw
次回は設定ファイルをいじるところから。。。

関連記事

これまでのコメント

  1. UltraMonkey-L7でロードバランサー構築 その3 | 自宅がiDC? :

    [...] サクッとインストールできたところで本題にいきます。 前回はrpmでマニュアル無視で進めてましたが方針転換w ちゃんと手順もあるので参照しながらやっていきます。 [...]

この記事にコメントする

TopHatenar

ジオターゲティング

あわせて読みたいブログパーツ

Powered by WordPress, WP Theme designed by WSC Project. ログイン