This repository provides a set of instructions to create Docker containers to start a full working set of the MACI framework published on https://maci-research.net/
The service is launched with Docker Compose initiating and connecting different Containers:
Linux (Ubuntu 16.06)
Docker-CE and Docker compose need to be installed, see https://docs.docker.com/compose/install/
#run as root
apt-get update
apt-get install \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
apt-get update
apt-get install docker-ce
curl -L https://github.com/docker/compose/releases/download/1.15.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
service docker start
macOS
Install Docker (e.g., following these instructions)
Windows
Install Docker (e.g., following these instructions).
The MACI framework is loaded as a git submodule and needs to be loaded before starting the container:
git submodule init
git submodule update --remote
The command below starts all required containers. Replace <WORKER>
with the worker you wish. The MACI WebUI will be available at http://localhost:63658
docker-compose -f docker-compose.yml -f mininet.yml up
docker-compose -f docker-compose.yml -f mininet.yml down
docker pull maciresearch/maci-backend
docker pull maciresearch/core_worker
docker pull macireserach/ns3_worker
docker pull maciresearch/mininet_worker
docker build -t maciresearch/maci-backend maci-backend/
docker build -t maciresearch/mininet_worker mininet_worker/
docker build -t maciresearch/core_worker core_worker/
docker build -t maciresearch/ns3_worker ns3_worker/
Run
docker-compose -f docker-compose.yml -f <WORKER>.yml --scale <WORKER>=<N> up
docker run --rm --privileged -v /lib/modules:/lib/modules -e BACKEND=<BACKEND_ADDRESS> -e IDLE=3600 -d maciresearch/mininet_worker
docker run --rm --privileged -v /lib/modules:/lib/modules -e BACKEND=<BACKEND_ADDRESS> -e IDLE=3600 -d --cap-add=NET_ADMIN maciresearch/core_worker
For development purposes there is a core-gui adaption. The container tries to connect to an x server running on your desktop. Important: authorize the host to connect: xhost + <DOCKER_HOST_IP>
, Docker for mac users can use the hostname docker.for.mac.localhost
.
docker run --rm --privileged -v /lib/modules:/lib/modules -it --cap-add=NET_ADMIN -e DISPLAY=docker.for.mac.localhost:0 maciresearch/core_worker
/sys
folder:docker run --rm --privileged --net=host -v /sys:/sys -e BACKEND=<BACKEND_ADDRESS> -e IDLE=3600 -d --cap-add=ALL maciresearch/mininet-wifi_worker
... using the id provided after start:
docker stop <CONTAINER_ID>