GithubHelp home page GithubHelp logo

spyton / ansible-cvp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aristanetworks/ansible-cvp

0.0 1.0 0.0 4.21 MB

Ansible modules for Arista CloudVision

Home Page: http://cvp.avd.sh

License: Apache License 2.0

Python 86.91% Shell 2.24% Makefile 5.01% Dockerfile 1.25% CSS 1.61% HTML 2.98%

ansible-cvp's Introduction

collection version License

Ansible Modules for Arista CloudVision Platform

All the CV communication are now managed by cvprac library. So a new requirements MUST be installed first before any code execution.

About

Arista Networks supports Ansible for managing devices running the EOS operating system through CloudVision platform (CVP). This roles includes a set of ansible modules that perform specific configuration tasks on CVP server. These tasks include: collecting facts, managing configlets, containers, build provisionning topology and running tasks. For installation, you can refer to specific section of this readme.

Arista CloudVision and Ansible

More documentation is available in project's website

List of CVP versions supported

arista.cvp collection supports list of Cloudvision version as listed below:

When a CVP version is supported starting a specific version, any upcoming version will support that version until a specific announcement was made.

Modules overview

This repository provides content for Ansible's collection arista.cvp with following content:

List of available modules:

List of available roles:

Important notes

This repository is built based on new collections system introduced by ansible starting version 2.9.

It means that it is required to run at least ansible 2.9.0rc4 to be able to use this collection.

Getting Started

This example outlines how to use arista.cvp to create a containers topology on Arista CloudVision.

A dedicated repository is available for step by step examples on ansible-cvp-toi.

A complete end to end demo using Arista Validated Design collection and CloudVision modules is available as an example.

Below is a very basic example to build a container topology on a CloudVision platform assuming you have 3 veos named veos0{1,3} and a configlet named alias

---
- name: Playbook to demonstrate cv_container module.
  hosts: cvp
  connection: local
  gather_facts: no
  collections:
    - arista.cvp
  vars:
    containers_provision:
        Fabric:
          parent_container: Tenant
        Spines:
          parent_container: Fabric
        Leaves:
          parent_container: Fabric
          configlets:
              - alias
          devices:
            - veos03
        MLAG01:
          parent_container: Leaves
          devices:
            - veos01
            - veos02
  tasks:
    - name: "Gather CVP facts from {{inventory_hostname}}"
      cv_facts:
      register: cvp_facts

    - name: "Build Container topology on {{inventory_hostname}}"
      cv_container:
        topology: '{{containers_provision}}'
        cvp_facts: '{{cvp_facts.ansible_facts}}'

As modules of this collection are based on HTTPAPI connection plugin, authentication elements shall be declared using this plugin mechanism and are automatically shared with arista.cvp.cv_* modules.

[development]
cvp_foster  ansible_host= 10.90.224.122 ansible_httpapi_host=10.90.224.122

[development:vars]
ansible_connection=httpapi
ansible_httpapi_use_ssl=True
ansible_httpapi_validate_certs=False
ansible_user=cvpadmin
ansible_password=ansible
ansible_network_os=eos
ansible_httpapi_port=443

Installation

Complete installation process is available on repository website

Dependencies

This collection requires the following to be installed on the Ansible control machine:

  • python 3.6 and higher
  • ansible >= 2.9.0
  • cvprac version 1.0.4
  • requests >= 2.22.0
  • treelib 1.5.5
  • jsonschema 3.2.0

Installation from ansible-galaxy

Ansible galaxy hosts all stable version of this collection. Installation from ansible-galaxy is the most convenient approach for consuming arista.cvp content

$ ansible-galaxy collection install arista.cvp
Process install dependency map
Starting collection install process
Installing 'arista.cvp:1.0.1' to '~/.ansible/collections/ansible_collections/arista/cvp'

Git installation as source of collection

You can git clone this repository and use examples folder for testing. This folder contains a set of pre-configured playbook and ansible configuration:

$ git clone https://github.com/aristanetworks/ansible-cvp.git

Update your ansible.cfg to update collections_paths to point to local repository

collections_paths = /path/to/local/repository:~/.ansible/collections:/usr/share/ansible/collections

It is highly recommended to use a python virtual-environment to not alter your production environment.

Docker for testing

In an effort to support both arista.avd and arista.cvp collections, you can find a generic docker image in this repository.

Besides this image, a repository with some basic labs to use as part of a TOI are available in this repository

Resources

Ask a question

Support for this arista.cvp collection is provided by the community directly in this repository. Easiest way to get support is to open an issue.

Branching Model

  • The devel branch corresponds to the release actively under development.
  • The releases/x.x.x branches correspond to stable releases.
  • Fork repository and create a branch based on devel to set up a dev environment if you want to open a PR.
  • See the ansible-cvp release for information about active branches.

License

Project is published under Apache 2.0 License

ansible-cvp's People

Contributors

ajnouri avatar apollocreed avatar b-abadie avatar carlbuchmann avatar fredhsu avatar guillaumevilar avatar hugh-adams avatar jrecchia1029 avatar ksator avatar networkop avatar noredistribution avatar titom73 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.