github opsmill/infrahub 0.6.0
0.6.0 - Tech Preview #4

latest releases: infrahub-v1.4.6, infrahub-v1.3.9, infrahub-v1.4.5...
pre-release2 years ago

Main Changes

New Logo and refresh of the frontend

Infrahub has a new logo and a new paint of colors based on a shade of blue.
Infrahub-SVG-hori

Infrahub's logo is inspired by a tree.
Why a tree ? because trees are composed of branches like Infrahub and the leaves on a tree have some similarities to the nodes on a graph.

User Management and Authentication

Infrahub now supports standard user management and authentication systems.

A user account can have 3 levels of permissions

  • admin
  • read-write
  • read-only

By default, Infrahub will allow anonymous access in read-only. it's possible to disable this feature via the configuration main.allow_anonymous_access or via the environment variable INFRAHUB_ALLOW_ANONYMOUS_ACCESS

Check the documentation for more details about the authentication framework

Enforcement of protected fields

Fields labeled as protected and that have an owner defined are now grey out in the frontend for everyone else.

Namespace for the Schema

All models for nodes and generics defined in the schema must now have a Namespace.
The introduction of Namespace will allow us to provide a better classification of the models as the schema grows. It will also allow us to better differentiate between internal and user provided models which will ultimately lead to a better user experience.

In the process we also removed the former attribute name on the model because it was highly redundant with the kind.
In the new format, a model is define by its namespace and its name, which together forms for the new kind
The kind doesn't have to be provided by the user anymore and it is generated by concatenating the namespace and the name

Kind = Namespace + Name

In the example below, the kind of this model will be InfraRack

nodes:
  - name: Rack
    namespace: Infra
    label: Rack

Impact on the GraphQL API

Previously the name was mainly used to generate the top level graphql query.
As a result of this change, the format of the GraphQL top level query are now using the Kind in CamelCase.

Before

query {
    device {
        edges {
            node {
                id
            }
        }
    }
}

After

query {
    InfraDevice {
        edges {
            node {
                id
            }
        }
    }
}

Groups

With the new Group model, it's now possible to create arbitrary groups of objects.
A group can be composed of members and subscribers and both can be objects of any types.

By default a CoreStandardGroup is available but it's possible to create new type of groups with additional attributes and/or relationships.

It's possible to retrieve the list of groups a given object is member of or subscriber of with the relationships
member_of_groups and subscriber_of_groups.

These 2 relationships will be automatically added to all objects in GraphQL.

We are just scratching the surface with the groups. Over time, Groups will have a major role in infrahub and they will act as glue between a lot of other features so stay tuned for more update in the next release.

Add Diff view for files in Git Repository

It's now possible to visualise the diff for the files that are part of a Git repository in the Branch View along with the diff for the data.

Screenshot 2023-07-05 at 2 48 22 PM

Support for Memgraph as the main database

In addition to Neo4j, it's now possible to run Infrahub on Memgraph.

The main benefits to use memgraph is its speed, especially on non-production environment.

The demo environment and the tests are now using Memgraph by default.

It's possible to start the demo environment with the flag --database=neo4j to switch to Neo4j.

Query all Generics Model directly from GraphQL

All generics models are now exposed at the top level of the GraphQL query by default.
This will make it much easier to query for generic nodes whithout having to go through the relationships of a given object.

