Skip to content

Releases: opsmill/infrahub

Version 0.14.1 - Open Beta Maintenance

04 Jun 14:59
13c1265
Compare
Choose a tag to compare

Changelog

Version 0.14.1 is maintenance release with minor fixes.

🧰 Maintenance

Python SDK - Version 0.11.0

27 May 13:22
c8625b2
Compare
Choose a tag to compare

Changelog

🚀 Features

🐛 Bug Fixes

🧰 Maintenance

Version 0.14.0 - Open Beta

27 May 13:58
13cad09
Compare
Choose a tag to compare

We are thrilled to announce the latest release of Infrahub (0.14), marking the start of our open beta.
This release focuses on preparing for the open beta by cleaning up and improving documentation and introducing key features like the Resource Manager.

Main changes

Unified storage

Resource Manager

The resource manager simplifies resource management and allocation.
This initial implementation supports IP Prefixes and IP Addresses, with future support for additional resources like VLAN, IDs, and interfaces.

Key features of the Resource Manager include:

  • Inline Allocation: Allocate resources from a pool directly when creating an object.
  • Branch Agnostic: Resource allocation works across branches. A resource allocated in one branch won’t be allocated in another.
  • Idempotent: If the same consumer requests a resource multiple times, the Resource Manager will always return the same value. This reduces the complexity of managing resource allocation on the client side in an idempotent way.

resource_manager_overview
resource_manager_form

Schema

Human Friendly Identifier (hfid)

In addition to the automatically generated internal ID (UUID) for each object, Infrahub now allows defining fields that form a human-friendly identifier (hfid).

The hfid can uniquely reference objects across systems, even before an object is created in Infrahub.

While mostly invisible in the frontend, hfid is crucial for building robust data synchronization between systems and creating truly idempotent scripts.

