This provides a four-node virtual cluster by docker to develop distributed systems in Mochi-Margo.
There are four containers; c1, c2, c3, and c4. The workspace in a container is ~/workspace, which is shared among all containers.
This directory also includes sample programs in Mochi-Margo, and CMakeLists.txt.
Install WSL
Install Docker Engine
$ docker compose up -d
You can login to a container as follows
$ docker exec -it c1 bash
$ cd
or
$ ssh $(docker exec -it c1 hostname -i)
- Install VS Code and Remote Containers extension
- Open this directory
- Open a command palette by Ctrl+Shift+P and execute "Remote-Containers: Rebulid and Reopen in Container"
$ cd sample
$ mkdir build
$ cd build
$ spack load mochi-margo
$ cmake -DCMAKE_INSTALL_PREFIX=$HOME/workspace ..
$ make
$ make install
Target programs; server and client, are installed in ~/workspace/bin, which is shared among containers. This directory is included in PATH environment variable by ~/.bashrc.
$ server
Server running at address na+sm://6564-0
Specify the server address, key and value
$ client na+sm://6564-0 111 222
$ ssh c2
Enjoy!