11
|
1 set :user, "mass"
|
|
2
|
16
|
3 role :pall00, "133.13.62.44","133.13.62.45","133.13.62.46","133.13.62.47","133.13.62.48"
|
11
|
4
|
16
|
5 #role :pall00, "133.13.62.44","133.13.62.45","133.13.62.46","133.13.62.47"
|
|
6 #role :pall01, "133.13.62.39","133.13.62.40","133.13.62.41","133.13.62.42","133.13.62.43"
|
|
7 #role :pall02, "133.13.62.34","133.13.62.35","133.13.62.36","133.13.62.37","133.13.62.38"
|
|
8 #role :pall03, "133.13.62.29","133.13.62.30","133.13.62.31","133.13.62.32","133.13.62.33"
|
|
9 #role :pall04, "133.13.62.19","133.13.62.20","133.13.62.21","133.13.62.22","133.13.62.23","133.13.62.24","133.13.62.25","133.13.62.26","133.13.62.27","133.13.62.28"
|
|
10 #role :pall05, "133.13.62.9","133.13.62.10","133.13.62.11","133.13.62.12","133.13.62.13","133.13.62.14","133.13.62.15","133.13.62.16","133.13.62.17","133.13.62.18"
|
|
11 #role :pall06, "133.13.62.1","133.13.62.2","133.13.62.3","133.13.62.4","133.13.62.5","133.13.62.6","133.13.62.7","133.13.62.8"
|
11
|
12
|
16
|
13 #*** CR ***
|
|
14 #role :pall07, "133.13.62.101", "133.13.62.102"
|
|
15 #role :pall08, "133.13.62.103","133.13.62.104","133.13.62.105","133.13.62.106","133.13.62.107","133.13.62.108","133.13.62.109","133.13.62.110","133.13.62.111","133.13.62.112"
|
12
|
16
|
11
|
17
|
|
18 task :mkdir_maven do
|
|
19 run "sudo mkdir /usr/local/apache-maven"
|
|
20 end
|
|
21
|
|
22 task :maven_cp do
|
|
23 run "sudo cp -r /home/mass/share/student/k128576/maven_download/apache-maven-3.0.5 /usr/local/apache-maven"
|
|
24 end
|
|
25
|
|
26 task :maven_zshrc do
|
|
27 run "echo \"# maven \" >> /home/mass/.zshrc "
|
|
28 run "echo 'export M2_HOME=/usr/local/apache-maven/apache-maven-3.0.5\' >> /home/mass/.zshrc "
|
|
29 run "echo 'export M2=$M2_HOME/bin\' >> /home/mass/.zshrc "
|
|
30 run "echo 'export PATH=$M2:$PATH\' >> /home/mass/.zshrc "
|
|
31 end
|
|
32
|
|
33 task :python_cp do
|
|
34 run "mkdir -p /home/mass/student/k128576/"
|
|
35 run "cp -r /home/mass/share/student/k128576/hg/Python-2.7 /home/mass/student/k128576/Python27 "
|
|
36 end
|
|
37
|
|
38 task :make_python do
|
|
39 run "make -C /home/mass/student/k128576/Python27"
|
|
40 end
|
|
41
|
|
42 task :m2_cp do
|
15
|
43 run "rm -rf /home/mass/.m2"
|
|
44 run "mkdir /home/mass/.m2"
|
|
45 run "cp -r /home/mass/share/student/k128576/m2/repository /home/mass/.m2/"
|
11
|
46 end
|
16
|
47
|
|
48 task :killalljava do
|
|
49 run "killall java"
|
|
50 end
|
|
51
|
11
|
52 task :killjava do
|
|
53 run "pkill java"
|
|
54 end
|
|
55
|
|
56 task :hostname do
|
|
57 run "hostname"
|
|
58 end
|
|
59
|
|
60 task :df_awk do
|
|
61 run "df | awk 'NR==3'"
|
12
|
62 end
|
14
|
63
|
12
|
64 task :mkdir_hg do
|
|
65 run "mkdir -p /home/mass/student/k128576/hg"
|
|
66 end
|
|
67
|
|
68 task :rsync_project do
|
|
69 run "rsync -av /home/mass/share/student/k128576/hg/jungle-network /home/mass/student/k128576/hg/"
|
|
70 end
|
|
71
|
|
72 task :clean_project do
|
|
73 run "/usr/local/apache-maven/apache-maven-3.0.5/bin/mvn -f /home/mass/student/k128576/hg/jungle-network/pom.xml clean"
|
|
74 end
|
|
75
|
|
76 task :compile_project do
|
|
77 run "/usr/local/apache-maven/apache-maven-3.0.5/bin/mvn -f /home/mass/student/k128576/hg/jungle-network/pom.xml compile"
|
|
78 end
|
|
79
|
|
80 task :run_jungle do
|
15
|
81 run "sleep 0.$RANDOM && export MAVEN_OPTS='-Xmx3g -Xms3g' && /usr/local/apache-maven/apache-maven-3.0.5/bin/mvn -f /home/mass/student/k128576/hg/jungle-network/pom.xml exec:java -Dexec.mainClass='app.bbs.DistributeApp' -Dexec.args='-level fatal -host bldsv12.cr.ie.u-ryukyu.ac.jp -port 10000 -p 20000 -bp 8080' "
|
12
|
82 end
|
|
83
|
16
|
84 task :cp_cassandra2 do
|
|
85 run "cp -r /home/mass/share/student/k128576/cassandra/apache-cassandra-2.0.4 /home/mass/student/k128576/cassandra"
|
12
|
86 end
|
|
87
|
|
88 task :gen_conf do
|
16
|
89 run "/usr/local/bin/ruby /home/mass/share/student/k128576/cassandra/generate_yaml.rb > /home/mass/student/k128576/cassandra/apache-cassandra-2.0.4/conf/cassandra.yaml"
|
12
|
90 end
|
|
91
|
|
92 task :start_cassandra do
|
16
|
93 run "cd /home/mass/student/k128576/cassandra/ && /home/mass/student/k128576/cassandra/apache-cassandra-2.0.4/bin/cassandra -f"
|
12
|
94 end
|
|
95
|
14
|
96 task :rsync_bbs do
|
|
97 run "rsync -av /home/mass/share/student/k128576/hg/bulletinboard /home/mass/student/k128576/cassandra/"
|
|
98 end
|
|
99
|
|
100 task :clean_bbs do
|
|
101 run "/usr/local/apache-maven/apache-maven-3.0.5/bin/mvn -f /home/mass/student/k128576/cassandra/bulletinboard/pom.xml clean"
|
12
|
102 end
|
|
103
|
|
104 task :compile_bbs do
|
|
105 run "/usr/local/apache-maven/apache-maven-3.0.5/bin/mvn -f /home/mass/student/k128576/cassandra/bulletinboard/pom.xml compile"
|
|
106 end
|
|
107
|
16
|
108 task :install_bbs do
|
|
109 run "/usr/local/apache-maven/apache-maven-3.0.5/bin/mvn -f /home/mass/student/k128576/cassandra/bulletinboard/pom.xml install"
|
|
110 end
|
|
111
|
|
112 task :rsync_core do
|
|
113 run "rsync -av /home/mass/share/student/k128576/hg/jungle-core /home/mass/student/k128576/hg/"
|
|
114 end
|
|
115
|
|
116 task :one_bbs do
|
12
|
117 run "/usr/local/apache-maven/apache-maven-3.0.5/bin/mvn -f /home/mass/student/k128576/cassandra/bulletinboard/pom.xml exec:java -Dexec.mainClass='jp.ac.u_ryukyu.ie.cr.shoshi.jungle.bbs.App' -Dexec.args='-one' "
|
|
118 end
|
|
119
|
16
|
120 task :one_bbs5 do
|
|
121 run "/usr/local/apache-maven/apache-maven-3.0.5/bin/mvn -f /home/mass/student/k128576/cassandra/bulletinboard/pom.xml exec:java -Dexec.mainClass='jp.ac.u_ryukyu.ie.cr.shoshi.jungle.bbs.App' -Dexec.args='-one -rep 5' "
|
14
|
122 end
|
|
123
|
15
|
124 task :one_bbs8 do
|
|
125 run "/usr/local/apache-maven/apache-maven-3.0.5/bin/mvn -f /home/mass/student/k128576/cassandra/bulletinboard/pom.xml exec:java -Dexec.mainClass='jp.ac.u_ryukyu.ie.cr.shoshi.jungle.bbs.App' -Dexec.args='-one -rep 8' "
|
|
126 end
|
|
127
|
16
|
128 task :quorum_bbs do
|
14
|
129 run "/usr/local/apache-maven/apache-maven-3.0.5/bin/mvn -f /home/mass/student/k128576/cassandra/bulletinboard/pom.xml exec:java -Dexec.mainClass='jp.ac.u_ryukyu.ie.cr.shoshi.jungle.bbs.App' -Dexec.args='-quorum' "
|
|
130 end
|
|
131
|
16
|
132 task :quorum_bbs5 do
|
|
133 run "/usr/local/apache-maven/apache-maven-3.0.5/bin/mvn -f /home/mass/student/k128576/cassandra/bulletinboard/pom.xml exec:java -Dexec.mainClass='jp.ac.u_ryukyu.ie.cr.shoshi.jungle.bbs.App' -Dexec.args='-quorum -rep 5' "
|
|
134 end
|
|
135
|
|
136 task :all_bbs do
|
14
|
137 run "/usr/local/apache-maven/apache-maven-3.0.5/bin/mvn -f /home/mass/student/k128576/cassandra/bulletinboard/pom.xml exec:java -Dexec.mainClass='jp.ac.u_ryukyu.ie.cr.shoshi.jungle.bbs.App' -Dexec.args='-all' "
|
|
138 end
|
|
139
|
16
|
140 task :all_bbs5 do
|
|
141 run "/usr/local/apache-maven/apache-maven-3.0.5/bin/mvn -f /home/mass/student/k128576/cassandra/bulletinboard/pom.xml exec:java -Dexec.mainClass='jp.ac.u_ryukyu.ie.cr.shoshi.jungle.bbs.App' -Dexec.args='-all -rep 5' "
|
15
|
142 end
|
14
|
143
|
12
|
144 task :delete_var do
|
|
145 run "rm -rf /home/mass/student/k128576/cassandra/var"
|
|
146 end
|
|
147
|
16
|
148 task :kill9bbs do
|
|
149 run "ps aux |grep maven |grep -v grep |awk '{print $2}'| xargs kill -9"
|
12
|
150 end
|
14
|
151
|
16
|
152
|
|
153 task :rm_snappy do
|
|
154 run "rm /home/mass/student/k128576/cassandra/apache-cassandra-2.0.4/lib/snappy-java-1.0.5.jar"
|
14
|
155 end
|
16
|
156 task :cp_snappy do
|
|
157 run "cp /home/mass/share/student/k128576/cassandra/snappy-java-1.0.4.jar /home/mass/student/k128576/cassandra/apache-cassandra-2.0.4/lib/"
|
|
158 end
|