Giter Site home page Giter Site logo

intent-based-ansible-lab's Introduction

Intent-based fabric management with Ansible

A practical example of using Ansible to manage the configuration of an SR Linux fabric with the intent-based approach leveraging the official Ansible collection for SR Linux - read the tutorial on learn.srlinux.dev for a complete walkthrough of this project.


Run this lab in GitHub Codespaces for free.
Learn more about Containerlab for Codespaces.


Quick Start Guide to run in codespaces

  1. Deploy the lab topology:
sudo clab deploy -t topo.yml
  1. Run the Ansible playbook:
ansible-playbook -i inv/ -e intent_dir=/workspaces/intent-based-ansible-lab/intent_examples/infra/underlay_with_fabric_intent --diff playbooks/cf_fabric.yml

intent-based-ansible-lab's People

Contributors

flosch62 avatar freddebacker avatar hellt avatar wdesmedt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

intent-based-ansible-lab's Issues

roles vars vs host vars

@wdesmedt I wanted to check why did you decide to add host variables in each role's vars section. Why don't you put host vars into the inventory, making it a single place where host_vars are defined.

Imagine you grow your fabric from 4 leaves to 6 leaves. With the current approach you would have to add clab-xxx-l5 and clab-xxx-l6 vars to all the roles, instead of just adding the relevant nodes into the inventory.

Add CI

Automated testing of playbook roles (ansible-test?)

Support setting the commit message

I would like to be able to specify the commit message that gets used in the JSON-RPC call to the device. That way we can use the Git commit message as commit message on the device when integrating it with our CI/CD pipeline.

Use of labels

Rather than specifying individual interfaces or network-instances, use labels as properties to resources that can be referenced by other resources/services (e.g. l2vpn with interfaces tagged with label xxx, l3vpn with interfaces and macvrfs tagged with label yyy, ...

Generic verision match lookup workflow

Often, lookup vars that match the full version is not feasible. Instead, a generic version lookup logic can be introduced:

  1. first lookup vars from the full version match (as it is done today) - e.g. 23.3.3
  2. if not found, lookup vars from the major version - 23.3
  3. if not found, lookup vars from the year release - 23
  4. if not found, lookup vars from the default location - e.g. default/vars.yml

Move to filters for high-level intent

Coding in Jinja/YAML is error-prone and difficult to troubleshoot. Proposal to move to custom filters (l2vpn, l3vpn) to generate low-level device configuration from high-level intent.

Support for 'fabric intent'

Define high-level fabric intent model that gets transformed in the custom low-level per-device intent (=device abstraction layer), currently used for underlay via the infra role. Still support input into the per-device intent to suppport configuration that is not covered by the fabric intent.
Fabric intent should define a.o.

  • 'ASN range' for BGP-underlay
  • roles: spine, leaf, bleaf, dcgw
  • external access handoff: vlan, vxlan
  • underlay-routing: OSPF, ISIS, BGP, BGP-UNNUMBERED - blueprint currently defines BGP only
  • ISL prefix: from which inter-switch links are getting addresses from: ipv4, /31
  • VTEP prefix: from which system loopback interface gets address from (/32)
  • ISL ports (leaf, spine, bleaf)
  • ACCESS or DOWNLINK port (leaf)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.