[Groonga-commit] droonga/droonga.org at 3d3b0e8 [gh-pages] Update translation

Zurück zum Archiv-Index

SHIMODA Piro Hiroshi null+****@clear*****
Wed Sep 24 02:44:33 JST 2014


SHIMODA "Piro" Hiroshi	2014-09-24 02:44:33 +0900 (Wed, 24 Sep 2014)

  New Revision: 3d3b0e89e9828c2bd32e1870c2493a86256a1b35
  https://github.com/droonga/droonga.org/commit/3d3b0e89e9828c2bd32e1870c2493a86256a1b35

  Message:
    Update translation

  Modified files:
    _po/ja/tutorial/1.0.6/add-replica/index.po
    ja/tutorial/1.0.6/add-replica/index.md

  Modified: _po/ja/tutorial/1.0.6/add-replica/index.po (+210 -133)
===================================================================
--- _po/ja/tutorial/1.0.6/add-replica/index.po    2014-09-24 02:30:59 +0900 (007172d)
+++ _po/ja/tutorial/1.0.6/add-replica/index.po    2014-09-24 02:44:33 +0900 (82e60ca)
@@ -15,7 +15,7 @@ msgid ""
 "---"
 msgstr ""
 "---\n"
-"title: \"Droonga tutorial: 既存クラスタへのreplicaの追加\"\n"
+"title: \"Droongaチュートリアル: 既存クラスタへのreplicaの追加\"\n"
 "layout: ja\n"
 "---"
 
@@ -42,22 +42,26 @@ msgid ""
 "  Please complete the [\"getting started\" tutorial](../groonga/) before this.\n"
 "* You must know how to duplicate data between multiple clusters.\n"
 "  Please complete the [\"How to backup and restore the database?\" tutorial](../"
-"dump-restore/) before this.\n"
-"* Your `catalog.json` must have `system` and `catalog` plugins in the list of "
-"plugins.\n"
-"  Otherwise, you must add them, like:"
+"dump-restore/) before this."
 msgstr ""
 "* 何らかのデータが格納されている状態の[Droonga][]クラスタがあること。\n"
-"  このチュートリアルを始める前に、[「使ってみる」のチュートリアル](../groonga/)を完了している事が望ましいです\n"
+"  このチュートリアルを始める前に、[「使ってみる」のチュートリアル](../groonga/)を完了しておいて下さい。\n"
 "* 複数のクラスタの間でのデータの複製方法を把握していること。\n"
-"  このチュートリアルを始める前に、[バックアップと復元のチュートリアル](../dump-restore/)を完了しておいてください。\n"
-"* `catalog.json`に`system`と`catalog`プラグインが登録済みであること。\n"
-"  未登録の場合は、以下のようにして`plugins`の一覧に`system`と`catalog`を追加しておいて下さい:"
+"  このチュートリアルを始める前に、[バックアップと復元のチュートリアル](../dump-restore/)を完了しておいて下さい。"
 
 msgid ""
-"      - \"plugins\": [\"groonga\", \"crud\", \"search\", \"dump\"],\n"
-"      + \"plugins\": [\"groonga\", \"crud\", \"search\", \"dump\", \"system\", \"catalog\"],"
+"This tutorial assumes that there are two existing Droonga nodes prepared by th"
+"e [first tutorial](../groonga/): `node0` (`192.168.100.50`) and `node1` (`192."
+"168.100.51`), and there is another computer `node2` (`192.168.100.52`) for a n"
+"ew node.\n"
+"If you have Droonga nodes with other names, read `node0`, `node1` and `node2` "
+"in following descriptions as yours."
 msgstr ""
+"このチュートリアルでは、[最初のチュートリアル](../groonga/)で準備した2つの既存のDroongaノード:`node0` (`192.168.1"
+"00.50`) 、 `node1` (`192.168.100.51`) と、新しいノードとして使うもう1台のコンピュータ `node2` (`192.16"
+"8.100.52`) があると仮定します。\n"
+"あなたの手元にあるDroongaノードがこれとは異なる名前である場合には、以下の説明の中の`node0`、`node1`、`node2`は実際の物に読み替え"
+"て下さい。"
 
 msgid "## What's \"replica\"?"
 msgstr "## 「replica」とは?"
@@ -121,12 +125,11 @@ msgstr ""
 "(将来的には、新しいノードを完全に無停止で追加できるようにする予定ですが、今のところはそれはできません。)"
 
 msgid ""
-"Assume that there is a Droonga cluster constructed with two replica nodes `192"
-".168.100.50` and `192.168.100.51`, and we are going to add a new replica node "
-"`192.168.100.52`."
+"Assume that there is a Droonga cluster constructed with two replica nodes `nod"
+"e0` and `node1`, and we are going to add a new replica node `node2`."
 msgstr ""
-"ここでは、`192.168.100.50` と `192.168.100.51` の2つのreplicaノードからなるDroongaクラスタがあり、新しいr"
-"eplicaノードとして `192.168.100.52` を追加すると仮定します。"
+"ここでは、`node0` と `node1` の2つのreplicaノードからなるDroongaクラスタがあり、新しいreplicaノードとして `node"
+"2` を追加すると仮定します。"
 
 msgid "### Setup a new node"
 msgstr "### 新しいノードをセットアップする"
@@ -135,26 +138,15 @@ msgid "First, prepare a new computer, install required softwares and configure t
 msgstr "まず、新しいコンピュータをセットアップし、必要なソフトウェアのインストールと設定を済ませます。"
 
 msgid ""
