GithubHelp home page GithubHelp logo

ediboko1980 / sdwan-devops Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ciscodevnet/sdwan-devops

0.0 1.0 0.0 7.32 MB

SD-WAN DevOps Tools

License: Other

Dockerfile 16.56% Shell 12.31% Python 36.58% Groovy 34.55%

sdwan-devops's Introduction

SDWAN DevOps

This repo contains a set of tools to automate workflows and build CI/CD pipelines for Cisco SDWAN.

Note: The tools in this repo only work from a Unix environment with Docker (e.g. Linux, MacOS, etc.) due to issues with Ansible and file permissions mapping between Windows and the Linux container used in play.sh. WSL2 may fix this issue and we will revisit when WSL2 is released.

Installation

Cloning the repo

git clone --recursive https://github.com/ciscodevnet/sdwan-devops.git

All operations are run out of the sdwan-devops directory:

cd sdwan-devops

Software Dependancies

  • ansible-viptela (Delivered as part of the repo when --recursive is used when cloning)
  • Python 3 with the dependencies listed in requirements.txt
  • sshpass

Running with Docker

The easiest way to address the python and sshpass dependencies is to use the Dockerfile packaged in the repo. All development and testing uses this Dockerfile, so it is the best way to guarantee that the tooling will run as designed

Build the Docker container

To build the docker container, run:

docker build -t ansible-sdwan .

Running the the playbooks in the docker container

In order to make this easier, a bash script has been provided. To run a playbook specified in the directions, you can run using bash:

$ ./play.sh <playbook> <options>

Licensing Requirements

  • A Viptela license file and the Organization name associated with that license file in licenses/serialFile.viptela.
  • The Organization name associated with the serial file
  • A Cisco Smart License token that point to an account with ASAv licensing (when licensing non-SD-WAN VNFs is required)

Set the name of the organization, e.g.: Using bash:

export VMANAGE_ORG=myorgname

Note: This value can be set permanently in group_vars/all/local.yml

organization_name: "<your org name>"
license_token: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Note: Edge devices in the topologies must be updated to reflect the one from the serialFile.viptela provided. This is done by updated sdwan_uuid in the sdwan.yml inventory file in the host_vars directory corresponding to the edge device (e.g. inventory/hq1/host_vars/hq-cedge1/sdwan.yml). See the Variables section for more information.

Capabilities

Simulation

Simulation can be used for developing new deployments as well as testing changes to current deployments. Simulation capabilities are provided by VIRL^2. The Ansible VIRL^2 Modules are used to automate deployments in VIRL^2.

Automation

A set of playbooks is providing for automating deployments on several different infrastructures. Currently, the following infrastructure is supported:

  • VIRL
  • Vmware
  • AWS: Deployment on AWS can be done with the either:
  • Azure
  • NFVIS

Automation Playbooks

  • build-ca.yml: Creates a local CA

  • import-templates.yml

  • attach-templates.yml

  • import-policy.yml

  • activate-policy.yml

  • waitfor-sync.yml

  • build-XXXX.yml

  • config-XXXX.yml

    • Configure setting on vmanage
    • Install Enterprise CA when required
    • Add vbonds and vsmarts to vmanage
    • Create CSRs for vbonds and vsmarts
    • Install certificates into vmanage
    • Push certificates to controllers
    • Import templates if present
    • Import policy if present

Validation

Validation Playbooks

  • check-sdwan.yml
  • check-network.yml

Testing

Jenkins is used for automatic and manual testing.

Structure

Inventories

The repo contains a set of playbooks, roles, and templates that are fed from the included inventories. Several built-in topologies located in the inventory and more can be added. There are

To switch between topologies, either edit ansible.cfg and point inventory to the proper directory:

For example, change:

inventory = ./inventory/hq1

to

inventory = ./inventory/crn1

or specify -i with every command (e.g. ./play.sh -i inventory/hq1 build-cml.yml)

The local defaults for all inventories are set in sdwan-devops/group_vars/all/local/yml

Variables

The following variables are used by the playbooks and must be set somewhere in the inventory:

sdwan_system_ip: 192.168.255.13
sdwan_site_id: 1
sdwan_vbond: 10.0.0.11
sdwan_model: 'vedge-CSR-1000v'
sdwan_uuid: 'CSR-82DEC3C6-3A28-B866-6F4A-40BEA274CA00'
sdwan_personality: vedge
sdwan_template:
  name: 'hq-csr1000v'
  variables:
    'vpn512_interface': GigabitEthernet1
    'vpn0_internet_ipv4_address': 10.0.0.13/24
    'vpn0_default_gateway': 10.0.0.1
    'vpn0_interface': GigabitEthernet2
    'vpn1_ipv4_address': 10.0.255.6/30
    'vpn1_interface': GigabitEthernet3
    'vpn1_ospf_interface': GigabitEthernet3
    'system_latitude': 37.411343
    'system_longitude': -121.938803
    'system_site_id': 1
    'system_host_name': hq-cedge1
    'system_system_ip': 192.168.255.13
    'banner_login': "{{ login_banner }}"
    'banner_motd': Welcome to hq-cedge1!

Infrastructure specific playbooks for building the control plane and deploying vedges are described in the specific infrastructure instructions below

sdwan-devops's People

Contributors

stevenca avatar chrishocker avatar jasonking3 avatar tithomas1 avatar radtrentasei avatar stmosher avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.