Skip to content
Snippets Groups Projects
user avatar
.
Jiaqi Liu authored
bff5cce6
History
Name Last commit Last update
service
README.md
replicate.sh

Configure & Run

Membership Service

Open MP2/replicate.sh and put IP addresses of all VM's in IPs array variable, then change the IP 172.22.149.118 to the actual IP of VM that clones MP2 from git. Similary, put all those IP addressed in MP2/service/logger/IP.txt, one IP per line.

Set Up Passwordless SSH

On the VM that clones MP2 from git, enable this VM's ssh into other VM's without password. This step is optional, though, if you are OK with typing ssh password in the next step.
ssh-keygen
ssh-copy-id -i ~/.ssh/id_rsa.pub remote_host_ip

remote_host_ip is the IP addresses of the other VM's

Run MP2

Run the script replicate.sh to distribute MP2 source code into all other VM's, the run MP2/../service/start-all.sh to start the service. At each VM, wait before prompt gets returned, then proceed to the next VM to repeat the process. If you get error of ...address already in use..., you can reuse the address after running MP2/../service/reset.sh and running MP2/../service/start-all.sh again

To view the membership list of all VM's, cd into MP2/../service/logger and run querier.sh. When a VM crashes or is stopped(MP2/../service/stop-all.sh), all alive VM's will update their membership lists and querier.sh will show you these changes.