Skip to content

jorschul/GVE_Devnet_DNAC_Github_Template

 
 

Repository files navigation

GVE Devnet: DNA Center & Github Configuration Template Manager

Contacts

  • Eda Akturk
  • Charles Llewellyn

Solution Components

Solution Overview

The solution creates a flask application that allows to manage configuration templates between DNA Center Lab, DNA Center Prod and Github.

  • Templates can be created on Github in the format of project_name/file_name with the template content from DNA Center Configuration Templates
  • Template status can be tracked between the different mediums and the sync status can be viewed on the GUI.
  • Templates can be pushed/updated in DNA Center Prod from Github Content.

For details please view "Usage" below.

Installation/Configuration

Clone the repo :

$ git clone (link)

(Optional) Create Virtual Environment :

Initialize a virtual environment

virtualenv venv

Activate the virtual env

Windows venv\Scripts\activate

Linux source venv/bin/activate

Install the libraries :

$ pip install -r requirements.txt

Setup:

DNA Center

  1. Add the DNA Center Lab credentials in env_var.py
DNAC_URL = " "
DNAC_USER = " "
DNAC_PASS = " "
  1. Add the DNA Center Prod credentials in env_var.py
DNAC_URL_PROD = " "
DNAC_USER_PROD = " "
DNAC_PASS_PROD = " "

Database

  1. Download and install MongoDB.

  2. Add the database credentials to env_var.py

Database = " "
Cluster = " "
Collection = " "

Github

  1. In your Github account go to Settings --> Developer Settings --> Personal Access Tokens (https://github.com/settings/tokens).

  2. Here you will see your access tokens which allow to use the github api. You can use an existing access token or generate a new one from "Generate access token."

  3. Add your github credentials to the env_var.py. The Github Url format should be as: "https://api.github.com/repos/:username/:repo"

GITHUB_TOKEN = " "
GITHUB_URL = " "

Cisco Webex

  1. Create a Webex Chatbot from here.

  2. Add your Bot Token to env_var.py.

WEBEX_ACCESS_TOKEN= " "
  1. Add the email of Webex account to receive the notifications to webex_notification.py.
to = " "

Usage

From the GUI the users can:

  1. Update database with configuration template metadata from DNA Center Lab
  2. Compares configuration template content data with Github content, DNA Center Lab Content and DNA Center Prod content
  3. Creates development branch in GitHub with configuration templates
  4. Creates/updates templates in DNA Center Lab or Prod

GUI

/IMAGES/gui.png

Screenshots

/IMAGES/0image.png /IMAGES/0image.png /IMAGES/0image.png /IMAGES/0image.png

LICENSE

Provided under Cisco Sample Code License, for details see LICENSE

CODE_OF_CONDUCT

Our code of conduct is available here

CONTRIBUTING

See our contributing guidelines here

DISCLAIMER:

Please note: This script is meant for demo purposes only. All tools/ scripts in this repo are released for use "AS IS" without any warranties of any kind, including, but not limited to their installation, use, or performance. Any use of these scripts and tools is at your own risk. There is no guarantee that they have been through thorough testing in a comparable environment and we are not responsible for any damage or data loss incurred with their use. You are responsible for reviewing and testing any scripts you run thoroughly before use in any non-testing environment.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • CSS 86.5%
  • JavaScript 5.6%
  • Python 5.5%
  • HTML 2.4%