Quick Start Guide

Quick start instructions to get started with NSO.


This quick start guide uses a Local Install of NSO for those just getting started to try or evaluate NSO. The NSO Installation and Deployment Guide details handling Local and System installations.

Local vs. System Install

Before you install NSO onto your system, you need to decide whether to do a System or a Local installation. Here's a simple breakdown of the two:

  • Use System Install when installing NSO for a centralized, "always-on" production-grade purpose. System installs configure NSO as a system daemon that starts and ends with the underlying operating system. Linux PAM is used instead of NSO local authentication using the admin and oper default users, and the file structure is distributed.

  • Use Local Install for development, lab, and evaluation purposes. It unpacks all the application components, including docs and examples. The developer can use local installs to run multiple unrelated instances of NSO for different labs and demos on a single workstation.


Download Your NSO Free Trial Installer and Cisco NEDs

This evaluation copy has been provided under the terms of the Cisco NSO Evaluation License. There are two versions of the NSO installer for macOS and Linux systems, respectively:

Requirements

For development purposes, choose between the following:

  • Linux for x86_64 or arm64.

  • macOS Darwin for x86_64 or arm64.

A detailed list of NSO installation requirements can be found in the NSO Installation and Deployment Guide.

Installation

The recommended guide for installing NSO is the NSO Installation and Deployment Guide. The description below is a quick-start version.

Operating System

Cisco NSO can run on macOS or Linux systems. If you are a Windows user (or do not wish to install it natively on your laptop), you can install NSO on a Linux virtual machine or in a container.

If you use Docker, there are pre-built system install images available. See the Containerized NSO guide.

There are NSO Playgrounds available to dive right in and try out examples in a user-friendly browser-based integrated development environment (IDE).

Performing a Local Install

Once you've installed the prereqs and downloaded the NSO installation file for your operating system, you are ready to do your installation:

1

Open a terminal and navigate to the directory where you downloaded the installer.

Ensure that you have the correct installer binary for your OS, darwin is for macOS, and linux for Linux distributions.

If your file is a signed.bin file, this means that Cisco has digitally signed the file you downloaded, and when you execute it, you'll verify the signature and unpack the installer.bin. If you have the installer.bin , skip down past the signed steps.

2

Use the sh command to "run" the signed.bin to verify the certificate and extract the installer binary and other files.

3

If it all comes back green, you're in good shape and ready to install.

Here is what was unpacked:

  • The NSO installer nso-VERSION.OS.ARCH.installer.bin.

  • Signature generated for the NSO image nso-VERSION.OS.ARCH.installer.bin.signature.

  • An enclosed Cisco-signed tailf.cer x.509 end-entity certificate containing the public key that is used to verify the signature.

  • README.signature file which briefs you on more details on the unpacked content and the steps on "How to run the signature verification program". If you would like to manually verify the signature, please refer to the steps in this file.

  • cisco_x509_verify_release.py python program that can be used to verify the 3-tier x.509 certificate chain and signature.

4

First, check out the --help on the installer binary using the sh nso-6.0.darwin.x86_64.installer.bin --help command. Notice the two options for --local-install or --system-install.

5

For the installation directory or LocalInstallDir, the recommendation is to install it into your $HOME directory in a folder called ~/nso-VERSION. So if our version is 6.0, our directory will be ~/nso-6.0.

6

Run the installer with the argument --local-install ~/nso-6.0 to install it into your home directory.

7

That's it. NSO is installed.

Exploring the Installation

Before we start up NSO, let's just look at what we have.

Go ahead and cd into the new installation directory.

Documentation

Note: Links to the online version of the NSO Guides and NSO Extension API Reference documentation.

Along with the binaries, NSO installs a full set of documentation available in the doc/ folder in ~/nso-6.0.

Feel free to open up the index.html file in your favorite browser and poke around (you can use the open command in the terminal to open the file). You'll find installation, admin, user, development, and more guides available for you to jump right into.

Examples

An NSO Local Install also comes with A LOT of examples of a variety of different types of ways you can use NSO. Many of these touch on advanced topics, but there are plenty of basic ones as well. Here are the high-level directories of examples in ~/nso-6.0/examples.ncs

NEDs or Network Element Drivers

In order to "talk to" the network, NSO uses NEDs as device drivers for different device types. Cisco has NEDs for hundreds of different devices available for customers, and several are included in the installer in the ~/nso-6.0/packages/neds directory.

Here you can see there are NEDs for Cisco ASA, IOS, IOS XR, and NX-OS. Also included are NEDs for other vendors including Juniper JunOS, A10, ALU, and Dell.

Note: The NEDs included in the installer are intended for evaluation, demonstration, and use with the examples.ncs that are also included. These are not the latest versions available, and often don't have all the features available in production NEDs.

Installing New NED Versions

Cisco also makes additional versions of some NEDs available on DevNet for evaluation and non-production use. You can find them with the NSO downloads (scroll up!).

Note: The specific file names and versions you download maybe different from this guide. Update the paths appropriately.

  1. Like the NSO installer, the NEDs are signed.bin files that need to be run to validate the download and extract the new code.

  2. First, find the downloaded files - change to the working directory where your downloads are:

Note: The filenames indicate which version of NSO the NEDs are pre-compiled for (in this case NSO 6.0), and the version of the NED.

  1. Use the sh command to "run" the signed.bin to verify the certificate and extract the NED tar.gz and other files. Repeat for all files.

Output:

  1. You now have three tarballs (.tar.gz) files. These are compressed versions of the NEDs.

Output:

  1. Navigate to the packages/neds directory for your local install.

  1. While in ~/nso-6.0/packages/neds directory, extract the tarballs into this directory using the tar command with the path to where the compressed NED is located:

Update the path and file name for the NED versions you downloaded

Here is a sample list of the newer NEDs extracted along with the ones bundled with the installation:

  1. And now you have the newer NED versions available, as well as the demo/evaluation versions included with NSO itself!

ncsrc File

The last thing to note is the files ncsrc and ncsrc.tsch. These are shell scripts for bash and tsch that set up your PATH and other environment variables for NSO. Depending on your shell, you will need source this file before starting your NSO work.

Most users add source ~/nso-6.0/ncsrc to their ~/.bash_profile, but you can just do it manually when you want it. Once it has been "sourced" you have access to all the NSO executable commands - which start with ncs.

Creating an Instance of NSO

A NSO Local Install unpacks and prepares your system to run NSO, but doesn't actually start it up. A Local Install allows the engineer to create an NSO "instance" tied to a project, which you have not done yet.

If you are familiar with Python, you can think of this like creating a Python virtual environment after installing Python. Within this NSO instance, you will have different inventory, configuration, and code.

Using ncs-setup to Create an NSO Instance

One of the included scripts with an NSO installation is ncs-setup, which makes it very easy to create instances of NSO from a Local Install. You can look at the --help for full details, but the two options we need to know are: * --dest defines the directory where you want to set up NSO (if the directory does not exist, it will be created) * --package defines the NEDs you want to this NSO instance to have installed. You can specify this option multiple times.

Note: NCS is the original name of the NSO product, so many the commands and application features will be prefaced with ncs. Think of ncs as another name for NSO.

  1. Go ahead and run this command to setup an NSO instance in the current directory with the IOS, NX-OS, IOS-XR, and ASA NEDs, you only need one NED per platform that you want NSO to manage (even though you may have multiple versions in your installer neds directory).\

    You will want to use the name of the NED folder in ${NCS_DIR}/packages/neds for the latest NED version you've got installed for the target platform. You can use tab complete after you start typing a path (or just copy and paste, though double check the NED version numbers below match what is currently on the sandbox to avoid a syntax error):

  2. If you check out the nso-instance directory now, you'll find several new files and folders have been created. This guide won't go through them all in detail now, but a couple are handy to know about.

    • ncs.conf is the NSO application configuration file which is used to customize aspects of the NSO instance (for example, change ports, enable/disable features, enable Web UI, etc.). The defaults are often perfect for projects like this.

    • packages/ is the directory that has symlinks to the NEDs that we referenced in the --package arguments at setup.

    • logs/ is the directory that contains all the logs from NSO. This directory is useful when troubleshooting.

  3. Now you need to "start" your NSO instance. Navigate to the nso-instance directory and type the command ncs. It will take a few seconds to run, and you won't get any explicit output unless there is a problem.

Note: You need to be in the nso-instance directory each time you want to start or stop NSO. If you have multiple instances, you need to navigate to each one to use the ncs command to start or stop each one.

  1. You can verify that NSO is running by using the ncs --status | grep status command, which has a large amount of information, so we use grep to just search for the status:

  1. Now you should add either some netsim devices (ncs-netsim -h) or lab devices to NSO and get automating!

Get Started

We recommend that you start with the online version or in the doc directory $HOME/nso-VERSION/doc/pdf/.

There are a lot of examples in the $HOME/nso-VERSION/examples.ncs directory. The examples have a short description in the $HOME/nso-VERSION/examples.ncs/READMEfile. Each example has a README file that explains how to run it.

To access the Web UI (usually at http://localhost:8080), first enable it in the ncs.conf file. See the NSO Web UI Guide for more information.

Sandboxes

If you do not want to download and install Cisco NSO, please check out the NSO Reservable Sandbox on DevNet. There is also an associated tutorial called Learn NSO the Easy Way.

Still Need Help?

There is a lot of material on the NSO Developer Hub, where you also can ask questions about anything NSO-related.

Last updated

Was this helpful?