VPP/Pulling, Building, Running, Hacking and Pushing VPP Code

From fd.io
< VPP
Revision as of 14:30, 28 April 2016 by Hagbard (Talk | contribs)

Jump to: navigation, search

Intro

This page tries to give you a quick start guide for Pulling, Building, Running, Hacking, and Pushing VPP Code.

Pulling

fd.io uses Gerrit, a code review front end on git You can pull and push code via ssh or https. ssh is recommended.

Pulling anonymously (https)

You can pull the code anonymously using:

git clone https://gerrit.fd.io/r/vpp

This is the fastest way to get the code, but you cannot *push* anonymously, and so you are going to have to establish an account when you get to the point of pushing code.

Pulling code via ssh

The recommended way to pull code is via ssh. This requires you to setup an account and set up gerrit.

Setting up an account

fd.io uses the Linux Foundations identity system. If you do not already have an LF account, proceed to: https://identity.linuxfoundation.org/ to create one. If you do, you can use your Linux Foundation username and password for all logins at fd.io.

Setting up Gerrit

Make sure you have registered your ssh key with gerrit.

Pulling the code

Type the following git command (replacing USERNAME with your Linux Foundation username):

git clone ssh://USERNAME@gerrit.fd.io:29418/vpp.git

Building

Linux

VPP can be built, packaged and run on either Debian based (Ubuntu,etc) or RPM based (Centos,etc) out of the box.

Building the first time

In order to insure up to date instructions for setting up and building the first time, VPP has a script

build-root/vagrant/build.sh

which installs any dependencies, builds the proper packaging for your local Linux distribution, and installs those packages. Simply running this script should get you going fast. It is the same file used to install dependencies, build, and install packages when the vagrant environment is used. It is also a useful place to crib from for how to do those individual steps.

Subsequent Builds

Once you've gone through your first build successfully, there are detailed instructions on building, installing, and testing packages here: https://wiki.fd.io/view/VPP/Build,_install,_and_test_images#Build_A_VPP_Package

Mac OS

If you are working on a Mac, you will want to stand up a Linux VM. If you have a Linux VM already, please feel free to simply utilize the 'Linux' instructions. If you do not yet have a Linux VM, VPP provides a 'vagrant' setup to help you quickly and simply get one.

Setting Up Vagrant

Follow the instructions for setting up Vagrant