English

How to Integrate Ansible With Cumulus Linux Automation Feature?

Updated on Sep 27, 2021 by
5.9k

Note: FS has discontinued Cumulus Linux system for N-series switches. As per our policy, customers will continue to get support from FS technical assistance team, and the valid warranty provided is maintained on the product. For customers who are interested in FS N-series switches, you can choose either open network switches or NVIDIA Cumulus Linux switches.

As you may know that Cumulus Linux is an open network operating system (ONOS) and it is famous for its powerful functions in web-scale networking. Among all the functions, “automation” is an important and unique one, especially when operated with the popular automated operation tool Ansible. Then, what is “automation” in Cumulus Linux? What is Ansible and why it is a perfect match for “automation” in Cumulus Linux? Read this post to find all the answers and get detailed steps on how to use Cumulus Linux automation feature with Ansible from the example shown in the text.

What Is “Automation” in Cumulus Linux?

As is mentioned above, “automation” is one of the most powerful functions of the open source software Cumulus Linux.

It benefits in large scale orchestration for its automation feature, which leverages Linux’s extensibility to support any scripting language, enables automation with zero-touch install and provisioning, and integrates seamlessly with common orchestration tools such as Ansible, Chef, Puppet, CFEngine, etc., resulting in increased network stability and uptime. With the automation feature, you can automate the complete operational life cycle of network devices (network switch, for example) with ease. The biggest advantage of this feature is that it saves manpower by using automation tools.

Automation in Cumulus Linux

Integration of Ansible and Cumulus Linux With Automation

Automating your network seems like a daunting task. While, the truth is that using Ansible to automate Cumulus Linux may be easier than many things you might have automated. Then, what exactly the Ansible is? How to use Cumulus Linux automation feature with Ansible? Just read on to get more details.

What Is Ansible?

Ansible is an extremely simple IT automation engine that automates cloud provisioning, configuration management, application deployment, intra-service orchestration, and many other IT needs.

Featured with no agents and no additional custom security infrastructure, Ansible is an easy-to-operate IT automation tool that anyone can use. It uses a very simple language (YAML, in the form of Ansible Playbooks) that allow you to describe your automation jobs in a way using plain English.

How to Use Cumulus Linux Automation Feature With Ansible?

With the introduction above, you may get familiar with Cumulus Linux automation and Ansible, then how to use Cumulus Linux automation feature with Ansible in real situation? Next, we will take an example of LACP automation configuration with Ansible to illustrate this further. Here, we will use Ansible to automate the configuration of LACP between switch1 (FS N5850-48S6Q with Cumulus Linux preloaded) and switch2 (FS N8050-32Q with Cumulus Linux preloaded).

Network topology

To realize LACP automation configuration with Ansible, you can follow the steps below:

Step 1: Configure “ansible-server” to log in to switch1 and switch2 without password. Just input “ssh-keygen” and then press “enter” all the time to use the default configuration to generate the public and private keys on the Ansible host. After that, copy the public keys to switch1 and switch2.

SSH login without password

Step 2: Input “vim /etc/ansible/hosts” to add switch1 and switch2 to the list of hosts in the “ansible-server”.

Add switch1 and switch2 to the list of hosts

Step 3: Input “ansible LACP -m ping” to test whether it is possible to remotely control the two switches.

Control test

Step 4: Start writing playbook files, including hosts, remote_user, tasks, etc.

writing playbook files

Step 5: We call the variable “PORT_RANGE” in between, while our LACP aggregation ports are not the same (switch1 is swp49 and swp50 for aggregation, switch2 is swp6 and swp7 for aggregation). Therefore, we have to configure variables. We can add variables to each host in the host list.

configure variables

Step 6: Enter “ansible-playbook LACP.yml” to run “playbook”.

Run playbook

Step 7: Check if LACP automation is succeeded. If you see “UP” in the “Summary” lists, it means the automation is successful.

Check LACP automation

Conclusion

From all the above, you might have a general understanding of how Ansible and Cumulus Linux automation works together. Given the automation configuration process, it is obvious that there are many advantages using Ansible with Cumulus Linux automation function. On one hand, Cumulus exposes IT automation as native Linux; on the other hand, Ansible can be used in Cumulus Linux automation for easy network device configuration and deployment.

You might be interested in

Knowledge
Knowledge
Knowledge
See profile for Sheldon.
Sheldon
Decoding OLT, ONU, ONT, and ODN in PON Network
Mar 14, 2023
382.4k
Knowledge
See profile for Irving.
Irving
What's the Difference? Hub vs Switch vs Router
Dec 17, 2021
366.0k
Knowledge
See profile for Sheldon.
Sheldon
What Is SFP Port of Gigabit Switch?
Jan 6, 2023
332.0k
Knowledge
See profile for Migelle.
Migelle
PoE vs PoE+ vs PoE++ Switch: How to Choose?
Mar 16, 2023
418.3k
Knowledge
Knowledge
Knowledge
Knowledge
See profile for Moris.
Moris
How Much Do You Know About Power Cord Types?
Sep 29, 2021
291.5k