Home / Companies / OpsMill / Blog / Post Details
Content Deep Dive

How to Build and Run Generators to Automate Network Provisioning

Blog post from OpsMill

Post Details
Company
Date Published
Author
Suresh Vina
Word Count
4,245
Language
English
Hacker News Points
-
Summary

Infrahub Generators are designed to automate repetitive network deployment tasks by allowing users to define logic once and reuse it for efficient resource provisioning. This system eliminates manual steps by automatically creating necessary objects, connecting them, and allocating resources based on predefined logic captured in Python code. An Infrahub Generator interprets a high-level request into a technical implementation, such as provisioning a dedicated Internet circuit or rolling out new branch offices, ensuring idempotency by updating existing objects and avoiding duplicates. The process involves creating a generator definition, targeting specific object groups, and utilizing GraphQL queries to fetch input data. A practical example demonstrates the automated provisioning of network sites, where a Generator allocates IP prefixes, creates subnets and firewalls, and assigns management IPs without manual intervention. This approach streamlines network deployments, as showcased by Otter Bank's efficient rollout of new branches, and can be extended to more complex scenarios with additional logic for interfaces and routing configurations.