Navigation Menu

Skip to content

Commit

Permalink
Add steps to confirm the cluster is working
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Jun 28, 2014
1 parent 2530d95 commit 2a25a14
Show file tree
Hide file tree
Showing 3 changed files with 108 additions and 0 deletions.
42 changes: 42 additions & 0 deletions _po/ja/tutorial/1.0.4/groonga/index.po
Expand Up @@ -288,6 +288,48 @@ msgstr ""
"能し続けていた場合には、残ったノードがDroongaクラスタとして動作し続けます。そのため、そのような事態が起こっても秘密裏に、機能停止したノードを復旧した"
"りクラスタに復帰させたりすることができます。"

msgid "Let's make sure that the cluster works, by the `system.status` command:"
msgstr "クラスタが動作している事を、`system.status` コマンドを使って確認してみましょう:"

msgid ""
"~~~\n"
"# curl \"http://192.168.0.10:10041/droonga/system/status\"\n"
"{\n"
" \"nodes\": {\n"
" \"192.168.0.10:10031/droonga\": {\n"
" \"live\": true\n"
" },\n"
" \"192.168.0.11:10031/droonga\": {\n"
" \"live\": true\n"
" }\n"
" }\n"
"}\n"
"~~~"
msgstr ""

msgid ""
"The result says that two nodes are working correctly.\n"
"Because it is a cluster, another endpoint returns same result."
msgstr ""
"この結果は、2つのノードが正常に動作している事を示しています。\n"
"Droongaはクラスタで動作するので、他のエンドポイントも同じ結果を返します。"

msgid ""
"~~~\n"
"# curl \"http://192.168.0.11:10041/droonga/system/status\"\n"
"{\n"
" \"nodes\": {\n"
" \"192.168.0.10:10031/droonga\": {\n"
" \"live\": true\n"
" },\n"
" \"192.168.0.11:10031/droonga\": {\n"
" \"live\": true\n"
" }\n"
" }\n"
"}\n"
"~~~"
msgstr ""

msgid "To stop services, run commands like following on each Droonga node:"
msgstr "サービスを停止するには、以下のコマンドを各Droongaノード上で実行します:"

Expand Down
33 changes: 33 additions & 0 deletions ja/tutorial/1.0.4/groonga/index.md
Expand Up @@ -142,6 +142,39 @@ GroongaをHTTPサーバとして使う場合は、以下のように `-d` オプ

このコマンドにより、2つのノードはクラスタを形成し、互いの生死を監視するようになります。もしクラスタ内のどれか1つのノードが機能を停止し、他のノードがまだ機能し続けていた場合には、残ったノードがDroongaクラスタとして動作し続けます。そのため、そのような事態が起こっても秘密裏に、機能停止したノードを復旧したりクラスタに復帰させたりすることができます。

クラスタが動作している事を、`system.status` コマンドを使って確認してみましょう:

~~~
# curl "http://192.168.0.10:10041/droonga/system/status"
{
"nodes": {
"192.168.0.10:10031/droonga": {
"live": true
},
"192.168.0.11:10031/droonga": {
"live": true
}
}
}
~~~

この結果は、2つのノードが正常に動作している事を示しています。
Droongaはクラスタで動作するので、他のエンドポイントも同じ結果を返します。

~~~
# curl "http://192.168.0.11:10041/droonga/system/status"
{
"nodes": {
"192.168.0.10:10031/droonga": {
"live": true
},
"192.168.0.11:10031/droonga": {
"live": true
}
}
}
~~~

サービスを停止するには、以下のコマンドを各Droongaノード上で実行します:

# kill $(cat $DROONGA_BASE_DIR/droonga-engine.pid)
Expand Down
33 changes: 33 additions & 0 deletions tutorial/1.0.4/groonga/index.md
Expand Up @@ -135,6 +135,39 @@ By the command two nodes construct a cluster and they monitor each other.
If one of nodes dies and there is any still alive node, survivor(s) will work as the Droonga cluster.
Then you can recover the dead node and re-join it to the cluster secretly.

Let's make sure that the cluster works, by the `system.status` command:

~~~
# curl "http://192.168.0.10:10041/droonga/system/status"
{
"nodes": {
"192.168.0.10:10031/droonga": {
"live": true
},
"192.168.0.11:10031/droonga": {
"live": true
}
}
}
~~~

The result says that two nodes are working correctly.
Because it is a cluster, another endpoint returns same result.

~~~
# curl "http://192.168.0.11:10041/droonga/system/status"
{
"nodes": {
"192.168.0.10:10031/droonga": {
"live": true
},
"192.168.0.11:10031/droonga": {
"live": true
}
}
}
~~~

To stop services, run commands like following on each Droonga node:

# kill $(cat $DROONGA_BASE_DIR/droonga-engine.pid)
Expand Down

0 comments on commit 2a25a14

Please sign in to comment.