Devnet
NSO
Installing Nso 5.3

Installing Cisco NSO on Ubuntu Linux

I have been exploring Cisco's NSO (Network Services Orchestrator), which serves as Cisco's proprietary Orchestration platform, akin to tools like Ansible, Chef, or Puppet. Remarkably, NSO is vendor-agnostic, enabling management beyond Cisco devices.

In this guide, I'll demonstrate the process of installing NSO on Ubuntu Linux in a laboratory setting, ideal for development, testing, or proof-of-concept endeavors. This localized installation facilitates the creation of multiple NSO instances for experimentation and configuration adjustment in a controlled environment. Therefore, if you wish to follow along, set up a Linux server and return promptly!

For permanent or production setups, a system-wide installation is necessary. This approach ensures that the NSO application and associated services initialize and terminate alongside the server. This procedure differs slightly from the Local Install method and is detailed in the NSO documentation.

More About NSO

NSO emerged from Cisco's acquisition of Tail-F Systems. Initially, Tail-F Systems/NSO served as a NETCONF and YANG Orchestration platform primarily catering to Service Providers' needs. However, the demand for network automation and orchestration has expanded beyond Service Providers to encompass diverse organizations.

NSO's major advantage, as I discovered through a tutorial video, lies in its capability to retrieve existing configurations from network devices on Day 1. Subsequently, NSO facilitates the management and automation of networks in their current state. In contrast, alternative platforms may necessitate significant development efforts before being able to orchestrate existing networks.

Cisco offers a free edition of NSO for Lab/Non-Production environments through Cisco DevNet. We'll obtain our NSO copy from Cisco DevNet for the purposes of this guide.

Setting Up the Lab

For this demonstration, I'm deploying NSO locally on a Ubuntu Linux virtual machine hosted in VMware Workstation. This setup enables interaction with virtual devices in GNS3 or CML2, as well as physical hardware in the lab environment.

To streamline connectivity, I've configured my VM's network card in bridge mode, allowing it to acquire an IP address on the local LAN and communicate with other servers and devices.

Obtaining the Installer Files

Initially, we require the installer files. Although NSO is free, you'll need your Cisco CCO ID to access them. Ensure you have these credentials ready.

  1. Visit Cisco's NSO page (opens in a new tab).
  2. Navigate to "Getting NSO" under the "Getting Started" section in the sidebar.
  3. Click on "Downloads" and select "NSO 5.3 Linux".
  4. You'll be prompted to log in using your Cisco credentials. Proceed with authentication.

Transferring to Linux

As I'm using the server version of Ubuntu without a GUI, I encountered issues unpacking files due to fatal errors related to file integrity. Despite attempting TFTP and SCP transfers, the problem persisted. Eventually, I succeeded using SFTP.

To set up an SFTP server on Windows swiftly, I utilized the SolarWinds SFTP Server. Following installation, open the settings window by double-clicking the tray icon.

  1. Open the settings and switch the Allowed Protocols to "SFTP".
  2. Add a user or enable anonymous login.
  3. Place the downloaded file in the SFTP_Root folder created by the SolarWinds SFTP/SCP server.

SFTP Transfer of NSO Installer

On my clean Ubuntu Server 20.04, I created a directory named "downloads" to receive the downloaded file. Then, I accessed the SFTP client using the username@server-ip format, entered the password, and initiated the file transfer.

mkdir downloads
cd downloads
sftp username@server-ip

Retrieve the file using the GET command. Upon completion, verify the presence of the file in the downloads folder.

Installing NSO

Before proceeding with the NSO installation, ensure to obtain the following prerequisites:

  • Python 3
  • python-is-python package or else you may get an erro: "ERROR Verification requires Python version 2.7.4 or later." as only python3 works in newer versions of Ubuntu. or you can use --skip-verification as shown below
  • Java Runtime Environment
  • Apache Ant
  • Python Installer (pip)
  • Paramiko (Python SSHv2 implementation)
  • Tree (for visualizing folder structures)

Install the prerequisites using the following commands:

sudo apt update
sudo apt-get install default-jdk ant python3-pip python-is-python3 -y
pip3 install paramiko -y
sudo apt-get install tree -y

Now, execute the NSO installer using the sh command, specifying the --skip-verification flag to bypass signature verification.

sh nso-5.3.linux.x86_64.signed.bin --skip-verification

Upon successful unpacking, proceed with the installation. Specify a new folder for NSO files using the --local-install flag.

sh nso-5.3.linux.x86_64.installer.bin $HOME/ncs-5.3 --local-install

Complete the environment setup within the designated folder structures:

source $HOME/ncs-5.3/ncsrc
ncs-setup --dest $HOME/ncs-run

Navigate to the NSO runtime folder and initiate NSO:

cd $HOME/ncs-run
ncs

Assuming a successful startup, access NSO via http://server-ip:8080/login.html (opens in a new tab) using the credentials admin/admin.

Conclusion

Congratulations! You've now installed NSO and are primed to delve into its functionalities. In a future blog post, I'll delve into device addition and configuration retrieval using NSO. Stay tuned for more insights!

Credit: NO BLINKY BLINKY Blog (opens in a new tab)