annotate distributed/capistrano_jungle.rb @ 16:704bcc773b96

Modifed capistrano file
author Nobuyasu
date Fri, 24 Jan 2014 18:09:16 +0900
parents 6e7a01afaaf8
children 9ecbc7400fbb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11
223af50e60d5 Added some files
Nobuyasu
parents:
diff changeset
1 set :user, "mass"
223af50e60d5 Added some files
Nobuyasu
parents:
diff changeset
2
16
704bcc773b96 Modifed capistrano file
Nobuyasu
parents: 15
diff changeset
3 role :pall00, "133.13.62.44","133.13.62.45","133.13.62.46","133.13.62.47","133.13.62.48"
11
223af50e60d5 Added some files
Nobuyasu
parents:
diff changeset
4
16
704bcc773b96 Modifed capistrano file
Nobuyasu
parents: 15
diff changeset
5 #role :pall00, "133.13.62.44","133.13.62.45","133.13.62.46","133.13.62.47"
704bcc773b96 Modifed capistrano file
Nobuyasu
parents: 15
diff changeset
6 #role :pall01, "133.13.62.39","133.13.62.40","133.13.62.41","133.13.62.42","133.13.62.43"
704bcc773b96 Modifed capistrano file
Nobuyasu
parents: 15
diff changeset
7 #role :pall02, "133.13.62.34","133.13.62.35","133.13.62.36","133.13.62.37","133.13.62.38"
704bcc773b96 Modifed capistrano file
Nobuyasu
parents: 15
diff changeset
8 #role :pall03, "133.13.62.29","133.13.62.30","133.13.62.31","133.13.62.32","133.13.62.33"
704bcc773b96 Modifed capistrano file
Nobuyasu
parents: 15
diff changeset
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"
704bcc773b96 Modifed capistrano file
Nobuyasu
parents: 15
diff changeset
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"
704bcc773b96 Modifed capistrano file
Nobuyasu
parents: 15
diff changeset
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
223af50e60d5 Added some files
Nobuyasu
parents:
diff changeset
12
16
704bcc773b96 Modifed capistrano file
Nobuyasu
parents: 15
diff changeset
13 #*** CR ***
704bcc773b96 Modifed capistrano file
Nobuyasu
parents: 15
diff changeset
14 #role :pall07, "133.13.62.101", "133.13.62.102"
704bcc773b96 Modifed capistrano file
Nobuyasu
parents: 15
diff changeset
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
c69a41ffc439 Modified cassandra benchmark
Nobuyasu
parents: 11
diff changeset
16
11
223af50e60d5 Added some files
Nobuyasu
parents:
diff changeset
17
223af50e60d5 Added some files
Nobuyasu
parents:
diff changeset
18 task :mkdir_maven do
223af50e60d5 Added some files
Nobuyasu
parents:
diff changeset
19 run "sudo mkdir /usr/local/apache-maven"
223af50e60d5 Added some files
Nobuyasu
parents:
diff changeset
20 end
223af50e60d5 Added some files
Nobuyasu
parents:
diff changeset
21
223af50e60d5 Added some files
Nobuyasu
parents:
diff changeset
22 task :maven_cp do
223af50e60d5 Added some files
Nobuyasu
parents:
diff changeset
23 run "sudo cp -r /home/mass/share/student/k128576/maven_download/apache-maven-3.0.5 /usr/local/apache-maven"
223af50e60d5 Added some files
Nobuyasu
parents:
diff changeset
24 end
223af50e60d5 Added some files
Nobuyasu
parents:
diff changeset
25
223af50e60d5 Added some files
Nobuyasu
parents:
diff changeset
26 task :maven_zshrc do
223af50e60d5 Added some files
Nobuyasu
parents:
diff changeset
27 run "echo \"# maven \" >> /home/mass/.zshrc "
223af50e60d5 Added some files
Nobuyasu
parents:
diff changeset
28 run "echo 'export M2_HOME=/usr/local/apache-maven/apache-maven-3.0.5\' >> /home/mass/.zshrc "
223af50e60d5 Added some files
Nobuyasu
parents:
diff changeset
29 run "echo 'export M2=$M2_HOME/bin\' >> /home/mass/.zshrc "
223af50e60d5 Added some files
Nobuyasu
parents:
diff changeset
30 run "echo 'export PATH=$M2:$PATH\' >> /home/mass/.zshrc "
223af50e60d5 Added some files
Nobuyasu
parents:
diff changeset
31 end
223af50e60d5 Added some files
Nobuyasu
parents:
diff changeset
32
223af50e60d5 Added some files
Nobuyasu
parents:
diff changeset
33 task :python_cp do
223af50e60d5 Added some files
Nobuyasu
parents:
diff changeset
34 run "mkdir -p /home/mass/student/k128576/"
223af50e60d5 Added some files
Nobuyasu
parents:
diff changeset
35 run "cp -r /home/mass/share/student/k128576/hg/Python-2.7 /home/mass/student/k128576/Python27 "
223af50e60d5 Added some files
Nobuyasu
parents:
diff changeset
36 end
223af50e60d5 Added some files
Nobuyasu
parents:
diff changeset
37
223af50e60d5 Added some files
Nobuyasu
parents:
diff changeset
38 task :make_python do
223af50e60d5 Added some files
Nobuyasu
parents:
diff changeset
39 run "make -C /home/mass/student/k128576/Python27"
223af50e60d5 Added some files
Nobuyasu
parents:
diff changeset
40 end
223af50e60d5 Added some files
Nobuyasu
parents:
diff changeset
41
223af50e60d5 Added some files
Nobuyasu
parents:
diff changeset
42 task :m2_cp do
15
6e7a01afaaf8 Modified prrogram
Nobuyasu
parents: 14
diff changeset
43 run "rm -rf /home/mass/.m2"
6e7a01afaaf8 Modified prrogram
Nobuyasu
parents: 14
diff changeset
44 run "mkdir /home/mass/.m2"
6e7a01afaaf8 Modified prrogram
Nobuyasu
parents: 14
diff changeset
45 run "cp -r /home/mass/share/student/k128576/m2/repository /home/mass/.m2/"
11
223af50e60d5 Added some files
Nobuyasu
parents:
diff changeset
46 end
16
704bcc773b96 Modifed capistrano file
Nobuyasu
parents: 15
diff changeset
47
704bcc773b96 Modifed capistrano file
Nobuyasu
parents: 15
diff changeset
48 task :killalljava do
704bcc773b96 Modifed capistrano file
Nobuyasu
parents: 15
diff changeset
49 run "killall java"
704bcc773b96 Modifed capistrano file
Nobuyasu
parents: 15
diff changeset
50 end
704bcc773b96 Modifed capistrano file
Nobuyasu
parents: 15
diff changeset
51
11
223af50e60d5 Added some files
Nobuyasu
parents:
diff changeset
52 task :killjava do
223af50e60d5 Added some files
Nobuyasu
parents:
diff changeset
53 run "pkill java"
223af50e60d5 Added some files
Nobuyasu
parents:
diff changeset
54 end
223af50e60d5 Added some files
Nobuyasu
parents:
diff changeset
55
223af50e60d5 Added some files
Nobuyasu
parents:
diff changeset
56 task :hostname do
223af50e60d5 Added some files
Nobuyasu
parents:
diff changeset
57 run "hostname"
223af50e60d5 Added some files
Nobuyasu
parents:
diff changeset
58 end
223af50e60d5 Added some files
Nobuyasu
parents:
diff changeset
59
223af50e60d5 Added some files
Nobuyasu
parents:
diff changeset
60 task :df_awk do
223af50e60d5 Added some files
Nobuyasu
parents:
diff changeset
61 run "df | awk 'NR==3'"
12
c69a41ffc439 Modified cassandra benchmark
Nobuyasu
parents: 11
diff changeset
62 end
14
77a01d4fca04 capistrano file
Nobuyasu
parents: 12
diff changeset
63
12
c69a41ffc439 Modified cassandra benchmark
Nobuyasu
parents: 11
diff changeset
64 task :mkdir_hg do
c69a41ffc439 Modified cassandra benchmark
Nobuyasu
parents: 11
diff changeset
65 run "mkdir -p /home/mass/student/k128576/hg"
c69a41ffc439 Modified cassandra benchmark
Nobuyasu
parents: 11
diff changeset
66 end
c69a41ffc439 Modified cassandra benchmark
Nobuyasu
parents: 11
diff changeset
67
c69a41ffc439 Modified cassandra benchmark
Nobuyasu
parents: 11
diff changeset
68 task :rsync_project do
c69a41ffc439 Modified cassandra benchmark
Nobuyasu
parents: 11
diff changeset
69 run "rsync -av /home/mass/share/student/k128576/hg/jungle-network /home/mass/student/k128576/hg/"
c69a41ffc439 Modified cassandra benchmark
Nobuyasu
parents: 11
diff changeset
70 end
c69a41ffc439 Modified cassandra benchmark
Nobuyasu
parents: 11
diff changeset
71
c69a41ffc439 Modified cassandra benchmark
Nobuyasu
parents: 11
diff changeset
72 task :clean_project do
c69a41ffc439 Modified cassandra benchmark
Nobuyasu
parents: 11
diff changeset
73 run "/usr/local/apache-maven/apache-maven-3.0.5/bin/mvn -f /home/mass/student/k128576/hg/jungle-network/pom.xml clean"
c69a41ffc439 Modified cassandra benchmark
Nobuyasu
parents: 11
diff changeset
74 end
c69a41ffc439 Modified cassandra benchmark
Nobuyasu
parents: 11
diff changeset
75
c69a41ffc439 Modified cassandra benchmark
Nobuyasu
parents: 11
diff changeset
76 task :compile_project do
c69a41ffc439 Modified cassandra benchmark
Nobuyasu
parents: 11
diff changeset
77 run "/usr/local/apache-maven/apache-maven-3.0.5/bin/mvn -f /home/mass/student/k128576/hg/jungle-network/pom.xml compile"
c69a41ffc439 Modified cassandra benchmark
Nobuyasu
parents: 11
diff changeset
78 end
c69a41ffc439 Modified cassandra benchmark
Nobuyasu
parents: 11
diff changeset
79
c69a41ffc439 Modified cassandra benchmark
Nobuyasu
parents: 11
diff changeset
80 task :run_jungle do
15
6e7a01afaaf8 Modified prrogram
Nobuyasu
parents: 14
diff changeset
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
c69a41ffc439 Modified cassandra benchmark
Nobuyasu
parents: 11
diff changeset
82 end
c69a41ffc439 Modified cassandra benchmark
Nobuyasu
parents: 11
diff changeset
83
16
704bcc773b96 Modifed capistrano file
Nobuyasu
parents: 15
diff changeset
84 task :cp_cassandra2 do
704bcc773b96 Modifed capistrano file
Nobuyasu
parents: 15
diff changeset
85 run "cp -r /home/mass/share/student/k128576/cassandra/apache-cassandra-2.0.4 /home/mass/student/k128576/cassandra"
12
c69a41ffc439 Modified cassandra benchmark
Nobuyasu
parents: 11
diff changeset
86 end
c69a41ffc439 Modified cassandra benchmark
Nobuyasu
parents: 11
diff changeset
87
c69a41ffc439 Modified cassandra benchmark
Nobuyasu
parents: 11
diff changeset
88 task :gen_conf do
16
704bcc773b96 Modifed capistrano file
Nobuyasu
parents: 15
diff changeset
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
c69a41ffc439 Modified cassandra benchmark
Nobuyasu
parents: 11
diff changeset
90 end
c69a41ffc439 Modified cassandra benchmark
Nobuyasu
parents: 11
diff changeset
91
c69a41ffc439 Modified cassandra benchmark
Nobuyasu
parents: 11
diff changeset
92 task :start_cassandra do
16
704bcc773b96 Modifed capistrano file
Nobuyasu
parents: 15
diff changeset
93 run "cd /home/mass/student/k128576/cassandra/ && /home/mass/student/k128576/cassandra/apache-cassandra-2.0.4/bin/cassandra -f"
12
c69a41ffc439 Modified cassandra benchmark
Nobuyasu
parents: 11
diff changeset
94 end
c69a41ffc439 Modified cassandra benchmark
Nobuyasu
parents: 11
diff changeset
95
14
77a01d4fca04 capistrano file
Nobuyasu
parents: 12
diff changeset
96 task :rsync_bbs do
77a01d4fca04 capistrano file
Nobuyasu
parents: 12
diff changeset
97 run "rsync -av /home/mass/share/student/k128576/hg/bulletinboard /home/mass/student/k128576/cassandra/"
77a01d4fca04 capistrano file
Nobuyasu
parents: 12
diff changeset
98 end
77a01d4fca04 capistrano file
Nobuyasu
parents: 12
diff changeset
99
77a01d4fca04 capistrano file
Nobuyasu
parents: 12
diff changeset
100 task :clean_bbs do
77a01d4fca04 capistrano file
Nobuyasu
parents: 12
diff changeset
101 run "/usr/local/apache-maven/apache-maven-3.0.5/bin/mvn -f /home/mass/student/k128576/cassandra/bulletinboard/pom.xml clean"
12
c69a41ffc439 Modified cassandra benchmark
Nobuyasu
parents: 11
diff changeset
102 end
c69a41ffc439 Modified cassandra benchmark
Nobuyasu
parents: 11
diff changeset
103
c69a41ffc439 Modified cassandra benchmark
Nobuyasu
parents: 11
diff changeset
104 task :compile_bbs do
c69a41ffc439 Modified cassandra benchmark
Nobuyasu
parents: 11
diff changeset
105 run "/usr/local/apache-maven/apache-maven-3.0.5/bin/mvn -f /home/mass/student/k128576/cassandra/bulletinboard/pom.xml compile"
c69a41ffc439 Modified cassandra benchmark
Nobuyasu
parents: 11
diff changeset
106 end
c69a41ffc439 Modified cassandra benchmark
Nobuyasu
parents: 11
diff changeset
107
16
704bcc773b96 Modifed capistrano file
Nobuyasu
parents: 15
diff changeset
108 task :install_bbs do
704bcc773b96 Modifed capistrano file
Nobuyasu
parents: 15
diff changeset
109 run "/usr/local/apache-maven/apache-maven-3.0.5/bin/mvn -f /home/mass/student/k128576/cassandra/bulletinboard/pom.xml install"
704bcc773b96 Modifed capistrano file
Nobuyasu
parents: 15
diff changeset
110 end
704bcc773b96 Modifed capistrano file
Nobuyasu
parents: 15
diff changeset
111
704bcc773b96 Modifed capistrano file
Nobuyasu
parents: 15
diff changeset
112 task :rsync_core do
704bcc773b96 Modifed capistrano file
Nobuyasu
parents: 15
diff changeset
113 run "rsync -av /home/mass/share/student/k128576/hg/jungle-core /home/mass/student/k128576/hg/"
704bcc773b96 Modifed capistrano file
Nobuyasu
parents: 15
diff changeset
114 end
704bcc773b96 Modifed capistrano file
Nobuyasu
parents: 15
diff changeset
115
704bcc773b96 Modifed capistrano file
Nobuyasu
parents: 15
diff changeset
116 task :one_bbs do
12
c69a41ffc439 Modified cassandra benchmark
Nobuyasu
parents: 11
diff changeset
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' "
c69a41ffc439 Modified cassandra benchmark
Nobuyasu
parents: 11
diff changeset
118 end
c69a41ffc439 Modified cassandra benchmark
Nobuyasu
parents: 11
diff changeset
119
16
704bcc773b96 Modifed capistrano file
Nobuyasu
parents: 15
diff changeset
120 task :one_bbs5 do
704bcc773b96 Modifed capistrano file
Nobuyasu
parents: 15
diff changeset
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
77a01d4fca04 capistrano file
Nobuyasu
parents: 12
diff changeset
122 end
77a01d4fca04 capistrano file
Nobuyasu
parents: 12
diff changeset
123
15
6e7a01afaaf8 Modified prrogram
Nobuyasu
parents: 14
diff changeset
124 task :one_bbs8 do
6e7a01afaaf8 Modified prrogram
Nobuyasu
parents: 14
diff changeset
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' "
6e7a01afaaf8 Modified prrogram
Nobuyasu
parents: 14
diff changeset
126 end
6e7a01afaaf8 Modified prrogram
Nobuyasu
parents: 14
diff changeset
127
16
704bcc773b96 Modifed capistrano file
Nobuyasu
parents: 15
diff changeset
128 task :quorum_bbs do
14
77a01d4fca04 capistrano file
Nobuyasu
parents: 12
diff changeset
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' "
77a01d4fca04 capistrano file
Nobuyasu
parents: 12
diff changeset
130 end
77a01d4fca04 capistrano file
Nobuyasu
parents: 12
diff changeset
131
16
704bcc773b96 Modifed capistrano file
Nobuyasu
parents: 15
diff changeset
132 task :quorum_bbs5 do
704bcc773b96 Modifed capistrano file
Nobuyasu
parents: 15
diff changeset
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' "
704bcc773b96 Modifed capistrano file
Nobuyasu
parents: 15
diff changeset
134 end
704bcc773b96 Modifed capistrano file
Nobuyasu
parents: 15
diff changeset
135
704bcc773b96 Modifed capistrano file
Nobuyasu
parents: 15
diff changeset
136 task :all_bbs do
14
77a01d4fca04 capistrano file
Nobuyasu
parents: 12
diff changeset
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' "
77a01d4fca04 capistrano file
Nobuyasu
parents: 12
diff changeset
138 end
77a01d4fca04 capistrano file
Nobuyasu
parents: 12
diff changeset
139
16
704bcc773b96 Modifed capistrano file
Nobuyasu
parents: 15
diff changeset
140 task :all_bbs5 do
704bcc773b96 Modifed capistrano file
Nobuyasu
parents: 15
diff changeset
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
6e7a01afaaf8 Modified prrogram
Nobuyasu
parents: 14
diff changeset
142 end
14
77a01d4fca04 capistrano file
Nobuyasu
parents: 12
diff changeset
143
12
c69a41ffc439 Modified cassandra benchmark
Nobuyasu
parents: 11
diff changeset
144 task :delete_var do
c69a41ffc439 Modified cassandra benchmark
Nobuyasu
parents: 11
diff changeset
145 run "rm -rf /home/mass/student/k128576/cassandra/var"
c69a41ffc439 Modified cassandra benchmark
Nobuyasu
parents: 11
diff changeset
146 end
c69a41ffc439 Modified cassandra benchmark
Nobuyasu
parents: 11
diff changeset
147
16
704bcc773b96 Modifed capistrano file
Nobuyasu
parents: 15
diff changeset
148 task :kill9bbs do
704bcc773b96 Modifed capistrano file
Nobuyasu
parents: 15
diff changeset
149 run "ps aux |grep maven |grep -v grep |awk '{print $2}'| xargs kill -9"
12
c69a41ffc439 Modified cassandra benchmark
Nobuyasu
parents: 11
diff changeset
150 end
14
77a01d4fca04 capistrano file
Nobuyasu
parents: 12
diff changeset
151
16
704bcc773b96 Modifed capistrano file
Nobuyasu
parents: 15
diff changeset
152
704bcc773b96 Modifed capistrano file
Nobuyasu
parents: 15
diff changeset
153 task :rm_snappy do
704bcc773b96 Modifed capistrano file
Nobuyasu
parents: 15
diff changeset
154 run "rm /home/mass/student/k128576/cassandra/apache-cassandra-2.0.4/lib/snappy-java-1.0.5.jar"
14
77a01d4fca04 capistrano file
Nobuyasu
parents: 12
diff changeset
155 end
16
704bcc773b96 Modifed capistrano file
Nobuyasu
parents: 15
diff changeset
156 task :cp_snappy do
704bcc773b96 Modifed capistrano file
Nobuyasu
parents: 15
diff changeset
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/"
704bcc773b96 Modifed capistrano file
Nobuyasu
parents: 15
diff changeset
158 end