1st working demo (for F2F in Dublin)
mpeuster opened this issue · comments
This issue captures the developments and TODOs for the first working demo we are going to show in Dublin.
Demo will involve: DigitalTwind -> MDC -> CC -> EAE all deployed on vim-emu.
Documentation: https://github.com/sonata-nfv/tng-industrial-pilot/wiki/Pilot-prototype-on-vim-emu
Todos and open issues
Deployment on vim-emu
- create descriptors for NS1
- create descriptors for NS2
- test deployment of NS1 and NS2 on vim-emu
- test NS internal network connectivity
- enable connectivity from NS2 to NS1
- not working right now, each service has its own subnet. we need to somehow route between the networks
- add a router VNF to NS2 with a uplink interface that we can connect to the subnet of NS1
- configure router's
uplink
interface to have IP in NS1 subnet - configure switch to add
uplink
to the vlan of NS1 - configure router to have ipv4 forwarding enabled and correct routes set
- create router VNF
- link RTR as a new artifact from the wiki
- configure MDC VNF to have RTR as default gateway to reach CC in NS1
- ...
VNF internals (software, configurations etc.)
- CC-CDU01: Broker
- basic container with installed Mosquitto
- can we show the messages somehow? (output is piped to
/mosquitto.log
for now)docker exec -it mn.vnf_cc.cdu01 mosquitto_sub -h 30.0.1.1 -p 1883 -v -t machines/+/sensors/+
- CC-CDU02: Processor
- create custom Docker image
- integrate WEID software (without Azure keys (!!!!))
- add keys to server
- add a custom script that subscribes to broker and
dumps all messages to a file (enough for Dublin presentation)pushes it to WEID's Azure cloud
- MDC
- add MQTT client script to MDC to check that MDC can connect to CC-CDU01 and let it send random data (
/mqtt_generator.sh
) - add real MDC code from WEID
- add Samba/NFS to create a shared folder to which the DT connects
- add MQTT client script to MDC to check that MDC can connect to CC-CDU01 and let it send random data (
- DigitalTwin
- add DT code from WEID
- configure to use shared folder from MDC
- fix permissions when files and folders should be created
- check if we have a race condition in the emulator? MDC needs to be up before DT connects
- try forwarding to get access to DT's web interface from remote -> Does require port in emulator -> vim-emu update (DONE make a new issue from this: sonata-nfv/son-emu#295)
- add autostart functionality to IMMS.py (command line parameters to start it)
Bugs
- Running mosquitto blocks emulator shutdown (starting process in background with
&
solves it)
Others
- create a detailed network diagram of the demo (show subnets, CDUs, IPs per CDU, OVSs, NAT, ...)
- check if the old emulator dashboard still works (nice for demos)
- Not integrated anymore! Must do. Use temp solution on local machine (Bookmark bar "Emu. Dashbaord")
Known Issues
- docker needs to run privileged to allow mount of SAMBA share (won't work in K8s)
Simple NAT Router setup in emulator:
RTR container:
apt-get update
apt-get install iptables
sysctl -w net.ipv4.ip_forward=1
iptables -t nat -A POSTROUTING -o uplink -j MASQUERADE
iptables -A FORWARD -i uplink -o data -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i data -o uplink -j ACCEPT
MDC container
route add -net 30.0.1.0/24 gw 30.0.3.3 dev data
Test: ping 30.0.1.1
First MQTT experiments using Mosquitto:
Install
# install latest mosquitto
apt-add-repository -y ppa:mosquitto-dev/mosquitto-ppa
apt-get update
apt-get install -y mosquitto mosquitto-clients
Run broker
mosquitto -v
Use
We use the mosquitto command line clients for now:
# subscribe (tested on CC-CDU01)
mosquitto_sub -h 30.0.1.1 -p 1883 -v -t machines/+/sensors/+
# publish (tested on MDC)
mosquitto_pub -h 30.0.1.1 -p 1883 -t machines/molding-042/sensors/temp -m "250.4356"
Ok continue tomorrow:
MDC:
Why is broker connection not possible? Fixed: Had a bug in the MDC config.
Waiting (3/100)
Connecting to broker 30.0.1.1
Cannot connect to MQTT broker '30.0.1.1'
Exception in MDC:
DAT file found. Processing ...
Exception detected: list index out of range
Problem: DAT file is empty when MDC reads it e.g. 00010022.DAT
: Race condition?? Fixed: set waitTimeCycle=2.0
DT:
Mount does not always work (race conditions?) **Fixed: Sleep for some time**
vnf_dt.cdu01
cannot be stopped by emulator
Problem: We need to unmount the share before the container is stopped (umount em63_share/
)! Fixed: Call the service termination
of the LLCM before stopping the emulator. This triggers the stop script in the DT and unmounts the share.
Workaround: sudo pkill python
and docker rm -f mn.vnf_dt.cdu01
and docker ps -a | grep Removal | cut -f1 -d' ' | xargs -rt docker rm
do not always work
First version without Azure is working.