Commit 6dc9142ba241e83a925dbd891bb731108b61f1ca

Authored by Etienne Pallier
1 parent e8a64c9f
Exists in dev

legeres adaptations

docker/PYROS_DOCKER_RUN
1 1 #!/usr/bin/env bash
2 2  
3   -#if no container is running
  3 +# There should be 4 pyros* containers running
4 4 if ! [ $(docker ps | grep 'pyros' | wc -l) -eq 4 ]
5 5 then
6 6 echo "pyros-db or pyros weren't running, starting them..."
... ... @@ -9,11 +9,13 @@ fi
9 9  
10 10 echo "LOG files :"
11 11  
  12 +#
12 13 # 1) Web server
  14 +#
13 15 # - Display log on current terminal
14 16 #docker exec -it pyros python3 pyros.py start webserver $@
15 17 # - Save log in file
16   -docker exec pyros python3 pyros.py -d start -o tnc webserver >> ../../LOG_PYROS_webserver.log 2>&1 &
  18 +docker exec pyros python3 pyros.py -d start -o tnc webserver > ../../LOG_PYROS_webserver.log 2>&1 &
17 19 #docker exec pyros python3 pyros.py -d start -o guitalens webserver >> ../../LOG_PYROS_webserver.log 2>&1 &
18 20 #docker exec pyros python3 pyros.py start webserver $@ > ../../LOG_PYROS_webserver.log 2>&1 &
19 21 #docker exec pyros python3 pyros.py start -o tnc webserver >> ../../LOG_PYROS_webserver.log 2>&1 &
... ... @@ -25,14 +27,19 @@ echo "- Webserver LOG file is ../../LOG_PYROS_webserver.log"
25 27 # Go on only if not "web"
26 28 if [[ $1 != "web" ]] ; then
27 29  
  30 +#
28 31 # 2) PLC simulator
  32 +#
29 33 # - Display log on current terminal
30 34 #docker exec -it pyros bash -c "cd simulators/plc/ ; ./plcSimulator.py"
31 35 # - Save log in file
32   -docker exec pyros bash -c "cd simulators/plc/ ; ./plcSimulator.py" >> ../../LOG_PYROS_plc_simulator.log 2>&1 &
  36 +docker exec pyros bash -c "cd simulators/plc/ ; ./plcSimulator.py" > ../../LOG_PYROS_plc_simulator.log 2>&1 &
33 37 echo "- PLC simulator LOG file is ../../LOG_PYROS_plc_simulator.log"
34 38  
35   -# 3) Agent Monitoring (AgentM)
  39 +#
  40 +# 3) AGENTS (according to TNC config)
  41 +#
  42 +# Agent Monitoring (AgentM)
36 43 # - Display log on current terminal
37 44 #docker exec -it pyros python3 pyros.py start agentM
38 45 # - Save log in file
... ... @@ -41,7 +48,7 @@ docker exec pyros python3 pyros.py new-start -o tnc -fg >> ../../LOG_PYROS_agent
41 48 # START
42 49 ####docker exec pyros python3 pyros.py -d start agentM -o tnc >> ../../LOG_PYROS_agent_monitoring.log 2>&1 &
43 50 #docker exec pyros python3 pyros.py -d start agentM -o "guitalens" >> ../../LOG_PYROS_agent_monitoring.log 2>&1 &
44   -echo "- Agent Monitoring LOG file is ../../LOG_PYROS_agent_monitoring.log"
  51 +##echo "- Agent Monitoring LOG file is ../../LOG_PYROS_agent_monitoring.log"
45 52  
46 53 fi
47 54  
... ...
privatedev/config/tnc/observatory_tnc.yml
... ... @@ -426,7 +426,7 @@ OBSERVATORY:
426 426 name: AgentBasic_irap
427 427 computer: IRAP_SERVER
428 428 protocol: private/plugin/agent/AgentBasic.py
429   - is_active: False
  429 + is_active: True
430 430  
431 431 TOPOLOGY:
432 432  
... ...