# openr **Repository Path**: mirrors_facebook/openr ## Basic Information - **Project Name**: openr - **Description**: Distributed platform for building autonomic network functions. - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-08-08 - **Last Updated**: 2026-10-21 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # OpenR: Open Routing [![Build Status](https://github.com/facebook/openr/workflows/linux/badge.svg)](https://github.com/facebook/openr/actions?workflow=linux) [![Documentation Status](https://readthedocs.org/projects/openr/badge/?version=latest)](https://openr.readthedocs.io/en/latest/?badge=latest) 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](https://terragraph.com/) 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](https://openr.readthedocs.io/) to get started with OpenR. ## Library Examples --- Please refer to the [`examples`](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/ - Github: https://github.com/facebook/openr/ - IRC: #openr on freenode ## Contribute --- Take a look at [`Developer Guide`](openr/docs/Developer_Guide/DeveloperGuide.md) and [`CONTRIBUTING.md`](CONTRIBUTING.md) to get started contributing. The Developer Guide outlines best practices for code contribution and testing. Any single change should be well tested for regressions and version compatibility. ## Code of Conduct --- The code of conduct is described in [`CODE_OF_CONDUCT.md`](CODE_OF_CONDUCT.md) ## Requirements --- We have tried `OpenR` on Ubuntu 24.04 LTS (earlier versions are no longer supported) and CentOS Stream 9. OpenR should work on all Linux based platforms. - Compiler supporting C++20 or higher - Python 3.10 or higher for the Breeze CLI ## 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 and compile and install the OpenR C++ binaries. 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 ```console # 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 The install step installs the Open/R binaries, generated Thrift libraries, source and generated Thrift headers under `/opt/facebook/openr`, and Python modules in your Python's `site-packages` directory. Open/R executables and tests link the granular component libraries directly; the build does not install a monolithic Open/R implementation library. 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 The Docker build runs `build/build_breeze.sh` to generate modern Thrift Python bindings, install their matching `fbthrift-python` runtime, and install the `breeze` CLI in an isolated virtual environment. `openr/py/setup.py` packages the staged source and generated bindings; it is not a standalone source-tree build entry point. ### Docker Building / Usage OpenR now has a `Dockerfile`. It uses `gendeps.py` to build all dependencies + OpenR. ```console docker build --network host . ``` #### Running You can specify a config file by bind mount a directory with a `openr.cfg` file in /config ```console docker run --name openr --network host openr_ubuntu ``` - To use a custom config bind mount `/config` into the container - OpenR binary will look for `/config/openr.conf` ### License OpenR is [MIT licensed](./LICENSE).