cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4070
Views
0
Helpful
7
Replies

ESC package loading procedure in NSO

Hi 

I have one NSO and ESC installations as separate VMs and both of these are working fine. Thanks to Cisco Docs available online. Now i wan to integrate ESC to NSO. I have generated the NEDs and tried to load those in NSO as package but unfortunately in none of the avaliable docs it is mentined clearly that which files/forders  of ESC need to be copied in which file/folder.

Pls share the procedure doc to integration ESC in running NSO .

I am following the attached doc for the integration. But unfortunately, it specifies to copy NEDs in running NSO system. but which files and folder need to be copied, is not mentioned any where. Pls help.

 

 

 

Thanks

Satish 

2 Accepted Solutions

Accepted Solutions

it's also unclear where you're actually running NSO from...

 

Initially, you're in "ncs-run" -- and this is where you're building the ESC NED....

        ubuntu@ubuntu1604:~/escyang$ cd /home/ubuntu/ncs-run/packages/

 

and then... you seem to be trying to run from a completely different place???

       ubuntu@ubuntu1604:~/ncs-run/packages/esc/src$ cd ~/nso-4.7/examples.ncs/getting-started/using-ncs/1-simulated-cisco-ios/
     ubuntu@ubuntu1604:~/nso-4.7/examples.ncs/getting-started/using-ncs/1-simulated-cisco-ios$ ncs
     ubuntu@ubuntu1604:~/nso-4.7/examples.ncs/getting-started/using-ncs/1-simulated-cisco-ios$ ncs_cli -u admin -C

 

this doesnt seem correct...

 

 

View solution in original post

perfect! that seemed to be a good idea :)

everything you do should be from "ncs-run"

 

glad it works :)

View solution in original post

7 Replies 7

gschudel
Cisco Employee
Cisco Employee

ESC uses "confd" and hence presents a NETCONF interface to NSO. The ESC NED that is included in the nfvo-function pack is pre-built and pre-complied for the NSO version of the nfvo-function pack being loaded.

However, If it is necessary to (re)build the ESC NED, follow this example (use any names, and use the IP or your ESC):

   -1- copy the YANG files from ESC to the linux box where NSO resides...
         (be sure to use the "-r" option for recursion in the directories being copied)

           mkdir escyang
           cd escyang
           scp -r admin@192.168.0.5:/opt/cisco/esc/esc-confd/YANGmodels-tailf/* .

 

  -2- in the NSO "packages" directory, create a netconf-ned for esc...

           cd $HOME/ncs-run/packages

           ncs-make-package --netconf-ned <location of yang in step 1> esc

 

  -3- compile the yang...
        (be sure that the ncsrc file has been 'sourced' before attempting "make")

           cd esc/src

           make

 

-4- "reload" from NSO to onboard the new (esc) NED package..

          admin@ncs> request packages reload

 

-5- "on-board" ESC into NSO as a new device..

 

admin@ncs> configure
Entering configuration mode private
[ok][2017-12-09 16:01:05]

[edit]
admin@ncs% set devices device esc0 address 192.168.0.5 device-type netconf
[ok][2017-12-09 16:01:14]

[edit]
admin@ncs% set devices device esc0 port 830
[ok][2017-12-09 16:01:26]

[edit]
admin@ncs% set devices device esc0 authgroup default
[ok][2017-12-09 16:02:07]

[edit]
admin@ncs% set devices device esc0 state admin-state unlocked
[ok][2017-12-09 16:02:23]


admin@ncs% commit
Commit complete.
[ok][2017-12-09 16:02:25]

[edit]
admin@ncs%


admin@ncs% request devices device esc0 ssh fetch-host-keys
result updated
fingerprint {
algorithm ssh-dss
value f2:b4:2d:a0:4f:97:88:13:fc:eb:29:50:b3:1e:e9:71
}
[ok][2017-12-09 16:03:14]

[edit]
admin@ncs% request devices device esc0 sync-from
result true
[ok][2017-12-09 16:03:20]

[edit]
admin@ncs%

admin@ncs% run show devices list
NAME ADDRESS DESCRIPTION NED ID ADMIN STATE
----------------------------------------------------
esc0 192.168.0.5 - netconf unlocked
[ok][2017-12-09 16:03:30]

[edit]
admin@ncs%

 

 

Hi gschudel 

Thanks for the detailed reply. It really helped me to proceed further. But after adding the esc0 device, sync fails.

I can see esc device from nso UI but it says "sync-failed" for esc device.

Pls see below the set of commands and their outputs as per your suggestions.

Requesting you to help further.

ubuntu@ubuntu1604:~$ mkdir escyang
ubuntu@ubuntu1604:~$ cd escyang/
ubuntu@ubuntu1604:~/escyang$ ls
ubuntu@ubuntu1604:~/escyang$ scp -r admin@10.109.191.132:/opt/cisco/esc/esc-confd/YANGmodels-tailf/* .
The authenticity of host '10.109.191.132 (10.109.191.132)' can't be established.
ECDSA key fingerprint is SHA256:/xcd5fEnnmfE7liTEZmPcpe+37T/nN2bgVN73sv53ns.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '10.109.191.132' (ECDSA) to the list of known hosts.
WARNING!!!
READ THIS BEFORE ATTEMPTING TO LOGON

This System is for the use of authorized users only. Individuals using this
computer without authority, or in excess of their authority, are subject to
having all of their activities on this system monitored and recorded by
system personnel. In the course of monitoring individuals improperly using
this system, or in the course of system maintenance, the activities of
authorized users may also be monitored. Anyone using this system expressly
consents to such monitoring and is advised that if such monitoring reveals
possible criminal activity, system personnel may provide the evidence of
such monitoring to law enforcement officials.

Copyright (c) 2018 by Cisco Systems, Inc.
All Rights Reserved

2018 Cisco Systems, Inc., Cisco, Cisco Systems, and Cisco Systems logo are
registered trademarks of Cisco Systems, Inc. and/or its affiliates in the
U.S. and certain other countries. The copyrights to certain works contained
in this software are owned by other third parties and used and distributed
under license. Certain components of this software are licensed under the
GNU General Public License (GPL) version 2.0 or the GPL v2.0 and LGPLv2.1.
admin@10.109.191.132's password:
build.gradle 100% 285 0.3KB/s 00:00
esc_config_data.fxs 100% 3136 3.1KB/s 00:00
esc_config_data.yang 100% 7233 7.1KB/s 00:00
esc_datamodel.fxs 100% 3474 3.4KB/s 00:00
esc_datamodel.yang 100% 7309 7.1KB/s 00:00
esc_disk.fxs 100% 1893 1.9KB/s 00:00
esc_disk.yang
.......
.........
100% 61KB 61.2KB/s 00:00
ubuntu@ubuntu1604:~/escyang$ cd /home/ubuntu/ncs-run/packages/
ubuntu@ubuntu1604:~/ncs-run/packages$ ls
ubuntu@ubuntu1604:~/ncs-run/packages$ source ~/nso-4.7/ncsrc
ubuntu@ubuntu1604:~/ncs-run/packages$ ncs-make-package --netconf-ned ~/escyang esc
ubuntu@ubuntu1604:~/ncs-run/packages$ cd esc
ubuntu@ubuntu1604:~/ncs-run/packages/esc$ ls
netsim package-meta-data.xml src
ubuntu@ubuntu1604:~/ncs-run/packages/esc$ cd src
ubuntu@ubuntu1604:~/ncs-run/packages/esc/src$ ls
java Makefile yang
ubuntu@ubuntu1604:~/ncs-run/packages/esc/src$ make
mkdir -p ncsc-out
mkdir -p ../load-dir
mkdir -p ../shared-jar
mkdir -p ../private-jar
/home/ubuntu/nso-4.7/bin/ncsc --ncs-compile-bundle yang \
--ncs-device-dir ncsc-out \
--ncs-device-type netconf \
&& \
cp ncsc-out/modules/fxs/*.fxs ../load-dir;
yang/esc_locators.yang:67: warning: The 'must' expression should have a tailf:dependency. If is doesn't, it will be checked for every commit.
yang/esc_locators.yang:67: warning: The 'must' expression should have a tailf:dependency. If is doesn't, it will be checked for every commit.
yang/esc_locators.yang:67: warning: The 'must' expression should have a tailf:dependency. If is doesn't, it will be checked for every commit.
yang/esc_network.yang:113: warning: The 'must' expression should have a tailf:dependency. If is doesn't, it will be checked for every commit.
yang/esc_network.yang:113: warning: The 'must' expression should have a tailf:dependency. If is doesn't, it will be checked for every commit.
yang/esc_network.yang:113: warning: The 'must' expression should have a tailf:dependency. If is doesn't, it will be checked for every commit.
........
.............
make[2]: Leaving directory '/home/ubuntu/ncs-run/packages/esc/netsim'
make[1]: Leaving directory '/home/ubuntu/ncs-run/packages/esc/netsim'

ubuntu@ubuntu1604:~/ncs-run/packages/esc/src$ cd ~/nso-4.7/examples.ncs/getting-started/using-ncs/1-simulated-cisco-ios/
ubuntu@ubuntu1604:~/nso-4.7/examples.ncs/getting-started/using-ncs/1-simulated-cisco-ios$ ncs
ubuntu@ubuntu1604:~/nso-4.7/examples.ncs/getting-started/using-ncs/1-simulated-cisco-ios$ ncs_cli -u admin -C

admin connected from 10.62.150.87 using ssh on ubuntu1604
admin@ncs# packages reload
reload-result {
package cisco-ios
result true
}
admin@ncs# configure
-----------^
syntax error: expecting
aaa - AAA management
alarms - Alarm management
autowizard - Automatically query for mandatory elements
call-home - Set satellite URL for Smart Licensing
cd - Change working directory
clear - Clear parameter
cluster - Cluster configuration
compare - Compare running configuration to another configuration or a file
complete-on-space - Enable/disable completion on space
compliance - Compliance reporting
config - Manipulate software configuration information
debug - Commands for debugging
describe - Display transparent command information
devices - The managed devices and device communication settings
devtools - Enable/disable development tools
display-level - Configure show command display level
exit - Exit the management session
file - Perform file operations
help - Provide help information
history - Configure history size
id - Show user id information
idle-timeout - Configure idle timeout
ignore-leading-space - Ignore leading whitespace (true/false)
java-vm - Control of the NCS Java VM
job - Job operations
license - Execute licensing commands
logout - Logout a user
ncs-state - NCS status information
no - Negate a command or set its defaults
output-file - Copy output to file or terminal
packages - Installed packages
paginate - Paginate output from CLI commands
prompt1 - Set operational mode prompt
prompt2 - Set configure mode prompt
pwd - Display current mode path
python-vm - Control of the NCS Python VM
quit - Exit the management session
scheduler - Time-based job scheduler suitable for scheduling periodic
background work.
screen-length - Configure screen length
screen-width - Configure screen width
script - Script actions
send - Send message to terminal of one or all users
services - The services managed by NCS
show - Show information about the system
show-defaults - Show default values when showing the configuration
smart-license -
software - Software management
source - File to source
switch - Change CLI style
templatize - Find patterns in subtree.
terminal - Set terminal type
timestamp - Enable/disable the display of timestamp
who - Display currently logged on users
write - Write configuration
zombies -
admin@ncs# config
Entering configuration mode terminal
admin@ncs(config)# set devices device esc0 address 10.109.191.132 device-type netconf
-------------------^
syntax error: unknown command
admin@ncs(config)# set
^
% Invalid input detected at '^' marker.
admin@ncs(config)# set
^
% Invalid input detected at '^' marker.
admin@ncs(config)# devices device esc0 address 10.109.191.132 device-type netconf
admin@ncs(config-device-esc0)# devices device esc0 port 830
admin@ncs(config-device-esc0)# devices device esc0 authgroup default
admin@ncs(config-device-esc0)# devices device esc0 state admin-state unlocked
admin@ncs(config-device-esc0)# commit
Commit complete.
admin@ncs(config-device-esc0)# request
^
% Invalid input detected at '^' marker.
admin@ncs(config-device-esc0)# request
^
% Invalid input detected at '^' marker.
admin@ncs(config-device-esc0)# devices device esc0 ssh fetch-host-keys
result updated
fingerprint {
algorithm ssh-rsa
value 2c:29:9c:b6:e2:cd:98:2a:21:93:b1:d4:86:d1:a6:e1
}
admin@ncs(config-device-esc0)# devices device esc0 sync-from
result false
info Device esc0 does not advertise any known YANG modules
admin@ncs(config-device-esc0)# *** ALARM connection-failure: Device esc0 does not advertise any known YANG modules
admin@ncs(config-device-esc0)# show devices list
------------------------------------^
syntax error: expecting
configuration - Show a parameter
full-configuration - Show a parameter
history - Display CLI command history
parser - Display parser information
admin@ncs(config-device-esc0)# devices list
---------------------------------------^
syntax error: incomplete path
admin@ncs(config-device-esc0)# run show devices list
-------------------------------^
syntax error: unknown command
admin@ncs(config-device-esc0)#

 

Rgds
Satish

 

You're in "cisco" CLI mode on NSO..

All the examples i gave were in Juniper CLI mode...

"switch cli" -- or use the commands appropriate to Cisco mode if that's the one you prefer.

 

cheers

gregg

it's also unclear where you're actually running NSO from...

 

Initially, you're in "ncs-run" -- and this is where you're building the ESC NED....

        ubuntu@ubuntu1604:~/escyang$ cd /home/ubuntu/ncs-run/packages/

 

and then... you seem to be trying to run from a completely different place???

       ubuntu@ubuntu1604:~/ncs-run/packages/esc/src$ cd ~/nso-4.7/examples.ncs/getting-started/using-ncs/1-simulated-cisco-ios/
     ubuntu@ubuntu1604:~/nso-4.7/examples.ncs/getting-started/using-ncs/1-simulated-cisco-ios$ ncs
     ubuntu@ubuntu1604:~/nso-4.7/examples.ncs/getting-started/using-ncs/1-simulated-cisco-ios$ ncs_cli -u admin -C

 

this doesnt seem correct...

 

 

Actually ncs fails to start while being ncs-run/packages/esc/src folder. That's why i have change the folder to "~/nso-4.7/examples.ncs/getting-started/using-ncs/1-simulated-cisco-ios/" to start ncs. Pls see below.

Will u be able to help me while on some screen sharing application?

Rgds

Satish

 

ubuntu@ubuntu1604:~/ncs-run/packages/esc/src$ source ~/nso-4.7/ncsrc
ubuntu@ubuntu1604:~/ncs-run/packages/esc/src$ make
cd java && ant -q all

BUILD SUCCESSFUL
Total time: 0 seconds
cd ../netsim && make all
make[1]: Entering directory '/home/ubuntu/ncs-run/packages/esc/netsim'
make esc_rules.fxs esc_volume.fxs esc_types.fxs esc_opdata_tenant.fxs esc_file_locators.fxs esc_opdata_devstats.fxs esc_scaling.fxs esc_opdata_networks.fxs esc_extension.fxs esc_network.fxs esc_port_forwarding.fxs esc_interface.fxs esc_property.fxs esc_disk.fxs esc_opdata_volumes.fxs esc_opdata.fxs esc_opdata_image_state_machine.fxs esc_config_data.fxs esc_opdata_default_locators.fxs esc_opdata_interface.fxs esc_datamodel.fxs esc_locators.fxs esc_opdata_state_machines.fxs esc_opdata_system_config.fxs esc_flavor.fxs esc_file_server.fxs esc_vim_connector.fxs esc_opdata_flavor_state_machine.fxs esc.fxs esc_opdata_flavors.fxs esc_opdata_images.fxs esc_info.fxs esc_policies.fxs esc_kpi.fxs
make[2]: Entering directory '/home/ubuntu/ncs-run/packages/esc/netsim'
make[2]: 'esc_rules.fxs' is up to date.
make[2]: 'esc_volume.fxs' is up to date.
make[2]: 'esc_types.fxs' is up to date.
make[2]: 'esc_opdata_tenant.fxs' is up to date.
make[2]: 'esc_file_locators.fxs' is up to date.
make[2]: 'esc_opdata_devstats.fxs' is up to date.
make[2]: 'esc_scaling.fxs' is up to date.
make[2]: 'esc_opdata_networks.fxs' is up to date.
make[2]: 'esc_extension.fxs' is up to date.
make[2]: 'esc_network.fxs' is up to date.
make[2]: 'esc_port_forwarding.fxs' is up to date.
make[2]: 'esc_interface.fxs' is up to date.
make[2]: 'esc_property.fxs' is up to date.
make[2]: 'esc_disk.fxs' is up to date.
make[2]: 'esc_opdata_volumes.fxs' is up to date.
make[2]: 'esc_opdata.fxs' is up to date.
make[2]: 'esc_opdata_image_state_machine.fxs' is up to date.
make[2]: 'esc_config_data.fxs' is up to date.
make[2]: 'esc_opdata_default_locators.fxs' is up to date.
make[2]: 'esc_opdata_interface.fxs' is up to date.
make[2]: 'esc_datamodel.fxs' is up to date.
make[2]: 'esc_locators.fxs' is up to date.
make[2]: 'esc_opdata_state_machines.fxs' is up to date.
make[2]: 'esc_opdata_system_config.fxs' is up to date.
make[2]: 'esc_flavor.fxs' is up to date.
make[2]: 'esc_file_server.fxs' is up to date.
make[2]: 'esc_vim_connector.fxs' is up to date.
make[2]: 'esc_opdata_flavor_state_machine.fxs' is up to date.
make[2]: 'esc.fxs' is up to date.
make[2]: 'esc_opdata_flavors.fxs' is up to date.
make[2]: 'esc_opdata_images.fxs' is up to date.
make[2]: 'esc_info.fxs' is up to date.
make[2]: 'esc_policies.fxs' is up to date.
make[2]: 'esc_kpi.fxs' is up to date.
make[2]: Leaving directory '/home/ubuntu/ncs-run/packages/esc/netsim'
make[1]: Leaving directory '/home/ubuntu/ncs-run/packages/esc/netsim'
ubuntu@ubuntu1604:~/ncs-run/packages/esc/src$ ncs --stop
ubuntu@ubuntu1604:~/ncs-run/packages/esc/src$ ncs
Bad configuration: /home/ubuntu/nso-4.7/etc/ncs/ncs.conf:0: "./state/packages-in-use: Failed to create symlink: no such file or directory"
Daemon died status=21
ubuntu@ubuntu1604:~/ncs-run/packages/esc/src$ source ~/nso-4.7/ncsrc
ubuntu@ubuntu1604:~/ncs-run/packages/esc/src$ ncs
Bad configuration: /home/ubuntu/nso-4.7/etc/ncs/ncs.conf:0: "./state/packages-in-use: Failed to create symlink: no such file or directory"
Daemon died status=21
ubuntu@ubuntu1604:~/ncs-run/packages/esc/src$

Thanks gschudel for your quick responses. I was able to fix the issue by reinstalling it and by running ncs from ncs-run directory only.

 

perfect! that seemed to be a good idea :)

everything you do should be from "ncs-run"

 

glad it works :)