This is the lab work for the LTU course "D7024E - Mobile and Distributed Computing Systems"
The script restart.sh
will automatically remove all artifacts from previous network. Then, build the required docker image and start the network. To attach a terminal connection to the network, i.e. a container running ubuntu connected to the Kademlia network, add the -a
option.
./restart.sh -a
Note: The script must be executed in the project root.
Use Docker compose to start up a network of 50 nodes. They will automatically connect and start communicating with each other. First, build the docker image
docker build -t docker-go .
Then, use the following to start the network.
docker compose up -d
The network will start in detached mode and to connect to a Kademlia node, follow the instructions in the next section Connect to a container. To stop the network use
docker compose down
Use
docker attach kademlia-node-{number}
to attach a running Kademlia node to the current terminal. Replace {number}
with a numerical value, e.g. 5
to connect to node number five.
Use test.sh
to run all unit tests in the project. Once all tests have passed, a coverage report ./coverage.html
will be generated alongside with a coverage.out
artifact.