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

First configlets_sync role version #196

Merged
merged 6 commits into from
Jun 3, 2020
Merged

Conversation

titom73
Copy link
Contributor

@titom73 titom73 commented May 11, 2020

Implement a role to synchronize configlets across 2 different Cloudvision servers. Originally described on EOS Central

Types of changes

  • New feature (non-breaking change which adds functionality)

Related Issue(s)

N/A

Proposed changes

New role to synchronized configlets between 2 CV instances based on a configlet tag.

How to test

Inventory:

  • generic CV options for ansible
all:
  children:
    cvp_sync:
      hosts:
        cv_server1:
          ansible_host: 10.83.28.164
          ansible_user: ansible
          ansible_password: ansible
        cv_server2:
          ansible_host: 3.101.27.173
          ansible_user: arista
          ansible_password: arista

Playbook

---
- name: Shared Configlets across CVP clusters
  hosts: cvp_sync
  serial: true
  gather_facts: no
  collections:
    - arista.cvp
  tasks:
    - name: 'Init Configlets Sync structure'
      import_role:
        name: configlets_sync
      vars:
        action: init

    - name: 'Sync Shared Configlets'
      import_role:
        name: configlets_sync
      vars:
        action: pull

    - name: 'Refresh Shared Configlets'
      import_role:
        name: configlets_sync
      vars:
        action: push

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • All new and existing tests passed (make linting and make sanity-lint).

@titom73 titom73 added type: enhancement New feature or request status: in-progress Currently under investigation or implementation labels May 11, 2020
@titom73 titom73 added this to the v1.1.2 milestone May 11, 2020
@titom73 titom73 requested a review from Hugh-Adams May 11, 2020 16:55
@titom73 titom73 self-assigned this May 11, 2020
@titom73 titom73 added this to In progress in Feature development May 11, 2020
Use a variable for delegate_to even if it should not be changed since
arista.cvp tasks are not delegated.
@titom73
Copy link
Contributor Author

titom73 commented May 13, 2020

Tests:

Phase 1:

  • CVP 01: 2020 (lab)
  • CVP02: 2019 (ADC)
  • configlet tag: shared
  • One configlet on each side

Result: OK

Phase 2:

  • CVP 01: 2019 (ADC)
  • CVP02: 2019 (ADC)
  • configlet tag: shared
  • 2 configlets on CVP01

Result: OK

Phase 3:

  • CVP 01: 2019 (ADC)
  • CVP02: 2019 (ADC)
  • configlet tag: inetsix

Result: OK

- Pull: Extract shared configlets from CVP servers and save locally
- Push: deployed previously saved configlets to Cloudvision servers
- Sync: run both Pull and then Push
Change actions supported by the role.
Add more playbook examples
@titom73 titom73 marked this pull request as ready for review May 13, 2020 08:35
@titom73 titom73 moved this from In progress to Done in Feature development May 13, 2020
@titom73 titom73 changed the base branch from master to releases/v1.1.x May 13, 2020 08:35
@titom73 titom73 requested a review from ksator May 16, 2020 07:17
Base automatically changed from releases/v1.1.x to devel May 20, 2020 14:26
@titom73 titom73 merged commit e62a80d into devel Jun 3, 2020
@titom73 titom73 deleted the features/configlets-sync branch June 3, 2020 21:26
@titom73 titom73 mentioned this pull request Jul 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: in-progress Currently under investigation or implementation type: enhancement New feature or request
Projects
Development

Successfully merging this pull request may close these issues.

None yet

1 participant