/
commands.properties
71 lines (61 loc) · 4.59 KB
/
commands.properties
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# This file contains a list of named command-line commands that are executed
# after substituting the appropriate dynamic values.
#
# Valid variables are:
#
# hostName External host name of remote host
# hostUserId User ID for remote host
# sshPrivateKey Local path to SSH private key to use to connect
# destinationDirectory Relative directory on remote host under which
# the files will be copied
# voldemortRootDirectory Relative directory on remote host which points
# to the Voldemort distribution; usually it's
# ${destinationDirectory}/voldemort
# voldemortHomeDirectory Relative directory on remote host which points
# to the Voldemort configuration; usually it's
# ${voldemortRootDirectory}/config/<some directory>
# voldemortNodeId Node ID (as seen in cluster.xml) of the node
# remoteTestArguments Arguments passed to the voldemort-remote-test.sh
# command on the remote host
# sourceDirectory Local path which points to the Voldemort
# distribution; this is copied to
# ${voldemortParentDirectory}
#
# Of course, feel free to update CommandLineClusterOperation.java and
# CommandLineClusterConfig.java to add more variables, as needed.
RsyncDeployer.rsync=rsync -vazc --delete --progress --exclude=.git --exclude=src/java/voldemort --exclude=test --exclude=contrib --exclude=example --exclude=docs \
-e "ssh -o StrictHostKeyChecking=no -i ${sshPrivateKey}" \
${sourceDirectory} ${hostUserId}@${hostName}:${destinationDirectory}
RsyncDeployer.rsync.nokey=rsync -vazc --delete --progress --exclude=.git --exclude=src/java/voldemort --exclude=test --exclude=contrib --exclude=example --exclude=docs \
-e "ssh -o StrictHostKeyChecking=no" \
${sourceDirectory} ${hostUserId}@${hostName}:${destinationDirectory}
SshClusterCleaner.ssh=ssh -o StrictHostKeyChecking=no -i ${sshPrivateKey} ${hostUserId}@${hostName} \
"rm -rf ${voldemortHomeDirectory}/data "
SshClusterCleaner.ssh.nokey=ssh -o StrictHostKeyChecking=no ${hostUserId}@${hostName} \
"rm -rf ${voldemortHomeDirectory}/data "
SshClusterStarter.ssh=ssh -o StrictHostKeyChecking=no -i ${sshPrivateKey} ${hostUserId}@${hostName} \
"export VOLDEMORT_HOME=$(pwd)/${voldemortHomeDirectory} ; \
export VOLDEMORT_NODE_ID=${voldemortNodeId} ; \
mv $VOLDEMORT_HOME/config/server.properties $VOLDEMORT_HOME/config/server.properties.bak ; \
grep -v "^node.id=" $VOLDEMORT_HOME/config/server.properties.bak > $VOLDEMORT_HOME/config/server.properties ; \
rm -rf ${voldemortHomeDirectory}/data ; \
rm -rf ${voldemortHomeDirectory}/config/.temp ; \
rm -rf ${voldemortHomeDirectory}/config/.version ; \
cd ${voldemortRootDirectory} ; \
./bin/voldemort-server.sh"
SshClusterStarter.ssh.nokey=ssh -o StrictHostKeyChecking=no ${hostUserId}@${hostName} \
"export VOLDEMORT_HOME=$(pwd)/${voldemortHomeDirectory} ; \
export VOLDEMORT_NODE_ID=${voldemortNodeId} ; \
mv $VOLDEMORT_HOME/config/server.properties $VOLDEMORT_HOME/config/server.properties.bak ; \
grep -v "^node.id=" $VOLDEMORT_HOME/config/server.properties.bak > $VOLDEMORT_HOME/config/server.properties ; \
rm -rf ${voldemortHomeDirectory}/data ; \
rm -rf ${voldemortHomeDirectory}/config/.temp ; \
rm -rf ${voldemortHomeDirectory}/config/.version ; \
cd ${voldemortRootDirectory} ; \
./bin/voldemort-server.sh"
SshClusterStopper.ssh=ssh -o StrictHostKeyChecking=no -i ${sshPrivateKey} ${hostUserId}@${hostName} \
"cd ${voldemortRootDirectory} ; ./bin/voldemort-stop.sh"
SshClusterStopper.ssh.nokey=ssh -o StrictHostKeyChecking=no ${hostUserId}@${hostName} \
"cd ${voldemortRootDirectory} ; ./bin/voldemort-stop.sh"
SshRemoteTest.ssh=ssh -o StrictHostKeyChecking=no -i ${sshPrivateKey} ${hostUserId}@${hostName} "${testCommand}"
SshRemoteTest.ssh.nokey=ssh -o StrictHostKeyChecking=no ${hostUserId}@${hostName} "${testCommand}"