Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 57 lines (45 sloc) 1.554 kB
4786eae @jkreps Add cluster control scripts. Patch on http://code.google.com/p/projec…
jkreps authored
1 #!/bin/bash
2
3 #
4 # Copyright 2008-2009 bebo, Inc
5 #
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
9 #
10 # http://www.apache.org/licenses/LICENSE-2.0
11 #
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
17 #
18
19 # Name says it all. Like all the other scripts the --config parameter allow
20 # you to determine, which configuration to use. Log output goes into a logs
21 # directory on each node (will be auto created if it doesn't exist).
22
23
24 usage="Usage: voldemort-start-all.sh [--config <conf-dir>]"
25
26 bin=`dirname "$0"`
27 bin=`cd "$bin"; pwd`
28
29 . "$bin/voldemort-config.sh"
30
31 if [ "$#" != "0" ] && [ "$#" != "2" ]
32 then
33 echo $usage
34 exit 1
35 fi
36
37 #check to see if the conf dir is given as an optional argument
38 if [ $# -eq 2 ]
39 then
40 if [ "--config" = "$1" ]
41 then
42 shift
43 confdir=$1
44 shift
45 VOL_CONF_DIR=$confdir
46 nodeid=$1
47 fi
48 fi
49
50 export HOSTLIST="$VOL_CONF_DIR/config/nodes"
51
52 for node in `cat "$HOSTLIST"`; do
53 ssh $VOL_SSH_OPTS $node "mkdir $VOL_HOME/logs 2>/dev/null; nohup $bin/voldemort-server.sh `cd $VOL_CONF_DIR && pwd` >$VOL_HOME/logs/voldemort-server.log 2>$VOL_HOME/logs/voldemort-server.err </dev/null& " &
54 done
55 wait
56
Something went wrong with that request. Please try again.