Mercurial > hg > Members > nobuyasu > jungle_benchmark
view distributed/capistrano_jungle.rb @ 25:726b2deadbe3
calc_sd.rb
author | Nobuyasu |
---|---|
date | Fri, 31 Jan 2014 04:51:45 +0900 |
parents | 358c96fab537 |
children |
line wrap: on
line source
set :user, "mass" #role :pall00, "133.13.62.44","133.13.62.45","133.13.62.46","133.13.62.47" role :pall00, "133.13.62.44" #role :pall00, "133.13.62.44","133.13.62.45","133.13.62.46","133.13.62.47","133.13.62.48" role :pall01, "133.13.62.39","133.13.62.40","133.13.62.41","133.13.62.42","133.13.62.43" role :pall02, "133.13.62.34","133.13.62.35","133.13.62.36","133.13.62.37","133.13.62.38" role :pall03, "133.13.62.29","133.13.62.30","133.13.62.31","133.13.62.32","133.13.62.33" 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" 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" 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" #*** CR *** role :pall07, "133.13.62.101", "133.13.62.102" #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" task :somaxconn do run "sudo /sbin/sysctl -w net.core.somaxconn=10000" end task :cat_conn do run "cat /proc/sys/net/core/somaxconn" end 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 :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 "rm -rf /home/mass/.m2" run "mkdir /home/mass/.m2" run "cp -r /home/mass/share/student/k128576/m2/repository /home/mass/.m2/" end task :killalljava do run "killall java" 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 "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' " end task :cp_cassandra2 do run "cp -r /home/mass/share/student/k128576/cassandra/apache-cassandra-2.0.4 /home/mass/student/k128576/cassandra" 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-2.0.4/conf/cassandra.yaml" end task :start_cassandra do run "cd /home/mass/student/k128576/cassandra/ && /home/mass/student/k128576/cassandra/apache-cassandra-2.0.4/bin/cassandra -f" end task :rsync_bbs do run "rsync -av /home/mass/share/student/k128576/hg/bulletinboard /home/mass/student/k128576/cassandra/" end task :clean_bbs do run "/usr/local/apache-maven/apache-maven-3.0.5/bin/mvn -f /home/mass/student/k128576/cassandra/bulletinboard/pom.xml clean" 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 :install_bbs do run "/usr/local/apache-maven/apache-maven-3.0.5/bin/mvn -f /home/mass/student/k128576/cassandra/bulletinboard/pom.xml install" end task :rsync_core do run "rsync -av /home/mass/share/student/k128576/hg/jungle-core /home/mass/student/k128576/hg/" end task :one_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 :one_bbs5 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 -rep 5' " end task :one_bbs8 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 -rep 8' " end task :quorum_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='-quorum' " end task :quorum_bbs5 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='-quorum -rep 5' " end task :all_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='-all' " end task :all_bbs5 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='-all -rep 5' " end task :delete_var do run "rm -rf /home/mass/student/k128576/cassandra/var" end task :kill9bbs do run "ps aux |grep maven |grep -v grep |awk '{print $2}'| xargs kill -9" end task :rm_snappy do run "rm /home/mass/student/k128576/cassandra/apache-cassandra-2.0.4/lib/snappy-java-1.0.5.jar" end task :cp_snappy do 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/" end task :hostname10, :roles =>:pall00 do run "hostname" end