-
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:
Documents how to deploy and run the pilot on the emulator.
Requirements:
- Python2 (vim-emu), Python3 (5GTANGO SDK)
- bare-metal installation of vim-emu
- 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)$ curl -i -X POST -F [email protected] http://127.0.0.1:5000/packages
(venv)$ curl -i -X POST -F [email protected] http://127.0.0.1:5000/packages
Trigger the instantiation of the uploaded services:
(venv)$ curl -X POST http://127.0.0.1:5000/instantiations -d '{"service_name": "tng-smpilot-ns1-emulator"}'
(venv)$ curl -X POST http://127.0.0.1:5000/instantiations -d '{"service_name": "tng-smpilot-ns2-emulator"}'
Wait some seconds until the services are up and running.
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 | ubuntu:trusty | mgmt,data | dc2.s1-eth2,dc2.s1-eth3 |
+--------------+---------------+--------------------------------+------------------+-------------------------------------+
| dc2 | vnf_dt.cdu01 | ubuntu:trusty | mgmt,data | dc2.s1-eth7,dc2.s1-eth8 |
+--------------+---------------+--------------------------------+------------------+-------------------------------------+
| dc2 | vnf_rtr.cdu01 | sonatanfv/vnf-rtr-nat:vimemu | mgmt,data,uplink | dc2.s1-eth4,dc2.s1-eth5,dc2.s1-eth6 |
+--------------+---------------+--------------------------------+------------------+-------------------------------------+
| dc1 | vnf_cc.cdu03 | ubuntu:trusty | mgmt,data | dc1.s1-eth6,dc1.s1-eth7 |
+--------------+---------------+--------------------------------+------------------+-------------------------------------+
| dc1 | vnf_cc.cdu02 | ubuntu:trusty | mgmt,data | dc1.s1-eth4,dc1.s1-eth5 |
+--------------+---------------+--------------------------------+------------------+-------------------------------------+
| dc1 | vnf_cc.cdu01 | sonatanfv/vnf-cc-broker:vimemu | mgmt,data | dc1.s1-eth2,dc1.s1-eth3 |
+--------------+---------------+--------------------------------+------------------+-------------------------------------+
| dc1 | vnf_mdc.cdu01 | sonatanfv/vnf-mdc:vimemu | mgmt,data | dc1.s1-eth8,dc1.s1-eth9 |
+--------------+---------------+--------------------------------+------------------+-------------------------------------+
In the first terminal window (running vim-emu) press 2x ENTER
to get the containernet>
prompt.
Then 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 (2).
# check if the RTR (NS2) can ping CC (NS1)
docker exec -it mn.vnf_rtr.cdu01 ping 30.0.1.1
# check if the MDC (NS2) can ping CC (NS1)
docker exec -it mn.vnf_mdc.cdu01 ping 30.0.1.1
# check if the MDC (NS2) publishes random data to the CC (NS1) broker
docker exec -it mn.vnf_cc.cdu01 mosquitto_sub -h 30.0.1.1 -p 1883 -v -t machines/+/sensors/+
...