-"    (on 192.168.100.52)\n"
-"    # apt-get update\n"
-"    # apt-get -y upgrade\n"
-"    # apt-get install -y ruby ruby-dev build-essential nodejs nodejs-legacy np"
-"m\n"
-"    # gem install droonga-engine\n"
-"    # npm install -g droonga-http-server\n"
-"    # mkdir ~/droonga\n"
-"    # echo \"host: 192.168.100.52\"    >  ~/droonga/droonga-engine.yaml\n"
-"    # echo \"port:        10041\"      >  ~/droonga/droonga-http-server.yaml\n"
-"    # echo \"environment: production\" >> ~/droonga/droonga-http-server.yaml"
-msgstr ""
-
-msgid "Then generate the `catalog.json` with only one replica, the new node itself:"
-msgstr "新しく追加しようとしているノードのみをreplicaとして含む内容で、`catalog.json`を生成します:"
-
-msgid ""
-"    (on 192.168.100.52)\n"
-"    # droonga-engine-catalog-generate --hosts=192.168.100.52 \\\n"
-"                                      --output=~/droonga/catalog.json"
+"~~~\n"
+"(on node2)\n"
+"# curl https://raw.githubusercontent.com/droonga/droonga-engine/master/install"
+".sh | \\\n"
+"    HOST=node2 bash\n"
+"# curl https://raw.githubusercontent.com/droonga/droonga-http-server/master/in"
+"stall.sh | \\\n"
+"    ENGINE_HOST=node2 HOST=node2 bash\n"
+"~~~"
 msgstr ""
 
 msgid ""
@@ -166,67 +158,63 @@ msgstr ""
 "もしそのコンピュータがかつてDroongaノードとして使われていた事があった場合には、最初に古いデータを消去する必要があります。"
 
 msgid ""
-"    (on 192.168.100.52)\n"
-"    # droonga-engine-stop\n"
-"    # rm -rf ~/droonga\n"
-"    # mkdir ~/droonga\n"
-"    # droonga-engine-catalog-generate --hosts=192.168.100.52 \\\n"
-"                                      --output=~/droonga/catalog.json"
+"~~~\n"
+"(on node2)\n"
+"# droonga-engine-configure --quiet \\\n"
+"                           --clear --reset-config --reset-catalog \\\n"
+"                           --host=node2\n"
+"# droonga-http-server-configure --quiet --reset-config \\\n"
+"                                --droonga-engine-host-name=node2 \\\n"
+"                                --receive-host-name=node2\n"
+"~~~"
 msgstr ""
 
-msgid "Let's start the server."
-msgstr "では、サーバを起動しましょう。"
+msgid "Let's start services."
+msgstr "では、サービスを起動しましょう。"
 
 msgid ""
-"    (on 192.168.100.52)\n"
-"    # export DROONGA_BASE_DIR=$HOME/droonga\n"
-"    # droonga-engine\n"
-"    # droonga-http-server --cache-size=-1"
+"~~~\n"
+"(on node2)\n"
+"# service start droonga-engine\n"
+"# service start droonga-http-server\n"
+"~~~"
 msgstr ""
 
 msgid ""
-"Currently, the new node doesn't work as a node of the cluster, because it does"
-"n't appear in the `catalog.json`.\n"
-"Even if you send requests to the new node, it just forwards all of them to oth"
-"er existing members of the cluster."
+"Currently, the new node doesn't work as a node of the existing cluster.\n"
+"You can confirm that, via the `system.status` command:"
 msgstr ""
-"この時点では、ノードの情報が `catalog.json` に含まれていないため、この新しいノードはクラスタのノードとしては動作していません。\n"
-"新しいノードにリクエストを送っても、それらはすべてクラスタ内の既存のノードに転送されます。"
-
-msgid "You can confirm that, via the `system.status` command:"
-msgstr "この事は、`system.status` コマンドの結果を見ると確認できます:"
+"この時点で、この新しいノードは既存のクラスタのノードとしては動作していません。\n"
+"この事は、`system.status`コマンドを通じて確認できます:"
 
 msgid ""
 "~~~\n"
-"# curl \"http://192.168.100.50:10041/droonga/system/status\" | jq \".\"\n"
+"$ curl \"http://node0:10041/droonga/system/status\" | jq \".\"\n"
 "{\n"
 "  \"nodes\": {\n"
-"    \"192.168.100.50:10031/droonga\": {\n"
+"    \"node0:10031/droonga\": {\n"
 "      \"live\": true\n"
 "    },\n"
-"    \"192.168.100.51:10031/droonga\": {\n"
+"    \"node1:10031/droonga\": {\n"
 "      \"live\": true\n"
 "    }\n"
 "  }\n"
 "}\n"
-"# curl \"http://192.168.100.51:10041/droonga/system/status\" | jq \".\"\n"
+"$ curl \"http://node1:10041/droonga/system/status\" | jq \".\"\n"
 "{\n"
 "  \"nodes\": {\n"
-"    \"192.168.100.50:10031/droonga\": {\n"
+"    \"node0:10031/droonga\": {\n"
 "      \"live\": true\n"
 "    },\n"
-"    \"192.168.100.51:10031/droonga\": {\n"
+"    \"node1:10031/droonga\": {\n"
 "      \"live\": true\n"
 "    }\n"
 "  }\n"
 "}\n"
-"# curl \"http://192.168.100.52:10041/droonga/system/status\" | jq \".\"\n"
+"$ curl \"http://node2:10041/droonga/system/status\" | jq \".\"\n"
 "{\n"
 "  \"nodes\": {\n"
-"    \"192.168.100.50:10031/droonga\": {\n"
-"      \"live\": true\n"
-"    },\n"
-"    \"192.168.100.51:10031/droonga\": {\n"
+"    \"node2:10031/droonga\": {\n"
 "      \"live\": true\n"
 "    }\n"
 "  }\n"
@@ -294,24 +282,26 @@ msgstr ""
 "on` が置かれているディレクトリで、`droonga-engine-join` コマンドを実行します:"
 
 msgid ""
-"    (on 192.168.100.52)\n"
-"    # droonga-engine-join --host=192.168.100.52 \\\n"
-"                          --replica-source-host=192.168.100.50\n"
-"    Joining new replica to the cluster...\n"
-"    ...\n"
-"    Update existing hosts in the cluster...\n"
-"    ...\n"
-"    Done."
+"~~~\n"
+"(on node2)\n"
+"$ droonga-engine-join --host=node2 \\\n"
+"                      --replica-source-host=node0\n"
+"Joining new replica to the cluster...\n"
+"...\n"
+"Update existing hosts in the cluster...\n"
+"...\n"
+"Done.\n"
+"~~~"
 msgstr ""
 
 msgid ""
-" * You must specify the host name or the IP address of the new replica node, v"
-"ia the `--host` option.\n"
-" * You must specify the host name or the IP address of an existing node of the"
-" cluster, via the `--replica-source-host` option."
+" * You must specify the host name of the new replica node, via the `--host` op"
+"tion.\n"
+" * You must specify the host name of an existing node of the cluster, via the "
+"`--replica-source-host` option."
 msgstr ""
-" * `--host` オプションで、その新しいreplicaノードのホスト名またはIPアドレスを指定して下さい。\n"
-" * `--replica-source-host` オプションで、クラスタ中の既存のノードの1つのホスト名またはIPアドレスを指定して下さい。"
+" * `--host` オプションで、その新しいreplicaノードのホスト名を指定して下さい。\n"
+" * `--replica-source-host` オプションで、クラスタ中の既存のノードの1つのホスト名を指定して下さい。"
 
 msgid ""
 "Then the command automatically starts to synchronize all data of the cluster t"
@@ -325,18 +315,34 @@ msgstr ""
 "データの同期が完了すると、ノードが自動的に再起動してクラスタに参加します。\n"
 "すべてのノードの`catalog.json`も同時に更新され、この時点をもって、新しいノードは晴れてそのクラスタのreplicaノードとして動作し始めます。"
 
+msgid "To refresh response cacnes, restart the `droonga-http-server` on all nodes:"
+msgstr "レスポンスキャッシュを空にするために、すべてのノードで`droonga-http-server`を再起動しておきます:"
+
 msgid ""
 "~~~\n"
-"# curl \"http://192.168.100.50:10041/droonga/system/status\" | jq \".\"\n"
+"(on node0, node1, node2)\n"
+"# service droonga-http-server restart\n"
+" * Restarting  droonga-http-server             [ OK ]\n"
+"~~~"
+msgstr ""
+
+msgid ""
+"You can confirm that they are working as a cluster, via the `system.status` co"
+"mmand:"
+msgstr "これで、ノードがクラスタに参加しました。この事は `system.status` コマンドで確かめられます:"
+
+msgid ""
+"~~~\n"
+"$ curl \"http://node0:10041/droonga/system/status\" | jq \".\"\n"
 "{\n"
 "  \"nodes\": {\n"
-"    \"192.168.100.50:10031/droonga\": {\n"
+"    \"node0:10031/droonga\": {\n"
 "      \"live\": true\n"
 "    },\n"
-"    \"192.168.100.51:10031/droonga\": {\n"
+"    \"node1:10031/droonga\": {\n"
 "      \"live\": true\n"
 "    },\n"
-"    \"192.168.100.52:10031/droonga\": {\n"
+"    \"node2:10031/droonga\": {\n"
 "      \"live\": true\n"
 "    }\n"
 "  }\n"
@@ -384,12 +390,12 @@ msgid ""
 msgstr "もちろん、他の目的に転用したいといった理由から、正常動作中のノードを取り除きたいと考える場合もあるでしょう。"
 
 msgid ""
-"Assume that there is a Droonga cluster constructed with trhee replica nodes `1"
-"92.168.100.50`, `192.168.100.51` and `192.168.100.52`, and planning to remove "
-"the last node `192.168.100.52` from the cluster."
+"Assume that there is a Droonga cluster constructed with trhee replica nodes `n"
+"ode0`, `node1` and `node2`, and planning to remove the last node `node2` from "
+"the cluster."
 msgstr ""
-"ここでは、`192.168.100.50`、`192.168.100.51`、および `192.168.100.52` の3つのreplicaノードからなる"
-"Droongaクラスタが存在していて、最後のノード `192.168.100.52` をクラスタから取り除こうとしていると仮定します。"
+"ここでは、`node0` 、 `node1` 、`node2` の3つのreplicaノードからなるDroongaクラスタがあり、最後のノード `node2"
+"` をクラスタから離脱させようとしていると仮定します。"
 
 msgid "### Unjoin an existing replica from the cluster"
 msgstr "### 既存のreplicaをクラスタから分離する"
@@ -403,12 +409,13 @@ msgstr ""
 " `droonga-engine-unjoin` コマンドを実行します:"
 
 msgid ""
