cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2943
Views
16
Helpful
8
Comments

Good Days,

Recently I installed NSO in few customers environments and I thought it would be helpful to automate the installation procedures instead of repeating it each time or PoC.

So I wrote Ansible module that take three inputs from user and take care of the rest


Variable NameUsage
ncs_package_nameThis is the name of NSO downloaded package (example: nso-4.4.linux.x86_64)
ncs_package_locationWhere you uploaded this package in linux server(example: /root/)
ncs_run_locationThe location of instantiated project from NSO installation (example: ncs-run or access_project)

Once you run the module (locally or via remote host), it will prepare the linux machine first with some settings (like disable selinux and firewalld services, install correct java version, update the cache..etc) then customize the bash profile with ncsrc file and finally install and run the NSO at the end


to run it, simply execute the below command on host that has ansible package installed


#ansible-playbook nso_demo.yml


if you need to run it in verbose mode to see the exact running commands, then add few "vvv" to the command


#ansible-playbook nso_demo.yml -vvv


Sample Output


Script Output

output1.png


NSO Started

output2.png



Please share any other ideas to automate the installation or NSO configuration.


Thank You


Regards

Bassim Aly


8 Comments
ian.scheidler1
Level 4
Level 4

Does this perform a local or system install of NSO?

Judging by the variable "ncs_run_location" it is a local install, right?

Sorry, no time to test, so I thought I'd be quicker to just ask. Thx.

Hello Ian,

Actually it's a local install, I'm planning to add system install tag to ansible playbook

sunge
Cisco Employee
Cisco Employee

Hey, very cool.

As for other ideas, have you checked out the "nct" tool-set?

rogaglia
Cisco Employee
Cisco Employee

Hi Bassim,

Good initiative, do you think you could upload the module to the github repository in the forum?

Roque

I didnt try it yet, but for sure I will work and try to orchestrate it. Thank You for your feedback!

Sure Roque, I will create a pull request to github repo.

jvikman
Cisco Employee
Cisco Employee

Do you have a link for the repo?

sbarvick
Cisco Employee
Cisco Employee

I'm actually working through the process to contribute some playbooks to DevNet.  In the meantime, this is the link:  GitHub - sbarvick-dd/nso-ansible-ops: A collection of Ansible playbooks for managing Cisco NSO installations

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the NSO Developer community: