🎯 Objective: Discover and run ANTA
Make sure the two following commands return correctly
anta --version
anta --help
For every ANTA CLI command you can always run anta foo --help
to get more information.
Note if you are running in ATD, you can skip this step
- download cEOS in version 4.33.0F
ardl --token <ARISTA_TOKEN> get eos --version 4.33.0F --image-type cEOS --import-docker
Note The ARISTA_TOKEN value comes from your arista.com account profile
- Start the containerlab topology
# From the root of the repository
cd containerlab
sudo containerlab deploy
-
Review ANTA environment variables that will be set in
anta.env
# From the root of the repository cat anta.env
-
Load anta parameters
source anta.env
-
Run ANTA testing
anta nrfu --catalog 1-hello-world/catalog.yml
To see only the failures:
anta nrfu --catalog 1-hello-world/catalog.yml --hide success
-
Analyze the first results
There should be test failures on
spine1
andspine2
devices. -
Update the
catalog.yml
file:- Under test
VerifyBGPPeerCount
update the expected number of peers (num_peers
) of theevpn
address family to2
for thespines
devices - Under test
VerifyLoopbackCount
update the expected number of loopbacks to1
for thespines
devices
- Under test
-
Run ANTA again, there should be no failures now
anta nrfu --catalog 1-hello-world/catalog.yml
Run testing only on leaf devices
anta nrfu --catalog 1-hello-world/catalog.yml --tags leaf
-
Review the list of command to collect
cat 1-hello-world/snapshot.yml
Commands can be collected in JSON or TEXT format.
-
Collect commands using ANTA
anta exec snapshot -c 1-hello-world/snapshot.yml
ANTA CLI documentation