[Groonga-commit] droonga/droonga.org at f9d489f [gh-pages] Basically use host names instead of IP addresses

Zurück zum Archiv-Index

Piro / YUKI Hiroshi null+****@clear*****
Tue Sep 23 03:34:21 JST 2014


Piro / YUKI Hiroshi	2014-09-23 03:34:21 +0900 (Tue, 23 Sep 2014)

  New Revision: f9d489fdf2fd56a40310603975ac2510e952aff4
  https://github.com/droonga/droonga.org/commit/f9d489fdf2fd56a40310603975ac2510e952aff4

  Message:
    Basically use host names instead of IP addresses

  Modified files:
    tutorial/1.0.6/dump-restore/index.md

  Modified: tutorial/1.0.6/dump-restore/index.md (+36 -36)
===================================================================
--- tutorial/1.0.6/dump-restore/index.md    2014-09-23 03:27:57 +0900 (d17106f)
+++ tutorial/1.0.6/dump-restore/index.md    2014-09-23 03:34:21 +0900 (6b90d60)
@@ -51,11 +51,11 @@ After that, establish that the `drndump` command has been installed successfully
 The `drndump` command extracts all schema and data as JSONs.
 Let's dump contents of existing your Droonga cluster.
 
-For example, if your cluster is constructed from two nodes `192.168.100.50` and `192.168.100.51`, and now you are logged in to the host `192.168.100.52` then the command line is:
+For example, if your cluster is constructed from two nodes `node0` (`192.168.100.50`) and `node1` (`192.168.100.51`), and now you are logged in to new another computer `node2` (`192.168.100.52`). then the command line is:
 
 ~~~
