Copyright 2020-2021 Cisco Systems, Inc
YANG Suite core Django application.
Capable of dynamic discovery of installed application plugins. Provides common library APIs for logging, filesystem access, GUI appearance and behavior, and client-server communication.
- Authors: Members of the Cisco YANG Suite development team.
- Supports: Python 3.6, Python 3.7, Python 3.8
YANG Suite can be installed as a Docker container or through Python package management. Docker-compose is the recommended install.
Requires about 3.5GB of memory to load large Cisco native models.
DevNet landing page: developer.cisco.com/yangsuite
Documentation: developer.cisco.com/docs/yangsuite
To use the resources in this repository, you must install Docker on the system where you want to run YANG Suite. In addition, since this YANG Suite repository uses Docker Compose, your system needs Docker Compose. Docker Desktop for Mac and Docker Desktop for Windows installations include Compose and you can install those using instructions at https://docs.docker.com/install. For Linux, follow these specific instructions to install Docker Compose on Linux systems.
-
Clone this repository
-
Generate the certificates for the HTTPS secure connection
-
Run docker-compose
-
Access the tool at https://localhost
git clone https://github.com/CiscoDevNet/yangsuite
cd yangsuite/docker/ ; ./gen_test_certs.sh
docker-compose up
WARNINGS:
- Change admin username/password default in docker-compose.yml file first!
- Official SSL/TLS certificate/key needs to be obtained and copied to yangsuite/docker/nginx directory.
To ensure you have the latest release of the YANG Suite Docker container files, from a terminal or PowerShell window, run: git clone https://github.com/CiscoDevNet/yangsuite.git
The SSL/TLS certificates installed with the nginx container should be obtained or generated using a trusted certificate authority. As a convenience you can use the yangsuite/docker/gen_test_certs.sh script to generate a self-signed certificate/key to get you going quickly.
After obtaining or generating a certificate/key, run this command in the yangsuite/docker/ directory:
docker-compose up
The yangsuite/docker/yangsuite/production.py file contains Django settings.
Adding/Updating plugins can be done through the Admin-->Manage plugins page or by copying the plugin wheels into the yangsuite/docker/yangsuite/ directory, uncomment the appropriate lines in the yangsuite/docker/yangsuite/dockerfile, and run:
docker-compose up --build
- Connect to https://localhost NOTE: You will get a complaint about the certificate if it was generated using "gen_test_certs.sh"
- Login using default user. You can find credentials in "cat docker-compose.yml" file. You should change this after your first login.
WARNING: You will not have HTTPS support unless you install a web server like NGINX and frontend it with uwsgi. Instructions for that can be found searching online.
- Create a Python 3.6, 3.7, or 3.8 virtural environment and activate it.
- Type
pip install yangsuite[core]
- You will be prompted to set superuser credentials.
- Use ctrl-c to stop the yangsuite server
- Use
yangsuite
to start the yangsuite server - Connect to http://localhost:8480.
- Login using user set at install.
- Activate the virtual environment
- Type
yangsuite -h