-
Notifications
You must be signed in to change notification settings - Fork 707
VPP Setting_Up_Your_Dev_Environment
- 1 Intro
- 2 Install The Enviroment
- 3 Obtain The VPP Source Code
- 4 Using ssh
- 5 Using https
- 6 Install cscope
- 7 Customize Vagrant
- 8 Restconf/Netconf
- 9 Next Steps
This page has been superceded by Pulling, Building, Running, Hacking, and Pushing VPP Code which should have more up to date information.
You will need a virtual machine (Linux being the guest) and Vagrant software to host and launch the build environment. Vagrant is optional but makes your life easier.
The default configuration supports VMWare and VirtualBox. You will need to install *one* of them.
VirtualBox is free. You can download and install VirtualBox from here.
VMWare runs faster than VirtualBox, but requires purchase. You can acquire VMWare Fusion (Mac) or VMWare Workstation (Windows)
VMware runs faster than VirtualBox. To use VMware you will need to obtain a VMware plugin for Vagrant. You can learn more about support for VMware from the Vagrant documentation: https://docs.vagrantup.com/v2/vmware/.
LibVirt / qemu-kvm has been tested in development but is not officially supported. NOTE: The following vagrant plugin is useful if using libvirt: https://github.com/sciurus/vagrant-mutate
Install the Vagrant software: https://docs.vagrantup.com/v2/installation/index.html
Optional: To cache apt/yum (for faster Vagrant VM rebuild), install vagrant-cachier.
At the unix command line run:
vagrant plugin install vagrant-cachier
vagrant box add --provider virtualbox https://app.vagrantup.com/puppetlabs/boxes/ubuntu-16.04-64-nocm
vagrant box add --provider virtualbox https://atlas.hashicorp.com/puppetlabs/centos-7.2-64-nocm
Optionally install vagrant-mutate to convert virtualbox vagrant image to other provider formats (virtualbox, kvm, libvirt)
vagrant plugin install vagrant-mutate
Make sure you have registered your ssh key with gerrit.
Get the VPP source code.
a. Open a command-line interface (terminal window).
b. Change to the directory where you want to install VPP
cd $HOME/source/vpp
c. Type the following git command (replacing USERNAME with your Linux Foundation username):
git clone ssh://[email protected]:29418/vpp.git
Get the VPP source code.
a. Open a command-line interface (terminal window).
b. Change to the directory where you want to install VPP
cd $HOME/source/vpp
c. Type the following git command:
git clone https://gerrit.fd.io/r/vpp
cscope is a tool that can make browsing the code base much easier but it is not a requirement to run or to build VPP.
a. Install cscope on your mac following the instructions at: [https://ports.macports.org/port/cscope/]
b. Go to the directory where you have installed VPP
cd $HOME/source/vpp
c. Run the following commands to create a cscope database file
find . -path .git -prune -o -name "*.[ch]" -print > cscope.files
cscope -b -q -k
d. Now you can explore the code base using cscope (-d command tells it not to regenerate the database)
cscope -d
e. For more information on how to use csocpe, check out http://cscope.sourceforge.net/
Check out http://cscope.sourceforge.net/ for instructions on how to download and install on Windows
The vagrant file included needs to be updated as follows. The file can be found at build-root/vagrant/Vagrantfile
vi ./build-root/vagrant/Vagrantfile
You may wish to increase the number of CPU, amount of memory, or otherwise configure the Vagrant VM you're about to create. You can do so after creating the VM, as well. (note: builds may hang on virtualbox with 4096, increasing to 8092 solves this.)
Depending on which provider you are using, you can edit the appropriate section and set the memory or num of cpus
config.vm.provider "virtualbox" do |vb|
vb.memory = "4096"
end
config.vm.provider "vmware_fusion" do |fusion,override|
fusion.vmx["memsize"] = "4096"
end
config.vm.provider "vmware_workstation" do |vws,override|
vws.vmx["memsize"] = "8192"
vws.vmx["numvcpus"] = "4"
end
The VPP_VAGRANT_NICS environment variable holds the number of networks to spin up in the guest environment
When running behind a proxy/firewall, you may need to set http_proxy and https_proxy in the environment. You can use the export command to make the following environmental variables available to child processes:
export http_proxy=http://<proxy-server>:<port>
export https_proxy=https://<proxy-server>:<port>
Vagrant can do this for you by installing proxyconf:
vagrant plugin install vagrant-proxyconf
An issue was observed on Mac OS X where shared files are not properly working in Virtual Box. The workaround is to define *absolute* paths in the VagrantFile.
- config.vm.synced_folder "../../", "/vpp", disabled: false
+ config.vm.synced_folder "/absolute/path/to/vpp/build-root/vagrant/", "/vagrant", disabled: false
+ config.vm.synced_folder "/absolute/path/to/vpp", "/vpp", disabled: false
Lisp ONE functionality can be also used with use of Restconf/Netconf protocols and Honeycomb project.
For further details how to setup Honeycomb with VPP follow this [1] guide.
Try some of the following tutorials:
Build, install, and test images
- VPP 2022 Make Test Use Case Poll
- VPP-AArch64
- VPP-ABF
- VPP Alternative Builds
- VPP API Concepts
- VPP API Versioning
- VPP-ApiChangeProcess
- VPP-ArtifactVersioning
- VPP-BIER
- VPP-Bihash
- VPP-BugReports
- VPP Build System Deep Dive
- VPP Build, Install, And Test Images
- VPP-BuildArtifactRetentionPolicy
- VPP-c2cpel
- VPP Code Walkthrough VoD
- VPP Code Walkthrough VoD Topic Index
- VPP Code Walkthrough VoDs
- VPP-CodeStyleConventions
- VPP-CodingTips
- VPP Command Line Arguments
- VPP Command Line Interface CLI Guide
- VPP-CommitMessages
- VPP-Committers-SMEs
- VPP-CommitterTasks-ApiFreeze
- VPP CommitterTasks Compare API Changes
- VPP-CommitterTasks-CutPointRelease
- VPP-CommitterTasks-CutRelease
- VPP-CommitterTasks-FinalReleaseCandidate
- VPP-CommitterTasks-PullThrottleBranch
- VPP-CommitterTasks-ReleasePlan
- VPP Configuration Tool
- VPP Configure An LW46 MAP E Terminator
- VPP Configure VPP As A Router Between Namespaces
- VPP Configure VPP TAP Interfaces For Container Routing
- VPP-CoreFileMismatch
- VPP-cpel
- VPP-cpeldump
- VPP-CurrentData
- VPP-DHCPKit
- VPP-DHCPv6
- VPP-DistributedOwnership
- VPP-Documentation
- VPP DPOs And Feature Arcs
- VPP EC2 Instance With SRIOV
- VPP-elog
- VPP-FAQ
- VPP Feature Arcs
- VPP-Features
- VPP-Features-IPv6
- VPP-FIB
- VPP-g2
- VPP Getting VPP 16.06
- VPP Getting VPP Release Binaries
- VPP-HA
- VPP-HostStack
- VPP-HostStack-BuiltinEchoClientServer
- VPP-HostStack-EchoClientServer
- VPP-HostStack-ExternalEchoClientServer
- VPP HostStack Hs Test
- VPP-HostStack-LDP-iperf
- VPP-HostStack-LDP-nginx
- VPP-HostStack-LDP-sshd
- VPP-HostStack-nginx
- VPP-HostStack-SessionLayerArchitecture
- VPP-HostStack-TestHttpServer
- VPP-HostStack-TestProxy
- VPP-HostStack-TLS
- VPP-HostStack-VCL
- VPP-HostStack-VclEchoClientServer
- VPP-Hotplug
- VPP How To Add A Tunnel Encapsulation
- VPP How To Build The Sample Plugin
- VPP How To Connect A PCI Interface To VPP
- VPP How To Create A VPP Binary Control Plane API
- VPP How To Deploy VPP In EC2 Instance And Use It To Connect Two Different VPCs
- VPP How To Optimize Performance %28System Tuning%29
- VPP How To Use The API Trace Tools
- VPP How To Use The C API
- VPP How To Use The Packet Generator And Packet Tracer
- VPP-Howtos
- VPP-index
- VPP Installing VPP Binaries From Packages
- VPP Interconnecting vRouters With VPP
- VPP Introduction To IP Adjacency
- VPP Introduction To N Tuple Classifiers
- VPP IP Adjacency Introduction
- VPP-IPFIX
- VPP-IPSec
- VPP IPSec And IKEv2
- VPP IPv6 SR VIRL Topology File
- VPP Java API
- VPP Java API Plugin Support
- VPP Jira Workflow
- VPP-Macswapplugin
- VPP-MakeTestFramework
- VPP-Meeting
- VPP-MFIB
- VPP Missing Prefetches
- VPP Modifying The Packet Processing Directed Graph
- VPP MPLS FIB
- VPP-NAT
- VPP Nataas Test
- VPP-OVN
- VPP Per Feature Notes
- VPP Performance Analysis Tools
- VPP-perftop
- VPP Progressive VPP Tutorial
- VPP Project Meeting Minutes
- VPP Pulling, Building, Running, Hacking And Pushing VPP Code
- VPP Pure L3 Between Namespaces With 32s
- VPP Pure L3 Container Networking
- VPP Pushing And Testing A Tag
- VPP Python API
- VPP-PythonVersionPolicy
- VPP-QuickTrexSetup
- VPP Random Hints And Kinks For KVM Usage
- VPP Release Plans Release Plan 16.09
- VPP Release Plans Release Plan 17.01
- VPP Release Plans Release Plan 17.04
- VPP Release Plans Release Plan 17.07
- VPP Release Plans Release Plan 17.10
- VPP Release Plans Release Plan 18.01
- VPP Release Plans Release Plan 18.04
- VPP Release Plans Release Plan 18.07
- VPP Release Plans Release Plan 18.10
- VPP Release Plans Release Plan 19.01
- VPP Release Plans Release Plan 19.04
- VPP Release Plans Release Plan 19.08
- VPP Release Plans Release Plan 20.01
- VPP Release Plans Release Plan 20.05
- VPP Release Plans Release Plan 20.09
- VPP Release Plans Release Plan 21.01
- VPP Release Plans Release Plan 21.06
- VPP Release Plans Release Plan 21.10
- VPP Release Plans Release Plan 22.02
- VPP Release Plans Release Plan 22.06
- VPP Release Plans Release Plan 22.10
- VPP Release Plans Release Plan 23.02
- VPP Release Plans Release Plan 23.06
- VPP Release Plans Release Plan 23.10
- VPP Release Plans Release Plan 24.02
- VPP Release Plans Release Plan 24.06
- VPP Release Plans Release Plan 24.10
- VPP Release Plans Release Plan 25.02
- VPP Release Plans Release Plan 25.06
- VPP Release Plans Release Plan 25.10
- VPP Release Plans Release Plan 26.02
- VPP Release Plans Release Plan 26.06
- VPP-RM
- VPP-SecurityGroups
- VPP Segment Routing For IPv6
- VPP Segment Routing For MPLS
- VPP Setting Up Your Dev Environment
- VPP-SNAT
- VPP Software Architecture
- VPP STN Testing
- VPP The VPP API
- VPP Training Events
- VPP-Troubleshooting
- VPP-Troubleshooting-BuildIssues
- VPP-Troubleshooting-Vagrant
- VPP Tutorial DPDK And MacSwap
- VPP Tutorial Routing And Switching
- VPP-Tutorials
- VPP Use VPP To Chain VMs Using Vhost User Interface
- VPP Use VPP To Connect VMs Using Vhost User Interface
- VPP Using mTCP User Mode TCP Stack With VPP
- VPP Using VPP As A VXLAN Tunnel Terminator
- VPP Using VPP In A Multi Thread Model
- VPP-VOM
- VPP VPP BFD Nexus
- VPP VPP Home Gateway
- VPP VPP WIKI DEPRECATED CONTENT
- VPP-VPPCommunicationsLibrary
- VPP-VPPConfig
- VPP What Is ODP4VPP
- VPP What Is VPP
- VPP Working Environments
- VPP Working With The 16.06 Throttle Branch