Skip to content

Latest commit

 

History

History
220 lines (175 loc) · 6.62 KB

README.md

File metadata and controls

220 lines (175 loc) · 6.62 KB

Vendor Configuration Examples

This repository illustrates how to configure services on different vendors using the Inmanta language.

Prerequisites

  • The OS of choice for demonstrating these examples is Ubuntu but any Linux version should be fine.
  • Install the Inmanta software using this guide.
  • Make sure to setup a project using this guide before running the examples.
  • You need to have an access token in order to pull down the modules that are provided in the examples. If you already have a license to these modules, you should have received this token. Otherwise, contact sales.

Notes

  • All these examples should be placed into main.cf file at the root of your project directory.

  • Not all the modules that are shown in the examples are free. Those modules require an access token to get downloaded. This access token, alongside the GIT repository URL will have to be added to the project.yml file under each project to successfully get the modules. For instance:

    name: Cisco Examples
    description: Provides examples for the Cisco module
    author: Inmanta
    author_email: [email protected]
    license: ASL 2.0
    copyright: 2022 Inmanta
    modulepath: libs
    downloadpath: libs
    repo:
        - https://github.com/inmanta/
        - https://USERNAME:[email protected]/ciscoxr/{}.git
    install_mode: release
    requires:
    

Notice how we added the username, access token and Cisco IOS-XR module under the repo section.

Examples

Having Inmanta installed, a project set up, and adding the required module repositories to the project.yml file, you can use any of the available examples under each vendor's specific directory.

For instance, let's see how we can shutdown an interface and set an IP address for a Cisco IOS-XR device.

  1. Head to the directory in which you have created your project, open the main.cf file and add the following lines which are taken from Cisco XR interface example:

    import ciscoxr
    
    router=ciscoxr::Device(
       name="router101",
       mgmt_ip="10.10.10.1",
       port=830,
       username=USERNAME,
       password=PASSWORD,
    )
    
    ge2=ciscoxr::Interface(
       device=router,
       interface_name="GigabitEthernet0/0/0/2",
       shutdown=true,
    )
    
    c::Primary(
       interface=ge2,
       address="172.16.10.50",
       netmask="255.255.255.0"
    )

    Note: Modules will get downloaded when you save the file. If not, please make sure your project.yml file is correctly configured.

  2. Deploy the configuration:

    Configuration deployment is possible via deploy and export switches. The main difference is, export option will send your configuration model to the Service Orchestrator from where, you can view the deployment steps in the GUI. If you have followed the installation guide the dashboard should be at your disposal. Additionally, we also provide a Docker container for Service Orchestrator which is publicly available but it needs a license to function which you can contact us to that end.

    Let's deploy this example using the deploy switch:

      inmanta -vvv deploy -f main.cf
    • inmanta will be the name of the executable after successful installation.
    • -vvv determines the verbosity level.
    • deploy is the intended action. You can use compile to sanity check your configuration without applying any configuration on the device.
    • -f main.cf specifies the location of the main configuration file.

    In case of deployment using the export switch, the model does not need to be named main.cf:

      inmanta -vvv export -e d3b2e897-0121-4124-863e-47b6c78ebc35 -f ip_address.cf
    • export pushes the model to the Service Orchestrator.
    • -e provides the environment ID. This can be derived from the Service Orchestrator Web Console.

When the deployment is successfully done, you can SSH to the device and verify its configuration.

Supported Platforms

Supported Features

Cisco

  • Hostname
  • Interface
    • Set primary address
    • Set secondary address
    • MTU
    • Bandwidth
    • Admin state
    • Description
  • Sub-interface
  • Interface VRF
  • Timezone/clock
  • NTP
  • VRF
    • Static route
  • Static route
  • L2VPN-EVPN
  • BGP
    • Neighbor
    • Address families
    • VRF

Cisco Services

  • L2VPN
  • Policy-map
  • VRF

Juniper

  • Interface

    • Set primary address
    • Set primary address
    • MTU
    • Bandwidth
  • VLAN

  • VXLAN

  • Link aggregation

    • LACP
  • Ethernet switching

  • IRB

  • Interface RPF policies

  • Policer

  • Policy options/statements

Juniper services

  • Bridge domains
  • Firewall
  • L2 Circuit
  • Protocols EVPN
  • Routing instances
  • EVPN
  • VPWS

Nokia

  • TACACS configuration
    • configure an authorization server with a key
    • configure accounting
    • set servers timeout
  • SNMP configuration
    • configure snmp group, comminity, view
  • BGP configuration
    • Set a bgp group with families
    • Set a neighbor with a group
    • Change description for a neighbor
    • Set backup path
    • Set rapid update
  • Client configuration
    • Set a name and an id of a client
  • Ethernet segment
    • set single-active ethernet-segment
    • set all-active ethernet-segment
  • Service EPIPE
    • set epipe
    • set epipe and eth-cfm
    • set epipe and bgp
  • eth-cfm
    • set eth-cfm
  • Policy option
    • Set policy options with community
    • Set policy option with allow/deny statement
  • Service VPRN
    • set service VPRN
    • set service VPRN with VRRP
    • set service VPRN with static router

SR Linux

  • All the aforementioned features in Nokia and more

VyOS

  • Hostname
  • Interface
    • Set primary address
    • Set secondary address
    • MTU
    • Bandwidth
    • Admin state
    • Description
  • Sub-interface
  • Interface VRF
  • Timezone/clock
  • NTP
  • VRF
    • Static route
  • Static route
  • Bridge domains
  • Policy options/statements
  • Firewall