Last active
August 27, 2017 01:00
-
-
Save minaminao/cbaf34167b9347537e9012752ab07f3c to your computer and use it in GitHub Desktop.
ConoHa VPS で使用する ISUCON6 予選の provisioning shell script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set -e | |
export DEBIAN_FRONTEND=noninteractive | |
apt-get update | |
apt-get install -y --no-install-recommends ansible git aptitude golang-go tzdata make | |
export GOPATH=/tmp/go | |
mkdir -p ${GOPATH}/src/github.com/isucon/ | |
cd ${GOPATH}/src/github.com/isucon | |
rm -rf isucon6-qualify | |
git clone https://github.com/minaminao/isucon6-qualify.git | |
sed -i -e 's:--disable-phar::' isucon6-qualify/provisioning/image/ansible/02_xbuild.yml | |
( | |
cd isucon6-qualify/bench | |
go get github.com/Songmu/timeout | |
go get github.com/mitchellh/go-homedir | |
go get github.com/PuerkitoBio/goquery | |
go get github.com/marcw/cachecontrol | |
make | |
) | |
( | |
cd isucon6-qualify/provisioning/bench | |
PYTHONUNBUFFERED=1 ANSIBLE_FORCE_COLOR=true ansible-playbook -i localhost, ansible/*.yml --connection=local | |
) | |
( | |
cd isucon6-qualify | |
make | |
ln -s isupam_linux bin/isupam | |
) | |
( | |
cd isucon6-qualify/provisioning/image/ansible | |
PYTHONUNBUFFERED=1 ANSIBLE_FORCE_COLOR=true ansible-playbook -i localhost, *.yml --connection=local -t dev | |
) | |
( | |
cd isucon6-qualify/provisioning/image | |
./db_setup.sh | |
) | |
rm -rf ${GOPATH} | |
usermod -G sudo -a -s /bin/bash isucon | |
echo "Provisioning Successful" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment