Total Pageviews

Thursday, 18 May 2023

网络路由软件 OpenR


路由软件 OpenR是Facebook开源的路由软件, 遵守 MIT 开源许可。OpenR已经在Facebook内部主干网和数据中心网络使用多年, 最初是为Facebook的 Terragraph 无线回程网络设计的,实际也能工作在数据网络中。OpenR 支持不同的网络拓扑和多种底层硬件软件系统,支持自动 IP 前缀分配、快速收敛、平滑重启等特性。可安装在Linux平台上,或在Docker中运行。

[repo owner=”facebook” name=”openr”]

------------------------------------------------------------------------------

 Distributed platform for building autonomic network functions.

OpenR: Open Routing

Support Ukraine Build Status Documentation Status

Open Routing, OpenR, is Facebook's internally designed and developed Interior Routing Protocol/Platform. OpenR was originally designed and built for performing routing on the Terragraph mesh network. OpenR's flexible design has led to its adoption in other networks, including Facebook's new WAN network, Express Backbone.

Documentation

Please refer to our extensive Documentation to get started with OpenR.

Library Examples

Please refer to the examples directory to see some useful ways to leverage the libraries to build software to run with OpenR.

Resources

Developer Group: https://www.facebook.com/groups/openr/

Contribute

Take a look at Developer Guide and CONTRIBUTING.md to get started contributing. The Developer Guide outlines best practices for code contribution and testing.

Requirements

We have tried OpenR on Ubuntu-16.04, Ubuntu-18.04 and CentOS 7/8. OpenR should work on all Linux based platforms.
  • Compiler supporting C++17 or higher

Build

Repo Directory Structure

At the top level of this repo are the build and openr directories. Under the former is a tool, gen, that contains scripts for building the project. The openr directory contains the source for the project.

Dependencies

OpenR requires these dependencies for your system and follows the traditional cmake build steps below.

  • cmake
  • gflags
  • gtest
  • libsodium
  • zstd
  • folly
  • fbthrift
  • re2-devel

One Step Build - Ubuntu

We've provided a script, build/build_openr.sh, tested on Ubuntu LTS releases. It uses gendeps.py to install all necessary dependencies, compile OpenR and install C++ binaries as well as python tools. Please modify the script as needed for your platform. Also, note that some library dependencies require a newer version than provided by the default package manager on the system and hence we are compiling them from source instead of installing via the package manager. Please see the script for those instances and the required versions.

Build Steps

# Install dependencies and build openr
bash ./build/build_openr.sh

# To Run tests (some tests requires sudo privileges)
python3 build/fbcode_builder/getdeps.py test \
  --src-dir=. \
  --project-install-prefix openr:/opt/facebook \
  openr

If you make any changes you can run cmake ../openr and make from the build directory to build openr with your changes.

Installing

openr builds both static and dynamic libraries and the install step installs libraries and all header files to /opt/facebook/openr/lib and /opt/facebook/openr/include/ along with python modules in your Python's site-packages directory. Note: the build_openr.sh script will run this step for you

  • Manually you can drive getdeps.py to install elsewhere
    • refer to build_openr.sh

Installing Python Libraries + CLI

You will need python pip or setuptools to build and install python modules. All library dependencies will be automatically installed except the fbthrift-python module which you will need to install manually using steps similar to those described below. This will install breeze, a cli tool to interact with OpenR.

  • Python install requires a fbthrift / thrift1 compiler to be installed and in PATH
cd openr/openr/py
python setup.py build
sudo python setup.py install
from https://github.com/facebook/openr

 
 

 

 

No comments:

Post a Comment