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.

What are resources in Apstra
Resources are objects/items in freeform that can be assigned. They are everything from IP addresses to something as simple as an integer.

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.

The relationship:
[ Allocation Group ] → [ Global Pool 1 ]
                                    ➘ [ Global Pool 2]

When you see 'Generator', it refers to a dynamic generation of objects, be it resources, or the Groups (folders) the resources are organized in. The scope for this dynamic creation of new objects in Freeform is achieved through a GraphDB query. Read on to discover what these are.
  • 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 resource group - (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 group generator - 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.

An example data set created by a Group Generator that pulls all of the systems from a Blueprint as stored in GraphDB and creates a Group (folder) structure for each

Root >
    ◻ systems
        ◻ Green-Park
        ◻ Tottenham-Court-Road
        ◻ Oxford-Circus
        ◻ Leicester-Square
        ◻ Bond-Street
        ◻ Piccadilly-Circus

  • Resource - An example of a resource would be a single IPv4 Address. eg. 192.168.1.24

  • Resource Generator resource gen - 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.

What is the advantage of using resource allocation vs just statically defining data in property sets?

Property sets can be seen as a static way to allocate parameters to needed elements in the rendered configuration for a device. This can cause a more labor / task intensive workflow for network changes. If these parameters can be auto-generated you can eliminate the need for a manual change to a property set element, therefore limiting the risk of an error and reducing the workload to make these network changes.
There are a number of clear benefits to this approach
- Reduce the impact of human error caused by manually changing a Property Set
- Increasing productivity and time to deliver new services when adding new systems to the Blueprint as resources are automatically generated and assigned according to your design
- Streamline the process for managing resources in your organization by assigning a defined pool of resources and assigning them accordingly.