Applied to the network industry:

  • the hfid of a device could be its name: atl1-edge01
  • the hfid of an interface will be the combination of the name of the device and the name of the interface: `["atl1-edge01", "Ethernet1"]

The fields that will compose the human_friendly_id must be defined in the schema

hfid support in GraphQL

hfid can be used as an alternative to the ID in most GraphQL operations, including:

  • Update Mutation
  • Upsert Mutation
  • Delete Mutation
  • Related Node in all Mutations

Other

Documentation update

We have significantly improved and added new content to the documentation, including a new FAQ section.

Breaking Changes

Remove support for non-isolated branch

Support for branches in non-isolated mode has been removed.
Although useful, it posed challenges for operations dependent on other nodes in the graph, such as schema management, constraints validation, and IPAM.

All branches now operate in isolated mode by default, similar to branches in Git. A branch need to be rebased to stay in sync with main.

Migration Guide

To migrate your instance of Infrahub to the latest version, please run the following commands and restart all instances of Infrahub.

infrahub db migrate
infrahub db update-core-schema

if you are running in docker these commands need to run from the container where Infrahub is installed

Migration of the demo instance

If you are using the demo environment, you can migrate to the latest version with the following commands

invoke demo.stop
invoke demo.build
invoke demo.migrate
invoke demo.start

If you don't want to keep your data, you can start a clean instance with the following command

invoke demo.destroy demo.build demo.start demo.load-infra-schema demo.load-infra-data

All data will be lost, please make sure to backup everything you need before running this command.

The repository https://github.com/opsmill/infrahub-demo-edge has also been updated, it's recommended to pull the latest changes into your fork.

Changelog

🚀 Features

🐛 Bug Fixes

  • Fix mutation for pool assignment on fields for relationships of cardinality many @pa-lem (#3477)
  • Fix link for allocated ip address to IPAM @bilalabbad (#3484)
  • Improve support for Profile in Artifact & Proposed Change @dgarros (#3471)
  • Fix test to include only required relationships of cardinality many only in create form @pa-lem (#3476)
  • fix off-by-one type error in ip address parent identification @ajtmccarty (#3480)
  • Updates peers to display in form for relationships inputs @pa-lem (#3419)
  • Fixed default value on textarea input + fixed label missing on json input @bilalabbad (#3451)
  • new relationship constraint for peer type @ajtmccarty (#3396)
  • small fix for diff payload with multiple relationship changes @ajtmccarty (#3442)
  • Fix get artifact API endpoint @gmazoyer (#3440)
  • Added basic validation on proposed change creation form @bilalabbad (#3450)
  • Ensure hfid is defined to generate an identifier @dgarros (#3448)
  • Fix menu overflow @pa-lem (#3446)
  • Raise user-friendly error and exit if git-agent is unable to reach Infrahub @ogenstad (#3445)
  • fixes for IP reconciliation logic @ajtmccarty (#3381)
  • Prevent menu from disappearing on small screens @pa-lem (#3432)
  • GraphiQL link preserves QSP @bilalabbad (#3424)
  • Fix password length details on details view @bilalabbad (#3423)
  • Fix mutation data for relationship select @pa-lem (#3415)
  • Thread mutation fix depending on the view @pa-lem (#3408)
  • Support display_label for Generic node in Graphql @dgarros (#3361)
  • Fix typo in INFRAHUB_STORAGE_QUERYSTRING_AUTH @dgarros (#3353)
  • [FIX] min time is not applied anymore on past date on time selector @bilalabbad (#3311)
  • Fix query for hierarchical children in relationships many @pa-lem (#3304)

🧰 Maintenance

  • Add exception in schema_manager for ip_namespace @dgarros (#3486)
  • Convert attribute variables on CoreGraphQLQuery to read-only @dgarros (#3479)
  • Add section about performance benchmark tool to docs @dgarros (#3482)
  • Update schema for IP Prefix Pool and IP Address Pool @dgarros (#3468)
  • fixes identifier description of IpPrefixPoolGetResource and IpAddresPoolGetResource mutations @wvandeun (#3467)
  • Rename default_prefix_size -> default_prefix_length for IP Address pool @ogenstad (#3465)
  • update readme screenshot @petercrocker (#3470)
  • Add optional initial agent user @ogenstad (#3390)
  • Set order_weight for resource pool objects @ogenstad (#3447)
  • Add tests for allocation queries @ogenstad (#3421)
  • Rename CorePrefixPool -> CoreIPPrefixPool @ogenstad (#3425)
  • Add condition to backend.validate-generated documentations files are changed @BeArchiTek (#3418)
  • Add relationship name to generated identifier @dgarros (#3398)
  • Rename Groups & Profiles to Object Management and add resourcepool @ogenstad (#3344)
  • Add logic to resource pool allocation query @ogenstad (#3387)
  • Run IPAM reconcilement after assignment from pool @ogenstad (#3384)
  • Add utilization_branches for frontend and resource_id to allocation @ogenstad (#3374)
  • Only allocate ip prefixes & addresses if available across all branches @ogenstad (#3363)
  • Remove get_account_by_id and get_account functions that aren't used currently @dgarros (#3349)
  • Small update for the demo environment in the doc @dgarros (#3357)
  • Cleanup schema path parsing and analysis @dgarros (#3351)
  • Major documentation updates @petercrocker (#3332)
  • Add skeleton for IPPrefix pool utilization query @ogenstad (#3330)
  • Remove "contact opsmill" from swagger docs @petercrocker (#3333)
  • Switch to reflect member_types of BuiltinIPPrefix @ogenstad (#3323)
  • fix(backend): use correct label value for query metrics @fatih-acar (#3298)
  • Set integer enum values to strings, otherwise keep the previous logic of _.join @fra...
Read more

Python SDK - Version 0.10.1

07 May 21:49
9421aae
Compare
Choose a tag to compare

Changelog

🐛 Bug Fixes

Python SDK - Version 0.10.0

07 May 14:19
dfa1f98
Compare
Choose a tag to compare

Changelog

🚀 Features

🐛 Bug Fixes

🧰 Maintenance

Beta #2 - Version 0.13.0

07 May 14:34
dfa1f98
Compare
Choose a tag to compare

We're proud to announce the second beta release of Infrahub 🎉 🚀

Main Changes

Unified Storage

IP Address Management

Infrahub now includes builtin support for IP Prefixes and IP Addresses, both for IPv4 and IPv6.

To keep things extensible, Infrahub provides a minimal schema to capture the relationships between IP Prefix, IP address and IP Namespace.
Infrahub will automatically maintain trees of IP prefixes and IP addresses being built based on the IP Namespace.
Building these hierarchies/trees allows Infrahub to determine how IP prefixes and IP addresses are nested as well as computing utilization of the recorded IP spaces.

The following Generic models are provided by default and can be extended as needed to add your own attributes/relationships or constraints:

  • BuiltinIPNamespace: used to model a namespace to manage IP resources, this is a generic representation of what could be, for examples, a routing table, a routing instance or a VRF
  • BuiltinIPPrefix: used to model a network, sometimes referred as supernet/subnet
  • BuiltinIPAddress: used to model a single IP address

More information about IPAM is available in the Documentation.

ipam_01 ipam_02

Profiles

A profile in Infrahub allow you to define a common set of attributes that should be applied to nodes.

A node that has a profile assigned, will get the values of its attributes inherited from the assigned profile, if no value is defined for the attribute at the node, or if the default value is used.
The attribute values of a node that were inherited from a profile can be overridden, by defining them at the node.

More information about Profiles is available in the Documentation.

Leverage Database Indexes to improve performance

Infrahub is now leveraging database indexes to improve the overall performance of the database.
Indexes will be automatically applied during startup.

A new command infrahub db index has been introduced to manage the indexes.

infrahub db index --help

 Usage: infrahub db index [OPTIONS] [ACTION]:[show|add|drop] [CONFIG_FILE]

 Manage Database Indexes

╭─ Arguments ─────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│   action           [ACTION]:[show|add|drop]  [default: IndexAction.SHOW]                                            │
│   config_file      [CONFIG_FILE]             [env var: INFRAHUB_CONFIG] [default: infrahub.toml]                    │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Options ───────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --help          Show this message and exit.                                                                         │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

CI Pipeline

Generators

A Generator is a generic plugin that can be used apply your own logic to create new nodes and relationships.
Generator are expected to be idempotent and should be able to run multiple times and always produce the same result.

One use case for the generators is to be able to manage technical objects derived from a higher level definition of a service.

Generators are associated with some input data identified by a GraphQL query.
Similar to the Transforms & Artifacts, Generator will be automatically executed as part of the CI Pipeline if the data associated with a given generator has changed.

The Generator itself is a Python class that is based on the InfrahubGenerator class from the SDK. Just like transforms and checks, the Generators are user defined.

More information about Generators is available in the Documentation.

Redesigned proposed change creation form

The form to create a proposed change has been redesigned to expand the description field.

proposed_change_form

Schema

Relationship of type Parent can't be optional

The constraints around the relationships of kind Parent have been tightened and these relationships can't be optional anymore.
All existing relationships will be automatically migrated when upgrading to this release and your schema will need to be updated.

Improvement and modularization of demo schema

The demo schemas located in the models directory have been updated to cover more use cases and to simplify how to use them.

The main schema, previously stored in the file infrastructure_base.yml has been broken down in multiple schemas now located in the base directory.
The other schemas have been moved to the examples directory

Cascade node deletion

It's now possible to define how related nodes should be handled when a node is being deleted. This feature is usually referred as CASCADE DELETE.
On each relationship, it's now possible to defined on_delete: CASCADE to indicate that if this node is deleted, all nodes on the other side of this relationship must be deleted too.

New options available in the schema

The attribute read_only is now available on all relationships.
If True, users won't be able to add or remove peers to this relationship (not present in GraphQL mutations and forms)

The attribute allow_override is now available on all attributes and relationships.
This new flag is meant to be used on a Generic node to protect the attribute / relationship that can't be overwritten by a node inheriting from this generic.

The attribute documentation is now available on all Node and Generic.
This field is meant to store an URL where the documentation for this model is available.
The link will be displayed in the help popup in the frontend.

The attribute on_delete is now available on all relationships. See section above.

More information about the schema is available in the Documentation.

API / GraphQL

is_from_profile and is_default properties on all attributes

In GraphQL, it's now possible to query 2 new properties on all attributes to gather more information about the origin of the value:

  • is_from_profile: True if the value was inherited from a profile, the name of the profile will be available in under source
  • is_default: True if the value was set by the default value defined in the schema

Other

Schema information included in the search anywhere bar

The main search anywhere bar now includes information from the schema and
it can include return existing schema page as a potential result for the search.

search_in_list filter_in_list

Search and filter on object list view

The object list view has been updated to include a new search bar and a new panel to filter the element of the list.

search_schema

Cleanup of invoke tasks and introduction of the dev namespace

The invoke tasks have been cleaned up to clearly separate the tasks related to the demo environment and the one for internal development.
A new namespace dev has been introduced and some commands have been renamed including demo.dev-start that has been renamed to dev.deps.

A new demo.migrate command has been introduced to apply the database & schema migrations.

Update GraphiQL Application

The Graph sandbox (GraphiQL) has been integrated into Infrahub directly to provide a better experience
and remove the dependencies to an external CDN.

The standard menu is now available on the left of the GraphiQL application
and its possible to directly select the active branch with the standard dropdown.

graphiql

Help Panel in the list view

A new help popup is now available in the top right corner of a list view for all objects.
The help popup will include a link to the schema for this object and if defined in the schema, a link to the external documentation.

help_panel

Changelog

Read more

Python SDK - Version 0.10.0 - Release Candidate 1

30 Apr 09:26
a11b541
Compare
Choose a tag to compare

Note

This is a pre-release of Infrahub Python SDK 0.10.0.

Changelog

🚀 Features

🐛 Bug Fixes

  • Fix "one" relationship process if null @gmazoyer (#3039)
  • Fix infrahubctl [cmd] --config-file @ogenstad (#2708)
  • fix infrahubctl schema load error message when schema file contains invalid YAML @wvandeun (#2704)

🧰 Maintenance

Beta 1.1 - Version 0.12.1

23 Mar 10:17
6443685
Compare
Choose a tag to compare

🚀 Features

support parent generic uniqueness_constraints during mutation @ajtmccarty (#2721)

🐛 Bug Fixes

more tests for a uniqueness constraint validator issue @ajtmccarty (#2667)
allow updating nested lists on schema @ajtmccarty (#2710)
fix the /api/diff/schema endpoint returning non-Schema diffs @ajtmccarty (#2645)

Python SDK - Version 0.9.0

15 Mar 10:46
d97d183
Compare
Choose a tag to compare

Changelog

This Python SDK release introduces an important change regarding how its dependencies are installed. By default, only the required dependencies to interact with Infrahub API will be installed. Two extras are provided in addition to the base SDK, ctl and tests, which are required to run infrahubctl commands and to use the SDK test framework respectively.

Extras can be installed using pip like:

  • pip install 'infrahub-sdk[ctl]'
  • pip install 'infrahub-sdk[tests]'

Or with Poetry by having the following in a pyproject.toml:

infrahub-sdk = { version = "0.9.0", extras = [ "ctl", "tests" ] }

🚀 Features

🐛 Bug Fixes

🧰 Maintenance

Beta #1 - Version 0.12.0

15 Mar 17:57
65a3418
Compare
Choose a tag to compare

We're proud to announce the first beta release of Infrahub 🎉 🚀

This release is packed with a lot of new features and improvements and it indicates that infrahub is ready to be part of your day to day workflow. Moving forward our goal is to provide a migration path to the future releases without a need to rebuild the system or losing data. It's also possible now to update an existing schema and infrahub will take care of migrating the data.

Main Changes

Unified Storage

Schema Update & Migrations

It's now possible to update the schema without losing data. Infrahub will automatically apply the validations and the migrations to ensure the data currently in the database is compliant with the new schema.

The validations and the migrations will also be applied :

  • As part of a Proposed Change
  • During a branch rebase
  • During a branch merge

Non Isolated Branches

The default behavior for a branch has been updated to keep in sync with the main branch by default.
With this new behavior, all changes applied to the main branch will automatically be visible in the branches without the need for rebase.

A new isolated branch mode has been introduced. It allows a branch to be isolated from the main branch. Isolated branches are not kept in sync with the changes in the main branch.
With these changes, the rebase flag in the API and in the transformations has been deprecated.

The flag data_only on a branch has been renamed to sync_with_git to provide a better description of its intent.
The meaning of this flag has been switched so is_data_only=true is the same as sync_with_git=false.
branch_create_form

Additional Constraints for the Schema

A few additional constraints have been added to the schema to enforce your business logic.

multiple uniqueness constraints

On a Node or a Generic, it's now possible to define one or multiple uniqueness constraints composed of multiple attributes or relationships of cardinality one.

In the example below, all Interfaces will be guaranteed to be unique based on their name and the device they are connected to.

  - name: Interface
    namespace: Infra
    uniqueness_constraints:
        - [ "device", "name__value"]
    attributes:
      - name: name
        kind: Text
    relationships:
      - name: device
        cardinality: one
        peer: InfraDevice
        kind: Parent
min_max / max_count for relationships

On a relationship of cardinality many, it's now possible to define a minimum or maximum number of peers that should be present.

    relationships:
      - name: "tags"
        cardinality: "many"
        peer: "BuiltinTag"
        max_count: 5
        min_count: 2

New Version of the Data & Time Picker

The widget to select the active date and time has been updated to improve its usability.
In addition to this change, all edits have been disabled while viewing past data to avoid any confusions and guarantee the immutability of the database.

CI Pipeline

The CI Pipeline as part of a Proposed Change has been significantly improved to provide more visibility to the user.

New version of the Check View

The page to display the progression and the results of the checks has been redesigned to provide more visibility.

proposed_change_checks
proposed_change_failed_checks

Background Tasks

Information about background pipeline tasks are now available in the Tasks tab of the proposed change view.

proposed_change_tasks

Schema

Schema Visualizer

The Schema page in the frontend has been redesigned to make it easier to navigate the current schema.
All information are now accessible, in the future the page will be updated to modify the schema directly from the frontend as well.

schema_visualizer

Schema Documentation

The internal schema has been refactored in order to generate better documentation and to be able to provide better validation of new schema.
A new definition of the internal schema has been published in JSONSchema format and it's accessible at https://schema.infrahub.app/infrahub/schema/latest.json

Multiple Editors are able to leverage this file to provide inline documentation and validation.

In VS Code, the YAML Plugin support file with the yaml-language-server marker at the top of the file.

# yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json
---
version: '1.0'
generics:
  - name: Interface
    namespace: Infra

API / GraphQL

New DiffSummary query

The GraphQL query DiffSummary has been refactored to expose more information, it's now possible to query information about the attributes and the relationships in addition to the nodes.
The previous version of the Query has been migrated to DiffSummaryOld and it will be removed in the next release.

Other

Enhanced Search Bar

The search bar has been enhanced to return more information. In addition to the objects, it's now possible to search the documentation and to navigate directly to other pages in the frontend.
The search results view has also been redesigned to make it faster and more accessible.

search_bar_02

Performance Improvement

The processing of the schema internally has been significantly improved and as a result:

  • Accessing the schema is 5x to 10x faster
  • Loading a new schema is 3x faster
  • Loading the frontend for the first time is significantly faster too

Sync Engine

The Synchronization Engine has been improved to be able to run in standalone mode and it has been integrated with Dagster, to provide more visibility into the process and leverage its orchestration capabilitites.
The project has been packaged as a dedicated Python package and it's now available on PyPI infrahub-sync.

Documentation Update

There have been multiple improvements to the documentation, including:

  • A new topic page about Immutability and Version Control
  • A new topic page about the Resources testing framework
  • A new guide on how to create your own schema
  • The Python SDK section has been reorganized to have Guides, a Reference, and include more information

Changelog

🚀 Features

🐛 Bug Fixes

  • added page name in breadcrumb of search docs results @bilalabbad (#2631)
  • Fix initial value for JSON attributes in form @pa-lem (#2629)
  • Add integrations tests for schema migrations related to relationships and attributes @dgarros (#2623)
  • Prevent overflow on sidebar menu @bilalabbad (#2626)
  • Refetch object details on mount relationships view @pa-lem (#2624)
  • fix some links in docs @bilalabbad (#2610)
  • Assign display_label...
Read more