Installing NCP Package

These steps will guide the user on how to install a tarball package on a Linux-based machine

NCP Installation Steps

  • Extract the contents of the NCP package

tar -xf ncp-onprem.tar.gz
  • Navigate to the extracted NCP directory

cd ncp-1711792447-onprem/
  • Start the installation by running the following command

sudo ./installer.sh

The installer can automatically detect and perform either a fresh installation or an upgrade.

  1. NCP supports SSL certificate integration

    1. Select "YES" if you want to integrate your own SSL certificate:

      Installing Network CoPilot
      ..................................................
      NCP is getting installed for the first time, choose appropriate options when prompted...
      ....................
      Installing prerequisites for NCP application
      ....................
      ....................
      ....................
      ....................
      Installing sshpass...
      dpkg: warning: downgrading sshpass from 1.09-1 to 1.06-1
      (Reading database ... 253981 files and directories currently installed.)
      Preparing to unpack .../sshpass_1.06-1_amd64.deb ...
      Unpacking sshpass (1.06-1) over (1.09-1) ...
      Setting up sshpass (1.06-1) ...
      Processing triggers for man-db (2.10.2-1) ...
      Installing NCP application...
      
      Do you want to install domain SSL certificate(if not, installation will proceed with a self signed certificate)? [y/n]: y
      Enter the path to the private key file: ./certs/server.pem 
      Enter the path to the certificate file: ./certs/server.crt.pem

      **Replace the Private key & certificate path to the correct location

    2. Select "No" if you wish to use a self-signed certificate included in the NCP package:

    Installing Network CoPilot
    ..................................................
    NCP is getting installed for the first time, choose appropriate options when prompted...
    ....................
    Installing prerequisites for NCP application
    ....................
    ....................
    ....................
    ....................
    Installing sshpass...
    dpkg: warning: downgrading sshpass from 1.09-1 to 1.06-1
    (Reading database ... 253981 files and directories currently installed.)
    Preparing to unpack .../sshpass_1.06-1_amd64.deb ...
    Unpacking sshpass (1.06-1) over (1.09-1) ...
    Setting up sshpass (1.06-1) ...
    Processing triggers for man-db (2.10.2-1) ...
    Installing NCP application...
    
    Do you want to install domain SSL certificate(if not, installation will proceed with a self signed certificate)? [y/n]: n
    Using self signed certificates...
    
  2. The installation allows a user to enable DB backup:

    1. Users can choose the local or remote location to back up the database

    2. By default, the application creates a database backup every 86400 seconds(1 day), but the user can modify it as per the requirement

  3. Local and Remote Backup:

    1. By default application creates 1 backup for local and for remote,

    2. It has a range of 1 to 3 and once it adds one more it will remove the first copy of the database,

    3. Users can modify the number of backup files at the time of installation

    4. By default NCP create a ./backup directory to maintain the local database asd

    Local backup:
    Do you want to enable DB backups? [y/n]y
    Where do you want to store the backups? [local/remote]: local    #local keyword trigger local database on server
    Enter the backup directory: ./backups     #Enter the server directory in which user wants to take backup
    Enter the number of backups (between 1 and 3) to retain (Older backups will be deleted): 1   #Enter the number of backup user wants to create
    Enter the backup interval in seconds (3600 seconds or higher): 86400 #Enter the value in seconds to take a backup 
    Remote backup:
    Do you want to enable DB backup feature? [y/n]: y
    Where do you want to store the backups? [local/remote]: remote    #remote keyword trigger remote database on server
    Please make sure the remote server is reachable via SSH
    Enter the remote machine IP: 10.0.0.1    
    Enter the remote machine username: admin
    Enter the remote machine password: 
    Enter the backup directory: ~/backups    #Enter the remote server directory in which user wants to take backup
    Backup is being done in 10.0.0.1 at ~/backups
    Enter the number of backups (between 1 and 100) to retain (Older backups will be deleted): 5    #Enter the number of backup user wants to create
    Enter the backup interval in seconds (3600 seconds or higher): 86400    #Enter the value in seconds to take a backup
  4. NCP supports certificate-based authentication between NCP App and devices for gNMI and Auto-discovery:

    1. For agent auto-discovery agent will act as a client and the collector as a server. For normal gNMI communication, the agent will act as a server and the collector as a client. Need certificates based on this.

    No:
    Do you want to enable certificate based authentication between NCP controller and devices? [y/n]: n
    Yes:
    Do you want to enable certificate based authentication between NCP controller and devices? [y/n]: y
    Enter the path to the ca-cert.pem file: ca-cert.pem    
    Enter the path to the server-cert.pem file: server-cert.pem    
    Enter the path to the server-key.pem file: server-key.pem
    Enter the path to the client-cert.pem file: client-cert.pem
    Enter the path to the client-key.pem file: client-key.pem
    Proceeding with certificates for Agent Auto Registration
    Enter the path to the ca-cert-reg.pem file: ca-cert-reg.pem
    Enter the path to the server-cert.pem file: server-cert.pem
    Enter the path to the server-key.pem file: server-key.pem
    Enter the path to the client-cert.pem file: client-cert.pem
    Enter the path to the client-key.pem file: client-key.pem 
    

    The user needs to provide the certificate path and replace the key name with the path of the certificate to be used here

  5. NCP Application support IP-based Access & FQDN Access:

    Enter the NCP App URL: https:// #Replace the input with IP or FQDN

    IP based

    Enter the NCP App URL <host-ip or domain>: https://192.168.1.1

    FQDN based

    Enter the NCP App URL <host-ip or domain>: https://ncp.aviznetworks.com
Installation Logs -
aviz@ncp:~/ncp-1711792447-onprem$ sudo ./installer.sh
[sudo] password for ravi:
Installing Network CoPilot
..................................................
NCP is getting installed for the first time, choose appropriate options when prompted...
....................
Installing prerequisites for NCP application
....................
....................
....................
....................
Installing sshpass...
dpkg: warning: downgrading sshpass from 1.09-1 to 1.06-1
(Reading database ... 253981 files and directories currently installed.)
Preparing to unpack .../sshpass_1.06-1_amd64.deb ...
Unpacking sshpass (1.06-1) over (1.09-1) ...
Setting up sshpass (1.06-1) ...
Processing triggers for man-db (2.10.2-1) ...
Installing NCP application...

Do you want to install domain SSL certificate(if not, installation will proceed with a self signed certificate)? [y/n]: n
Using self signed certificates...
Do you want to enable DB backup feature? [y/n]: n
Do you want to enable certificate based authentication between NCP controller and devices? [y/n]: n
Enter the NCP App URL <host-ip or domain>: https://10.4.5.33
Setting up the environment and loading essential dockers...
Loaded image: avizdock/collector:ncp
ce0cf0b53390: Loading layer [==================================================>]  77.59MB/77.59MB
0344a1894c78: Loading layer [==================================================>]  161.2MB/161.2

<...>


Finishing up NCP Installation...
............................................................Installed NCP application successfully...
....................
Open the NCP application  at https://<host-ip>

aviz@ncp:~/ncp-1711792447-onprem$
  • Verify the installation

aviz@ncp:~/ncp-1711792447-onprem$ docker-compose ps
      Name                    Command                  State                                                                    Ports
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
broker             /etc/confluent/docker/run        Up             0.0.0.0:29092->29092/tcp,:::29092->29092/tcp, 0.0.0.0:9092->9092/tcp,:::9092->9092/tcp, 0.0.0.0:9101->9101/tcp,:::9101->9101/tcp
chromadb           chroma run --host 0.0.0.0  ...   Up             8000/tcp
collector-db       /docker-entrypoint.sh postgres   Up             0.0.0.0:5432->5432/tcp,:::5432->5432/tcp, 8008/tcp, 8081/tcp
docker             python3 app.py                   Up
flow-collector     ./goflow2 -transport=kafka ...   Up             0.0.0.0:2055->2055/udp,:::2055->2055/udp, 0.0.0.0:6343->6343/udp,:::6343->6343/udp, 0.0.0.0:8099->8080/tcp,:::8099->8080/tcp
gnmi-collector     java -jar -XX:MaxGCPauseMi ...   Up             0.0.0.0:50053->50053/tcp,:::50053->50053/tcp, 8093/tcp
gnmi-gateway       ./gnmi-gateway -TargetLoad ...   Up             0.0.0.0:9339->9339/tcp,:::9339->9339/tcp
kafka-connect      /etc/confluent/docker/run        Up (healthy)   0.0.0.0:8083->8083/tcp,:::8083->8083/tcp, 9092/tcp
ksqldb-server      /usr/bin/docker/run              Up             0.0.0.0:8088->8088/tcp,:::8088->8088/tcp
ncp-api            gunicorn main:app -w 4 -k  ...   Up             0.0.0.0:9001->8000/tcp,:::9001->8000/tcp
ncp-db             docker-entrypoint.sh postgres    Up             5432/tcp
ncp-ui             docker-entrypoint.sh node  ...   Up             3002/tcp, 0.0.0.0:443->443/tcp,:::443->443/tcp
ncp-vllm           entrypoint.sh                    Up
schema-registry    /etc/confluent/docker/run        Up             0.0.0.0:8081->8081/tcp,:::8081->8081/tcp
snmp-collector     java -jar -XX:MaxGCPauseMi ...   Up             8093/tcp
stream-processor   java -jar /app/stream-proc ...   Up             8080/tcp
zookeeper          /etc/confluent/docker/run        Up             0.0.0.0:2181->2181/tcp,:::2181->2181/tcp, 2888/tcp, 3888/tcp
aviz@ncp:~/ncp-1711792447-onprem$

Last updated