SHARE
Service Provider / March 4, 2021

Automation and Orchestration, Part 3: Managing 5G with Ansible for Gigamon

This is the final post of a three-part series. For more, read Part 1 and Part 2.

As mobile service providers and tool vendors race against time to transition from 4G/LTE to 5G/ LTE CUPS (Control and User Plane Separation), the Gigamon Visibility and Analytics Fabric™ is primed for providing the needed intelligence to scale infrastructure analytics and management.

Starting with release 5.9, mobility solution configuration is solely supported through Ansible on the GigaVUE® HC nodes. This is an important step towards reducing the amount of manual effort needed to add subscriber intelligence to the visibility platform.

A Refresher on Ansible

Ansible is one of the simplest and most widely used automation tools for configuration management, device provisioning, application deployment, CI/CD and orchestration. It can be installed on a wide variety of Linux-based systems running Python 2 or 3. This machine or VM is called the control node, and the devices (servers) you automate with Ansible are the managed nodes. Ansible doesn’t require an agent or software on managed nodes — it only needs to establish an SSH connection with them. Refer to the documentation at the end of this post for links to installation guides.

The inventory file contains information about managed devices, such as IP addresses, login credentials and so on. End users will typically use playbooks to automate and orchestrate repetitive or complex tasks that are error-prone when performed manually. These playbooks can also be generated based on user-created flows akin to record-and-replay scenarios. Ansible playbooks are a combination of variables and tasks written in YAML format, making them easy to read and configure.

Gigamon-Ansible

Now that you’re ready to use Ansible with the GigaVUE-FM fabric manager , you can install the gigamon-ansible package and explore different configuration options for 5G CUPS visibility. There are gigamon-ansible packages available for Ubuntu 16.x (and later), and CentOS 7.x or MAC. Download the .deb or .rpm package and extract it under /usr/local/share/gigamon/. Install using the command:

sudo apt install ./gigamon-ansible-<version> 

or

sudo yum install ./gigamon-ansible-<version> 

Some of the directories in the package are:

  • inventory – A dynamic inventory script for use with the Fabric Manager.
  • library – Gigamon Ansible modules that can be referenced in playbooks.
  • module_utils – Libraries consumed by Gigamon Ansible modules that communicate to the FM.
  • playbooks – A series of examples. Do not modify these directly, as your changes will not be preserved.
  • generator – A playbook generator that will extract configurations from a running device and create a playbook.

Note: Always make a copy of the files in the default location (/usr/local/share/gigamon) to a working directory so when new versions of the package are installed, you don’t lose custom scripts.

To create a local copy of the installation, run the commands:

$ mkdir -p $HOME/gigamon_ansible 
$ cd /usr/local/share/gigamon
$ cp -r playbooks setup-gigamon $HOME/gigamon_ansible
$ cp ansible.cfg $HOME/.ansible.cfg
$ sudo rm -f /tmp/ansible.log

Step-by-Step Implementation for the 5G/CUPS Solution

The entire solution payload can be split into two parts: policies and site configuration. The user provides the policies in YAML format, and site information in either a CSV file or YAML. There is also an GigaVUE-FM API used to visualize the CUPS solution using this path: /api/v1.3/intent/cups.

  1. Create a directory of your choice (ex: ~/myInventory) to keep your inventories files and create a directory host_vars under your inventory directory (ex: ~/myInventory/host_vars/)
  2. Plan your 5G and LTE policy and place your policy YAML files in ~/myInventory/host_vars/ (ex: ~/myInventory/host_vars/lte_policy_1.yaml)
  3. Define your Site elements in a CSV format and convert to YAML using a Python tool provided with the gigamon-ansible package. Optionally, create your CPN/UPN/Site.yaml files and master orchestrating Ansible inventory file manually.
  4. Use the tool FM_Ansible/integration/tools/cupsCsvToYaml.py to convert the CSV files into the Ansible-usable YAML inventory files. (Note: Use ./cupsCsvToYaml.py -h to check for the supported command line options.)
  5. To generate the inventory run the command:
tools/cupsCsvToYaml.py --inventory_dir_path ~/myInventory --nwCsv cups_csvs/NetworkSources.csv --vfCsv cups_csvs/CUPNInfo.csv --siteInfo cups_csvs/SiteInfo.csv --ltePolicy lte_policy.yml --5gPolicy 5g_policy.yml --cupsSolutionAlias cups1

  • The above command generates the CPN/UPN/Site inventory YAML files under your inventory host_vars: (~/myInventory/host_vars).
  • The tool will also create the Ansible Inventory file (CUPS master Orchestrate file) in ~/myInventory/cups_inventory. Open this file and edit to include prerequisite configurations such as GTPwhiteLists, IpInterfaces, ToolGroups and Gigastreams.
  • To create prerequisite configurations, create a YAML file for each clusterId and include applicable configurations like GTPWhiteList, IpInterface, ToolGroup and Gigastreams.
  • Once your inventory file is updated, you can call the ansible-playbook to deploy the solution:
ansible-playbook -e "@/home/<user>/ansible inputs.json"-vvv ~/myInventory/cups_inventory playbooks/cups/deploy_cups.yml

A deployment report will also be generated to troubleshoot any issues pertaining to deploying, creating or updating the CUPS solution. There is also a feature called checkmode that provides the information about difference in configuration between current and proposed payload.

To delete a CUPS solution, run the Ansible playbook command delete_cups.yml playbook. Once the CUPS solution is configured using Ansible, the user can go back to the GigaVUE-FM UI to visualize these components. The control/user plane network elements, CPN/UPN nodes, forwarding policies and associated tools will be visualized in the abstraction level.

This blog was a sneak peek into the latest 5G CUPS Ansible solution for Gigamon Visibility and Analytics Fabric. For similar use cases and other tips and tricks, join the Gigamon Community or request a demo.


Reference Documentation:

Thanks to Rukmangathan Annadurai for the documentation and the command references.

Featured Webinars
Hear from our experts on the latest trends and best practices to optimize your network visibility and analysis.

CONTINUE THE DISCUSSION

People are talking about this in the Gigamon Community’s Service Provider group.

Share your thoughts today


}
Back to top