-"    (on 192.168.100.50)\n"
-"    # cd ~/droonga\n"
-"    # droonga-engine-unjoin --host=192.168.100.52\n"
-"    Unjoining replica from the cluster...\n"
-"    ...\n"
-"    Done."
+"~~~\n"
+"(on node0)\n"
+"$ droonga-engine-unjoin --host=node2\n"
+"Unjoining replica from the cluster...\n"
+"...\n"
+"Done.\n"
+"~~~"
 msgstr ""
 
 msgid ""
@@ -429,6 +436,57 @@ msgstr ""
 "すると、ノードがクラスタから自動的に離脱し、すべてのノードの `catalog.json` も同時に更新されます。\n"
 "これで、ノードはクラスタから無事離脱しました。"
 
+msgid ""
+"You can confirm that the `node2` is successfully unjoined, via the `system.sta"
+"tus` command:"
+msgstr "これで、ノード `node2` がクラスタから離脱しました。この事は `system.status` コマンドで確かめられます:"
+
+msgid ""
+"~~~\n"
+"$ curl \"http://node0:10041/droonga/system/status\" | jq \".\"\n"
+"{\n"
+"  \"nodes\": {\n"
+"    \"node0:10031/droonga\": {\n"
+"      \"live\": true\n"
+"    },\n"
+"    \"node1:10031/droonga\": {\n"
+"      \"live\": true\n"
+"    }\n"
+"  }\n"
+"}\n"
+"$ curl \"http://node1:10041/droonga/system/status\" | jq \".\"\n"
+"{\n"
+"  \"nodes\": {\n"
+"    \"node0:10031/droonga\": {\n"
+"      \"live\": true\n"
+"    },\n"
+"    \"node1:10031/droonga\": {\n"
+"      \"live\": true\n"
+"    }\n"
+"  }\n"
+"}\n"
+"$ curl \"http://node2:10041/droonga/system/status\" | jq \".\"\n"
+"{\n"
+"  \"nodes\": {\n"
+"    \"node0:10031/droonga\": {\n"
+"      \"live\": true\n"
+"    },\n"
+"    \"node1:10031/droonga\": {\n"
+"      \"live\": true\n"
+"    }\n"
+"  }\n"
+"}\n"
+"~~~"
+msgstr ""
+
+msgid ""
+"Note that the `node2` also says that the `node2` is not a member of the cluste"
+"r.\n"
+"This is the difference between a node unjoined from a cluster and a new node."
+msgstr ""
+"`node2` までもが、`node2` がクラスタの一員ではないと報告していることに注意して下さい。\n"
+"これは、クラスタから離脱したノードと新しいノードとの違いです。"
+
 msgid "## Replace an existing replica node in a cluster with a new one"
 msgstr "## クラスタ内の既存のreplicaノードを新しいreplicaノードで置き換える"
 
@@ -436,12 +494,12 @@ msgid "Replacing of nodes is a combination of those instructions above."
 msgstr "ノードの置き換えは、上記の手順の組み合わせで行います。"
 
 msgid ""
-"Assume that there is a Droonga cluster constructed with two replica nodes `192"
-".168.100.50` and `192.168.100.51`, the node `192.168.100.51` is unstable, and "
-"planning to replace it with a new node `192.168.100.52`."
+"Assume that there is a Droonga cluster constructed with two replica nodes `nod"
+"e0` and `node1`, the node `node1` is unstable, and planning to replace it with"
+" a new node `node2`."
 msgstr ""
-"`192.168.100.50` と `192.168.100.51` の2つのノードからなるDroongaクラスタがあり、ノード `192.168.100"
-".51` の動作が不安定になっていて、これを新しいノード `192.168.100.52` で置き換えようとしていると仮定します。"
+"ここでは、`node0` と `node1` の2つのreplicaノードからなるDroongaクラスタがあり、`node1` が不安定で、それを新しいre"
+"plicaノード `node2` で置き換えようとしていると仮定します。"
 
 msgid ""
 "First, remove the unstable node.\n"
@@ -449,9 +507,21 @@ msgid ""
 msgstr "まず、不安定になっているノードを取り除きます。以下のようにしてクラスタからノードを離脱させて下さい:"
 
 msgid ""
-"    (on 192.168.100.50)\n"
-"    # cd ~/droonga\n"
-"    # droonga-engine-unjoin --host=192.168.100.51"
+"~~~\n"
+"(on node0)\n"
+"$ droonga-engine-unjoin --host=node1\n"
+"~~~"
+msgstr ""
+
+msgid "Refresh response caches:"
+msgstr "レスポンスキャッシュを空にします:"
+
+msgid ""
+"~~~\n"
+"(on node0, node1)\n"
+"# service droonga-http-server restart\n"
+" * Restarting  droonga-http-server             [ OK ]\n"
+"~~~"
 msgstr ""
 
 msgid ""
@@ -461,10 +531,10 @@ msgstr "これで、ノードがクラスタから離脱しました。この事
 
 msgid ""
 "~~~\n"
-"# curl \"http://192.168.100.50:10041/droonga/system/status\" | jq \".\"\n"
+"$ curl \"http://node0:10041/droonga/system/status\" | jq \".\"\n"
 "{\n"
 "  \"nodes\": {\n"
-"    \"192.168.100.50:10031/droonga\": {\n"
+"    \"node0:10031/droonga\": {\n"
 "      \"live\": true\n"
 "    }\n"
 "  }\n"
@@ -476,60 +546,67 @@ msgid "### Add a new replica"
 msgstr "### 新しいreplicaを追加する"
 
 msgid ""
