-
Notifications
You must be signed in to change notification settings - Fork 62
How to debug on AWS?
Samarth Kulshreshtha edited this page Nov 27, 2018
·
1 revision
- Check if you can reproduce the problem by running across multiple processes.
- If Step 1. doesn't work, try to reproduce the problem on AWS with as less VMs as possible.
- Once you have found a small
n
, use therun-on-ec2
script to startn
VMs and kill the command usingCTRL+\
after it starts to execute the MPC commands. Now,ssh
into the AWS VMs (all of them, best to useterminator
or a multiple paned terminal) using the commandssh <path-to-pem> ubuntu@<ip-of-the-VM>
(the username is the same username that you specify in the AWS config) - Check if there are any running containers on the VMs using -
sudo docker ps
. If there are any running containers it is best to kill them using -sudo docker kill $(sudo docker ps -q)
- Run the following command to start a shell inside the container on all the VMs:
sudo docker run -it -p <same-port-in-config>:<same-port-in-config> -v /home/ubuntu/config:/usr/src/HoneyBadgerMPC/config/ -v /home/ubuntu/sharedata:/usr/src/HoneyBadgerMPC/sharedata/ -v /home/ubuntu/benchmark:/usr/src/HoneyBadgerMPC/benchmark/ -e HBMPC_NODE_ID=<hbmpc_node_id> -e HBMPC_CONFIG=config/config.ini -e HBMPC_RUN_ID=<run-id> <AwsConfig.DOCKER_IMAGE_PATH> bash
- The port must match the port specified in the config while bringing up the VMs
- The node id is different for each VM. You should pass the node ids in the same order starting from
0
ton-1
as the instance-id ordering incurrent.vms
file. (This file should exist in the top directory after you use therun-on-ec2
script). - Run id can be any string (same for all VMs) unless you are running an MPC command whose inputs are generated with the run-id prefix in which case use the
run-id
generated when you created the VMs. - Docker image path is the path where you have uploaded the docker image.
Eg:
sudo docker run -it -p 7000:7000 -v /home/ubuntu/config:/usr/src/HoneyBadgerMPC/config/ -v /home/ubuntu/sharedata:/usr/src/HoneyBadgerMPC/sharedata/ -v /home/ubuntu/benchmark:/usr/src/HoneyBadgerMPC/benchmark/ -e HBMPC_NODE_ID=0 -e HBMPC_CONFIG=config/config.ini -e HBMPC_RUN_ID=test_run smkuls/honeybadgermpc:latest bash