Skip to content

Commit

Permalink
Update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
carl-baillargeon committed Nov 7, 2024
1 parent d95cb52 commit 3dede8b
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 1 deletion.
55 changes: 54 additions & 1 deletion docs/advanced_usages/scaling.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@
- [Tag-Based Implementation](#tag-based-implementation)
- [Performance Considerations](#performance-considerations)
- [Parallel Job Control](#parallel-job-control)
- [JSON vs YAML](#json-vs-yaml)
- [Results Management](#results-management)
- [🎉 Conclusion](#-conclusion)
- [📚 References](#-references)

## 📖 Introduction

Expand Down Expand Up @@ -492,6 +494,28 @@ The `-j` option in `GNU Parallel` controls the number of concurrent jobs. Consid
- Each ANTA instance requires memory
- Monitor system resources during execution using `htop` or similar tools
#### JSON vs YAML
When working with large catalogs and inventories, using JSON format instead of YAML can provide better performance as ANTA loads JSON files more efficiently. If you choose to use JSON:
- Convert your YAML files to JSON (you can use `yq` for this)
- Modify the scripts to use `jq` instead of `yq`:
```bash
# For device-based implementation
NODE_NAMES=$(jq -r '.anta_inventory.hosts[].name' < "anta_inventory.json")
# For tag-based implementation
TAGS=$(jq -r '.. | select(.filters?) | .filters.tags[]' < "anta_catalog.json" | sort -u)
```
Example of converting YAML to JSON:
```bash
yq -o=json eval 'anta_inventory.yaml' > anta_inventory.json
yq -o=json eval 'anta_catalog.yaml' > anta_catalog.json
```
### Results Management
ANTA can output results in various formats:
Expand Down Expand Up @@ -563,6 +587,9 @@ ANTA can output results in various formats:
xml.write("nrfu.xml", pretty=True)
```
!!! tip "CI/CD Integration"
This report format can be used with CI/CD tools like Jenkins, GitLab, or GitHub Actions.
## 🎉 Conclusion
By implementing these scaling strategies, you can efficiently run ANTA tests on large network fabrics. The combination of parallel execution, optimized catalogs, and proper resource management ensures fast and reliable network validation.
Expand All @@ -578,5 +605,31 @@ Remember to:
Performance tuning can be complex and highly dependent on your specific deployment. Don't hesitate to:
- 📞 Reach out to your Arista SE for guidance
- 📝 Document your specific use case on GitHub
- 📝 Document your specific use case on [GitHub](https://github.com/aristanetworks/anta)
- 🔍 Share your findings with the community
## 📚 References
- **Python AsyncIO**
- [AsyncIO Documentation](https://docs.python.org/3/library/asyncio.html)
- [AsyncIO Event Loop](https://docs.python.org/3/library/asyncio-eventloop.html)
- [AsyncIO Tasks and Coroutines](https://docs.python.org/3/library/asyncio-task.html)
- **HTTPX**
- [HTTPX Documentation](https://www.python-httpx.org/)
- [Timeouts](https://www.python-httpx.org/advanced/timeouts/)
- [Resource Limits](https://www.python-httpx.org/advanced/resource-limits/)
- **GNU Parallel**
- [GNU Parallel Documentation](https://www.gnu.org/software/parallel/)
- [GNU Parallel Tutorial](https://www.gnu.org/software/parallel/parallel_tutorial.html)
- **JSON and YAML Processing**
- [jq Manual](https://jqlang.github.io/jq/manual/)
- [jq GitHub Repository](https://github.com/jqlang/jq)
- [yq Documentation](https://mikefarah.gitbook.io/yq/)
- [yq GitHub Repository](https://github.com/mikefarah/yq/)
- **JUnit/xUnit Result XML Parser**
- [junitparser Documentation](https://junitparser.readthedocs.io/en/latest/)
- [junitparser GitHub Repository](https://github.com/weiwei/junitparser)
6 changes: 6 additions & 0 deletions docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ anta_title: Frequently Asked Questions (FAQ)
The `user` is the one with which the ANTA process is started.
The `value` is the new hard limit. The maximum value depends on the system. A hard limit of 16384 should be sufficient for ANTA to run in most high scale scenarios. After creating this file, log out the current session and log in again.

!!! tip "Large Scale Deployments"
For detailed information about managing file descriptors and other resource limits in large scale deployments, please refer to the [Scaling ANTA](advanced_usages/scaling.md#resource-management) guide.

## `Timeout` error in the logs

???+ faq "`Timeout` error in the logs"
Expand All @@ -62,6 +65,9 @@ anta_title: Frequently Asked Questions (FAQ)
The previous command set a couple of options for ANTA NRFU, one them being the `timeout` command, by default, when running ANTA from CLI, it is set to 30s.
The timeout is increased to 50s to allow ANTA to wait for API calls a little longer.

!!! tip "Advanced Timeout Configuration"
For comprehensive information about timeout configuration and optimization in large scale environments, see the [Timeouts Configuration](advanced_usages/scaling.md#timeouts-configuration) section in the Scaling ANTA guide. The guide provides detailed explanations of different timeout types and recommended values for various deployment scenarios.

## `ImportError` related to `urllib3`

???+ faq "`ImportError` related to `urllib3` when running ANTA"
Expand Down

0 comments on commit 3dede8b

Please sign in to comment.