Using Docker
- install docker and VirtualBox(optional for OSX).
- register the IP of the docker-machine into
/etc/hosts
file(optional for OSX).- ex)
192.168.99.100 default
- ex)
- open up docker terminal and go to root directory.
- Build a docker image of the s2graph in the project's root directory
sbt "project s2rest_play" docker:publishLocal
- Run MySQL and HBase container first.
- change directory to dev-support.
cd dev-support
docker-compose build
docker-compose up -d graph_mysql
will run MySQL and HBase at same time.
- change directory to dev-support.
- Run graph container.
- in docker terminal, go to dev-support folder then run
docker-compose up -d
- you will find
default
image running on VirtualBox. - if you are on linux, then use your machine name.
- in docker terminal, go to dev-support folder then run
- Run rest server with Play on local machine(optionally).
sbt "project s2rest_play" run -Dhost=default
- you will see play application running on local machine.
- Run test cases.
sbt test -Dhost=default
this will use hbase and mysql on default image at VirtualBox.
S2Graph should be connected with MySQL at initial state. Therefore you have to run MySQL and HBase before running it.