[Groonga-commit] droonga/wikipedia-search.wiki at b843f4d [master] Updated ノンストップでノードを追加する場面の検証手順 (markdown)

Back to archive index

YUKI Piro Hiroshi null+****@clear*****
Wed Apr 1 12:42:55 JST 2015


YUKI "Piro" Hiroshi	2015-04-01 12:42:55 +0900 (Wed, 01 Apr 2015)

  New Revision: b843f4d591b92ae93487a4a1edfebc086f5aa857
  https://github.com/droonga/wikipedia-search/wiki/%E3%83%8E%E3%83%B3%E3%82%B9%E3%83%88%E3%83%83%E3%83%97%E3%81%A7%E3%83%8E%E3%83%BC%E3%83%89%E3%82%92%E8%BF%BD%E5%8A%A0%E3%81%99%E3%82%8B%E5%A0%B4%E9%9D%A2%E3%81%AE%E6%A4%9C%E8%A8%BC%E6%89%8B%E9%A0%86/b843f4d591b92ae93487a4a1edfebc086f5aa857

  Message:
    Updated ノンストップでノードを追加する場面の検証手順 (markdown)

  Modified files:
    ノンストップでノードを追加する場面の検証手順.md

  Modified: ノンストップでノードを追加する場面の検証手順.md (+55 -2)
===================================================================
--- ノンストップでノードを追加する場面の検証手順.md    2015-04-01 12:18:25 +0900 (7be08cc)
+++ ノンストップでノードを追加する場面の検証手順.md    2015-04-01 12:42:55 +0900 (53db72c)
@@ -65,15 +65,67 @@ $ while true; do curl -s "http://localhost:10041/engines?_=$(date +%s)" | jq .;
 $ while true; do ls ~droonga-engine/droonga/state/buffer/intentional/*/; echo "-----"; sleep 1; done
 ~~~
 
+## join前の状態への復帰
+
+restore-nodes.sh:
+
+~~~
+#!/bin/bash
+
+NODE0_SUDO="vagrant ssh node0 -- sudo"
+NODE1_SUDO="vagrant ssh node1 -- sudo"
+NODE2_SUDO="vagrant ssh node2 -- sudo"
+
+
+$NODE0_SUDO service droonga-http-server stop
+
+$NODE0_SUDO service droonga-engine stop
+$NODE1_SUDO service droonga-engine stop
+$NODE2_SUDO service droonga-engine stop
+
+$NODE0_SUDO droonga-engine-catalog-generate --hosts=node0,node1
+$NODE1_SUDO droonga-engine-catalog-generate --hosts=node0,node1
+$NODE2_SUDO droonga-engine-catalog-generate --hosts=node2
+
+$NODE0_SUDO rm -rf ~droonga-engine/droonga/state ~droonga-engine/droonga/*.log
+$NODE1_SUDO rm -rf ~droonga-engine/droonga/state ~droonga-engine/droonga/*.log
+$NODE2_SUDO rm -rf ~droonga-engine/droonga/databases ~droonga-engine/droonga/state ~droonga-engine/droonga/*.log
+
+./copy-db.sh node0 node1
+
+$NODE0_SUDO service droonga-engine start
+$NODE1_SUDO service droonga-engine start
+$NODE2_SUDO service droonga-engine start
+
+$NODE0_SUDO service droonga-http-server start
+~~~
 
 ## ノード間のデータベースのコピー(簡易)
 
 コピー時は、ログの流入を止めてから行う。
 vagrantのホストOS側で操作する。
 
+copy-db.sh:
+
 ~~~
-SOURCE=node0
-DESTINATION=node1
+#!/bin/bash
+
+SOURCE=$1
+DESTINATION=$2
+
+if [ "$SOURCE" = "" ]
+then
+  echo "you must specify the source host"
+  exit 1
+fi
+
+if [ "$DESTINATION" = "" ]
+then
+  echo "you must specify the destination host"
+  exit 1
+fi
+
+echo "copying database from $SOURCE to $DESTINATION"
 SOURCE_SUDO="vagrant ssh $SOURCE -- sudo"
 DESTINATION_SUDO="vagrant ssh $DESTINATION -- sudo"
 $SOURCE_SUDO service td-agent stop
@@ -83,6 +135,7 @@ $SOURCE_SUDO rm -f /vagrant/databases.tar
 $SOURCE_SUDO tar -cvz -f /vagrant/databases.tar -C ~droonga-engine/droonga/ databases
 $DESTINATION_SUDO rm -rf ~droonga-engine/droonga/databases
 $DESTINATION_SUDO tar -xv -f /vagrant/databases.tar -C ~droonga-engine/droonga/
+echo "done."
 ~~~
 
 ログ流入の復活
-------------- next part --------------
HTML����������������������������...
다운로드 



More information about the Groonga-commit mailing list
Back to archive index