summaryrefslogtreecommitdiffstats
path: root/doc/developer
diff options
context:
space:
mode:
authorChristian Hopps <chopps@labn.net>2023-06-08 19:47:01 +0200
committerChristian Hopps <chopps@labn.net>2023-06-09 09:19:20 +0200
commit3c43eaa7d487e3d0778f56abcf3a7ea3f7d94f67 (patch)
tree60ab0f8a443e6b9070ec15f7457376996ba85c8a /doc/developer
parentMerge pull request #13745 from FRRouting/revert-13509-bgp_nht_other_if_cases (diff)
downloadfrr-3c43eaa7d487e3d0778f56abcf3a7ea3f7d94f67.tar.xz
frr-3c43eaa7d487e3d0778f56abcf3a7ea3f7d94f67.zip
docker: ubuntu-ci 18.04 -> 22.04, topotest parallel run examples
Update the READMEs, and give example of a full parallel topotest run with result extraction for analyze.py Signed-off-by: Christian Hopps <chopps@labn.net>
Diffstat (limited to 'doc/developer')
-rw-r--r--doc/developer/building-docker.rst48
1 files changed, 33 insertions, 15 deletions
diff --git a/doc/developer/building-docker.rst b/doc/developer/building-docker.rst
index 4cf356049..3b1542b22 100644
--- a/doc/developer/building-docker.rst
+++ b/doc/developer/building-docker.rst
@@ -16,8 +16,8 @@ The following platform images are used to support Travis CI and can also
be used to reproduce topotest failures when the docker host is Ubuntu
(tested on 18.04 and 20.04):
-* Ubuntu 18.04
* Ubuntu 20.04
+* Ubuntu 22.04
The following platform images may also be built, but these simply install a
binary package from an existing repository and do not perform source builds:
@@ -130,57 +130,75 @@ No script, multi-arch (ex. amd64, arm64)::
-Building Ubuntu 18.04 Image
+Building Ubuntu 20.04 Image
---------------------------
Build image (from project root directory)::
- docker build -t frr-ubuntu18:latest -f docker/ubuntu18-ci/Dockerfile .
+ docker build -t frr-ubuntu20:latest --build-arg=UBUNTU_VERSION=20.04 -f docker/ubuntu-ci/Dockerfile .
+
+Running Full Topotest::
+
+ docker run --init -it --privileged --name frr -v /lib/modules:/lib/modules \
+ frr-ubuntu20:latest bash -c 'cd ~/frr/tests/topotests ; sudo pytest -nauto --dist=loadfile'
+
+Extract results from the above run into `run-results` dir and analyze::
+
+ tests/topotest/analyze.py -C frr -Ar run-results
Start the container::
- docker run -d --privileged --name frr-ubuntu18 --mount type=bind,source=/lib/modules,target=/lib/modules frr-ubuntu18:latest
+ docker run -d --init --privileged --name frr-ubuntu20 --mount type=bind,source=/lib/modules,target=/lib/modules frr-ubuntu20:latest
Running a topotest (when the docker host is Ubuntu)::
- docker exec frr-ubuntu18 bash -c 'cd ~/frr/tests/topotests/ospf-topo1 ; sudo pytest test_ospf_topo1.py'
+ docker exec frr-ubuntu20 bash -c 'cd ~/frr/tests/topotests/ospf-topo1 ; sudo pytest test_ospf_topo1.py'
Starting an interactive bash session::
- docker exec -it frr-ubuntu18 bash
+ docker exec -it frr-ubuntu20 bash
Stopping an removing a container::
- docker stop frr-ubuntu18 ; docker rm frr-ubuntu18
+ docker stop frr-ubuntu20 ; docker rm frr-ubuntu20
Removing the built image::
- docker rmi frr-ubuntu18:latest
+ docker rmi frr-ubuntu20:latest
-Building Ubuntu 20.04 Image
+Building Ubuntu 22.04 Image
---------------------------
Build image (from project root directory)::
- docker build -t frr-ubuntu20:latest -f docker/ubuntu20-ci/Dockerfile .
+ docker build -t frr-ubuntu22:latest -f docker/ubuntu-ci/Dockerfile .
+
+Running Full Topotest::
+
+ docker run --init -it --privileged --name frr -v /lib/modules:/lib/modules \
+ frr-ubuntu22:latest bash -c 'cd ~/frr/tests/topotests ; sudo pytest -nauto --dist=loadfile'
+
+Extract results from the above run into `run-results` dir and analyze::
+
+ tests/topotest/analyze.py -C frr -Ar run-results
Start the container::
- docker run -d --privileged --name frr-ubuntu20 --mount type=bind,source=/lib/modules,target=/lib/modules frr-ubuntu20:latest
+ docker run -d --init --privileged --name frr-ubuntu22 --mount type=bind,source=/lib/modules,target=/lib/modules frr-ubuntu22:latest
Running a topotest (when the docker host is Ubuntu)::
- docker exec frr-ubuntu20 bash -c 'cd ~/frr/tests/topotests/ospf-topo1 ; sudo pytest test_ospf_topo1.py'
+ docker exec frr-ubuntu22 bash -c 'cd ~/frr/tests/topotests/ospf-topo1 ; sudo pytest test_ospf_topo1.py'
Starting an interactive bash session::
- docker exec -it frr-ubuntu20 bash
+ docker exec -it frr-ubuntu22 bash
Stopping an removing a container::
- docker stop frr-ubuntu20 ; docker rm frr-ubuntu20
+ docker stop frr-ubuntu22 ; docker rm frr-ubuntu22
Removing the built image::
- docker rmi frr-ubuntu20:latest
+ docker rmi frr-ubuntu22:latest