-"Next, setup the new replica.\n"
+"Next, setup the new replica `node2`.\n"
 "Install required packages, generate the `catalog.json`, and start services."
 msgstr ""
-"次に、新しいreplicaを用意します。\n"
+"次に、新しいreplica `node2`を用意します。\n"
 "必要なパッケージをインストールし、`catalog.json`を生成して、サービスを起動します。"
 
 msgid ""
-"    (on 192.168.100.52)\n"
-"    # export DROONGA_BASE_DIR=$HOME/droonga\n"
-"    # echo \"host: 192.168.100.52\"    >  $DROONGA_BASE_DIR/droonga-engine.yaml\n"
-"    # echo \"port:        10041\"      >  $DROONGA_BASE_DIR/droonga-http-server."
-"yaml\n"
-"    # echo \"environment: production\" >> $DROONGA_BASE_DIR/droonga-http-server."
-"yaml\n"
-"    # droonga-engine-catalog-generate --hosts=$host \\\n"
-"                                      --output=$DROONGA_BASE_DIR/catalog.json\n"
-"    # droonga-engine\n"
-"    # droonga-http-server --cache-size=-1"
-msgstr ""
+"If the computer was used as a Droonga node in old days, then you must clear ol"
+"d data instead of installation:"
+msgstr "そのコンピュータがかつてDroongaノードの一員だったことがある場合は、インストール作業の代わりに、古いデータを消去する必要があります:"
 
 msgid "Then, join the node to the cluster."
 msgstr "そうしたら、そのノードをクラスタに参加させましょう。"
 
 msgid ""
-"    (on 192.168.100.52)\n"
-"    # droonga-engine-join --host=192.168.100.52 \\\n"
-"                          --replica-source-host=192.168.100.50"
+"~~~\n"
+"(on node2)\n"
+"$ droonga-engine-join --host=node2 \\\n"
+"                      --replica-source-host=node0\n"
+"~~~"
+msgstr ""
+
+msgid "And, refresh response caches:"
+msgstr "そして、レスポンスキャッシュを空にします:"
+
+msgid ""
+"~~~\n"
+"(on node0, node2)\n"
+"# service droonga-http-server restart\n"
+" * Restarting  droonga-http-server             [ OK ]\n"
+"~~~"
 msgstr ""
 
 msgid ""
-"Finally a Droonga cluster constructed with two nodes `192.168.100.50` and `192"
-".168.100.52` is here."
-msgstr "最終的に、`192.168.100.50` と `192.168.100.52` の2つのノードからなるDroongaクラスタができあがりました。"
+"Finally a Droonga cluster constructed with two nodes `node0` and `node2` is he"
+"re."
+msgstr "最終的に、`node0` と `node2` の2つのノードからなるDroongaクラスタができあがりました。"
+
+msgid "You can confirm that, via the `system.status` command:"
+msgstr "この事は、`system.status` コマンドの結果を見ると確認できます:"
 
 msgid ""
 "~~~\n"
-"# curl \"http://192.168.100.50:10041/droonga/system/status\" | jq \".\"\n"
+"$ curl \"http://node0:10041/droonga/system/status\" | jq \".\"\n"
 "{\n"
 "  \"nodes\": {\n"
-"    \"192.168.100.50:10031/droonga\": {\n"
+"    \"node0:10031/droonga\": {\n"
 "      \"live\": true\n"
 "    },\n"
-"    \"192.168.100.52:10031/droonga\": {\n"
+"    \"node2:10031/droonga\": {\n"
 "      \"live\": true\n"
 "    }\n"
 "  }\n"
 "}\n"
-"# curl \"http://192.168.100.52:10041/droonga/system/status\" | jq \".\"\n"
+"$ curl \"http://node2:10041/droonga/system/status\" | jq \".\"\n"
 "{\n"
 "  \"nodes\": {\n"
-"    \"192.168.100.50:10031/droonga\": {\n"
+"    \"node0:10031/droonga\": {\n"
 "      \"live\": true\n"
 "    },\n"
-"    \"192.168.100.52:10031/droonga\": {\n"
+"    \"node2:10031/droonga\": {\n"
 "      \"live\": true\n"
 "    }\n"
 "  }\n"

  Modified: ja/tutorial/1.0.6/add-replica/index.md (+146 -107)
===================================================================
--- ja/tutorial/1.0.6/add-replica/index.md    2014-09-24 02:30:59 +0900 (3eb57ba)
+++ ja/tutorial/1.0.6/add-replica/index.md    2014-09-24 02:44:33 +0900 (b06b1be)
@@ -25,12 +25,9 @@ layout: ja
   このチュートリアルを始める前に、[「使ってみる」のチュートリアル](../groonga/)を完了している事が望ましいです
 * 複数のクラスタの間でのデータの複製方法を把握していること。
   このチュートリアルを始める前に、[バックアップと復元のチュートリアル](../dump-restore/)を完了しておいてください。
-* `catalog.json`に`system`と`catalog`プラグインが登録済みであること。
-  未登録の場合は、以下のようにして`plugins`の一覧に`system`と`catalog`を追加しておいて下さい:
-  
-      - "plugins": ["groonga", "crud", "search", "dump"],
-      + "plugins": ["groonga", "crud", "search", "dump", "system", "catalog"],
-  
+
+このチュートリアルでは、[最初のチュートリアル](../groonga/)で準備した2つの既存のDroongaノード:`node0` (`192.168.100.50`) 、 `node1` (`192.168.100.51`) と、新しいノードとして使うもう1台のコンピュータ `node2` (`192.168.100.52`) があると仮定します。
+あなたの手元にあるDroongaノードがこれとは異なる名前である場合には、以下の説明の中の`node0`、`node1`、`node2`は実際の物に読み替えて下さい。
 
 ## 「replica」とは?
 
