Mercurial > hg > Members > nobuyasu > jungle_benchmark
view distributed/capistrano_jungle.rb @ 13:e3fe67fee803
adde hello_post.rb
author | Nobuyasu |
---|---|
date | Mon, 20 Jan 2014 17:01:44 +0900 |
parents | c69a41ffc439 |
children | 77a01d4fca04 |
line wrap: on
line source
set :user, "mass" #role :pall00, "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" #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" #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" #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" #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" # # 62.1(mass01) and 62.48(mass48) remove from the list. # # bldsv03 : use mass12 ~ mass15 (All : mass12 ~ mass17) #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" # bldsv04 : use mass18 ~ mass21 (All: mass18 ~ mass23) #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" # bldsv05 : use mass24 ~ mass27 (All: mass24 ~ mass29) #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" # bldsv06 : use mass30 ~ mass33 (All: mass30 ~ mass35) #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" # bldsv07 : use mass36 ~ mass38 (All: mass36 ~ mass41) #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" # bldsv08 : use mass42 ~ mass45 (All: mass42 ~ mass48) #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" role :pall00, "mass12.cs.ie.u-ryukyu.ac.jp" #role :pall00, "mass12.cs.ie.u-ryukyu.ac.jp","mass18.cs.ie.u-ryukyu.ac.jp","mass24.cs.ie.u-ryukyu.ac.jp" #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" #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" #role :pall00, "mass48.cs.ie.u-ryukyu.ac.jp" # max number of cluster is 24 task :mkdir_maven do run "sudo mkdir /usr/local/apache-maven" end task :maven_cp do run "sudo cp -r /home/mass/share/student/k128576/maven_download/apache-maven-3.0.5 /usr/local/apache-maven" end task :maven_zshrc do run "echo \"# maven \" >> /home/mass/.zshrc " run "echo 'export M2_HOME=/usr/local/apache-maven/apache-maven-3.0.5\' >> /home/mass/.zshrc " run "echo 'export M2=$M2_HOME/bin\' >> /home/mass/.zshrc " run "echo 'export PATH=$M2:$PATH\' >> /home/mass/.zshrc " end task :run_jungle do run "/usr/local/apache-maven/apache-maven-3.0.5/bin/mvn " end task :python_cp do run "mkdir -p /home/mass/student/k128576/" run "cp -r /home/mass/share/student/k128576/hg/Python-2.7 /home/mass/student/k128576/Python27 " end task :make_python do run "make -C /home/mass/student/k128576/Python27" end task :m2_cp do run "cp -r /home/mass/share/student/k128576/m2 /home/mass/.m2" end task :killjava do run "pkill java" end task :hostname do run "hostname" end task :df_awk do run "df | awk 'NR==3'" end task :mkdir_hg do run "mkdir -p /home/mass/student/k128576/hg" end task :rsync_project do run "rsync -av /home/mass/share/student/k128576/hg/jungle-network /home/mass/student/k128576/hg/" end task :clean_project do run "/usr/local/apache-maven/apache-maven-3.0.5/bin/mvn -f /home/mass/student/k128576/hg/jungle-network/pom.xml clean" end task :compile_project do run "/usr/local/apache-maven/apache-maven-3.0.5/bin/mvn -f /home/mass/student/k128576/hg/jungle-network/pom.xml compile" end task :run_jungle do run "sleep 0.$RANDOM && /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' " end task :cp_cassandra do run "cp -r /home/mass/share/student/k128576/cassandra /home/mass/student/k128576/" end task :gen_conf do 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" end task :start_cassandra do run "cd /home/mass/student/k128576/cassandra/ && /home/mass/student/k128576/cassandra/apache-cassandra-1.2.1/bin/cassandra -f" end task :cp_bbs do run "cp -r /home/mass/share/student/k128576/hg/bulletinboard /home/mass/student/k128576/cassandra/" end task :compile_bbs do run "/usr/local/apache-maven/apache-maven-3.0.5/bin/mvn -f /home/mass/student/k128576/cassandra/bulletinboard/pom.xml compile" end task :one_cassandra_bbs do 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' " end task :delete_var do run "rm -rf /home/mass/student/k128576/cassandra/var" end task :cp_var do run "rm -rf /home/mass/student/k128576/cassandra/var" run "cp -r /home/mass/student/k128576/cassandra/backup/var /home/mass/student/k128576/cassandra/" end