-
Notifications
You must be signed in to change notification settings - Fork 17
Pilot prototype on vim emu
This page is crated by @mpeuster and is used to document the developments of the first pilot prototype, deployed on vim-emu. This is a living document until the prototype is ready.
Collection of pointers to related issues among different repositories:
Main issue: 1st working demo (for F2F in Dublin)
- vim-emu
- tng-industrial-pilot
- Project: Emulator-based Pilot Deployment
- Project: VNF CC Development
- Project: VNF EAE Development
-
VNFs
-
Descriptor projects (network services and VNFDs)
The following figure captures technical details (mostly networking) of the current prototype:
The following figure shows the data flow of the current prototype:
Documents how to deploy and run the pilot on the emulator.
Requirements:
- Python2 (vim-emu), Python3 (5GTANGO SDK)
- bare-metal installation of vim-emu (on Ubuntu 18.04: also install
net-tools
forifconfig
) - installation of 5GTANGO SDK tools
- local clone of this repository
In a first terminal window, on the machine on which the emulator is installed, do:
git clone https://github.com/sonata-nfv/tng-industrial-pilot.git
cd tng-industrial-pilot/vnfs
./build_emulator_vnfs.sh
This will build all necessary VNFs (Docker containers) that will be used during this demo.
In a first terminal window, start the emulator and keep it open:
# Switch to vim-emu folder
$ cd ~/vim-emu
# Start emulator (Attention: Emulator needs Python2 and root access)
$ sudo python2 examples/tango_default_cli_topology_2_pop.py
In a second terminal window (in which the Python virtualenv
in which you installed the 5GTANGO SDK is active), do:
# switch to the sdk-projects folder of this repository
(venv)$ cd ~/tng-industrial-pilot/sdk-projects/
# package the network services
(venv)$ tng-pkg -p tng-smpilot-ns1-emulator/
(venv)$ tng-pkg -p tng-smpilot-ns2-emulator/
The service package file eu.5gtango.tng-smpilot-ns1-emulator.0.1.tgo
and eu.5gtango.tng-smpilot-ns2-emulator.0.1.tgo
are created.
Upload the service packages to the running vim-emu instance:
(venv)$ ./on-board-ns1.sh
(venv)$ ./on-board-ns2.sh
Trigger the instantiation of the uploaded services:
(venv)$ ./instantiate-ns1.sh
(venv)$ ./instantiate-ns2.sh
Wait some seconds until the services are up and running.
Note: Step 3 and 4 can be simplified with the helper script (attention: the script also performs Step 6) ./deploy_pilot_on_local_emulator.sh
Check the service status using the vim-emu client (in a third terminal window):
$ vim-emu compute list
# output:
+--------------+---------------+--------------------------------------+------------------+-------------------------+
| Datacenter | Container | Image | Interface list | Datacenter interfaces |
+==============+===============+======================================+==================+=========================+
| dc2 | vnf_eae.cdu01 | sonatanfv/vnf-eae:vimemu | data | dc2.s1-eth2 |
+--------------+---------------+--------------------------------------+------------------+-------------------------+
| dc2 | vnf_dt.cdu01 | sonatanfv/vnf-dt:vimemu | data | dc2.s1-eth5 |
+--------------+---------------+--------------------------------------+------------------+-------------------------+
| dc2 | vnf_rtr.cdu01 | sonatanfv/vnf-rtr-nat:vimemu | data,uplink | dc2.s1-eth3,dc2.s1-eth4 |
+--------------+---------------+--------------------------------------+------------------+-------------------------+
| dc1 | vnf_cc.cdu03 | sonatanfv/vnf-cc-mqttexporter:vimemu | data | dc1.s1-eth4 |
+--------------+---------------+--------------------------------------+------------------+-------------------------+
| dc1 | vnf_cc.cdu02 | sonatanfv/vnf-cc-processor:vimemu | data | dc1.s1-eth3 |
+--------------+---------------+--------------------------------------+------------------+-------------------------+
| dc1 | vnf_cc.cdu01 | sonatanfv/vnf-cc-broker:vimemu | data | dc1.s1-eth2 |
+--------------+---------------+--------------------------------------+------------------+-------------------------+
| dc1 | vnf_mdc.cdu01 | sonatanfv/vnf-mdc:vimemu | data | dc1.s1-eth6 |
+--------------+---------------+--------------------------------------+------------------+-------------------------+
| dc1 | vnf_cc.cdu04 | sonatanfv/vnf-cc-database:vimemu | data | dc1.s1-eth5 |
+--------------+---------------+--------------------------------------+------------------+-------------------------+
# follow logs of cc processor
docker exec -it mn.vnf_cc.cdu02 tail -f /var/cc.log
# follow logs of cc mqtt exporter
docker exec -it mn.vnf_cc.cdu03 tail -f /var/mqe.log
# alternative: directly subscribe to broker
docker exec -it mn.vnf_cc.cdu02 mosquitto_sub -h 30.0.0.1 -p 1883 -v -t WIMMS/+/+
Use your browser and go to the Prometheus Dashboard to view the recorded metrics:
- http://127.0.0.1:9090
- http://{your-host}:9090
Select metric wimms_em63_actsimpara2
and press execute.
ATTANTION: It is important to terminate the services before the emulator is stopped, to ensure that the DT correctly unmounts the shared folder. Otherwise vim-emu and the DT container will hang!
# helper script (in sdk-projects/)
./terminate_pilot_on_local_emulator.sh
Do the following to interconnect the two network services:
# do a containernet> dump or containernet> links to the to wich switch port the router's 'uplink' interface connects
containernet> dc2.s1 ovs-vsctl set port dc2.s1-eth6 tag=2
Explanation: The networks of the services are separated with VLANs in vim-emu. With this command we connect the 'uplink' interface of the router to the VLAN of NS1 (tag=2).
This is automatically done by ./instantiate-ns2.sh
.
# DT: IMMS APP
/var/imms.log
# MDC: Samba
/var/smb.log
# MDC: MDC APP
/var/mdc.log
# CC: Broker
/var/mosquitto.log
# CC: Processor
/var/cc.log
# check if the RTR (NS2) can ping CC (NS1)
docker exec -it mn.vnf_rtr.cdu01 ping 30.0.0.1
# check if the MDC (NS2) can ping CC (NS1)
docker exec -it mn.vnf_mdc.cdu01 ping 30.0.0.1
# check if the MDC (NS2) publishes random data to the CC (NS1) broker
docker exec -it mn.vnf_cc.cdu02 mosquitto_sub -h 30.0.0.1 -p 1883 -v -t machines/+/sensors/+
# or (with real MDC)
docker exec -it mn.vnf_cc.cdu02 mosquitto_sub -h 30.0.0.1 -p 1883 -v -t WIMMS/+/+
# or (with real CC)
docker exec -it mn.vnf_cc.cdu02 tail -f /var/cc.log
...