Some components used by ARouteServer need Python dev header files and static libraries: some distributions have them already included, others may need to manually install them:
# Debian Jessie, Ubuntu Trusty apt-get install python-dev # for Python 2 apt-get install python3-dev # for Python 3 # CentOS yum -y install gcc python-devel
If you plan to just use the program to build configurations or to run your own live tests scenarios, you can install it using
Strongly suggested: setup a Virtualenv.
# on Debian/Ubuntu: sudo apt-get install python-pip python-virtualenv # on CentOS: sudo yum install epel-release sudo yum install python-pip python-virtualenv # setup a virtualenv mkdir -p ~/.virtualenvs/arouteserver virtualenv ~/.virtualenvs/arouteserver source ~/.virtualenvs/arouteserver/bin/activate # install the program pip install arouteserver
If you receive the following error while installing the program (or its requirements): error in setup command: ‘install_requires’ must be a string or list of strings containing valid project/version requirement specifiers then please upgrade the setuptools package that is used in your virtualenv:
pip install --upgrade setuptools.
In the case the pip installation process breaks with the Failed building wheel for py-radix / fatal error: Python.h: No such file or directory error, please verify that the dependencies are satisfied.
Install from GitHub¶
If you plan to run built-in Live tests on your own or to contribute to the project, clone the GitHub repository locally and install dependencies:
mkdir -p ~/src/arouteserver cd ~/src/arouteserver # use the URL of your fork here: git clone https://github.com/USERNAME/arouteserver.git ./ export PYTHONPATH="`pwd`" pip install -r requirements.txt
Setup and initialization¶
Setup your system layout (confirmation will be asked before each action):
# if you used pip arouteserver setup # if you installed from GitHub export PYTHONPATH="`pwd`" ./scripts/arouteserver setup
The program will ask you to create some directories (under
~/arouteserverby default) and to copy some files there. These paths can be changed by editing the
arouteserver.ymlprogram configuration file or by using command line arguments. More information in the configuration section.
Define the route server configuration policies, using the
configurecommand or manually by editing the
# if you used pip arouteserver configure # if you installed from GitHub ./scripts/arouteserver configure
configurecommand asks some questions about the route server environment (ASN, router ID, local subnets) and then it builds a policy definition file based on best practices and suggestions which also includes a rich BGP communities list.
ARouteServer uses the following external programs:
(mandatory) bgpq3 is used to gather information from IRRDBs.
To install it:
mkdir /path/to/bgpq3/directory cd /path/to/bgpq3/directory git clone https://github.com/snar/bgpq3.git ./ # make and gcc packages required ./configure make make install
To install it, please refer to its official guide.
To install it:
apt-get install qemu-kvm virtinst
More details: https://wiki.debian.org/KVM
To install them:
curl -o rtrlib.zip -L https://github.com/rtrlib/rtrlib/archive/v0.3.6.zip unzip rtrlib.zip cd rtrlib-0.3.6 && \ cmake -D CMAKE_BUILD_TYPE=Release . && \ make && \ make install curl -o bird-rtrlib-cli.zip -L https://github.com/rtrlib/bird-rtrlib-cli/archive/v0.1.1.zip unzip bird-rtrlib-cli.zip cd bird-rtrlib-cli-0.1.1 && \ cmake . && \ make
More details: https://github.com/rtrlib/rtrlib/wiki/Installation
To configure bird-rtrlib-cli please refer to the README.
Often upgrades bring new features and new options, sometimes they also introduce changes that might break backward compatibility with previous versions.
It is advisable to always check the CHANGELOG to verify what’s new: the
arouteserver show_config command can also be used to verify if new configuration options are available and how they are set by default.
To upgrade the program, download the new version…
# if you cloned the repository from GitHub, # from within the local repository's directory: git pull origin master # if you installed it with pip: pip install --upgrade arouteserver
… then sync the local templates with those distributed in the new version:
If local templates have been edited, make a backup of your files in order to merge your changes in the new ones later. To customize the configuration of the route server with your own options, please consider using Site-specific custom configuration files instead of editing the template files.
Development and pre-release versions¶
Consider your needs carefully before using a version other than the current production versions. These are preview releases, and their use is not recommended in production settings.
The dev branch is used for the development of the project, while the master branch always contains the latest, (hopefully) stable production-ready code.
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple --pre arouteserver