Skip to content

Instantly share code, notes, and snippets.

@netmarkjp
Created September 29, 2015 11:38
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save netmarkjp/f9dc2ccc9eb1ec6caa25 to your computer and use it in GitHub Desktop.
Save netmarkjp/f9dc2ccc9eb1ec6caa25 to your computer and use it in GitHub Desktop.
# GCEでUbuntu 15.04
sudo su -
apt-get update && apt-get -y install ansible jq
git clone https://github.com/isucon/isucon5-qualify.git
cd isucon5-qualify/
cd gcp/bench/ansible/
sed -i 's/- copy/#- copy/' 00_devel.yml
sed -i 's@key_file=.*@@' 06_deploy_bench_tool.yml
sed -i 's@repo=.*@repo=https://github.com/isucon/isucon5-qualify.git@' 06_deploy_bench_tool.yml
echo localhost ansible_connection=local > local
ansible-playbook -i local 00_devel.yml 01_isucon_base.yml 02_xbuild_part.yml 06_deploy_bench_tool.yml
systemctl stop agent.ruby
systemctl disable agent.ruby
echo "/dev/sda1 / ext4 defaults 0 0" > /etc/fstab
su - isucon
bash
cd isucon5-qualify/bench/
gradle compileJava
source ~/env.bench.sh
export TARGET_IP="10.240.236.162"
jq ".[`expr $RANDOM % 30`]" < ../eventapp/testsets.json | gradle -q run -Pargs="net.isucon.isucon5q.bench.scenario.Isucon5Qualification ${TARGET_IP:?}"
@netmarkjp
Copy link
Author

TARGET_IP は適宜変える

@methane
Copy link

methane commented Sep 30, 2015

おおおぉ
ansible便利だ。

@matsuu
Copy link

matsuu commented Oct 2, 2015

元のcheck.rbの実装を見ると、$RANDOM % 30ではなく常に.[0]を使うべきのように読めました

@matsuu
Copy link

matsuu commented Oct 3, 2015

嘘でした。そんなことはなくランダムだった。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment