Skip to content

Commit

Permalink
Merge pull request #80 from stevenvanrossem/master
Browse files Browse the repository at this point in the history
update ovs-user-service example
  • Loading branch information
Steven Van Rossem authored May 12, 2017
2 parents 5859826 + 7a2c6f9 commit 37f6a2f
Show file tree
Hide file tree
Showing 19 changed files with 1,517 additions and 20 deletions.
2 changes: 2 additions & 0 deletions service-projects/pack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ virtualenv -p /usr/bin/python3 venv
source venv/bin/activate
pip3 install numpy
pip3 install scipy
pip3 install matplotlib
pip3 install docker==2.0.2
pip3 install Flask
python bootstrap.py
bin/buildout
python setup.py develop
Expand Down
22 changes: 22 additions & 0 deletions service-projects/sonata-ovs-user-service-emu/configure_ovs1.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#! /bin/bash

NAME="ovs1"


echo "set controller"
# configuration after startup (needs CONTROLLER_IP):
CONTROLLER_IP="10.20.0.2"
CONTROLLER="tcp:$CONTROLLER_IP:6633"
ovs-vsctl set-controller $NAME $CONTROLLER

echo "set flow entries"
#test flow entries
PORT0_IP="10.30.1.2"
PORT1_IP="10.30.3.2"
ovs-ofctl add-flow $NAME "dl_type=0x0800,nw_dst=$PORT1_IP,actions=output:2"
ovs-ofctl add-flow $NAME "dl_type=0x0800,nw_dst=$PORT0_IP,actions=output:1"
ovs-ofctl add-flow $NAME "dl_type=0x0806,actions=flood"
ovs-ofctl del-flows $NAME 'in_port=1'
ovs-ofctl del-flows $NAME 'in_port=2'
#ovs-ofctl add-flow $NAME 'in_port=1,actions=output:2'
#ovs-ofctl add-flow $NAME 'in_port=2,actions=output:1'
4 changes: 4 additions & 0 deletions service-projects/sonata-ovs-user-service-emu/msd_input.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,12 @@ vnf_metrics:
vnf_ids:
- vnf: "ovs1:port0"
direction: "rx"
- vnf: "ctrl:ctrl-port"
direction: "rx"
- metric_type: "byte_rate"
description: "byte rate (bytes/sec)"
vnf_ids:
- vnf: "ovs1:port0"
direction: "rx"
- vnf: "ctrl:ctrl-port"
direction: "rx"
4 changes: 0 additions & 4 deletions service-projects/sonata-ovs-user-service-emu/msd_output.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,12 @@ vnf_metrics:
- metric_type: "cpu"
description: "cpu load (%)"
vnf_ids:
- vnf: "ns_port0"
- vnf: "ovs1"
- vnf: "ns_port1"
- vnf: "ctrl"
- metric_type: "mem"
description: "memory usage (bytes)"
vnf_ids:
- vnf: "ns_port0"
- vnf: "ovs1"
- vnf: "ns_port1"
- vnf: "ctrl"
- metric_type: "packet_loss"
description: "packet loss (%)"
Expand Down
53 changes: 53 additions & 0 deletions service-projects/sonata-ovs-user-service-emu/ped_ctrl.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
#
# This is an example for a profiling experiment descriptor (PED).
# It defines profiling experiments for the sonata-fw-vtc-service-emu example service.
#
descriptor_version: 0.1
# SONATA-like identifier (just in case we need it)
vendor: "eu.sonata-nfv"
name: "ovs-profile-experiment"
version: "0.1"
author: "Manuel Peuster, Paderborn University, [email protected]"
description: "This is an example profiling experiment descriptor (PED)."

# path to the package of the service we want to profile
service_package: "./sonata-fw-vtc-service.son"

#
# First type of experiments: Service level experiments
#
service_experiments:
- name: "service_throughput"
description: "iperf test for entire service"
repetitions: 1
time_limit: "11"
# NSD to be used (SONATA-like vendor.name.version reference)
service: "eu.sonata-nfv.sonata-fw-vtc-service.0.1"
# additional containers for traffic generation/measurements (like SAPs)
measurement_points:
- name: "ns_port0"
connection_point: "ns:serviceout"
container: "sonata-son-emu-sap:latest"
configuration:
- "ethtool -K port0 tx off"
- "arp -s 10.20.30.40 11:22:33:44:55:66"
cmd: 'iperf -c 10.20.30.40 -t999 -u -b${1,2,3,5}M'
cmd_order: 2
- name: "ns_port1"
connection_point: "ns:servicein"
container: "sonata-son-emu-sap:latest"
configuration:
- "ethtool -K port1 tx off"
cmd: 'python iperf_server.py "-s -u -i1 -fm"'
cmd_order: 1
input_metrics: "msd_input.yml"
output_metrics: "msd_output.yml"
profile_calculations:
- name: "ovs1_profile"
input_metric: "rx_packet_rate@ovs1:port0"
output_metric: "cpu@ovs1"
- name: "ctrl_profile"
input_metric: "rx_packet_rate@ctrl:ctrl-port"
output_metric: "cpu@ctrl"

52 changes: 52 additions & 0 deletions service-projects/sonata-ovs-user-service-emu/ped_data.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
#
# This is an example for a profiling experiment descriptor (PED).
# It defines profiling experiments for the sonata-fw-vtc-service-emu example service.
#
descriptor_version: 0.1
# SONATA-like identifier (just in case we need it)
vendor: "eu.sonata-nfv"
name: "ovs-profile-experiment"
version: "0.1"
author: "Manuel Peuster, Paderborn University, [email protected]"
description: "This is an example profiling experiment descriptor (PED)."

# path to the package of the service we want to profile
service_package: "./sonata-fw-vtc-service.son"

#
# First type of experiments: Service level experiments
#
service_experiments:
- name: "service_throughput"
description: "iperf test for entire service"
repetitions: 1
time_limit: "11"
# NSD to be used (SONATA-like vendor.name.version reference)
service: "eu.sonata-nfv.sonata-fw-vtc-service.0.1"
# additional containers for traffic generation/measurements (like SAPs)
measurement_points:
- name: "ns_port0"
connection_point: "ns:serviceout"
container: "sonata-son-emu-sap:latest"
configuration:
- "ethtool -K port0 tx off"
cmd: 'iperf -c 10.30.3.2 -t999 -u -b${1,2,3,4,5}M'
cmd_order: 2
- name: "ns_port1"
connection_point: "ns:servicein"
container: "sonata-son-emu-sap:latest"
configuration:
- "ethtool -K port1 tx off"
cmd: 'python iperf_server.py "-s -u -i1 -fm"'
cmd_order: 1
input_metrics: "msd_input.yml"
output_metrics: "msd_output.yml"
profile_calculations:
- name: "ovs1_profile"
input_metric: "rx_packet_rate@ovs1:port0"
output_metric: "cpu@ovs1"
- name: "ctrl_profile"
input_metric: "rx_packet_rate@ctrl:ctrl-port"
output_metric: "cpu@ctrl"

Loading

0 comments on commit 37f6a2f

Please sign in to comment.