{"id":24202031,"url":"https://github.com/andreygrechin/nano","last_synced_at":"2026-03-06T02:34:41.632Z","repository":{"id":144131536,"uuid":"408927132","full_name":"andreygrechin/nano","owner":"andreygrechin","description":"Nano services are a great feature to help you build a solid CI/CD pipeline with no or low code on top of Cisco NSO orchestration platform. Defined in YANG format, Nano services can be easily extended with small Python modules for specific tasks. This example service, named `nano`, demonstrates a pipeline with manual work approval, pre and post-testing, SLA tracking, Webex notifications, XML and Python template-based device configurations.","archived":false,"fork":false,"pushed_at":"2025-02-05T23:36:22.000Z","size":807,"stargazers_count":2,"open_issues_count":26,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-03T10:28:12.488Z","etag":null,"topics":["ci-cd","cisco","netdevops","nso","webex"],"latest_commit_sha":null,"homepage":"","language":"Jinja","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andreygrechin.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":".github/SUPPORT.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-21T18:13:31.000Z","updated_at":"2023-07-17T07:26:54.000Z","dependencies_parsed_at":"2023-11-12T09:20:23.921Z","dependency_job_id":"980ddb28-e6cb-422c-be52-ad40782157fc","html_url":"https://github.com/andreygrechin/nano","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/andreygrechin/nano","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreygrechin%2Fnano","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreygrechin%2Fnano/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreygrechin%2Fnano/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreygrechin%2Fnano/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andreygrechin","download_url":"https://codeload.github.com/andreygrechin/nano/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreygrechin%2Fnano/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30159600,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T22:39:40.138Z","status":"online","status_checked_at":"2026-03-06T02:00:08.268Z","response_time":250,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ci-cd","cisco","netdevops","nso","webex"],"created_at":"2025-01-13T21:17:43.466Z","updated_at":"2026-03-06T02:34:41.614Z","avatar_url":"https://github.com/andreygrechin.png","language":"Jinja","funding_links":[],"categories":[],"sub_categories":[],"readme":"# An NSO Nano service as a CI/CD pipeline\n\nNano services are a great feature to help you build a solid CI/CD pipeline with\nno or low code on top of Cisco NSO orchestration platform. Defined in YANG\nformat, Nano services can be easily extended with small Python modules for\nspecific tasks. This example service, named `nano`, demonstrates a pipeline with\nmanual work approval, pre and post-testing, SLA tracking, Webex notifications,\nXML and Python template-based device configurations.\n\nFor a description of a use case and a typical workflow, please check\n[USECASE.md](USECASE.md).\n\n**Provided code and configurations are intended for educational purposes only.**\n\n## How to run this example\n\nThis repo represents a folder where you should instantiate a local NSO CDB with\nthe `ncs-setup` command. Combining with NSO Local Install, it will create an\nenvironment to run and develop the example.\n\nYou need to complete a few steps:\n\n1. Install NSO in Local Install mode\n1. Clone the repo\n1. Create a Python virtual environment and install all dependencies\n1. Configure environment variables\n1. Compile packages and start NSO\n\nThe service is tested against NSO 5.5.2.6 for macOS (Intel), NEDs:\ncisco-ios-cli-3.8, Python 3.9.5.\n\n### Install NSO\n\nYou need to have an NSO installed in Local Install mode to run this example with\nmostly no modifications. For detailed instructions on how to get a copy of NSO\nand do a local install, please check\n[DevNet documentation](https://developer.cisco.com/docs/nso/#!getting-and-installing-nso)\nand\n[NSO Installation Guide](https://developer.cisco.com/docs/nso/guides/#!nso-local-install).\n\nAfter a successful installation, please make sure you source the `ncsrc` file\nfrom a local install folder, for example:\n\n```sh\n$ source /Users/username/nso/5.5.2.6/ncsrc\n\n$ ncs --version\n5.5.2.6\n\n$ echo $PYTHONPATH\n/Users/username/nso/5.5.2.6/src/ncs/pyapi\n\n$ echo $NCS_DIR\n/Users/username/nso/5.5.2.6\n```\n\n`/Users/username/nso/5.5.2.6/` is a NSO local install folder.\n\n### Clone the repo\n\n```sh\ngit clone https://githib.com/andreygrechin/nano\ncd nano\n```\n\n### Create a Python virtual environment and install all dependencies\n\nCheck a version of Python; we need at least 3.9.\n\n```sh\n$ python3 --version\nPython 3.9.5\n```\n\nTo install dependencies, run:\n\n```sh\n$ python3 -m venv .venv\n\n$ source .venv/bin/activate\n\n$ which python3\n/Users/username/repos/nso/nano/.venv/bin/python3\n\n$ pip3 install -r requirements.txt\n\n```\n\nFor linting and other development activities, you may add additional\nrequirements from `requirements-dev.txt`.\n\nTo check if NSO Python API is available, try this:\n\n```sh\npython3 -c \"import ncs\"\n```\n\n### Configure environment variables\n\nThe example uses Webex API to send notifications to an approver and report\nService Progress Monitoring (aka SLA of service instances) status. You can find\ninstructions on creating a Webex bot and getting all the required credentials\n[here](https://developer.webex.com/docs/bots).\n\nYou need to add obtained credentials via environment variables. Alternatively,\nyou may specify them as a part of a configuration of the service.\n\n```sh\nexport WEBEX_BOT_TOKEN=\"YOUR-WEBEX-BOT-TOKEN-HERE\"\nexport WEBEX_ROOM_ID=\"YOUR-WEBEX-ROOM-ID-HERE\"\n```\n\nTo check credentials, run:\n\n```sh\ncurl --location --request POST 'https://api.ciscospark.com/v1/messages' \\\n--header 'Content-Type: application/json' \\\n--header \"Authorization: Bearer ${WEBEX_BOT_TOKEN}\" \\\n--data-raw '{\n  \"roomId\" : \"'\"${WEBEX_ROOM_ID}\"'\",\n  \"text\" : \"my test msg\"\n}'\n```\n\n### Compile packages and start NSO\n\n`make` or `make all` will clean up underlying folders, compile YANG models, set\nup required simulated devices, create an empty local NSO CDB, create local NSO\nfiles in the repo folder, load configuration files, and start NSO.\n\nTo run CLI or WebUI, use `make cli` or `make webui`. A default password for the\nuser `admin` is `admin`.\n\nAfter entering CLI, check if all packages are successfully loaded.\n\n```text\nadmin@ncs# show packages package oper-status\n                                                                                                      PACKAGE\n                        PROGRAM                                                                       META     FILE\n                        CODE     JAVA           PYTHON         BAD NCS  PACKAGE  PACKAGE  CIRCULAR    DATA     LOAD   ERROR\nNAME                UP  ERROR    UNINITIALIZED  UNINITIALIZED  VERSION  NAME     VERSION  DEPENDENCY  ERROR    ERROR  INFO\n-----------------------------------------------------------------------------------------------------------------------------\ncisco-ios-cli-3.8   X   -        -              -              -        -        -        -           -        -      -\nexample-nano-0.1.0  X   -        -              -              -        -        -        -           -        -      -\n\nadmin@ncs#\n```\n\nFor a description of a use case and a typical workflow, please check\n[USECASE.md](USECASE.md).\n\n## Clean up\n\nAfter finishing your session, you may stop the NSO process and clean up folders\nwith `make clean` or just `make stop` to stop NSO.\n\n## Testing the NSO service\n\nTo optionally run `lux` tests, you need to install it with all dependencies.\nCheck [the documentation](https://github.com/hawk/lux/blob/master/INSTALL.md)\nfor details.\n\nAn example of a [lux](https://github.com/hawk/lux) script is included in the\nrepo. It's pretty simple, but it does the job. Check it\n[here](tests/internal/lux/service/run.lux). You may run it from scratch with the\n`make all nsotest` command.\n\n## Getting help\n\nIf you have questions, concerns, bug reports, etc., please create an issue\nagainst this repository.\n\n## Getting involved\n\nFor contribution guidelines, please check\n[CONTRIBUTING.md](.github/CONTRIBUTING.md).\n\n## References\n\n1. [NetDevOps intro from Julio Gomez](https://github.com/juliogomez/netdevops),\n   based on NSO, Ansible and GitLab CI/CD pipelines.\n1. [Nano Services – Another approach for Reactive Fastmap (RFM) services](https://www.youtube.com/watch?v=NJhOBf8J-J8), [demo](https://www.youtube.com/watch?v=DMHOlInbfe0).\n1. [Building a Service, from Template to Reactive Fast Map to Nano services](https://www.youtube.com/watch?v=OIzBhzdAC9M).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreygrechin%2Fnano","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandreygrechin%2Fnano","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreygrechin%2Fnano/lists"}