@@ -56,81 +53,71 @@ Droongaのノードの集合には、「replica」と「slice」という2つの
 その一方で、クラスタへの新しいデータの流入は、新しいノードが動作を始めるまでの間停止しておく必要があります。
 (将来的には、新しいノードを完全に無停止で追加できるようにする予定ですが、今のところはそれはできません。)
 
-ここでは、`192.168.100.50` と `192.168.100.51` の2つのreplicaノードからなるDroongaクラスタがあり、新しいreplicaノードとして `192.168.100.52` を追加すると仮定します。
+ここでは、`node0` と `node1` の2つのreplicaノードからなるDroongaクラスタがあり、新しいreplicaノードとして `node2` を追加すると仮定します。
 
 ### 新しいノードをセットアップする
 
 まず、新しいコンピュータをセットアップし、必要なソフトウェアのインストールと設定を済ませます。
 
-    (on 192.168.100.52)
-    # apt-get update
-    # apt-get -y upgrade
-    # apt-get install -y ruby ruby-dev build-essential nodejs nodejs-legacy npm
-    # gem install droonga-engine
-    # npm install -g droonga-http-server
-    # mkdir ~/droonga
-    # echo "host: 192.168.100.52"    >  ~/droonga/droonga-engine.yaml
-    # echo "port:        10041"      >  ~/droonga/droonga-http-server.yaml
-    # echo "environment: production" >> ~/droonga/droonga-http-server.yaml
-
-新しく追加しようとしているノードのみをreplicaとして含む内容で、`catalog.json`を生成します:
-
-    (on 192.168.100.52)
-    # droonga-engine-catalog-generate --hosts=192.168.100.52 \
-                                      --output=~/droonga/catalog.json
+~~~
+(on node2)
+# curl https://raw.githubusercontent.com/droonga/droonga-engine/master/install.sh | \
+    HOST=node2 bash
+# curl https://raw.githubusercontent.com/droonga/droonga-http-server/master/install.sh | \
+    ENGINE_HOST=node2 HOST=node2 bash
+~~~
 
 注意点として、空でないノードを既存のクラスタに追加することはできません。
 もしそのコンピュータがかつてDroongaノードとして使われていた事があった場合には、最初に古いデータを消去する必要があります。
 
-    (on 192.168.100.52)
-    # droonga-engine-stop
-    # rm -rf ~/droonga
-    # mkdir ~/droonga
-    # droonga-engine-catalog-generate --hosts=192.168.100.52 \
-                                      --output=~/droonga/catalog.json
-
-では、サーバを起動しましょう。
+~~~
+(on node2)
+# droonga-engine-configure --quiet \
+                           --clear --reset-config --reset-catalog \
+                           --host=node2
+# droonga-http-server-configure --quiet --reset-config \
+                                --droonga-engine-host-name=node2 \
+                                --receive-host-name=node2
+~~~
 
-    (on 192.168.100.52)
-    # export DROONGA_BASE_DIR=$HOME/droonga
-    # droonga-engine
-    # droonga-http-server --cache-size=-1
+では、サービスを起動しましょう。
 
-この時点では、ノードの情報が `catalog.json` に含まれていないため、この新しいノードはクラスタのノードとしては動作していません。
-新しいノードにリクエストを送っても、それらはすべてクラスタ内の既存のノードに転送されます。
+~~~
+(on node2)
+# service start droonga-engine
+# service start droonga-http-server
+~~~
 
-この事は、`system.status` コマンドの結果を見ると確認できます:
+この時点で、この新しいノードは既存のクラスタのノードとしては動作していません。
+この事は、`system.status`コマンドを通じて確認できます:
 
 ~~~
