Juniper/OpenClos

Name: OpenClos

Owner: Juniper Networks

Description: null

Created: 2014-05-29 22:04:10.0

Updated: 2018-03-17 00:05:55.0

Pushed: 2018-03-27 07:51:04.0

Homepage: null

Size: 1885

Language: Python

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

OpenClos

UnitTest Status

OpenClos is a Python script library that helps you automate the design, deployment, and maintenance of a Layer 3 IP fabric built on Border Gateway Protocol (BGP).

To create an IP fabric that uses a spine and leaf architecture, the script generates configuration files for the devices in the fabric and uses zero-touch provisioning (ZTP) to push the configuration files to the devices. You can tailor the IP fabric to your network environment by adjusting values in the template files that are associated with the script.

Note: Fabric devices must be placed in a factory-default or zeroized state to participate in an OpenClos-generated IP fabric.

When you execute the script, it automatically generates values for the following device configuration settings within the IP fabric:

Supported Devices and Software
Install OpenClos on the Management Server
curl -L -u '<username>:<password>' -o OpenClos.zip https://github.com/Juniper/OpenClos/archive/<branch or tag>.zip
sudo pip install --egg OpenClos.zip

Install in development mode

curl -L -u '<username>:<password>' -o OpenClos.zip https://github.com/Juniper/OpenClos/archive/<branch or tag>.zip     
unzip OpenClos.zip  
cd OpenClos-<version>  
sudo pip install --egg -e .  

CentOS Installation Issues

For all the above errors, install the following packages and reinstall OpenClos.

sudo yum install -y python-devel libxml2-devel libxslt-devel gcc openssl

In CentOS 5.7, if the installation of lxml 3.4 causes a problem, manually install lxml 3.3.6 and then install OpenClos

sudo pip install lxml==3.3.6 --egg

Ubuntu Installation Issues

For all the above errors, install the following packages and reinstall OpenClos

sudo apt-get install -y python-dev libxml2-dev libxslt-dev

Windows Installation Issues

One of the OpenClos dependent modules uses PyCrypto. If the installation generates an error message, use the platform-specific prebuilt PyCrypto software from http://www.voidspace.org.uk/python/modules.shtml#pycrypto, and then reinstall OpenClos.

Configuration on the Management Server

Database

Junos OS image Copy the Junos OS image file to OpenClos-/jnpr/openclos/conf/ztp/ This image is pushed to the fabric devices in addition to the auto-generated configuration.

Example - OpenClos-R1.0.dev1/jnpr/openclos/conf/ztp/jinstall-qfx-5-13.2X51-D20.2-domestic-signed.tgz

Global configuration for the openclos.yaml file To configure ZTP, update the REST API IP address with the server's external IP address.

Example - ipAddr : 192.168.48.201

POD specific configuration for the closTemplate.yaml file

Please update the following settings per your own specific deployment environment:

Example - based on a 10-member IP Fabric:

For more examples, see /jnpr/openclos/conf/closTemplate.yaml

Run the script

The script is available at /jnpr/openclos/tests/sampleApplication.py

Runtime issues

OpenClos and its dependent module junos-eznc both use the same 'jnpr' namespace. If junos-eznc was already installed with pip, uninstall this module by issuing the “pip uninstall junos-eznc” command and then install OpenClos by issuing the “pip install OpenClos.zip –egg” command. Be sure to use '–egg' flag to avoid a 'flat' installation, which causes an import error.

Run tests
cd <path-to-OpenClos>/jnpr/openclos/tests
nosetests --exe --with-coverage --cover-package=jnpr.openclos --cover-erase
Output

The script generates the device configuration files and uses ZTP to send them to the devices.

It also generates a cabling plan in two formats:

All generated configurations (device and ZTP configurations) are stored in the /jnpr/openclos/out/PODID-PODNAME directory

License

Apache 2.0

Support

If you find an issue with the software, please open a bug report on the OpenClos repository.

The Juniper Networks Technical Assistance Center (JTAC) does not provide support for OpenClos software. You can obtain support for OpenClos by visiting the OpenClos Google Group


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.