11
|
1 set :user, "mass"
|
|
2
|
|
3
|
16
|
4 #role :pall00, "133.13.62.44","133.13.62.45","133.13.62.46","133.13.62.47"
|
17
|
5
|
18
|
6 role :pall00, "133.13.62.44"
|
17
|
7 #role :pall00, "133.13.62.44","133.13.62.45","133.13.62.46","133.13.62.47","133.13.62.48"
|
|
8 role :pall01, "133.13.62.39","133.13.62.40","133.13.62.41","133.13.62.42","133.13.62.43"
|
|
9 role :pall02, "133.13.62.34","133.13.62.35","133.13.62.36","133.13.62.37","133.13.62.38"
|
|
10 role :pall03, "133.13.62.29","133.13.62.30","133.13.62.31","133.13.62.32","133.13.62.33"
|
|
11 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"
|
|
12 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"
|
|
13 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
|
14
|
16
|
15 #*** CR ***
|
17
|
16 role :pall07, "133.13.62.101", "133.13.62.102"
|
16
|
17 #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
|
18
|
11
|
19
|
17
|
20 task :somaxconn do
|
|
21 run "sudo /sbin/sysctl -w net.core.somaxconn=10000"
|
|
22 end
|
|
23
|
|
24 task :cat_conn do
|
|
25 run "cat /proc/sys/net/core/somaxconn"
|
|
26 end
|
|
27
|
11
|
28 task :mkdir_maven do
|
|
29 run "sudo mkdir /usr/local/apache-maven"
|
|
30 end
|
|
31
|
|
32 task :maven_cp do
|
|
33 run "sudo cp -r /home/mass/share/student/k128576/maven_download/apache-maven-3.0.5 /usr/local/apache-maven"
|
|
34 end
|
|
35
|
|
36 task :maven_zshrc do
|
|
37 run "echo \"# maven \" >> /home/mass/.zshrc "
|
|
38 run "echo 'export M2_HOME=/usr/local/apache-maven/apache-maven-3.0.5\' >> /home/mass/.zshrc "
|
|
39 run "echo 'export M2=$M2_HOME/bin\' >> /home/mass/.zshrc "
|
|
40 run "echo 'export PATH=$M2:$PATH\' >> /home/mass/.zshrc "
|
|
41 end
|
|
42
|
|
43 task :python_cp do
|
|
44 run "mkdir -p /home/mass/student/k128576/"
|
|
45 run "cp -r /home/mass/share/student/k128576/hg/Python-2.7 /home/mass/student/k128576/Python27 "
|
|
46 end
|
|
47
|
|
48 task :make_python do
|
|
49 run "make -C /home/mass/student/k128576/Python27"
|
|
50 end
|
|
51
|
|
52 task :m2_cp do
|
15
|
53 run "rm -rf /home/mass/.m2"
|
|
54 run "mkdir /home/mass/.m2"
|
|
55 run "cp -r /home/mass/share/student/k128576/m2/repository /home/mass/.m2/"
|
11
|
56 end
|
16
|
57
|
|
58 task :killalljava do
|
|
59 run "killall java"
|
|
60 end
|
|
61
|
11
|
62 task :killjava do
|
|
63 run "pkill java"
|
|
64 end
|
|
65
|
|
66 task :hostname do
|
|
67 run "hostname"
|
|
68 end
|
|
69
|
|
70 task :df_awk do
|
|
71 run "df | awk 'NR==3'"
|
12
|
72 end
|
14
|
73
|
12
|
74 task :mkdir_hg do
|
|
75 run "mkdir -p /home/mass/student/k128576/hg"
|
|
76 end
|
|
77
|
|
78 task :rsync_project do
|
|
79 run "rsync -av /home/mass/share/student/k128576/hg/jungle-network /home/mass/student/k128576/hg/"
|
|
80 end
|
|
81
|
|
82 task :clean_project do
|
|
83 run "/usr/local/apache-maven/apache-maven-3.0.5/bin/mvn -f /home/mass/student/k128576/hg/jungle-network/pom.xml clean"
|
|
84 end
|
|
85
|
|
86 task :compile_project do
|
|
87 run "/usr/local/apache-maven/apache-maven-3.0.5/bin/mvn -f /home/mass/student/k128576/hg/jungle-network/pom.xml compile"
|
|
88 end
|
|
89
|
|
90 task :run_jungle do
|
17
|
91 run "export MAVEN_OPTS='-Xmx6g -Xms4g' && /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
|
92 end
|
|
93
|
16
|
94 task :cp_cassandra2 do
|
|
95 run "cp -r /home/mass/share/student/k128576/cassandra/apache-cassandra-2.0.4 /home/mass/student/k128576/cassandra"
|
12
|
96 end
|
|
97
|
|
98 task :gen_conf do
|
16
|
99 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
|
100 end
|
|
101
|
|
102 task :start_cassandra do
|
16
|
103 run "cd /home/mass/student/k128576/cassandra/ && /home/mass/student/k128576/cassandra/apache-cassandra-2.0.4/bin/cassandra -f"
|
12
|
104 end
|
|
105
|
14
|
106 task :rsync_bbs do
|
|
107 run "rsync -av /home/mass/share/student/k128576/hg/bulletinboard /home/mass/student/k128576/cassandra/"
|
|
108 end
|
|
109
|
|
110 task :clean_bbs do
|
|
111 run "/usr/local/apache-maven/apache-maven-3.0.5/bin/mvn -f /home/mass/student/k128576/cassandra/bulletinboard/pom.xml clean"
|
12
|
112 end
|
|
113
|
|
114 task :compile_bbs do
|
|
115 run "/usr/local/apache-maven/apache-maven-3.0.5/bin/mvn -f /home/mass/student/k128576/cassandra/bulletinboard/pom.xml compile"
|
|
116 end
|
|
117
|
16
|
118 task :install_bbs do
|
|
119 run "/usr/local/apache-maven/apache-maven-3.0.5/bin/mvn -f /home/mass/student/k128576/cassandra/bulletinboard/pom.xml install"
|
|
120 end
|
|
121
|
|
122 task :rsync_core do
|
|
123 run "rsync -av /home/mass/share/student/k128576/hg/jungle-core /home/mass/student/k128576/hg/"
|
|
124 end
|
|
125
|
|
126 task :one_bbs do
|
12
|
127 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' "
|
|
128 end
|
|
129
|
16
|
130 task :one_bbs5 do
|
|
131 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
|
132 end
|
|
133
|
15
|
134 task :one_bbs8 do
|
|
135 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' "
|
|
136 end
|
|
137
|
16
|
138 task :quorum_bbs do
|
14
|
139 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' "
|
|
140 end
|
|
141
|
16
|
142 task :quorum_bbs5 do
|
|
143 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' "
|
|
144 end
|
|
145
|
|
146 task :all_bbs do
|
14
|
147 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' "
|
|
148 end
|
|
149
|
16
|
150 task :all_bbs5 do
|
|
151 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
|
152 end
|
14
|
153
|
12
|
154 task :delete_var do
|
|
155 run "rm -rf /home/mass/student/k128576/cassandra/var"
|
|
156 end
|
|
157
|
16
|
158 task :kill9bbs do
|
|
159 run "ps aux |grep maven |grep -v grep |awk '{print $2}'| xargs kill -9"
|
12
|
160 end
|
14
|
161
|
16
|
162
|
|
163 task :rm_snappy do
|
|
164 run "rm /home/mass/student/k128576/cassandra/apache-cassandra-2.0.4/lib/snappy-java-1.0.5.jar"
|
14
|
165 end
|
16
|
166 task :cp_snappy do
|
|
167 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/"
|
|
168 end
|
18
|
169
|
|
170 task :hostname10, :roles =>:pall00 do
|
|
171 run "hostname"
|
|
172 end
|
|
173
|
|
174
|
|
175
|
|
176
|