- Create & start Vagrant box
vagrant init generic/ubuntu1804
vagrant up
vagrant ssh
- Install dependencies/packages
sudo apt-get -y update
sudo apt-get -y install build-essential autoconf libtool pkg-config
sudo apt-get -y install clang libc++-dev
sudo apt-get -y install make cmake
- Install gflags
sudo apt-get -y install libgflags-dev
- Install glog
git clone https://github.com/google/glog.git
cd glog
mkdir build && cd build
cmake -DGFLAGS_NAMESPACE=google -DCMAKE_CXX_FLAGS=-fPIC ..
make && sudo make install
cd ~
- Install gtest
sudo apt-get -y install libgtest-dev
cd /usr/src/gtest
sudo cmake CMakeLists.txt
sudo make
sudo cp *.a /usr/lib
cd ~
- Install GRPC
git clone -b $(curl -L https://grpc.io/release) https://github.com/grpc/grpc
cd grpc
git submodule update --init
make && sudo make install
cd third_party/protobuf
make && sudo make install
cd ~
- Clone Chirp project from GitHub
git clone https://github.com/kgopal492/499-gopalk.git
cd 499-gopalk
git checkout phase1
Compile with make
command in root directory: 499-gopalk/
- Run executable key_value_layer in one terminal shell:
./key_value_layer
- Run executable service_layer in another terminal shell:
./service_layer
- Run any chirp commands in other terminal(s), e.g.:
./chirp --register "barath"
./chirp --register "krishna"
./chirp --follow "barath" --user "krishna"
./chirp --chirp "Hello, class!" --user "barath"
./chirp --read "0"
./chirp --monitor=true --user "krishna"
- If monitor flag is run in one shell, spawn another shell to continue to execute chirp commands.
- Tests are compiled with the make command
- Run
./service_layer_test
and./key_value_store_test
to see the results of the gtests