-# drndump --host=192.168.100.50 \
-           --receiver-host=192.168.100.52
+# drndump --host=node0 \
+           --receiver-host=node2
 {
   "type": "table_create",
   "dataset": "Default",
@@ -112,8 +112,8 @@ Note to these things:
 The result is printed to the standard output.
 To save it as a JSONs file, you'll use a redirection like:
 
-    # drndump --host=192.168.100.50 \
-              --receiver-host=192.168.100.52 \
+    # drndump --host=node0 \
+              --receiver-host=node2 \
         > dump.jsons
 
 
@@ -135,13 +135,13 @@ After that, establish that the `droonga-send` command has been installed success
 
 ### Prepare an empty Droonga cluster
 
-Assume that there is an empty Droonga cluster constructed from two nodes `192.168.100.50` and `192.168.100.51`, now you are logged in to the host `192.168.100.52`, and there is a dump file `dump.jsons`.
+Assume that there is an empty Droonga cluster constructed from two nodes `node0` (`192.168.100.50`) and `node1` (`192.168.100.51`), now you are logged in to the host `node2` (`192.168.100.52`), and there is a dump file `dump.jsons`.
 
 If you are reading this tutorial sequentially, you'll have an existing cluster and the dump file.
 Make it empty with these commands:
 
 ~~~
-# endpoint="http://192.168.100.50:10041"
+# endpoint="http://node0:10041"
 # curl "$endpoint/d/table_remove?name=Location" | jq "."
 [
   [
@@ -174,7 +174,7 @@ Make it empty with these commands:
 After that the cluster becomes empty. Confirm it:
 
 ~~~
-# endpoint="http://192.168.100.50:10041"
+# endpoint="http://node0:10041"
 # curl "$endpoint/d/table_list" | jq "."
 [
   [
@@ -245,7 +245,7 @@ You just have to pour the contents of the dump file to an empty cluster, by the
 To restore the cluster from the dump file, run a command line like:
 
 ~~~
-# droonga-send --server=192.168.100.50  \
+# droonga-send --server=node0  \
                     dump.jsons
 ~~~
 
@@ -319,38 +319,38 @@ It copies all data from an existing cluster to another one directly, so it is re
 
 ### Prepare multiple Droonga clusters
 
-Assume that there are two clusters: the source has a node `192.168.100.50`, and the destination has a node `192.168.100.51`.
+Assume that there are two clusters: the source has a node `node0` (`192.168.100.50`), and the destination has a node `node1' (`192.168.100.51`).
 
 If you are reading this tutorial sequentially, you'll have an existing cluster with two nodes.
 Construct two clusters by `droonga-engine-catalog-modify` and make one cluster empty, with these commands:
 
-    (on 192.168.100.50)
+    (on node0)
     # droonga-engine-catalog-modify --source=~/droonga/catalog.json \
                                     --update \
-                                    --replica-hosts=192.168.100.50
+                                    --replica-hosts=node0
 
-    (on 192.168.100.51)
+    (on node1)
     # droonga-engine-catalog-modify --source=~/droonga/catalog.json \
                                     --update \
-                                    --replica-hosts=192.168.100.51
-    # endpoint="http://192.168.100.51:10041"
+                                    --replica-hosts=node1
+    # endpoint="http://node1:10041"
     # curl "$endpoint/d/table_remove?name=Location"
     # curl "$endpoint/d/table_remove?name=Store"
     # curl "$endpoint/d/table_remove?name=Term"
 
-After that there are two clusters: one contains `192.168.100.50` with data, another contains `192.168.100.51` with no data. Confirm it:
+After that there are two clusters: one contains `node0` with data, another contains `node1` with no data. Confirm it:
 
 
 ~~~
-# 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
     }
   }
 }
-# curl "http://192.168.100.50:10041/d/select?table=Store&output_columns=name&limit=10" | jq "."
+# curl "http://node0:10041/d/select?table=Store&output_columns=name&limit=10" | jq "."
 [
   [
     0,
@@ -401,15 +401,15 @@ After that there are two clusters: one contains `192.168.100.50` with data, anot
     ]
   ]
 ]
-# curl "http://192.168.100.51:10041/droonga/system/status" | jq "."
+# curl "http://node1:10041/droonga/system/status" | jq "."
 {
   "nodes": {
-    "192.168.100.51:10031/droonga": {
+    "node1:10031/droonga": {
       "live": true
     }
   }
 }
-# curl "http://192.168.100.51:10041/d/select?table=Store&output_columns=name&limit=10" | jq "."
+# curl "http://node1:10041/d/select?table=Store&output_columns=name&limit=10" | jq "."
 [
   [
     0,
@@ -435,11 +435,11 @@ Note: `/droonga/system/status` may not return the result like above. It can cach
 To copy data between two clusters, run the `droonga-engine-absorb-data` command on a node, like:
 
 ~~~
-(on 192.168.100.50 or 192.168.100.51)
-# droonga-engine-absorb-data --source-host=192.168.100.50 \
-                             --destination-host=192.168.100.51
-Start to absorb data from 192.168.100.50
-                       to 192.168.100.51
+(on node0 or node1)
+# droonga-engine-absorb-data --source-host=node0 \
+                             --destination-host=node1
+Start to absorb data from node0
+                       to node1
   dataset = Default
   port    = 10031
   tag     = droonga
@@ -452,7 +452,7 @@ Done.
 After that contents of these two clusters are completely synchronized. Confirm it:
 
 ~~~
-# curl "http://192.168.100.50:10041/d/select?table=Store&output_columns=name&limit=10" | jq "."
+# curl "http://node0:10041/d/select?table=Store&output_columns=name&limit=10" | jq "."
 [
   [
     0,
@@ -503,7 +503,7 @@ After that contents of these two clusters are completely synchronized. Confirm i
     ]
   ]
 ]
-# curl "http://192.168.100.51:10041/d/select?table=Store&output_columns=name&limit=10" | jq "."
+# curl "http://node1:10041/d/select?table=Store&output_columns=name&limit=10" | jq "."
 [
   [
     0,
@@ -560,26 +560,26 @@ After that contents of these two clusters are completely synchronized. Confirm i
 
 Run following command lines to unite these two clusters:
 
-    (on 192.168.100.50)
+    (on node0)
     # droonga-engine-catalog-modify --source=~/droonga/catalog.json \
                                     --update \
-                                    --add-replica-hosts=192.168.100.51
+                                    --add-replica-hosts=node1
 
-    (on 192.168.100.51)
+    (on node1)
     # droonga-engine-catalog-modify --source=~/droonga/catalog.json \
                                     --update \
-                                    --add-replica-hosts=192.168.100.50
+                                    --add-replica-hosts=node0
 
 After that there is just one cluster - yes, it's the initial state.
 
 ~~~
-# 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
     }
   }
-------------- next part --------------
HTML����������������������������...
Download 



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