Other Changes

  • Python SDK : Update query methods to allow user to select fields to query and not query all relationships by default @dgarros (#748)
  • Update infrahubctl to work with authentication + various fixes @dgarros (#742)
  • Change IPHost and IPNetwork graphql type to string @wvandeun (#713)
  • Improve deployment of the demo environment on Ubuntu and sudo environment
  • Initial prototype of a synchronization engine

Migration Guide

Rebuild the demo environment

It's mandatory to completely rebuild your demo environment with the following commands.

invoke demo.destroy demo.build demo.init demo.start
invoke demo.load-infra-schema
invoke 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 been updated to reflect the latest format of the GraphQL API
it's recommend to pull the latest changes into your fork otherwise it won't work with the latest version of Infrahub.

Migrate your existing schema

To migrate an existing schema, you need to:

  • define the namespace
  • delete the current name since it's not used anymore
  • rename the current kind into name
  • (optional) add a label, otherwise the label will be generated from the new kind

Changelog

🚀 Features

  • Add Groups in the Frontend @pa-lem (#783)
  • Add Git Repository in demo environment @dgarros (#775)
  • Fix groups relationships @pa-lem (#771)
  • Add mutation to create account tokens @ogenstad (#746)
  • Support namespaces in schema @ogenstad (#729)
  • Fix namespaces for frontend @pa-lem (#744)
  • Python SDK : Update query methods to allow user to select fields to query and not query all relationships by default @dgarros (#748)
  • Update infrahubctl to work with authentication + various fixes @dgarros (#742)
  • Add groups list and handle generics in the UI construction @pa-lem (#741)
  • Create top level query in GraphQL for all generic objects @dgarros (#735)
  • Add support for Group @dgarros (#726)
  • Add support for memgraph as an alternative to Neo4j @dgarros (#724)
  • Disable protected fields for edit form @pa-lem (#731)
  • Change IPHost and IPNetwork graphql type to string @wvandeun (#713)
  • Add new colours and logo @pa-lem (#728)
  • Enable authentication requirements for demo @ogenstad (#725)
  • Add files diff by repository and by file @pa-lem (#727)
  • Add commit_from and commit_to to api diff endpoint @ogenstad (#717)
  • Add endpoint to read files from git repositories @ogenstad (#716)
  • Anonymous access login @pa-lem (#715)
  • Enable user profile edit @pa-lem (#712)
  • Initial Prototype of a synchronization engine @dgarros (#690)
  • Add a mutation to query the current user profile @ogenstad (#707)
  • Get user profile from account query @pa-lem (#709)
  • Object deletion @pa-lem (#697)
  • Add logout endpoint and support to invalidate refresh tokens @ogenstad (#686)
  • Blocks UI on read only @pa-lem (#692)
  • Make load schema idempotent for node extensions as well @dgarros (#689)
  • Add auth in frontend @pa-lem (#687)
  • Add api endpoint to refresh an access token @ogenstad (#673)
  • Add infrahubctl validate graphql-query and refactor infrahubctl render @dgarros (#564)
  • Update internal Graph Schema to attach all nodes to Root instead of a Branch node @dgarros (#431)
  • Add support for offset and count in Query @dgarros (#426)
  • Add branch detail view, update branch list UI and use mutations for branch actions @pa-lem (#161)

🐛 Bug Fixes

🧰 Housekeeping

Others

  • Refactor invoke project to support Ubuntu @dgarros (#788)
  • Add cypress retries @pa-lem (#708)
  • Breakdown graphql/mutations.py into smaller files @dgarros (#700)
  • Move logic to generate weight out of NodeSchema into SchemaBranch @dgarros (#688)
  • Demo schema changes to support implementation of a Nornir inventory plugin @wvandeun (#667)
  • Enforce authentication for api modifications in backend tests @ogenstad (#669)
  • Initial code to restrict access to specific operations @ogenstad (#663)
  • Add ability to authenticate with SDK using token @ogenstad (#664)
  • Move Schema Manager to get rid of cyclic imports @ogenstad (#665)
  • Fix yaml lint warnings @dgarros (#662)
  • Add link to schema file for yaml-language-server @dgarros (#660)
  • Add Nornir plugin project @dgarros (#661)
  • Add code to enforce authentication on change operations @ogenstad (#655)
  • Fix label's color, remove uppercase and # @dgarros (#647)
  • Fix target branch for labels workflow @dgarros (#646)
  • Remove non paginated version @ogenstad (#633)
  • Add e2e test to check if the app loads and run @pa-lem (#638)
  • Update tests folders archi @pa-lem (#636)
  • Update develop with the latest from stable @dgarros (#635)
  • Add test for expired jwt signature @ogenstad (#625)
  • Add github-labeler to manage labels and release-drafter to manage release note @dgarros (#628)
  • Dynamically select RabbitMQ port based on TLS setting @ogenstad (#627)
  • Cypress test for mutation @pa-lem (#623)
  • Remove non paginated version of the SDK @ogenstad (#620)
  • Move standard library import pathlib.Path into a type-checking block @dgarros (#619)
  • Add test for mutation (update the name of a device) @pa-lem (#617)

Don't miss a new infrahub release

NewReleases is sending notifications on new releases.