travelping / upg-vpp

User Plane Gateway (UPG) based on VPP
Apache License 2.0
146 stars 51 forks source link

How to build upg? #202

Open hanjl93 opened 2 years ago

hanjl93 commented 2 years ago

I would like to deploy UPG-VPP. However, I can't find the necessary instructions to build and run UPG-VPP, nor how to configure it?

raoufkh commented 2 years ago

I would love to see the documentation of the project. With instructions and dependencies to build, and instructions and dependencies to run and to configure the UPF

stepin104796 commented 2 years ago

We are trying to build upg, but couldn't find proper steps to build and run it on a system or any Virtual machine. Can someone share the steps to build upg?

And there is no vpp directory in this upg repo. Do we have to clone that vpp from fd.io and paste it into the upg repo?

nickvsnetworking commented 2 years ago

+1 on this - I've tried and haven't been able to get the build instructions working, if someone can give me a point in the right direction I'm happy to document the procedure for all...

mitmitmitm commented 2 years ago

Yeah, readme claims that make image builds an image, but it errors out due to inaccessible base image.

hcbwiz commented 12 months ago

the latest upg-vpp depends on vpp 22.02 branch

Different linux distributions may need different modifications. Based on ubuntu 22.04 LTS, you can reference here:

Note: I have forked the related projects in my github account that can maintain these modifications easily.

Prepare system: step 1: install ubuntu 22.04 server edition, choice the smallest installation is fine. step 2: sudo apt-get install build-essential git meson ninja-build step 3: sudo apt-get install libhyperscan-dev //for upg-vpp

Build VPP:

  1. git clone https://github.com/hcbwiz/vpp.git
  2. cd vpp
  3. git checkout -b v22.02_ubuntu_2204 origin/v22.02_ubuntu_2204 Note: upg-vpp depends on vpp v22.02 stable release
  4. make install-dep
  5. make install-ext-deps Note: this step will build external deb packages like DPDK and etc. the package name is "vpp-ext-deps", it will be installed automacally.
  6. pip install setuptools==58.2.0 Note: vpp uses "old version" of setuptools, this step will rollback to older version
  7. make build //for debug => output: VPP_SRC_DIR/build-root/install-vpp_debug-native/vpp make build-release //for relase output VPP_SRC_DIR/build-root/install-vpp-native/vpp

    Build UPG-VPP:

    1. git clone https://github.com/hcbwiz/upg-vpp.git
    2. cd upg-vpp
    3. git checkout -b master_ubuntu_2204 origin/master_ubuntu_2204
    4. make version
    5. mkdir build; cd build
    6. cmake -DVPP_HOME="vpp build path" ../ note: vpp build for release => VPP_SRC_DIR/build-root/install-vpp-native/vpp vpp build for debug => VPP_SRC_DIR/build-root/install-vpp_debug-native/vpp
    7. make note: it will generate the plugin at here: build/upf_plugin.so
s5uishida commented 9 months ago

Hi @hcbwiz

I installed UPG-VPP according to the steps you pointed out, but unfortunately it didn't work in my environment.

Therefore, I selected Ubuntu 20.04 as shown in the Dockerfile of FPP-VPP, installed it on the host as follows, and confirmed the operation.

https://github.com/s5uishida/install_vpp_upf_dpdk#annex_1

Best regards,

--Shigeru

ztms123 commented 8 months ago

sudo apt-get install libhyperscan-dev

@hcbwiz please ask
when i Execute the command

make install-ext-deps

and
image

hcbwiz commented 8 months ago

@ztms123 Did you change to root?

northmirko commented 2 months ago

Hello,

after building upf_plugin.so is it enough to copy upf_plugin.so to folder VPP_SRC_DIR/build-root/install-vpp-native/vpp/lib/x86_64-linux-gnu/vpp_plugins/ ? and then do the packaging with: make pkg-deb in VPP_SRC_DIR