comparison distributed/capistrano_jungle.rb @ 16:704bcc773b96

Modifed capistrano file
author Nobuyasu
date Fri, 24 Jan 2014 18:09:16 +0900
parents 6e7a01afaaf8
children 9ecbc7400fbb
comparison
equal deleted inserted replaced
15:6e7a01afaaf8 16:704bcc773b96
1 set :user, "mass" 1 set :user, "mass"
2 2
3 role :pall00, "133.13.62.44","133.13.62.45","133.13.62.46","133.13.62.47","133.13.62.48"
3 4
4 role :pall00, "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","133.13.62.9","133.13.62.10" 5 #role :pall00, "133.13.62.44","133.13.62.45","133.13.62.46","133.13.62.47"
5 role :pall01, "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","133.13.62.19","133.13.62.20" 6 #role :pall01, "133.13.62.39","133.13.62.40","133.13.62.41","133.13.62.42","133.13.62.43"
6 role :pall02, "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","133.13.62.29","133.13.62.30" 7 #role :pall02, "133.13.62.34","133.13.62.35","133.13.62.36","133.13.62.37","133.13.62.38"
7 role :pall03, "133.13.62.31","133.13.62.32","133.13.62.33","133.13.62.34","133.13.62.35","133.13.62.36","133.13.62.37","133.13.62.38","133.13.62.39","133.13.62.40" 8 #role :pall03, "133.13.62.29","133.13.62.30","133.13.62.31","133.13.62.32","133.13.62.33"
8 role :pall04, "133.13.62.41","133.13.62.42","133.13.62.43","133.13.62.44","133.13.62.45","133.13.62.46","133.13.62.47","133.13.62.48" 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"
9 12
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"
10 16
11
12 #
13 # 62.1(mass01) and 62.48(mass48) remove from the list.
14 #
15 # bldsv03 : use mass12 ~ mass15 (All : mass12 ~ mass17)
16 #role :pall00, "mass12.cs.ie.u-ryukyu.ac.jp","mass13.cs.ie.u-ryukyu.ac.jp","mass14.cs.ie.u-ryukyu.ac.jp","mass15.cs.ie.u-ryukyu.ac.jp"
17
18 # bldsv04 : use mass18 ~ mass21 (All: mass18 ~ mass23)
19 #role :pall01, "mass18.cs.ie.u-ryukyu.ac.jp","mass19.cs.ie.u-ryukyu.ac.jp","mass20.cs.ie.u-ryukyu.ac.jp","mass21.cs.ie.u-ryukyu.ac.jp"
20
21 # bldsv05 : use mass24 ~ mass27 (All: mass24 ~ mass29)
22 #role :pall02, "mass24.cs.ie.u-ryukyu.ac.jp","mass25.cs.ie.u-ryukyu.ac.jp","mass26.cs.ie.u-ryukyu.ac.jp","mass27.cs.ie.u-ryukyu.ac.jp"
23
24 # bldsv06 : use mass30 ~ mass33 (All: mass30 ~ mass35)
25 #role :pall03, "mass30.cs.ie.u-ryukyu.ac.jp","mass31.cs.ie.u-ryukyu.ac.jp","mass32.cs.ie.u-ryukyu.ac.jp","mass33.cs.ie.u-ryukyu.ac.jp"
26
27 # bldsv07 : use mass36 ~ mass38 (All: mass36 ~ mass41)
28 #role :pall04, "mass36.cs.ie.u-ryukyu.ac.jp","mass37.cs.ie.u-ryukyu.ac.jp","mass38.cs.ie.u-ryukyu.ac.jp","mass39.cs.ie.u-ryukyu.ac.jp"
29
30 # bldsv08 : use mass42 ~ mass45 (All: mass42 ~ mass48)
31 #role :pall05, "mass42.cs.ie.u-ryukyu.ac.jp","mass43.cs.ie.u-ryukyu.ac.jp","mass44.cs.ie.u-ryukyu.ac.jp","mass45.cs.ie.u-ryukyu.ac.jp"
32
33 #role :pall00, "mass12.cs.ie.u-ryukyu.ac.jp"
34
35 #role :pall00, "mass12.cs.ie.u-ryukyu.ac.jp","mass18.cs.ie.u-ryukyu.ac.jp"
36 #role :pall00, "mass12.cs.ie.u-ryukyu.ac.jp","mass18.cs.ie.u-ryukyu.ac.jp","mass24.cs.ie.u-ryukyu.ac.jp","mass30.cs.ie.u-ryukyu.ac.jp"
37 #role :pall01, "mass13.cs.ie.u-ryukyu.ac.jp","mass19.cs.ie.u-ryukyu.ac.jp","mass25.cs.ie.u-ryukyu.ac.jp","mass31.cs.ie.u-ryukyu.ac.jp"
38
39 #role :pall00, "mass01.cs.ie.u-ryukyu.ac.jp"
40 #role :pall00, "mass48.cs.ie.u-ryukyu.ac.jp"
41
42 # max number of cluster is 24
43 17
44 task :mkdir_maven do 18 task :mkdir_maven do
45 run "sudo mkdir /usr/local/apache-maven" 19 run "sudo mkdir /usr/local/apache-maven"
46 end 20 end
47 21
68 task :m2_cp do 42 task :m2_cp do
69 run "rm -rf /home/mass/.m2" 43 run "rm -rf /home/mass/.m2"
70 run "mkdir /home/mass/.m2" 44 run "mkdir /home/mass/.m2"
71 run "cp -r /home/mass/share/student/k128576/m2/repository /home/mass/.m2/" 45 run "cp -r /home/mass/share/student/k128576/m2/repository /home/mass/.m2/"
72 end 46 end
47
48 task :killalljava do
49 run "killall java"
50 end
51
73 task :killjava do 52 task :killjava do
74 run "pkill java" 53 run "pkill java"
75 end 54 end
76 55
77 task :hostname do 56 task :hostname do
100 79
101 task :run_jungle do 80 task :run_jungle do
102 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' " 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' "
103 end 82 end
104 83
105 task :cp_cassandra do 84 task :cp_cassandra2 do
106 run "cp -r /home/mass/share/student/k128576/cassandra /home/mass/student/k128576/" 85 run "cp -r /home/mass/share/student/k128576/cassandra/apache-cassandra-2.0.4 /home/mass/student/k128576/cassandra"
107 end 86 end
108 87
109 task :gen_conf do 88 task :gen_conf do
110 run "/usr/local/bin/ruby /home/mass/share/student/k128576/cassandra/generate_yaml.rb > /home/mass/student/k128576/cassandra/apache-cassandra-1.2.1/conf/cassandra.yaml" 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"
111 end 90 end
112 91
113 task :start_cassandra do 92 task :start_cassandra do
114 run "cd /home/mass/student/k128576/cassandra/ && /home/mass/student/k128576/cassandra/apache-cassandra-1.2.1/bin/cassandra -f" 93 run "cd /home/mass/student/k128576/cassandra/ && /home/mass/student/k128576/cassandra/apache-cassandra-2.0.4/bin/cassandra -f"
115 end 94 end
116 95
117 task :rsync_bbs do 96 task :rsync_bbs do
118 run "rsync -av /home/mass/share/student/k128576/hg/bulletinboard /home/mass/student/k128576/cassandra/" 97 run "rsync -av /home/mass/share/student/k128576/hg/bulletinboard /home/mass/student/k128576/cassandra/"
119 end
120
121 task :rsync_core do
122 run "rsync -av /home/mass/share/student/k128576/hg/jungle-core /home/mass/student/k128576/hg/"
123 end 98 end
124 99
125 task :clean_bbs do 100 task :clean_bbs do
126 run "/usr/local/apache-maven/apache-maven-3.0.5/bin/mvn -f /home/mass/student/k128576/cassandra/bulletinboard/pom.xml clean" 101 run "/usr/local/apache-maven/apache-maven-3.0.5/bin/mvn -f /home/mass/student/k128576/cassandra/bulletinboard/pom.xml clean"
127 end 102 end
128 103
129 task :compile_bbs do 104 task :compile_bbs do
130 run "/usr/local/apache-maven/apache-maven-3.0.5/bin/mvn -f /home/mass/student/k128576/cassandra/bulletinboard/pom.xml compile" 105 run "/usr/local/apache-maven/apache-maven-3.0.5/bin/mvn -f /home/mass/student/k128576/cassandra/bulletinboard/pom.xml compile"
131 end 106 end
132 107
133 task :one_cassandra_bbs do 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
134 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' " 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' "
135 end 118 end
136 119
137 task :one_bbs4 do 120 task :one_bbs5 do
138 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 4' " 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' "
139 end 122 end
140 123
141 task :one_bbs8 do 124 task :one_bbs8 do
142 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' " 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' "
143 end 126 end
144 127
145 128 task :quorum_bbs do
146 task :quorum_cassandra_bbs do
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='-quorum' " 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' "
148 end 130 end
149 131
150 task :all_cassandra_bbs do 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
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' " 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' "
152 end 138 end
153 139
154 task :all_bbs2 do 140 task :all_bbs5 do
155 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 2' " 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' "
156 end
157
158 task :all_bbs4 do
159 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 4' "
160 end
161
162 task :all_bbs8 do
163 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 8' "
164 end
165
166 task :all_bbs24 do
167 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 23' "
168 end 142 end
169 143
170 task :delete_var do 144 task :delete_var do
171 run "rm -rf /home/mass/student/k128576/cassandra/var" 145 run "rm -rf /home/mass/student/k128576/cassandra/var"
172 end 146 end
173 147
174 task :cp_var do 148 task :kill9bbs do
175 run "rm -rf /home/mass/student/k128576/cassandra/var" 149 run "ps aux |grep maven |grep -v grep |awk '{print $2}'| xargs kill -9"
176 run "cp -r /home/mass/student/k128576/cassandra/backup/var /home/mass/student/k128576/cassandra/"
177 end 150 end
178 151
179 task :kill_bbs do 152
180 run "ps aux |grep bullet |grep -v grep |awk '{print $2}'| xargs kill" 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"
181 end 155 end
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