-
Notifications
You must be signed in to change notification settings - Fork 0
Run simulation
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 specifying the RabbitMQ host address.
docker run -it --rm --env ICT_RUN_FILE=<schedule_file> ICT_SCE_FILE=<config_file> ICT_HOST=<rabbitmq_redis_host_address> integrcity/orchestrator
For the DemoGA's scenario:
docker run -it --rm --env ICT_RUN_FILE=run.json --env ICT_SCE_FILE=sce.json --env ICT_HOST=172.17.0.1 integrcity/orchestrator
For the sake of simplicity, all the <config_file>, <schedule_file> and <wrap_file> have been already added to the orchestrator and fmu_node images. For next simulations, those files can be transfered to containers at run time by mounting volumes between host and containers, more on data management in containers here. To get the path for the different scenario files, please check the Dockerfiles used to create IntegrCiTy images here.
Finally, launch all the simulation nodes, specifying each time the path to the dedicated wrapper file, the RabbitMQ and the Redis host addresses via environment variables --env option (for now the two containers needs to be on the same host).
docker run -d --rm integrcity/node --env ICT_HOST=<rabbitmq_redis_host_address> ICT_FILE=<wrap_file_name>
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.