Difference between revisions of "VPP Sandbox/vpp-userdemo"

From fd.io
Jump to: navigation, search
(RUNNING DEMOs)
 
(19 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
= INTRO =
 
= INTRO =
  
This is a Vagrant based user demo environment for beginners with VPP
+
This is a GUI driven demo environment for beginners with VPP
  
The demo requires NodeJS installed on the host (today - we are working dilligently to keep this "all in the VM")
 
  
You then do the following:
 
 
- install nodeJS from nodejs.org/en/download/ for you host distribution
 
 
- from folder vpp-userdemo/gui/backend:
 
 
  '''npm install'''
 
 
- from folder vpp-userdemo/gui:
 
 
  '''NODE_ENV=production node backend/server.js'''
 
 
It walks a user through
 
- each of the commands,
 
- the expected output,
 
- gives a file of the commands used to try themselves
 
  
 
= REQUIREMENTS =
 
= REQUIREMENTS =
- vagrant (1.8)
+
* vagrant (1.8)
- virtualbox / vmware fusion
+
* virtualbox / vmware fusion
  
 
= GETTING STARTED =
 
= GETTING STARTED =
- clone the repo
+
* Clone the repo
- modify env.sh if needed and ```source ./env.sh```
+
  git clone https://gerrit.fd.io/r/vppsb
- by default the VM uses 2 x CPUs and 4G RAM
+
  cd vppsb/vpp-userdemo
- ```vagrant up```
+
* Modify env.sh if needed and  
- ... run the demo
+
  source ./env.sh
 +
  vagrant up
 +
* http://localhost:5000
 +
* Have fun!
  
 
= RUNNING DEMOs =
 
= RUNNING DEMOs =
- From the Host, where you ran ```vagrant up``` run ```./run <demoname>```
+
Select from
 +
* bridging
 +
* routing
 +
* tracing
  
```./run <demoname>```
+
On the left menu, and click next.
  
= DEMOs =
+
Output from VPP is displayed in a "terminal" style window.
  
== routing - directly connected routing ==
+
Commands can be copied to the clipboard for you to try yourself.
- Creates two network namespaces c1, c2
+
- A gateway interface for each on VPP
+
- Routes due to directly connected routes inserted into default FIB
+
  
== bridging - directly connected interfaces into a bridge-domain ==
+
[[File:Gui.png|800px|center|vppsb userdemo]]
- Creates two network namespaces c1, c2
+
- Adds interfaces to VPP and add them to bridge-domain 1
+
- MAC addresses are automatically learned
+
  
== tracing - how to show a "day in the life of a packet" in VPP ==
+
= ADDING YOUR OWN DEMO =
- Same environment as "routing" demo
+
* Map out list of text and commands you want to accompany it
- How to add a trace
+
* cd vppsb/vpp-userdemo/tutorials
- View a trace
+
* cp bridging mydemo
- Interpret a trace
+
* Modify any container IP addresses and gateways and the INSTR/CMD arrays
 +
C1_IP="172.16.1.2/24"
 +
C1_GW="172.16.1.1"
 +
C2_IP="172.16.1.3/24"
 +
C2_GW="172.16.1.1"
 +
 +
INSTR=()
 +
CMD=()
 +
INSTR+=("Welcome to the bridging demo. This will show you some simple commands to connect two linux containers to VPP via an L2 bridge.")
 +
CMD+=("")
 +
 +
INSTR+=("To show interfaces type:")
 +
CMD+=("sudo vppctl show inter")
 +
 +
INSTR+=("Lets examine our workloads cone and ctwo")
 +
CMD+=("sudo lxc-attach -n cone -- ip -o a")
 +
 
 +
INSTR+=("")
 +
CMD+=("sudo lxc-attach -n ctwo -- ip -o a")
 +
* Refresh GUI - it will be right there!

Latest revision as of 02:48, 16 September 2016

INTRO

This is a GUI driven demo environment for beginners with VPP


REQUIREMENTS

  • vagrant (1.8)
  • virtualbox / vmware fusion

GETTING STARTED

  • Clone the repo
 git clone https://gerrit.fd.io/r/vppsb
 cd vppsb/vpp-userdemo
  • Modify env.sh if needed and
 source ./env.sh
 vagrant up

RUNNING DEMOs

Select from

  • bridging
  • routing
  • tracing

On the left menu, and click next.

Output from VPP is displayed in a "terminal" style window.

Commands can be copied to the clipboard for you to try yourself.

vppsb userdemo

ADDING YOUR OWN DEMO

  • Map out list of text and commands you want to accompany it
  • cd vppsb/vpp-userdemo/tutorials
  • cp bridging mydemo
  • Modify any container IP addresses and gateways and the INSTR/CMD arrays
C1_IP="172.16.1.2/24"
C1_GW="172.16.1.1"
C2_IP="172.16.1.3/24"
C2_GW="172.16.1.1"

INSTR=() 
CMD=()
INSTR+=("Welcome to the bridging demo. This will show you some simple commands to connect two linux containers to VPP via an L2 bridge.")
CMD+=("")

INSTR+=("To show interfaces type:")
CMD+=("sudo vppctl show inter")

INSTR+=("Lets examine our workloads cone and ctwo")
CMD+=("sudo lxc-attach -n cone -- ip -o a")
 
INSTR+=("")
CMD+=("sudo lxc-attach -n ctwo -- ip -o a")
  • Refresh GUI - it will be right there!