Lab2 - Freeform Resource Allocation
Introduction to Resource Allocation in Apstra Freeform
Freeform is a completely arbitrary reference design from Apstra. It differs from the existing DC reference design model in that control of all design elements is placed entirely in the architect’s hands, meaning you now have the choice of both topology and protocol deployed in your environment. Therefore, networks designed with Freeform are not restricted to the existing design framework in the Data Center reference designs, i.e. eBGP / VXLAN / EVPN. You should be fairly familiar with freeform at this point, so we will focus primarily on resource creation and how to assign resources in freeform.
A Freeform reference design differs from the other reference designs in that the network designer is responsible for creating and validating all device configurations. As a comparison, a primary difference between Ansible and Freeform, is that Freeform provides built-in contextual validation to assist with building a valid Junos / Junos Evolved configuration. Any feature, protocol, or architecture that fits the deployment scenario can be leveraged, as long as it conforms to the protocols supported by Junos / Junos Evolved as well as the Juniper switches and NOS versions supported and validated by Apstra.
Apstra Freeform resources components (glossary of terms)
There are several type of objects related to assigning resources in Freeform. These have been described in order of how one would implement a Resource Allocation as part of your design.
-
Pools(Global) - The global Pools are defined containers of resources that come pre-configured in the system but can also be created up by the user as required. These pools have a specific type associated with them such as IPv4, IPv6, VNI or ASN.
-
Allocation Groups - An Allocation Group has a mapping to the global Pools described above. The Allocation group has a given name, a type (IPv4 / ASN / etc.) and an assigned Pool(s). Resource Generators (below) reference the Allocation Group to create resources for each system in the Freeform Blueprint. You can add more than one pool to an Allocation Group so that you can add non-contiguous block of resources to an allocation group that has already been assigned and is in use.
-
New Resource Pool Concept: In Freeform, there is a new Pool concept to locally assign VLAN IDs to a node (system) in the Blueprint. This can either be done statically, or dynamically with a graph query. The Local Pools are managed independently to the Global Pool Resource Allocation.
-
Local Pools (static assignment) - VLAN IDs that are assigned to a specific node, directly.
-
Local Pool Generator (dynamic assignment) - VLAN IDs that are dynamically assigned to a specific node(system) defined by a graphDB query, defined by the user.
-
-
To group the resources in a folder like structure we use a grouping mechanism called Groups. To do this we need to create the Group statically or dynamically with a Group Generator
-
Resource Groups - (akin to a folder structure) that contain resources and Resource Generators. These groups can be used to organize your environment if it becomes complex; at least one group is required. There is a default group called Root where all other groups will be nested beneath
-
Group Generators - creates resource groups dynamically based on a defined scope (a graph query). This graph query creates dynamic groups from the query response. Every element created under this group inherits this scope.
-
-
Resource - An example of a resource would be a single IPv4 Address. eg. 192.168.1.24
-
Resource Generator - Consists of parameters including a GraphDB scope (to pull the required nodes from the Blueprint Database where we’d like to assign Resources to), and a type (IPv4 address, IPv6 address, Integer, ASN). Resource Generators live in Resource Groups.
The importance of scope.
Resource Generators and Group Generators are both based on a scope, which is a query to the graph database that returns a set of objects. The generator then generates a resource based on the objects that are returned. It’s important to understand that scopes can use filtering mechanisms such as identifying tags and the type of object (i.e. a link or a system) can all be used to create the scope of generation of resources.