Skip to content

jefftune/gitw_river_bidders

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RIVER BIDDERS

large tar files not included. Still in SIM drive:

  • gitw-client.tar.gz
  • gitw-exchange.tar.gz

start the sample client

$ cd ~
$ mkdir ~/github
$ cd ~/github
$ git clone https://github.com/jefftune/gitw_river_bidders
$ scp -i ~/.ssh/GITW.pem ~/GITW2016/gitw-client.tar.gz [email protected]:
$ ssh -i ~/.ssh/GITW.pem [email protected]
[centos@ip-10-130-110-195 ~]$ zcat gitw-client.tar.gz | docker load
[centos@ip-10-130-110-195 ~]$ docker run -d -p 9000:80 gitw-client

congratulations, you're now qualified to enter the competition!

start the test exchange server

$ scp -i ~/.ssh/GITW.pem ~/GITW2016/gitw-exchange.tar.gz [email protected]:
$ scp -i ~/.ssh/GITW.pem ~/GITW2016/config.json [email protected]:
$ ssh -i ~/.ssh/GITW.pem [email protected]
[centos@ip-10-130-110-195 ~]$ zcat gitw-exchange.tar.gz | docker load
[centos@ip-10-130-110-195 ~]$ docker run -it -e GITW_CLIENTS="http://10.130.110.195:9000" -v `pwd`/config.json:/var/has/gitw/config.json gitw-exchange

watch logs in this terminal to see auction results

run a modified demo client with live reload

$ scp -i ~/.ssh/GITW.pem -r ~/GITW2016/client [email protected]:
$ ssh -i ~/.ssh/GITW.pem [email protected]
[centos@ip-10-130-110-195 ~]$ cd client

modify dev_client.py line 48 to bid 0.10 instead of random.random()

[centos@ip-10-130-110-195 client]$ docker run -d -p 9001:80 -v `pwd`/dev_client.py:/usr/local/src/client/client.py gitw-client
[centos@ip-10-130-110-195 client]$ cd ..
[centos@ip-10-130-110-195 ~]$ docker run -it -e GITW_CLIENTS="http://10.130.110.195:9000 http://10.130.110.195:9001" -v `pwd`/config.json:/var/has/gitw/config.json gitw-exchange

modify dev_client.py to bid 0.20 instead of 0.10, note live reload

[centos@ip-10-130-110-195 client]$ docker run -d -p 9001:80 -v `pwd`/dev_client.py:/usr/local/src/client/client.py gitw-client
[centos@ip-10-130-110-195 client]$ cd ..
[centos@ip-10-130-110-195 ~]$ docker run -it -e GITW_CLIENTS="http://10.130.110.195:9000 http://10.130.110.195:9001" -v `pwd`/config.json:/var/has/gitw/config.json gitw-exchange

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published