- Download Vagrant VM: https://www.vagrantup.com/downloads.html
$ vagrant
Usage: vagrant [options] <command> [<args>]
-v, --version Print the version and exit.
-h, --help Print this help.
# ...
Create a new directory for this project
$ mkdir aliya_petranik_499_chirp && cd aliya_petranik_499_chirp
$ vagrant init generic/ubuntu1804
- This could create a Vagrantfile in your current directory
- Check that your Vagrantfile says
config.vm.box = "generic/ubuntu1804"
vagrant box add generic/ubuntu1804
vagrant up
vagrant ssh
sudo apt-get -y update
sudo apt-get -y install build-essential autoconf libtool pkg-config
// install clang
curl -SL http://releases.llvm.org/9.0.0/clang+llvm-9.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz | tar -xJC .
sudo apt-get -y install make
git clone -b $(curl -L https://grpc.io/release) https://github.com/grpc/grpc
cd grpc
git submodule update --init
make && sudo make install
(this takes a while)
cd third_party/protobuf
make && sudo make install
cd ~
sudo apt-get -y install libgflags-dev
sudo apt-get -y install libgoogle-glog-dev
sudo apt-get -y install libgtest-dev
sudo apt install git
git clone https://github.com/apetranik/499-petranik.git
cd 499-petranik
git checkout Phase1-PR-Fixes
git pull origin Phase1-PR-Fixes
make clean && make
Open minimum 4 shells for testing all functionality
- Go to folder with Vagrantfile and use,
vagrant sshas you did the first time
Both backend and service must be running to use chirp CLI
$ cd src/
$ ./run_server
- Note: closing this will resete key value store
$ cd src/
$ ./run_service
- Note: if you quit the service layer, the backend key-value store will still be saved
-
In
src/chirp.o -
All commands start with
./chirp... -
You can not perform more than one of these commands at once
$ ./chirp --register <username>(user must be registered to perform any other commands)
$ ./chirp --user <username> --chirp <chirp text>$ ./chirp --user <username> --chirp <chirp text> --reply <reply chirp id>$ ./chirp --user <username> --follow <username_to_follow>$ ./chirp --read <chirp_id>$ ./chirp --user <username> --monitor
$ cd test/
$ ./key_value_store_unit_tests
$ ./service_layer_unit_tests