Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add deployment option via CVP #18

Closed
carlbuchmann opened this issue Oct 11, 2019 · 2 comments
Closed

Add deployment option via CVP #18

carlbuchmann opened this issue Oct 11, 2019 · 2 comments
Assignees
Labels

Comments

@carlbuchmann
Copy link
Member

No description provided.

titom73 added a commit that referenced this issue Oct 29, 2019
- Implement a role to build CVP topology based on inventory file
- Render expected container topology in a user defined folder with user
defined name
- Implement a role to collect cvp facts and create containers topology

TODO:
- Add configlet support
- Add device support
titom73 added a commit that referenced this issue Oct 29, 2019
- Implement function to extract devices attached under a container.
- Create a subsection named devices with all devices to move to that
container in CVP
@titom73
Copy link
Contributor

titom73 commented Oct 29, 2019

Because ansible-cvp requires a specific input structure for cv_container cv_configlet and cv_device, a module is part of the repository to transform data from inventory to correct struture:

all:
  children:
    CVP:
      hosts:
        cvp:
# DC1_Fabric - EVPN Fabric running in home lab
    DC1:
      children:
        enterprise_servers:
          hosts:
            srv01:
        DC1_FABRIC:
          children:
            DC1_SPINES:
              hosts:
                DC1-SPINE1:
                DC1-SPINE2:
            DC1_L3LEAFS:
              children:
                DC1_LEAF1:
                  hosts:
                    DC1-LEAF1A:
                DC1_LEAF2:
                  hosts:
                    DC1-LEAF2A:
                    DC1-LEAF2B:
                DC1_SVC3:
                  hosts:
                    DC1-SVC3A:
                    DC1-SVC3B:
                DC1_BL1:
                  hosts:
                    DC1-BL1A:
                    DC1-BL1B:

Modul inputs

- name: generate intented variables
  inventory_to_container:
    inventory: 'inventory.yml'
    container_root: 'DC1_FABRIC'
    destination: 'generated_vars/{{inventory_hostname}}.yml'
  register: CVP_VARS

Output is currently like:

inventory_to_cv_topology:
      CVP_TOPOLOGY:
        DC1_BL1:
          devices:
          - DC1-BL1A
          - DC1-BL1B
          parent_container: DC1_L3LEAFS
        DC1_FABRIC:
          parent_container: Tenant
        DC1_L2LEAF4:
          devices:
          - DC1-L2LEAF4A
          parent_container: DC1_L2LEAFS
        DC1_L2LEAF5:
          devices:
          - DC1-L2LEAF5A
          - DC1-L2LEAF5B
          parent_container: DC1_L2LEAFS

titom73 added a commit that referenced this issue Oct 30, 2019
Create configlet structure to load generated config to CVP
Structure is saved in result['CVP_CONFIGLETS'] and can passed to cv_configlet
titom73 added a commit that referenced this issue Oct 30, 2019
titom73 added a commit that referenced this issue Nov 7, 2019
Create a template to generate dataset required for cv_device.
All devices part of DC1-FABRIC are included.
titom73 added a commit that referenced this issue Dec 4, 2019
Validate a complete worflow from ZTP to Up & Running

From AVD/CVP perspective, example provides:
- Module to generate vars from inventory
- role to generate cv_device inputs and run all tasks related to CVP
- A single playbook for EOS config generation based on AVD and CVP
deployment
- A readme file with how-to
- Current version 1.0.1 of ansible-cvp

Tested in lab using GNS3 topology of 6 devices (2 spines and 2 pairs of
    leafs) and CVP 2018.2.4 with complete ZTP process.
@carlbuchmann
Copy link
Member Author

resolved by #41

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants