05-03-2022 12:32 AM - edited 05-03-2022 12:34 AM
Hi Team !
This topic aims to evolve along the time as well as along the issues and success i meet during this journey which covers how to move from a Local installation of NSO to a NID (NSO in Docker) installation.
I was able to create a docker instance of NSO using the great article :
https://developer.cisco.com/codeexchange/github/repo/NSO-developer/nso-docker
Still, i met some issues to access the nso webui but @u.avsec helped to fix it in this thread :
https://community.cisco.com/t5/nso-developer-hub-discussions/nso-docker/m-p/4603240#M7004
The idea here is to gather also the required steps to successfully achieve a Docker installation of NSO which includes all the packages & NEDS of a previous "baremetal" local installation.
Thanks a lot in advance for your incoming inputs !
Have a great day !
Jerems
Solved! Go to Solution.
05-03-2022 12:44 PM
Once NSO is shut down, copy over CDB dir and /packages dir. If you have anything fancy in ncs.conf coput that over too. That should be mostly it.
To "migrate" the CDB just paste the CDB files into the target container /cdb dir (make sure nothing is there beforehand).
05-16-2022 02:55 AM - edited 05-16-2022 04:53 AM
Hi @u.avsec ,
As you advised me here is what i performed :
docker run -itd --name nsojey -v /data/nso:/nso -v /data/nso-logs:/log -v /home/jeyriku/ncs_5.5.3/ncs-run/packages:/nso/run/packages/ -v /home/jeyriku/ncs_5.5.3/ncs-run/nso-jeyriku-instance/ncs-cdb:/nso/run/cdb -p 82:80 -p 4443:443 -p 8082:8080 -p 0.0.0.0:222:22 -e SSH_PORT=2024 -e HTTP_ENABLE=true -e HTTPS_ENABLE=true -e PAM=true -e ADMIN_PASSWORD=cisco cisco-nso-base:5.5.3
I have binded both folders :
/home/jeyriku/ncs_5.5.3/ncs-run/packages >>>> /nso/run/packages/
/home/jeyriku/ncs_5.5.3/ncs-run/nso-jeyriku-instance/ncs-cdb >>>> /nso/run/cdb
And it works ! i was able to recover the content of the CDB as well as all devices !
Thank you so much for your help !
Jerems
05-03-2022 12:50 AM - edited 05-03-2022 01:17 AM
Here are the components i rely on :
Ubuntu Workstation Intel i3 + 32Go RAM.
Local instance of NSO composed of different packages and Neds.
Docker instance of NSO :
Docker PS:
Docker Images:
Looking at the previous screenshot, you can see that not only nso is "Dockered".
My final goal is to make some virtual devices instantiated in ContainerLab to be inventoried into NSO.
Jerems !
05-03-2022 01:35 AM - edited 05-03-2022 01:41 AM
The installation process of the Docker Instance is pretty straight forward although i met some few hitches.
However, i'm now facing an authentication issue when passing this Docker Run command from my CLI :
docker run -itd --name nsojey -v /data/nso:/nso -v /data/nso-logs:/log -p 82:80 -p 4443:443 -p 8082:8080 -p 0.0.0.0:222:22 -e SSH_PORT=2024 -e HTTP_ENABLE=true -e ADMIN_PASSWORD=cisco cisco-nso-base:5.5
Authentication Failed :
I relied on this part of the article :
Thanks in advance for your help !
Jerems
05-03-2022 03:09 AM - edited 05-03-2022 03:10 AM
Found it by myself !
As i was trying to connect using the admin account i finally realized that the Docker Base install is somehow similar to a system install.
docker run -itd --name nsojey -v /data/nso:/nso -v /data/nso-logs:/log -p 82:80 -p 4443:443 -p 8082:8080 -p 0.0.0.0:222:22 -e SSH_PORT=2024 -e HTTP_ENABLE=true -e HTTPS_ENABLE=true -e PAM=true -e ADMIN_PASSWORD=cisco cisco-nso-base:5.5.3
Actually, because of having used the PAM option, it means that NSO will rely on container's system account to accomplish Authentication processes. Meaning that if i want to authenticate to NSO using the only account that exists ont he container at the moment which is root, i have to set password to the root account and game is over !
I relied on the article below to find the solution :
Then :
And :
Jerems
05-03-2022 03:17 AM
Next step, recover all datas including packages and NEd from my previous baremetal local instance of NSO.
If some of you have some drivers or inputs for that purpose, i will be very happy to hear from you !
Jerems
05-03-2022 12:44 PM
Once NSO is shut down, copy over CDB dir and /packages dir. If you have anything fancy in ncs.conf coput that over too. That should be mostly it.
To "migrate" the CDB just paste the CDB files into the target container /cdb dir (make sure nothing is there beforehand).
05-04-2022 02:50 AM
Hi @u.avsec,
Thanks again for your kind inputs !
I will give it a try this afternoon !
Cheers,
Jerems
05-16-2022 02:55 AM - edited 05-16-2022 04:53 AM
Hi @u.avsec ,
As you advised me here is what i performed :
docker run -itd --name nsojey -v /data/nso:/nso -v /data/nso-logs:/log -v /home/jeyriku/ncs_5.5.3/ncs-run/packages:/nso/run/packages/ -v /home/jeyriku/ncs_5.5.3/ncs-run/nso-jeyriku-instance/ncs-cdb:/nso/run/cdb -p 82:80 -p 4443:443 -p 8082:8080 -p 0.0.0.0:222:22 -e SSH_PORT=2024 -e HTTP_ENABLE=true -e HTTPS_ENABLE=true -e PAM=true -e ADMIN_PASSWORD=cisco cisco-nso-base:5.5.3
I have binded both folders :
/home/jeyriku/ncs_5.5.3/ncs-run/packages >>>> /nso/run/packages/
/home/jeyriku/ncs_5.5.3/ncs-run/nso-jeyriku-instance/ncs-cdb >>>> /nso/run/cdb
And it works ! i was able to recover the content of the CDB as well as all devices !
Thank you so much for your help !
Jerems
05-17-2022 12:42 AM
Hi Team,
It looks like i am missing some dependancies to let pyang works correctly from docker. The pyang directory is missing in here :
Whereas i have it in my previous "baremetal installation" :
I guess i have to edit the Dockerfile...
Feel free to comment if you have an idea.
Thanks in advance,
Jerems
05-17-2022 12:53 AM
I've tried to comment a line which is supposed to be deleted but it doesn't fix my issue :
Thanks in advance for your help !
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide