Skip to content

Run simulation

Puerto Pablo edited this page Aug 2, 2017 · 15 revisions

First, launch RabbitMQ (message broker) and Redis (results data base) containers.

docker run -d --hostname my-rabbit -p 5672:5672 --name ict-rabbit rabbitmq:alpine

docker run -d --hostname my-redis -p 6379:6379 --name ict-redis redis:alpine

By specifying image:alpine, the chosen image will be based on Alpine which is a lightweight Linux distibution. Images based on Alpine are usually smaller than other distributions.

The -p 0000:9999 option allow us to link ports between containers (9999) and host (0000). 5672 and 6397 are the defaults ports for respectively RabbitMQ and Redis.

Then, launch the orchestrator container.

docker run -it --rm integrcity/orchestrator <rabbitmq_host_address> <config_file_path> <schedule_file_path>

Finally, launch all the simulation nodes, specifying each time the path to the dedicated wrapper file.

docker run -d --rm integrcity/fmu_node <rabbitmq_host_address> <redis_host_address> <wrap_file_path>

The -d option allow to detach from the container, so it will run in background and logs will not be directly available. If you use the -it option, the container is launch in interactive mode and stay connected to the container. You will need to open a new terminal to run other containers, more on run command options here.

When all the simulation nodes have acknowledge to the orchestrator via the message broker, the simulation start.

Clone this wiki locally