Dynamic Byzantine Fault Tolerant Distributed Key Value Database
mvn clean install
- start_mochi.sh
- goto https://localhost:8080/
check_docker_run.sh
build_mochi_docker.sh
start_mochi_docker.sh
Maven installation errors : As of 11/5/2017 In Ubuntu 16.04, apt-get install maven partially installs java-8-openjdk-amd64
This partiall installation causes grief when building plugins
We can fix java 8 via sudo apt-get install openjdk-8-jdk
More info on : https://stackoverflow.com/questions/26313902/maven-error-perhaps-you-are-running-on-a-jre-rather-than-a-jdk
Read pom.xml file to know Java version dependencies before attempting mvn install <java.version>1.8</java.version>
mvn clean install -nsu && ./build_mochi_docker.sh && ./start_mochi_docker.sh
Protobuf 3.4.0 Installation
Ubuntu 16.04
curl -OL https://github.com/google/protobuf/releases/download/v3.4.0/protoc-3.4.0-linux-x86_64.zip
unzip protoc-3.4.0-linux-x86_64.zip -d proto3.4
sudo mv protoc3.4/bin/* /usr/local/bin/
sudo mv protoc3.4/include/* /usr/local/include/
protoc --version
libprotoc 3.4.0
MacOS
Install protobuf - https://stackoverflow.com/questions/21775151/installing-google-protocol-buffers-on-mac
Generate proto - /usr/local/bin/protoc ./src/main/java/edu/stanford/cs244b/mochi/server/messages/MochiProtocol.proto --java_out=src/main/java/
- Install AWS cli on your Mac, Cygwin :
pip install awscli
-
After installing AWS cli, run "aws configure" and update your access and secret key in the field provided
-
Then run : aws ecr get-login --region us-west-1
-
You would an access token that is valid for 12 hours
-
You would have to docker login using that access token
-
Once login is successful, we can now create a docker tag that matches our repository
sudo docker tag mochi-db:latest .dkr.ecr.us-west-1.amazonaws.com/mochi-db:latest
- Push our docker image to AWS repository
sudo docker push .dkr.ecr.us-west-1.amazonaws.com/mochi-db:latest
-
On our ECS instance, we have to docker login to our AWS repository following the same steps
-
Pull our image
docker pull .dkr.ecr.us-west-1.amazonaws.com/mochi-db:latest
- Run docker on ECS