Skip to content

isucon8 final provisioning

hiro116s edited this page Sep 30, 2020 · 2 revisions
  1. Run ubuntu instance in AWS
  2. Run Docker install (https://github.com/ponyopoppo/isucon-tools/wiki/Docker-install-in-Ubuntu-18.04)
  3. Run following commands
# clone repository
git clone [email protected]:ponyopoppo/isucon8-final.git
cd isucon8-final

# Update /etc/hosts
sudo bash -c "cat << EOF >> /etc/hosts
127.0.0.1 localhost.isucon8.flying-chair.net
127.0.0.1 compose.isucon8.flying-chair.net
EOF"

# docker-compose -f webapp/docker-compose.yml -f webapp/docker-compose.mockservice.yml -f webapp/docker-compose.go.yml up -d
docker-compose -f webapp/docker-compose.yml -f webapp/docker-compose.mockservice.yml -f webapp/docker-compose.nodejs.yml up -d
docker-compose -f blackbox/docker-compose.local.yml up -d

# Go install (https://github.com/golang/go/wiki/Ubuntu)
sudo add-apt-repository ppa:longsleep/golang-backports
sudo apt update
sudo apt install golang-go

# bench install
cd bench
make init
make deps
make build
cd ..

# bench (local)
./bench/bin/bench \
    -appep=http://localhost.isucon8.flying-chair.net \
    -bankep=http://compose.isucon8.flying-chair.net:5515 \
    -logep=http://compose.isucon8.flying-chair.net:5516 \
    -internalbank=http://localhost.isucon8.flying-chair.net:5515 \
    -internallog=http://localhost.isucon8.flying-chair.net:5516

# bench (remote)
APP_HOST=
./bench/bin/bench \
    -appep=${APP_HOST} \
    -bankep=http://compose.isucon8.flying-chair.net:5515 \
    -logep=http://compose.isucon8.flying-chair.net:5516 \
    -internalbank=http://localhost.isucon8.flying-chair.net:5515 \
    -internallog=http://localhost.isucon8.flying-chair.net:5516


[[[ Some useful commands ]]]
# How to connect to mysql server from host (Reference: https://hacknote.jp/archives/30781/)
mysql -P13306 -uisucon -pisucon --host=127.0.0.1

# Stop containers
docker-compose -f webapp/docker-compose.yml -f webapp/docker-compose.mockservice.yml -f webapp/docker-compose.nodejs.yml down
docker-compose -f blackbox/docker-compose.local.yml down