-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
276 changed files
with
1,304 additions
and
264 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
error=0 | ||
|
||
function pr_bold() { | ||
echo -e "\033[1m$@\033[0m" | ||
} | ||
|
||
function run_on() { | ||
set +e | ||
docker-compose exec -T $1 bash -c "$2" | ||
|
||
if [ $? -eq 0 ]; then | ||
res="OK" | ||
else | ||
res="Failed" | ||
error=1 | ||
fi | ||
|
||
set -e | ||
|
||
pr_bold "$1: $2 $res" | ||
} | ||
|
||
docker-compose version | ||
|
||
cd tools/playground | ||
|
||
if [ "$CI" == "true" ]; then | ||
export INSTALL_FROM_SRC=1 | ||
fi | ||
|
||
docker-compose build | ||
|
||
docker-compose up -d | ||
|
||
# Let run.sh configure ARouteServer... | ||
echo -n "Waiting a bit till run.sh configures everything... " | ||
sleep 60 | ||
echo "OK, let's move now!" | ||
|
||
run_on rs 'birdc show protocols | grep BGP | grep Established | wc -l | grep 2' | ||
|
||
run_on alice_lg 'curl -L http://10.0.0.2:29184/protocols/bgp' | ||
|
||
run_on client_2 'birdc show route count | grep "2 of 2 routes for 2 networks"' | ||
run_on client_2 'birdc show route | grep 193.0.0.0/21 | grep "via 10.0.0.11"' | ||
|
||
# Valid routes on the RS. | ||
run_on rs 'birdc show route count | grep "3 of 3 routes for 3 networks"' | ||
|
||
for prefix in \ | ||
192.136.136.0/24 \ | ||
193.0.0.0/21 \ | ||
193.0.22.0/23 | ||
do | ||
run_on rs "birdc show route $prefix | grep $prefix" | ||
done | ||
|
||
# Filtered routes on the RS. | ||
run_on rs 'birdc show route filtered count | grep "4 of 4 routes for 4 networks"' | ||
|
||
for prefix in \ | ||
10.0.0.0/24 \ | ||
192.168.0.0/24 \ | ||
193.0.0.1/32 \ | ||
202.12.29.0/24 | ||
do | ||
run_on rs "birdc show route filtered $prefix | grep $prefix" | ||
done | ||
|
||
run_on rs "birdc show route filtered 10.0.0.0/24 all | grep '(64500, 65520, 3)'" | ||
run_on rs "birdc show route filtered 202.12.29.0/24 all | grep '(64500, 65520, 9)'" | ||
|
||
pr_bold "Testing localhost, Alice at port 8080..." | ||
curl -L http://127.0.0.1:8080 | grep 'Alice - The friendly BGP looking glass' | ||
pr_bold "Testing localhost, Alice at port 8080... OK" | ||
|
||
echo "" | ||
echo "" | ||
|
||
if [ $error -eq 0 ]; then | ||
pr_bold "Tests completed successfully!" | ||
exit 0 | ||
else: | ||
pr_bold "Tests failed :-(" | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Playground tests | ||
|
||
on: push | ||
|
||
jobs: | ||
test-playground: | ||
name: Playground tests | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Run Playground tests | ||
run: .github/test_playground.sh | ||
env: | ||
DEFAULT_BRANCH: main | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,20 @@ | ||
.. DO NOT EDIT: this file is automatically created by /utils/build_doc | ||
Tools | ||
===== | ||
.. include:: TOOLS_invalid_routes_reporter.rst | ||
|
||
Playground | ||
---------- | ||
|
||
This is a Docker-based playground that can be use to experiment with ARouteServer. | ||
|
||
It offers and environment with several actors, configured to represent specific scenarios that can often be found on a real IX platform: a route server, some clients that announce some good and some bad routes, a looking glass. | ||
|
||
The idea is to let the users play with the whole environment and see how easy it is to deploy a secure, feature-rich route server. | ||
|
||
For more information: https://github.com/pierky/arouteserver/tree/master/tools/playground | ||
|
||
Invalid routes reporter | ||
----------------------- | ||
|
||
This script is intended to be used as an `ExaBGP <https://github.com/Exa-Networks/exabgp>`_ process to elaborate and report/log invalid routes received by route servers that have been previously configured using the `"tag" reject policy option <https://arouteserver.readthedocs.io/en/latest/CONFIG.html#reject-policy>`_ of ARouteServer. | ||
|
||
For more information: https://invalidroutesreporter.readthedocs.io |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.