Skip to content

Commit

Permalink
Move the default to bgpq4
Browse files Browse the repository at this point in the history
  • Loading branch information
pierky committed Feb 27, 2021
1 parent 8469295 commit fd73ba9
Show file tree
Hide file tree
Showing 11 changed files with 43 additions and 31 deletions.
9 changes: 9 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@ Change log

.. note:: **Upgrade notes**: after upgrading, run the ``arouteserver setup-templates`` command to sync the local templates with those distributed with the new version. More details on the `Upgrading <https://arouteserver.readthedocs.io/en/latest/INSTALLATION.html#upgrading>`__ section of the documentation.

next release
------------

- Improvement: change the default value of ``bgpq3_path`` to ``bgpq4``.

The ``bgpq4`` tool is now referenced as the default one in the ``bgpq3_path`` configuration line of arouteserver.yml.

**Please note**: if that line was not explicitly configured and was left to its default value, users will either need to be sure that ``bgpq4`` is available on the system or they will need to configure it.

v1.3.0
------

Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ How it works
- "RIPE::AS-FOO"
...
#. ARouteServer acquires external information to enrich them: i.e. `bgpq3`_/`bgpq4`_ for IRR data, `PeeringDB`_ for max-prefix limit and AS-SETs, ...
#. ARouteServer acquires external information to enrich them: i.e. `bgpq4`_/`bgpq3`_ for IRR data, `PeeringDB`_ for max-prefix limit and AS-SETs, ...

#. `Jinja2`_ built-in templates are used to render the final route server's configuration file.

Expand Down
14 changes: 8 additions & 6 deletions config.d/arouteserver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,18 @@
# Directory where cached data are stored.
#cache_dir: "cache"

# Path to the 'bgpq3' external program.
# Path to the 'bgpq4'/'bgpq3' external program.
# Going against the Principle of least astonishment,
# the value of this configuration line can also
# be set to the path of the 'bgpq4' program.
# be set to the path of the 'bgpq4' program, even
# though the name of the config knob seems pretty
# specific.
#
# Version 0.1.35 or newer is suggested for bgpq3.
# Version 0.0.5 or newer is required for bgpq4.
#bgpq3_path: "bgpq3"
# Version 0.1.35 or newer is suggested for bgpq3.
#bgpq3_path: "bgpq4"

# Host running IRRD software used by bgpq3/bgpq4.
# Host running IRRD software used by bgpq4/bgpq3.
# (-h argument).
# Use "host:port" to specify alternate port.
# Please note: to use rr.ntt.net at least bgpq3 0.1.35
Expand All @@ -49,7 +51,7 @@
# https://arouteserver.readthedocs.io/en/latest/INSTALLATION.html#external-programs
#bgpq3_host: "rr.ntt.net"

# Sources used by bgpq3/bgpq4.
# Sources used by bgpq4/bgpq3.
# (-S argument).
#bgpq3_sources: "RIPE,APNIC,AFRINIC,ARIN,NTTCOM,ALTDB,BBOI,BELL,JPIRR,LEVEL3,RADB,RGNET,TC"

Expand Down
4 changes: 2 additions & 2 deletions docs/CONFIG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ In this scenario, the route server's configuration will look like this:
IRRDBs-based filtering
**********************

The ``filtering.irrdb`` section of the configuration files allows to use IRRDBs information to filter or to tag routes entering the route server. Information are acquired using the external program `bgpq3 <https://github.com/snar/bgpq3>`_ or `bgpq4 <https://github.com/bgp/bgpq4>`_: installations details on :doc:`INSTALLATION` page.
The ``filtering.irrdb`` section of the configuration files allows to use IRRDBs information to filter or to tag routes entering the route server. Information are acquired using the external program `bgpq4 <https://github.com/bgp/bgpq4>`_ or `bgpq3 <https://github.com/snar/bgpq3>`_: installations details on :doc:`INSTALLATION` page.

One or more AS-SETs can be used to gather information about authorized origin ASNs and prefixes that a client can announce to the route server. AS-SETs can be set in the ``clients.yml`` file on a two levels basis:

Expand Down Expand Up @@ -183,7 +183,7 @@ Example:
- asn: 44
ip: "192.0.2.44"
With this configuration, the following values will be used to run the bgpq3/bgpq4 program:
With this configuration, the following values will be used to run the bgpq4/bgpq3 program:

- **AS-AS11NETS** will be used for 192.0.2.11 (it's configured at client-level for that client);
- **AS-AS22MAIN** for the 192.0.2.22 client (it's inherited from the ``asns``-level configuration of AS22, client's AS);
Expand Down
2 changes: 1 addition & 1 deletion docs/FEATURES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ How it works
- "RIPE::AS-FOO"
...
#. ARouteServer acquires external information to enrich them: i.e. `bgpq3`_/`bgpq4`_ for IRR data, `PeeringDB`_ for max-prefix limit and AS-SETs, ...
#. ARouteServer acquires external information to enrich them: i.e. `bgpq4`_/`bgpq3`_ for IRR data, `PeeringDB`_ for max-prefix limit and AS-SETs, ...

#. `Jinja2`_ built-in templates are used to render the final route server's configuration file.

Expand Down
26 changes: 13 additions & 13 deletions docs/INSTALLATION.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Some components used by ARouteServer need Python dev header files and static lib
# CentOS
yum -y install gcc python-devel
Please note that ARouteServer also needs `bgpq3 <https://github.com/snar/bgpq3>`_ or `bgpq4 <https://github.com/bgp/bgpq4>`_ to build IRR-based filters: details on its installation can be found within the :ref:`External programs` section.
Please note that ARouteServer also needs `bgpq4 <https://github.com/bgp/bgpq4>`_ (preferred) or `bgpq3 <https://github.com/snar/bgpq3>`_ to build IRR-based filters: details on their installation can be found within the :ref:`External programs` section.

Install using ``pip`` (suggested)
---------------------------------
Expand Down Expand Up @@ -104,29 +104,29 @@ External programs

ARouteServer uses the following external programs:

- (mandatory) `bgpq3 <https://github.com/snar/bgpq3>`_ or `bgpq4 <https://github.com/bgp/bgpq4>`_ are used to gather information from IRRDBs: at least one of them must be installed on the system where ARouteServer is executed.
- (mandatory) `bgpq4 <https://github.com/bgp/bgpq4>`_ or `bgpq3 <https://github.com/snar/bgpq3>`_ are used to gather information from IRRDBs: at least one of them must be installed on the system where ARouteServer is executed.

To install bgpq3:
To install bgpq4:

.. code:: bash
mkdir /path/to/bgpq3/directory
cd /path/to/bgpq3/directory
git clone https://github.com/snar/bgpq3.git ./
# make and gcc packages required
mkdir /path/to/bgpq4/directory
cd /path/to/bgpq4/directory
git clone https://github.com/bgp/bgpq4.git ./
# automake, autoconf, make and gcc packages required
./bootstrap
./configure
make
sudo make install
To install bgpq4:
To install bgpq3:

.. code:: bash
mkdir /path/to/bgpq4/directory
cd /path/to/bgpq4/directory
git clone https://github.com/bgp/bgpq4.git ./
# automake, autoconf, make and gcc packages required
./bootstrap
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
sudo make install
Expand Down
2 changes: 1 addition & 1 deletion docs/REALTESTS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Some *realistic* scenarios have been tested using ARouteServer by feeding it wit

- BCIX, VLAN ID 1 ("BCIX Peering LAN")

- BIX, VLAN ID 1 ("IPv4 Peering LAN") and 2 ("IPv6 Peering LAN")
- BIX, VLAN ID 1 ("IPv4 Peeing LAN") and 2 ("IPv6 Peeing LAN")

- GR-IX

Expand Down
2 changes: 1 addition & 1 deletion pierky/arouteserver/config/program.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class ConfigParserProgram(object):
"cache_dir": "cache",
"cache_expiry": CachedObject.DEFAULT_EXPIRY,

"bgpq3_path": "bgpq3",
"bgpq3_path": "bgpq4",
"bgpq3_host": IRRDBInfo.BGPQ3_DEFAULT_HOST,
"bgpq3_sources": IRRDBInfo.BGPQ3_DEFAULT_SOURCES,

Expand Down
2 changes: 1 addition & 1 deletion tests/static/test_cfg_program.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def test_010_load_distributed_file(self):
("templates_dir", "config.d/templates"),
("template_name", "main.j2"),
("cache_dir", "config.d/cache"),
("bgpq3_path", "bgpq3"),
("bgpq3_path", "bgpq4"),
("bgpq3_host", "rr.ntt.net"),
("bgpq3_sources", ("RIPE,APNIC,AFRINIC,ARIN,NTTCOM,ALTDB,BBOI,"
"BELL,JPIRR,LEVEL3,RADB,RGNET,TC")),
Expand Down
2 changes: 1 addition & 1 deletion tools/playground/SETUP_GUIDELINES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ First, we need to connect to the docker instance where the route server and ARou
$ docker-compose exec rs bash
All the dependencies needed by ARouteServer (basically just Python and `bgpq3 <https://github.com/snar/bgpq3>`__ or `bgpq4 <https://github.com/bgp/bgpq4>`__) are already installed inside the Docker image (see `rs/Dockerfile <rs/Dockerfile>`__).
All the dependencies needed by ARouteServer (basically just Python and `bgpq4 <https://github.com/bgp/bgpq4>`__) are already installed inside the Docker image (see `rs/Dockerfile <rs/Dockerfile>`__).

We just need to setup the program and configure it.

Expand Down
9 changes: 5 additions & 4 deletions tools/playground/rs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@ COPY birdwatcher.conf /etc/birdwatcher/birdwatcher.conf
# ARouteServer dependencies: bgpq3
# --------------------------------

RUN mkdir /bgpq3 && \
cd /bgpq3 && \
git clone https://github.com/snar/bgpq3.git ./ && \
RUN mkdir /bgpq4 && \
cd /bgpq4 && \
git clone https://github.com/bgp/bgpq4.git ./ && \
./bootstrap && \
./configure && \
make && \
make install
Expand All @@ -46,7 +47,7 @@ RUN pip3 install --upgrade pip setuptools wheel

# INSTALL_FROM_GITHUB_SHA is used by the
# test suite to perform the installation of
# ARouteServer from source. If can be ignored
# ARouteServer from source. It can be ignored
# for the regular use of this playground.
RUN if [ -z "$INSTALL_FROM_GITHUB_SHA" ]; \
then \
Expand Down

0 comments on commit fd73ba9

Please sign in to comment.