-# curl "http://192.168.100.50:10041/droonga/system/status" | jq "."
+$ curl "http://node0:10041/droonga/system/status" | jq "."
 {
   "nodes": {
-    "192.168.100.50:10031/droonga": {
+    "node0:10031/droonga": {
       "live": true
     },
-    "192.168.100.51:10031/droonga": {
+    "node1:10031/droonga": {
       "live": true
     }
   }
 }
-# curl "http://192.168.100.51:10041/droonga/system/status" | jq "."
+$ curl "http://node1:10041/droonga/system/status" | jq "."
 {
   "nodes": {
-    "192.168.100.50:10031/droonga": {
+    "node0:10031/droonga": {
       "live": true
     },
-    "192.168.100.51:10031/droonga": {
+    "node1:10031/droonga": {
       "live": true
     }
   }
 }
-# curl "http://192.168.100.52:10041/droonga/system/status" | jq "."
+$ curl "http://node2:10041/droonga/system/status" | jq "."
 {
   "nodes": {
-    "192.168.100.50:10031/droonga": {
-      "live": true
-    },
-    "192.168.100.51:10031/droonga": {
+    "node2:10031/droonga": {
       "live": true
     }
   }
@@ -162,35 +149,45 @@ cronjobとして実行されるバッチスクリプトによって `load` コ
 
 新しいreplicaノードを既存のクラスタに追加するには、いずれかの既存のノードもしくは新しいreplicaノードのいずれかにおいて、`catalog.json` が置かれているディレクトリで、`droonga-engine-join` コマンドを実行します:
 
-    (on 192.168.100.52)
-    # droonga-engine-join --host=192.168.100.52 \
-                          --replica-source-host=192.168.100.50
-    Joining new replica to the cluster...
-    ...
-    Update existing hosts in the cluster...
-    ...
-    Done.
+~~~
+(on node2)
+$ droonga-engine-join --host=node2 \
+                      --replica-source-host=node0
+Joining new replica to the cluster...
+...
+Update existing hosts in the cluster...
+...
+Done.
+~~~
 
- * `--host` オプションで、その新しいreplicaノードのホスト名またはIPアドレスを指定して下さい。
- * `--replica-source-host` オプションで、クラスタ中の既存のノードの1つのホスト名またはIPアドレスを指定して下さい。
+ * `--host` オプションで、その新しいreplicaノードのホスト名を指定して下さい。
+ * `--replica-source-host` オプションで、クラスタ中の既存のノードの1つのホスト名を指定して下さい。
 
 コマンドを実行すると、自動的に、クラスタのデータが新しいreplicaノードへと同期され始めます。
 データの同期が完了すると、ノードが自動的に再起動してクラスタに参加します。
 すべてのノードの`catalog.json`も同時に更新され、この時点をもって、新しいノードは晴れてそのクラスタのreplicaノードとして動作し始めます。
 
-この事は、`system.status` コマンドの結果を見ると確認できます:
+レスポンスキャッシュを空にするために、すべてのノードで`droonga-http-server`を再起動しておきます:
+
+~~~
+(on node0, node1, node2)
+# service droonga-http-server restart
+ * Restarting  droonga-http-server             [ OK ]
+~~~
+
+これで、ノードがクラスタに参加しました。この事は `system.status` コマンドで確かめられます:
 
 ~~~
-# curl "http://192.168.100.50:10041/droonga/system/status" | jq "."
+$ curl "http://node0:10041/droonga/system/status" | jq "."
 {
   "nodes": {
-    "192.168.100.50:10031/droonga": {
+    "node0:10031/droonga": {
       "live": true
     },
-    "192.168.100.51:10031/droonga": {
+    "node1:10031/droonga": {
       "live": true
     },
-    "192.168.100.52:10031/droonga": {
+    "node2:10031/droonga": {
       "live": true
     }
   }
@@ -214,18 +211,19 @@ Droongaクラスタ内のノードは互いに監視しあっており、動作
 
 もちろん、他の目的に転用したいといった理由から、正常動作中のノードを取り除きたいと考える場合もあるでしょう。
 
-ここでは、`192.168.100.50`、`192.168.100.51`、および `192.168.100.52` の3つのreplicaノードからなるDroongaクラスタが存在していて、最後のノード `192.168.100.52` をクラスタから取り除こうとしていると仮定します。
+ここでは、`node0` 、 `node1` 、`node2` の3つのreplicaノードからなるDroongaクラスタがあり、最後のノード `node2` をクラスタから離脱させようとしていると仮定します。
 
 ### 既存のreplicaをクラスタから分離する
 
 新しいreplicaノードを既存のクラスタから削除するには、クラスタ内のいずれかのノードの上で、`catalog.json` が置かれたディレクトリにおいて `droonga-engine-unjoin` コマンドを実行します:
 
-    (on 192.168.100.50)
-    # cd ~/droonga
-    # droonga-engine-unjoin --host=192.168.100.52
-    Unjoining replica from the cluster...
-    ...
-    Done.
+~~~
+(on node0)
+$ droonga-engine-unjoin --host=node2
+Unjoining replica from the cluster...
+...
+Done.
+~~~
 
  * `--host` オプションで、クラスタから削除するノードのホスト名またはIPアドレスを指定して下さい。
  * コマンドは `catalog.json` が置かれたディレクトリで実行するか、もしくはそのディレクトリのパスを `--base-dir` オプションで指定して下さい。
@@ -233,65 +231,86 @@ Droongaクラスタ内のノードは互いに監視しあっており、動作
 すると、ノードがクラスタから自動的に離脱し、すべてのノードの `catalog.json` も同時に更新されます。
 これで、ノードはクラスタから無事離脱しました。
 
-この事は、`system.status` コマンドの結果を見ると確認できます:
+レスポンスキャッシュを空にするために、すべてのノードで`droonga-http-server`を再起動しておきます:
 
 ~~~
-# curl "http://192.168.100.50:10041/droonga/system/status" | jq "."
+(on node0, node1, node2)
+# service droonga-http-server restart
+ * Restarting  droonga-http-server             [ OK ]
+~~~
+
+これで、ノード `node2` がクラスタから離脱しました。この事は `system.status` コマンドで確かめられます:
+
+~~~
+$ curl "http://node0:10041/droonga/system/status" | jq "."
 {
   "nodes": {
-    "192.168.100.50:10031/droonga": {
+    "node0:10031/droonga": {
       "live": true
     },
-    "192.168.100.51:10031/droonga": {
+    "node1:10031/droonga": {
       "live": true
     }
   }
 }
-# curl "http://192.168.100.51:10041/droonga/system/status" | jq "."
+$ curl "http://node1:10041/droonga/system/status" | jq "."
 {
   "nodes": {
-    "192.168.100.50:10031/droonga": {
+    "node0:10031/droonga": {
       "live": true
     },
-    "192.168.100.51:10031/droonga": {
+    "node1:10031/droonga": {
       "live": true
     }
   }
 }
-# curl "http://192.168.100.52:10041/droonga/system/status" | jq "."
+$ curl "http://node2:10041/droonga/system/status" | jq "."
 {
   "nodes": {
-    "192.168.100.50:10031/droonga": {
+    "node0:10031/droonga": {
       "live": true
     },
-    "192.168.100.51:10031/droonga": {
+    "node1:10031/droonga": {
       "live": true
     }
   }
 }
 ~~~
 
+`node2` までもが、`node2` がクラスタの一員ではないと報告していることに注意して下さい。
+これは、クラスタから離脱したノードと新しいノードとの違いです。
+
+
 ## クラスタ内の既存のreplicaノードを新しいreplicaノードで置き換える
 
 ノードの置き換えは、上記の手順の組み合わせで行います。
 
-`192.168.100.50` と `192.168.100.51` の2つのノードからなるDroongaクラスタがあり、ノード `192.168.100.51` の動作が不安定になっていて、これを新しいノード `192.168.100.52` で置き換えようとしていると仮定します。
+ここでは、`node0` と `node1` の2つのreplicaノードからなるDroongaクラスタがあり、`node1` が不安定で、それを新しいreplicaノード `node2` で置き換えようとしていると仮定します。
 
 ### 既存のreplicaをクラスタから分離する
 
 まず、不安定になっているノードを取り除きます。以下のようにしてクラスタからノードを離脱させて下さい:
 
-    (on 192.168.100.50)
-    # cd ~/droonga
-    # droonga-engine-unjoin --host=192.168.100.51
+~~~
+(on node0)
+$ droonga-engine-unjoin --host=node1
+~~~
+
+レスポンスキャッシュを空にします:
+
+~~~
+(on node0, node1)
+# service droonga-http-server restart
+ * Restarting  droonga-http-server             [ OK ]
+~~~
 
 これで、ノードがクラスタから離脱しました。この事は `system.status` コマンドで確かめられます:
 
 ~~~
-# curl "http://192.168.100.50:10041/droonga/system/status" | jq "."
+$ curl "http://node0:10041/droonga/system/status" | jq "."
 {
   "nodes": {
-    "192.168.100.50:10031/droonga": {
+    "node0:10031/droonga": {
       "live": true
     }
   }
@@ -300,48 +319,68 @@ Droongaクラスタ内のノードは互いに監視しあっており、動作
 
 ### 新しいreplicaを追加する
 
-次に、新しいreplicaを用意します。
+次に、新しいreplica `node2`を用意します。
 必要なパッケージをインストールし、`catalog.json`を生成して、サービスを起動します。
 
-    (on 192.168.100.52)
-    # export DROONGA_BASE_DIR=$HOME/droonga
-    # echo "host: 192.168.100.52"    >  $DROONGA_BASE_DIR/droonga-engine.yaml
-    # echo "port:        10041"      >  $DROONGA_BASE_DIR/droonga-http-server.yaml
-    # echo "environment: production" >> $DROONGA_BASE_DIR/droonga-http-server.yaml
-    # droonga-engine-catalog-generate --hosts=$host \
-                                      --output=$DROONGA_BASE_DIR/catalog.json
-    # droonga-engine
-    # droonga-http-server --cache-size=-1
+~~~
+(on node2)
+# curl https://raw.githubusercontent.com/droonga/droonga-engine/master/install.sh | \
+    HOST=node2 bash
+# curl https://raw.githubusercontent.com/droonga/droonga-http-server/master/install.sh | \
+    ENGINE_HOST=node2 HOST=node2 bash
+~~~
+
+そのコンピュータがかつてDroongaノードの一員だったことがある場合は、インストール作業の代わりに、古いデータを消去する必要があります:
+
+~~~
+(on node2)
+# droonga-engine-configure --quiet \
+                           --clear --reset-config --reset-catalog \
+                           --host=node2
+# droonga-http-server-configure --quiet --reset-config \
+                                --droonga-engine-host-name=node2 \
+                                --receive-host-name=node2
+~~~
 
 そうしたら、そのノードをクラスタに参加させましょう。
 
-    (on 192.168.100.52)
-    # droonga-engine-join --host=192.168.100.52 \
-                          --replica-source-host=192.168.100.50
+~~~
+(on node2)
+$ droonga-engine-join --host=node2 \
+                      --replica-source-host=node0
+~~~
+
+そして、レスポンスキャッシュを空にします:
+
+~~~
+(on node0, node2)
+# service droonga-http-server restart
+ * Restarting  droonga-http-server             [ OK ]
+~~~
 
-最終的に、`192.168.100.50` と `192.168.100.52` の2つのノードからなるDroongaクラスタができあがりました。
+最終的に、`node0` と `node2` の2つのノードからなるDroongaクラスタができあがりました。
 
 この事は、`system.status` コマンドの結果を見ると確認できます:
 
 ~~~
-# curl "http://192.168.100.50:10041/droonga/system/status" | jq "."
+$ curl "http://node0:10041/droonga/system/status" | jq "."
 {
   "nodes": {
-    "192.168.100.50:10031/droonga": {
+    "node0:10031/droonga": {
       "live": true
     },
-    "192.168.100.52:10031/droonga": {
+    "node2:10031/droonga": {
       "live": true
     }
   }
 }
-# curl "http://192.168.100.52:10041/droonga/system/status" | jq "."
+$ curl "http://node2:10041/droonga/system/status" | jq "."
 {
   "nodes": {
-    "192.168.100.50:10031/droonga": {
+    "node0:10031/droonga": {
       "live": true
     },
-    "192.168.100.52:10031/droonga": {
+    "node2:10031/droonga": {
       "live": true
     }
   }
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Zurück zum Archiv-Index