Automation is crucial in evolving data center and service provider networks. Fast growing size and complexity makes automation tools essential to streamline the inventory management, deployment, and on-going monitoring and management of an ever-increasing number of networking devices across multiple data centers and service provider networks. Modern cloud-based applications are dynamic, which requires automation to keep up and reduce the time it takes to deploy new services and configurations.
IP Infusion’s OcNOS (Open Compute Network Operating System) is a network operating system (NOS) that provides a disaggregated solution for data centers and service providers. It’s designed to be modular, multi-tasking, and integrated with commodity hardware. IP Infusion’s OcNOS supports a comprehensive set of north bound device management and network monitoring interfaces and protocols, including CLI, Netconf with both IP Infusion and OpenConfig Yang data models, SNMP, and gNMI telemetry. These management interfaces and protocols provide a flexible way to integrate OcNOS with automation tools. In this blog, we will describe how to integrate OcNOS with Ansible automation tools.
Ansible is a widely adopted open-source IT automation tool used in DevOps, cloud management and continuous deployment. Ansible enables a network operator to automate and orchestrate configuration management and application deployment tasks for a complex IT environment with multiple systems.
IP Infusion provides a collection of Ansible modules for automating the deployment of OcNOS. The IP Infusion Ansible collection is available on the following GitHub URL.
https://github.com/IPInfusion/ocnos-ansible-collection
IP Infusion’s Ansible collection can be installed from Ansible Galaxy.
How to Integrate Ansible with OcNOS
In the AUTOMATING NETWORK MANAGEMENT: INTEGRATING ANSIBLE WITH OcNOS application note, you can find detailed information on how to automate OcNOS devices with Ansible. The application note provides a step-by-step description of how to build an Ansible playbook to automate the deployment of BGP on a sample network of OcNOS spine and leaf nodes as an illustration.
This application note explores how to interact with OcNOS devices using Ansible, and how to provision different services and protocols on OcNOS devices using common and IP Infusion Ansible modules. Ansible modules are the smallest unit of execution. Ansible modules are written in Python. Ansible modules are the building blocks for an Ansible playbook, which calls out a set of tasks each of which in turn defines a set of Ansible modules to be executed.
Some of the core Ansible features for constructing the playbook, such as conditional task execution on a given host and loops that allow the repeated tasks to be defined once and iterated over a set of nodes are incorporated in the illustration.
The sample playbook follows the typical process: 1) create configuration template, 2) generate configuration for each OcNOS network device, 3) push configuration on each OcNOS device, and 4) commit the configuration on each OcNOS device. The automation of the configuration generation is done through the powerful templating engine used and supported by Ansible called Jinja2. The jinja2 and Ansible templating capability is illustrated to show how it makes the playbook dynamic and flexible.
Additional References
Ansible Guide in OcNOS Data Center and OcNOS Service Provider Documentation.
Contact us today to learn more about IP Infusion OcNOS-based networking software.
Alan Huang is the Senior Product Manager, Data Center for IP Infusion.