Skip to content

Latest commit

 

History

History

1-hello-world

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

ANTA Hello World

🎯 Objective: Discover and run ANTA

Preparation

Checking ANTA installation

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.

Starting containerlab

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

Network Ready for Use

  1. Review ANTA environment variables that will be set in anta.env

    # From the root of the repository
    cat anta.env
  2. Load anta parameters

    source anta.env
  3. 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
  4. Analyze the first results

    There should be test failures on spine1 and spine2 devices.

  5. Update the catalog.yml file:

    • Under test VerifyBGPPeerCount update the expected number of peers (num_peers) of the evpn address family to 2 for the spines devices
    • Under test VerifyLoopbackCount update the expected number of loopbacks to 1 for the spines devices
  6. Run ANTA again, there should be no failures now

    anta nrfu --catalog 1-hello-world/catalog.yml

Focusing on Leaf devices

Run testing only on leaf devices

anta nrfu --catalog 1-hello-world/catalog.yml --tags leaf

Collect a batch of command outputs from the devices

  1. Review the list of command to collect

    cat 1-hello-world/snapshot.yml

    Commands can be collected in JSON or TEXT format.

  2. Collect commands using ANTA

    anta exec snapshot -c 1-hello-world/snapshot.yml

Next steps

ANTA CLI documentation