From 4a875c84c9ee9b52bf6157393b45e05cbb980f61 Mon Sep 17 00:00:00 2001 From: Thomas Grimonet Date: Fri, 23 Oct 2020 16:14:34 +0200 Subject: [PATCH 1/7] Implement storm_control as per issue #154 Use Following input data model on either Ethernet Interfaces or Port-Channels: ``` storm_control: all: level: 10 unit: pps 'unknown-unicast': level: 1 unit: percent ``` Output generated: ``` interface Ethernet1 description P2P_LINK_TO_DC1-SPINE1_Ethernet7 no switchport ip address 172.31.255.17/31 storm-control all level pps 10 storm-control unknown-unicast level 1 ! ``` --- .../templates/eos/ethernet-interfaces.j2 | 9 +++++++++ .../templates/eos/port-channel-interfaces.j2 | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/ansible_collections/arista/avd/roles/eos_cli_config_gen/templates/eos/ethernet-interfaces.j2 b/ansible_collections/arista/avd/roles/eos_cli_config_gen/templates/eos/ethernet-interfaces.j2 index eed5902ea3f..9addc37a3b7 100644 --- a/ansible_collections/arista/avd/roles/eos_cli_config_gen/templates/eos/ethernet-interfaces.j2 +++ b/ansible_collections/arista/avd/roles/eos_cli_config_gen/templates/eos/ethernet-interfaces.j2 @@ -141,6 +141,15 @@ interface {{ ethernet_interface }} {% if ethernet_interfaces[ethernet_interface].vmtracer is defined and ethernet_interfaces[ethernet_interface].vmtracer == true %} vmtracer vmware-esx {% endif %} +{% if ethernet_interfaces[ethernet_interface].storm_control is defined and ethernet_interfaces[ethernet_interface].storm_control is not none %} +{% for section in ethernet_interfaces[ethernet_interface].storm_control | arista.avd.natural_sort %} +{% if ethernet_interfaces[ethernet_interface].storm_control[section].unit is defined and ethernet_interfaces[ethernet_interface].storm_control[section].unit == "pps" %} + storm-control {{ section }} level pps {{ethernet_interfaces[ethernet_interface].storm_control[section].level}} +{% else %} + storm-control {{ section }} level {{ethernet_interfaces[ethernet_interface].storm_control[section].level}} +{% endif %} +{% endfor %} +{% endif %} {% endif %} {% endfor %} {% endif %} diff --git a/ansible_collections/arista/avd/roles/eos_cli_config_gen/templates/eos/port-channel-interfaces.j2 b/ansible_collections/arista/avd/roles/eos_cli_config_gen/templates/eos/port-channel-interfaces.j2 index 9ea6f4ee163..aa4b82c84e4 100644 --- a/ansible_collections/arista/avd/roles/eos_cli_config_gen/templates/eos/port-channel-interfaces.j2 +++ b/ansible_collections/arista/avd/roles/eos_cli_config_gen/templates/eos/port-channel-interfaces.j2 @@ -117,5 +117,14 @@ interface {{ port_channel_interface }} {% if port_channel_interfaces[port_channel_interface].vmtracer is defined and port_channel_interfaces[port_channel_interface].vmtracer == true %} vmtracer vmware-esx {% endif %} +{% if port_channel_interfaces[port_channel_interface].storm_control is defined and port_channel_interfaces[port_channel_interface].storm_control is not none %} +{% for section in port_channel_interfaces[port_channel_interface].storm_control | arista.avd.natural_sort %} +{% if port_channel_interfaces[port_channel_interface].storm_control[section].unit is defined and port_channel_interfaces[port_channel_interface].storm_control[section].unit == "pps" %} + storm-control {{ section }} level pps {{port_channel_interfaces[port_channel_interface].storm_control[section].level}} +{% else %} + storm-control {{ section }} level {{port_channel_interfaces[port_channel_interface].storm_control[section].level}} +{% endif %} +{% endfor %} +{% endif %} {% endfor %} {% endif %} From 34661a043cacec06483c8293bb8c5472f16bcf27 Mon Sep 17 00:00:00 2001 From: Thomas Grimonet Date: Fri, 23 Oct 2020 16:16:55 +0200 Subject: [PATCH 2/7] Update documentation for #154 --- .../arista/avd/roles/eos_cli_config_gen/README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/ansible_collections/arista/avd/roles/eos_cli_config_gen/README.md b/ansible_collections/arista/avd/roles/eos_cli_config_gen/README.md index 83e53820cc5..4b1b46958a6 100644 --- a/ansible_collections/arista/avd/roles/eos_cli_config_gen/README.md +++ b/ansible_collections/arista/avd/roles/eos_cli_config_gen/README.md @@ -724,6 +724,19 @@ ethernet_interfaces: spanning_tree_bpduguard: < true | false > spanning_tree_portfast: < edge | network > vmtracer: < true | false > + storm_control: + all: + level: < Configure maximum storm-control level > + unit: < percent | pps > + broadcast: + level: < Configure maximum storm-control level > + unit: < percent | pps > + multicast: + level: < Configure maximum storm-control level > + unit: < percent | pps > + 'unknown-unicast': + level: < Configure maximum storm-control level > + unit: < percent | pps > ``` ### Loopback Interfaces From 27f611239d057916d64568fdcad0c495ad232a28 Mon Sep 17 00:00:00 2001 From: Thomas Grimonet Date: Sat, 28 Nov 2020 14:15:32 +0100 Subject: [PATCH 3/7] Update CI acritfacts --- .../molecule/dhcp_provisionning/converge.yml | 11 ++ .../molecule/dhcp_provisionning/create.yml | 13 ++ .../molecule/dhcp_provisionning/destroy.yml | 16 ++ .../cvp/ztp_configuration.yml | 60 ++++++ .../inventory/group_vars/AVD_LAB.yml | 32 +++ .../inventory/group_vars/DC1_FABRIC.yml | 187 ++++++++++++++++++ .../inventory/group_vars/DC1_L2LEAFS.yml | 1 + .../inventory/group_vars/DC1_LEAFS.yml | 1 + .../inventory/group_vars/DC1_SERVERS.yml | 72 +++++++ .../inventory/group_vars/DC1_SPINES.yml | 1 + .../group_vars/DC1_TENANTS_NETWORKS.yml | 122 ++++++++++++ .../inventory/group_vars/TOOLS.yml | 8 + .../inventory/host_vars/all.yml | 2 + .../dhcp_provisionning/inventory/hosts | 64 ++++++ .../molecule/dhcp_provisionning/molecule.yml | 65 ++++++ .../molecule/dhcp_provisionning/verify.yml | 9 + .../devices/ethernet-interfaces.md | 8 + .../intended/configs/ethernet-interfaces.cfg | 7 + .../host_vars/ethernet-interfaces.yml | 16 ++ 19 files changed, 695 insertions(+) create mode 100644 ansible_collections/arista/avd/molecule/dhcp_provisionning/converge.yml create mode 100644 ansible_collections/arista/avd/molecule/dhcp_provisionning/create.yml create mode 100644 ansible_collections/arista/avd/molecule/dhcp_provisionning/destroy.yml create mode 100644 ansible_collections/arista/avd/molecule/dhcp_provisionning/intended/structured_configs/cvp/ztp_configuration.yml create mode 100644 ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/group_vars/AVD_LAB.yml create mode 100644 ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/group_vars/DC1_FABRIC.yml create mode 100644 ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/group_vars/DC1_L2LEAFS.yml create mode 100644 ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/group_vars/DC1_LEAFS.yml create mode 100644 ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/group_vars/DC1_SERVERS.yml create mode 100644 ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/group_vars/DC1_SPINES.yml create mode 100644 ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/group_vars/DC1_TENANTS_NETWORKS.yml create mode 100644 ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/group_vars/TOOLS.yml create mode 100644 ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/host_vars/all.yml create mode 100644 ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/hosts create mode 100644 ansible_collections/arista/avd/molecule/dhcp_provisionning/molecule.yml create mode 100644 ansible_collections/arista/avd/molecule/dhcp_provisionning/verify.yml diff --git a/ansible_collections/arista/avd/molecule/dhcp_provisionning/converge.yml b/ansible_collections/arista/avd/molecule/dhcp_provisionning/converge.yml new file mode 100644 index 00000000000..e6bd9a21e09 --- /dev/null +++ b/ansible_collections/arista/avd/molecule/dhcp_provisionning/converge.yml @@ -0,0 +1,11 @@ +--- +- name: Converge + hosts: TOOLS + gather_facts: false + connection: local + tasks: + + - name: generate intented variables + delegate_to: 127.0.0.1 + import_role: + name: arista.avd.dhcp_provisioner diff --git a/ansible_collections/arista/avd/molecule/dhcp_provisionning/create.yml b/ansible_collections/arista/avd/molecule/dhcp_provisionning/create.yml new file mode 100644 index 00000000000..03188c3cb8a --- /dev/null +++ b/ansible_collections/arista/avd/molecule/dhcp_provisionning/create.yml @@ -0,0 +1,13 @@ +--- +- name: Configure local folders + hosts: all + gather_facts: false + connection: local + vars: + root_dir: '{{playbook_dir}}' + tasks: + - name: create local output folders + delegate_to: 127.0.0.1 + import_role: + name: arista.avd.build_output_folders + run_once: true diff --git a/ansible_collections/arista/avd/molecule/dhcp_provisionning/destroy.yml b/ansible_collections/arista/avd/molecule/dhcp_provisionning/destroy.yml new file mode 100644 index 00000000000..d0ca56cbba5 --- /dev/null +++ b/ansible_collections/arista/avd/molecule/dhcp_provisionning/destroy.yml @@ -0,0 +1,16 @@ +--- +- name: Remove output folders + hosts: all + gather_facts: false + connection: local + tasks: + - name: delete local folders + delegate_to: 127.0.0.1 + run_once: true + file: + path: "{{root_dir}}/{{ item }}" + state: absent + with_items: + - documentation + - intended + - config_backup diff --git a/ansible_collections/arista/avd/molecule/dhcp_provisionning/intended/structured_configs/cvp/ztp_configuration.yml b/ansible_collections/arista/avd/molecule/dhcp_provisionning/intended/structured_configs/cvp/ztp_configuration.yml new file mode 100644 index 00000000000..505dc9ac1a8 --- /dev/null +++ b/ansible_collections/arista/avd/molecule/dhcp_provisionning/intended/structured_configs/cvp/ztp_configuration.yml @@ -0,0 +1,60 @@ +--- +ztp: + default: + registration: http://192.168.200.11/ztp/bootstrap + gateway: 192.168.200.5 + nameservers: + - 192.168.200.5 + - 8.8.8.8 + use_system_mac: true + general: + subnets: + - network: 10.73.1.0 + netmask: 255.255.255.0 + gateway: 192.168.200.5 + nameservers: + - 192.168.200.5 + - 8.8.8.8 + start: 10.73.1.200 + end: 10.73.1.210 + lease_time: 300 + clients: + # SPINE + - name: DC1-SPINE1 + mac: 0c:1d:c0:1d:62:01 + ip4: 192.168.200.101 + - name: DC1-SPINE2 + mac: 0c:1d:c0:1d:62:01 + ip4: 192.168.200.102 + - name: DC1-SPINE3 + mac: 0c:1d:c0:1d:62:01 + ip4: 192.168.200.103 + - name: DC1-SPINE4 + mac: 0c:1d:c0:1d:62:01 + ip4: 192.168.200.104 + # L3LEAF + - name: DC1-LEAF1A + mac: 0c:1d:c0:1d:62:01 + ip4: 192.168.200.105 + - name: DC1-LEAF2A + mac: 0c:1d:c0:1d:62:01 + ip4: 192.168.200.106 + - name: DC1-LEAF2B + mac: 0c:1d:c0:1d:62:01 + ip4: 192.168.200.107 + - name: DC1-SVC3A + mac: 0c:1d:c0:1d:62:01 + ip4: 192.168.200.108 + - name: DC1-SVC3B + mac: 0c:1d:c0:1d:62:01 + ip4: 192.168.200.109 + - name: DC1-BL1A + mac: 0c:1d:c0:1d:62:01 + ip4: 192.168.200.110 + # L2LEAF + - name: DC1-L2LEAF1A + mac: 0c:1d:c0:1d:62:01 + ip4: 192.168.200.112 + - name: DC1-L2LEAF2B + mac: 0c:1d:c0:1d:62:01 + ip4: 192.168.200.114 diff --git a/ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/group_vars/AVD_LAB.yml b/ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/group_vars/AVD_LAB.yml new file mode 100644 index 00000000000..7f1dd687614 --- /dev/null +++ b/ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/group_vars/AVD_LAB.yml @@ -0,0 +1,32 @@ +# Nashua EVE-NG LAB shared attributes +root_dir: '{{playbook_dir}}' + +# local users +local_users: + admin: + privilege: 15 + role: network-admin + no_password: true + + cvpadmin: + privilege: 15 + role: network-admin + sha512_password: "$6$rZKcbIZ7iWGAWTUM$TCgDn1KcavS0s.OV8lacMTUkxTByfzcGlFlYUWroxYuU7M/9bIodhRO7nXGzMweUxvbk8mJmQl8Bh44cRktUj." + +# Cloud Vision server +cvp_instance_ips: + - 192.168.200.11 + +cvp_ingestauth_key: telarista + +# OOB Management network default gateway. +mgmt_gateway: 192.168.200.5 + +# dns servers. +name_servers: + - 192.168.200.5 + - 8.8.8.8 + +# NTP Servers IP or DNS name, first NTP server will be prefered, and sourced from Managment +ntp_servers: + - 192.168.200.5 diff --git a/ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/group_vars/DC1_FABRIC.yml b/ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/group_vars/DC1_FABRIC.yml new file mode 100644 index 00000000000..2c91ab416c0 --- /dev/null +++ b/ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/group_vars/DC1_FABRIC.yml @@ -0,0 +1,187 @@ +--- + +# L3LS Fabric Values - update these values with caution, some changes could be disruptive. + +fabric_name: DC1_FABRIC + +# Point to Point Network Summary range, assigned as /31 for each uplink interfaces +# Assign range larger then total [ spines * total potential leafs * 2 ] +underlay_p2p_network_summary: 172.31.255.0/24 + +# IP address range for evpn loopback for all switches in fabric, assigned as /32s +# Assign range larger then total spines + total leafs switches +overlay_loopback_network_summary: 192.168.255.0/24 + +# VTEP VXLAN Tunnel source loopback IP for leaf switches, assigned in /32s +# Assign range larger then total leaf switches +vtep_loopback_network_summary: 192.168.254.0/24 + +# mlag pair IP assignment - assign blocks - Assign range larger then total spines + total leafs switches +mlag_ips: + leaf_peer_l3: 10.255.251.0/24 + mlag_peer: 10.255.252.0/24 + +# Enable vlan aware bundles +vxlan_vlan_aware_bundles: true + +# bgp peer groups passwords +bgp_peer_groups: + IPv4_UNDERLAY_PEERS: + password: "AQQvKeimxJu+uGQ/yYvv9w==" + EVPN_OVERLAY_PEERS: + password: "q+VNViP5i4rVjW1cxFv2wA==" + MLAG_IPv4_UNDERLAY_PEER: + password: "vnEaG8gMeQf3d3cN6PktXQ==" + +# Spine Switches +spine: + platform: vEOS-LAB + bgp_as: 65001 + leaf_as_range: 65101-65132 + nodes: + DC1-SPINE1: + id: 1 + mgmt_ip: 192.168.200.101/24 + mac_address: '0c:1d:c0:1d:62:01' + DC1-SPINE2: + id: 2 + mgmt_ip: 192.168.200.102/24 + mac_address: '0c:1d:c0:1d:62:01' + DC1-SPINE3: + id: 3 + mgmt_ip: 192.168.200.103/24 + mac_address: '0c:1d:c0:1d:62:01' + DC1-SPINE4: + id: 4 + mgmt_ip: 192.168.200.104/24 + mac_address: '0c:1d:c0:1d:62:01' + +# Leaf switch groups +# A maximum of two nodes can form a leaf group +# When two nodes are in a leaf group this will automatically form mlag pair + +l3leaf: + defaults: + platform: vEOS-LAB + bgp_as: 65100 + spines: [ DC1-SPINE1, DC1-SPINE2, DC1-SPINE3, DC1-SPINE4 ] + uplink_to_spine_interfaces: [ Ethernet1, Ethernet2, Ethernet3, Ethernet4 ] + mlag_interfaces: [ Ethernet5, Ethernet6 ] + spanning_tree_mode: mstp + spanning_tree_priority: 4096 + virtual_router_mac_address: 00:dc:00:00:00:0a + node_groups: + DC1_LEAF1: + bgp_as: 65101 + filter: + tenants: [ all ] + tags: [ web, app ] + nodes: + DC1-LEAF1A: + id: 1 + mgmt_ip: 192.168.200.105/24 + mac_address: '0c:1d:c0:1d:62:01' + spine_interfaces: [ Ethernet1, Ethernet1, Ethernet1, Ethernet1 ] + DC1_LEAF2: + bgp_as: 65102 + filter: + tenants: [ Tenant_A, Tenant_B, Tenant_C ] + tags: [ opzone, web, app, db, vmotion, nfs ] + nodes: + DC1-LEAF2A: + id: 2 + mgmt_ip: 192.168.200.106/24 + mac_address: '0c:1d:c0:1d:62:01' + spine_interfaces: [ Ethernet2, Ethernet2, Ethernet2, Ethernet2 ] + DC1-LEAF2B: + id: 3 + mgmt_ip: 192.168.200.107/24 + mac_address: '0c:1d:c0:1d:62:01' + spine_interfaces: [ Ethernet3, Ethernet3, Ethernet3, Ethernet3 ] + DC1_SVC3: + bgp_as: 65103 + filter: + tenants: [ Tenant_A, Tenant_B, Tenant_C ] + tags: [ opzone, web, app, db, vmotion, nfs, wan ] + nodes: + DC1-SVC3A: + id: 4 + mgmt_ip: 192.168.200.108/24 + mac_address: '0c:1d:c0:1d:62:01' + spine_interfaces: [ Ethernet4, Ethernet4, Ethernet4, Ethernet4 ] + DC1-SVC3B: + id: 5 + mgmt_ip: 192.168.200.109/24 + mac_address: '0c:1d:c0:1d:62:01' + spine_interfaces: [ Ethernet5, Ethernet5, Ethernet5, Ethernet5 ] + DC1_BL1: + bgp_as: 65104 + filter: + tenants: [ all ] + tags: [ wan ] + nodes: + DC1-BL1A: + id: 6 + mgmt_ip: 192.168.200.110/24 + mac_address: '0c:1d:c0:1d:62:01' + spine_interfaces: [ Ethernet6, Ethernet6, Ethernet6, Ethernet6 ] + DC1-BL1B: + id: 7 + mgmt_ip: 192.168.200.111/24 + spine_interfaces: [ Ethernet7, Ethernet7, Ethernet7, Ethernet7 ] + +l2leaf: + defaults: + platform: vEOS-LAB + parent_l3leafs: [ DC1-SVC3A, DC1-SVC3B ] + uplink_interfaces: [ Ethernet1, Ethernet2 ] + mlag_interfaces: [ Ethernet3, Ethernet4 ] + spanning_tree_mode: mstp + spanning_tree_priority: 16384 + node_groups: + DC1_L2LEAF1: + parent_l3leafs: [ DC1-LEAF2A, DC1-LEAF2B ] + filter: + tenants: [ Tenant_A ] + tags: [ opzone, web, app ] + nodes: + DC1-L2LEAF1A: + id: 8 + mgmt_ip: 192.168.200.112/24 + mac_address: '0c:1d:c0:1d:62:01' + l3leaf_interfaces: [ Ethernet7, Ethernet7 ] + DC1_L2LEAF2: + nodes: + DC1-L2LEAF2A: + id: 9 + mgmt_ip: 192.168.200.113/24 + l3leaf_interfaces: [ Ethernet7, Ethernet7 ] + DC1-L2LEAF2B: + id: 10 + mgmt_ip: 192.168.200.114/24 + mac_address: '0c:1d:c0:1d:62:01' + l3leaf_interfaces: [ Ethernet8, Ethernet8 ] + +#### Override for vEOS Lab Caveats #### + +# Disable update wait-for-convergence and update wait-for-install, which is not supported in vEOS-LAB. + +spine_bgp_defaults: +# - update wait-for-convergence +# - update wait-install + - no bgp default ipv4-unicast + - distance bgp 20 200 200 + +leaf_bgp_defaults: +# - update wait-install + - no bgp default ipv4-unicast + - distance bgp 20 200 200 + +# Upodate p2p mtu 9000 -> 1500 +p2p_uplinks_mtu: 1500 + +# Adjust default bfd values +bfd_multihop: + interval: 1200 + min_rx: 1200 + multiplier: 3 diff --git a/ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/group_vars/DC1_L2LEAFS.yml b/ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/group_vars/DC1_L2LEAFS.yml new file mode 100644 index 00000000000..a95f1f169e1 --- /dev/null +++ b/ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/group_vars/DC1_L2LEAFS.yml @@ -0,0 +1 @@ +type: l2leaf diff --git a/ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/group_vars/DC1_LEAFS.yml b/ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/group_vars/DC1_LEAFS.yml new file mode 100644 index 00000000000..edfda2d30d1 --- /dev/null +++ b/ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/group_vars/DC1_LEAFS.yml @@ -0,0 +1 @@ +type: l3leaf diff --git a/ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/group_vars/DC1_SERVERS.yml b/ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/group_vars/DC1_SERVERS.yml new file mode 100644 index 00000000000..91cd371296f --- /dev/null +++ b/ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/group_vars/DC1_SERVERS.yml @@ -0,0 +1,72 @@ +port_profiles: + + TENANT_A_B: + mode: trunk + vlans: "110-111,210-211" + + TENANT_A: + mode: trunk + vlans: "110" + + TENANT_B: + mode: trunk + vlans: "210-211" + + +servers: + + server01: + rack: RackB + adapters: + - server_ports: [ Eth1 ] + switch_ports: [ Ethernet5 ] + switches: [ DC1-LEAF1A ] + profile: TENANT_A + - server_ports: [ Eth2, Eth3 ] + switch_ports: [ Ethernet10, Ethernet10 ] + switches: [ DC1-LEAF2A, DC1-LEAF2B ] + profile: TENANT_B + port_channel: + state: present + description: PortChanne1 + mode: active + + server02: + rack: RackB + adapters: + - server_ports: [ Eth1 ] + switch_ports: [ Ethernet6 ] + switches: [ DC1-LEAF1A ] + profile: TENANT_A + - server_ports: [ Eth2, Eth3 ] + switch_ports: [ Ethernet11, Ethernet11 ] + switches: [ DC1-LEAF2A, DC1-LEAF2B ] + profile: TENANT_B + port_channel: + state: present + description: PortChanne1 + mode: active + + server03: + rack: RackC + adapters: + - server_ports: [ Eth1, Eth2 ] + switch_ports: [ Ethernet10, Ethernet10 ] + switches: [ DC1-SVC3A, DC1-SVC3B ] + profile: TENANT_A_B + port_channel: + state: present + description: PortChanne1 + mode: active + + server04: + rack: RackC + adapters: + - server_ports: [ Eth1, Eth2 ] + switch_ports: [ Ethernet11, Ethernet11 ] + switches: [ DC1-SVC3A, DC1-SVC3B ] + profile: TENANT_A_B + port_channel: + state: present + description: PortChanne1 + mode: active diff --git a/ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/group_vars/DC1_SPINES.yml b/ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/group_vars/DC1_SPINES.yml new file mode 100644 index 00000000000..0633cbe079d --- /dev/null +++ b/ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/group_vars/DC1_SPINES.yml @@ -0,0 +1 @@ +type: spine diff --git a/ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/group_vars/DC1_TENANTS_NETWORKS.yml b/ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/group_vars/DC1_TENANTS_NETWORKS.yml new file mode 100644 index 00000000000..f837766c343 --- /dev/null +++ b/ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/group_vars/DC1_TENANTS_NETWORKS.yml @@ -0,0 +1,122 @@ +# DC1 Tenants Networks +# Documentation of Tenant specific information - Vlans/VRFs + +tenants: + # Tenant_A Specific Information - VRFs / VLANs + Tenant_A: + mac_vrf_vni_base: 10000 + vrfs: + Tenant_A_OP_Zone: + vrf_vni: 10 + vtep_diagnostic: + loopback: 100 + loopback_ip_range: 10.255.1.0/24 + svis: + 110: + name: Tenant_A_OP_Zone_1 + tags: ['opzone'] + enabled: True + ip_address_virtual: 10.1.10.1/24 + 111: + vni_override: 50111 + name: Tenant_A_OP_Zone_2 + tags: ['opzone'] + enabled: True + ip_address_virtual: 10.1.11.1/24 + Tenant_A_WEB_Zone: + vrf_vni: 11 + svis: + 120: + name: Tenant_A_WEB_Zone_1 + tags: ['web', 'erp1'] + enabled: True + ip_address_virtual: 10.1.20.1/24 + 121: + name: Tenant_A_WEBZone_2 + tags: ['web'] + enabled: True + ip_address_virtual: 10.1.21.1/24 + Tenant_A_APP_Zone: + vrf_vni: 12 + svis: + 130: + name: Tenant_A_APP_Zone_1 + tags: ['app', 'erp1'] + enabled: True + ip_address_virtual: 10.1.30.1/24 + 131: + name: Tenant_A_APP_Zone_2 + tags: ['app'] + enabled: True + ip_address_virtual: 10.1.31.1/24 + Tenant_A_DB_Zone: + vrf_vni: 13 + svis: + 140: + name: Tenant_A_DB_BZone_1 + tags: ['db', 'erp1'] + enabled: True + ip_address_virtual: 10.1.40.1/24 + 141: + name: Tenant_A_DB_Zone_2 + tags: ['db'] + enabled: True + ip_address_virtual: 10.1.41.1/24 + Tenant_A_WAN_Zone: + vrf_vni: 14 + svis: + 150: + name: Tenant_A_WAN_Zone_1 + tags: ['wan'] + enabled: True + ip_address_virtual: 10.1.40.1/24 + # Tenant_B Specific Information - VRFs / VLANs + Tenant_B: + mac_vrf_vni_base: 20000 + vrfs: + Tenant_B_OP_Zone: + vrf_vni: 20 + svis: + 210: + name: Tenant_B_OP_Zone_1 + tags: ['opzone'] + enabled: True + ip_address_virtual: 10.2.10.1/24 + 211: + name: Tenant_B_OP_Zone_2 + tags: ['opzone'] + enabled: True + ip_address_virtual: 10.2.11.1/24 + Tenant_B_WAN_Zone: + vrf_vni: 21 + svis: + 250: + name: Tenant_B_WAN_Zone_1 + tags: ['wan'] + enabled: True + ip_address_virtual: 10.2.50.1/24 + # Tenant_C Specific Information - VRFs / VLANs + Tenant_C: + mac_vrf_vni_base: 30000 + vrfs: + Tenant_C_OP_Zone: + vrf_vni: 30 + svis: + 310: + name: Tenant_C_OP_Zone_1 + tags: ['opzone'] + enabled: True + ip_address_virtual: 10.3.10.1/24 + 311: + name: Tenant_C_OP_Zone_2 + tags: ['opzone'] + enabled: True + ip_address_virtual: 10.3.11.1/24 + Tenant_C_WAN_Zone: + vrf_vni: 31 + svis: + 350: + name: Tenant_C_WAN_Zone_1 + tags: ['wan'] + enabled: True + ip_address_virtual: 10.3.50.1/24 diff --git a/ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/group_vars/TOOLS.yml b/ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/group_vars/TOOLS.yml new file mode 100644 index 00000000000..feec70e0a97 --- /dev/null +++ b/ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/group_vars/TOOLS.yml @@ -0,0 +1,8 @@ +--- +root_dir: '{{playbook_dir}}' +# ZTP & DHCP configuration section +ztp_network_summary: 10.73.1.0/24 +ztp_pool_start: 10.73.1.200 +ztp_pool_end: 10.73.1.210 +ztp_lease_time: 300 +ztp_mode: offline \ No newline at end of file diff --git a/ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/host_vars/all.yml b/ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/host_vars/all.yml new file mode 100644 index 00000000000..6006e2624e0 --- /dev/null +++ b/ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/host_vars/all.yml @@ -0,0 +1,2 @@ +--- +root_dir: '{{playbook_dir}}' diff --git a/ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/hosts b/ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/hosts new file mode 100644 index 00000000000..202e4ac0f40 --- /dev/null +++ b/ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/hosts @@ -0,0 +1,64 @@ +all: + children: + AVD_LAB: + children: + TOOLS: + hosts: + dhcp_server01: + DC1_FABRIC: + children: + DC1_SPINES: + hosts: + DC1-SPINE1: + ansible_host: 192.168.200.101 + DC1-SPINE2: + ansible_host: 192.168.200.102 + DC1-SPINE3: + ansible_host: 192.168.200.103 + DC1-SPINE4: + ansible_host: 192.168.200.104 + DC1_LEAFS: + children: + DC1_LEAF1: + hosts: + DC1-LEAF1A: + ansible_host: 192.168.200.105 + DC1_LEAF2: + hosts: + DC1-LEAF2A: + ansible_host: 192.168.200.106 + DC1-LEAF2B: + ansible_host: 192.168.200.107 + DC1_SVC3: + hosts: + DC1-SVC3A: + ansible_host: 192.168.200.108 + DC1-SVC3B: + ansible_host: 192.168.200.109 + DC1_BL1: + hosts: + DC1-BL1A: + ansible_host: 192.168.200.110 + DC1-BL1B: + ansible_host: 192.168.200.111 + DC1_L2LEAFS: + children: + DC1_L2LEAF1: + hosts: + DC1-L2LEAF1A: + ansible_host: 192.168.200.112 + DC1_L2LEAF2: + hosts: + DC1-L2LEAF2A: + ansible_host: 192.168.200.113 + DC1-L2LEAF2B: + ansible_host: 192.168.200.114 + DC1_TENANTS_NETWORKS: + children: + DC1_LEAFS: + DC1_L2LEAFS: + + DC1_SERVERS: + children: + DC1_LEAFS: + DC1_L2LEAFS: diff --git a/ansible_collections/arista/avd/molecule/dhcp_provisionning/molecule.yml b/ansible_collections/arista/avd/molecule/dhcp_provisionning/molecule.yml new file mode 100644 index 00000000000..fe50291758b --- /dev/null +++ b/ansible_collections/arista/avd/molecule/dhcp_provisionning/molecule.yml @@ -0,0 +1,65 @@ +--- +scenario: + create_sequence: + - dependency + - create + - prepare + converge_sequence: + - dependency + - create + - prepare + - converge + test_sequence: + - dependency + - syntax + - create + - converge + - idempotence + - verify + # cleanup_sequence: + # - destroy +dependency: + name: galaxy + options: + ignore-certs: True + ignore-errors: True + requirements-file: collections.yml +driver: + name: docker +platforms: + - name: dhcp_server01 + image: avdteam/base:3.6 + pre_build_image: true + managed: false + groups: + - TOOLS +provisioner: + name: ansible + # env: + # ANSIBLE_COLLECTIONS_PATHS: '../../../../../' + config_options: + defaults: + jinja2_extensions: 'jinja2.ext.loopcontrols,jinja2.ext.do,jinja2.ext.i18n' + gathering: explicit + command_warnings: False + inventory: + links: + hosts: 'inventory/hosts' + group_vars: 'inventory/group_vars/' + host_vars: 'inventory/host_vars/' + ansible_args: + - --inventory=inventory/hosts +verifier: + name: ansible + inventory: + links: + hosts: 'inventory/hosts' + group_vars: 'inventory/group_vars/' + host_vars: 'inventory/host_vars/' + ansible_args: + - --inventory=inventory/hosts + config_options: + defaults: + jinja2_extensions: 'jinja2.ext.loopcontrols,jinja2.ext.do,jinja2.ext.i18n' + gathering: explicit + command_warnings: False diff --git a/ansible_collections/arista/avd/molecule/dhcp_provisionning/verify.yml b/ansible_collections/arista/avd/molecule/dhcp_provisionning/verify.yml new file mode 100644 index 00000000000..a82dd6fd0bc --- /dev/null +++ b/ansible_collections/arista/avd/molecule/dhcp_provisionning/verify.yml @@ -0,0 +1,9 @@ +--- +# This is an example playbook to execute Ansible tests. + +- name: Verify + hosts: all + tasks: + - name: Example assertion + assert: + that: true diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/ethernet-interfaces.md b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/ethernet-interfaces.md index 08982872a1e..c1f5e11eb5b 100644 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/ethernet-interfaces.md +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/ethernet-interfaces.md @@ -221,6 +221,7 @@ No VLANs defined | Interface | Description | MTU | Type | Mode | Allowed VLANs (Trunk) | Trunk Group | VRF | IP Address | Channel-Group ID | Channel-Group Type | | --------- | ----------- | --- | ---- | ---- | --------------------- | ----------- | --- | ---------- | ---------------- | ------------------ | | Ethernet1 | P2P_LINK_TO_DC1-SPINE1_Ethernet1 | 1500 | routed | access | - | - | - | 172.31.255.1/31 | - | - | +| Ethernet2 | SRV-POD02_Eth1 | 1500 | switched | trunk | 110-111,210-211 | - | - | - | - | - | | Ethernet6 | SRV-POD02_Eth1 | 1500 | switched | trunk | 110-111,210-211 | - | - | - | - | - | *Inherited from Port-Channel Interface @@ -234,6 +235,13 @@ interface Ethernet1 no switchport ip address 172.31.255.1/31 ! +interface Ethernet2 + description SRV-POD02_Eth1 + switchport trunk allowed vlan 110-111,210-211 + switchport mode trunk + storm-control all level 10 + storm-control broadcast level pps 500 +! interface Ethernet6 description SRV-POD02_Eth1 switchport trunk allowed vlan 110-111,210-211 diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/ethernet-interfaces.cfg b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/ethernet-interfaces.cfg index abdaf14dacb..fbf93458392 100644 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/ethernet-interfaces.cfg +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/ethernet-interfaces.cfg @@ -11,6 +11,13 @@ interface Ethernet1 no switchport ip address 172.31.255.1/31 ! +interface Ethernet2 + description SRV-POD02_Eth1 + switchport trunk allowed vlan 110-111,210-211 + switchport mode trunk + storm-control all level 10 + storm-control broadcast level pps 500 +! interface Ethernet6 description SRV-POD02_Eth1 switchport trunk allowed vlan 110-111,210-211 diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/ethernet-interfaces.yml b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/ethernet-interfaces.yml index b5ea74275c4..cf93429ccbb 100644 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/ethernet-interfaces.yml +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/ethernet-interfaces.yml @@ -18,3 +18,19 @@ ethernet_interfaces: mode: trunk vlans: 110-111,210-211 profile: ALL + + Ethernet2: + peer: SRV-POD03 + peer_interface: Eth1 + peer_type: server + description: SRV-POD02_Eth1 + mode: trunk + vlans: 110-111,210-211 + profile: ALL + storm_control: + all: + level: 10 + unit: percent + broadcast: + level: 500 + unit: pps \ No newline at end of file From 7ad571b1a46bb04e89b3d646dd735b1110669162 Mon Sep 17 00:00:00 2001 From: Thomas Grimonet Date: Sat, 28 Nov 2020 14:18:48 +0100 Subject: [PATCH 4/7] Remove unused molecule scenario --- .../molecule/dhcp_provisionning/converge.yml | 11 -- .../molecule/dhcp_provisionning/create.yml | 13 -- .../molecule/dhcp_provisionning/destroy.yml | 16 -- .../cvp/ztp_configuration.yml | 60 ------ .../inventory/group_vars/AVD_LAB.yml | 32 --- .../inventory/group_vars/DC1_FABRIC.yml | 187 ------------------ .../inventory/group_vars/DC1_L2LEAFS.yml | 1 - .../inventory/group_vars/DC1_LEAFS.yml | 1 - .../inventory/group_vars/DC1_SERVERS.yml | 72 ------- .../inventory/group_vars/DC1_SPINES.yml | 1 - .../group_vars/DC1_TENANTS_NETWORKS.yml | 122 ------------ .../inventory/group_vars/TOOLS.yml | 8 - .../inventory/host_vars/all.yml | 2 - .../dhcp_provisionning/inventory/hosts | 64 ------ .../molecule/dhcp_provisionning/molecule.yml | 65 ------ .../molecule/dhcp_provisionning/verify.yml | 9 - 16 files changed, 664 deletions(-) delete mode 100644 ansible_collections/arista/avd/molecule/dhcp_provisionning/converge.yml delete mode 100644 ansible_collections/arista/avd/molecule/dhcp_provisionning/create.yml delete mode 100644 ansible_collections/arista/avd/molecule/dhcp_provisionning/destroy.yml delete mode 100644 ansible_collections/arista/avd/molecule/dhcp_provisionning/intended/structured_configs/cvp/ztp_configuration.yml delete mode 100644 ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/group_vars/AVD_LAB.yml delete mode 100644 ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/group_vars/DC1_FABRIC.yml delete mode 100644 ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/group_vars/DC1_L2LEAFS.yml delete mode 100644 ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/group_vars/DC1_LEAFS.yml delete mode 100644 ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/group_vars/DC1_SERVERS.yml delete mode 100644 ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/group_vars/DC1_SPINES.yml delete mode 100644 ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/group_vars/DC1_TENANTS_NETWORKS.yml delete mode 100644 ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/group_vars/TOOLS.yml delete mode 100644 ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/host_vars/all.yml delete mode 100644 ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/hosts delete mode 100644 ansible_collections/arista/avd/molecule/dhcp_provisionning/molecule.yml delete mode 100644 ansible_collections/arista/avd/molecule/dhcp_provisionning/verify.yml diff --git a/ansible_collections/arista/avd/molecule/dhcp_provisionning/converge.yml b/ansible_collections/arista/avd/molecule/dhcp_provisionning/converge.yml deleted file mode 100644 index e6bd9a21e09..00000000000 --- a/ansible_collections/arista/avd/molecule/dhcp_provisionning/converge.yml +++ /dev/null @@ -1,11 +0,0 @@ ---- -- name: Converge - hosts: TOOLS - gather_facts: false - connection: local - tasks: - - - name: generate intented variables - delegate_to: 127.0.0.1 - import_role: - name: arista.avd.dhcp_provisioner diff --git a/ansible_collections/arista/avd/molecule/dhcp_provisionning/create.yml b/ansible_collections/arista/avd/molecule/dhcp_provisionning/create.yml deleted file mode 100644 index 03188c3cb8a..00000000000 --- a/ansible_collections/arista/avd/molecule/dhcp_provisionning/create.yml +++ /dev/null @@ -1,13 +0,0 @@ ---- -- name: Configure local folders - hosts: all - gather_facts: false - connection: local - vars: - root_dir: '{{playbook_dir}}' - tasks: - - name: create local output folders - delegate_to: 127.0.0.1 - import_role: - name: arista.avd.build_output_folders - run_once: true diff --git a/ansible_collections/arista/avd/molecule/dhcp_provisionning/destroy.yml b/ansible_collections/arista/avd/molecule/dhcp_provisionning/destroy.yml deleted file mode 100644 index d0ca56cbba5..00000000000 --- a/ansible_collections/arista/avd/molecule/dhcp_provisionning/destroy.yml +++ /dev/null @@ -1,16 +0,0 @@ ---- -- name: Remove output folders - hosts: all - gather_facts: false - connection: local - tasks: - - name: delete local folders - delegate_to: 127.0.0.1 - run_once: true - file: - path: "{{root_dir}}/{{ item }}" - state: absent - with_items: - - documentation - - intended - - config_backup diff --git a/ansible_collections/arista/avd/molecule/dhcp_provisionning/intended/structured_configs/cvp/ztp_configuration.yml b/ansible_collections/arista/avd/molecule/dhcp_provisionning/intended/structured_configs/cvp/ztp_configuration.yml deleted file mode 100644 index 505dc9ac1a8..00000000000 --- a/ansible_collections/arista/avd/molecule/dhcp_provisionning/intended/structured_configs/cvp/ztp_configuration.yml +++ /dev/null @@ -1,60 +0,0 @@ ---- -ztp: - default: - registration: http://192.168.200.11/ztp/bootstrap - gateway: 192.168.200.5 - nameservers: - - 192.168.200.5 - - 8.8.8.8 - use_system_mac: true - general: - subnets: - - network: 10.73.1.0 - netmask: 255.255.255.0 - gateway: 192.168.200.5 - nameservers: - - 192.168.200.5 - - 8.8.8.8 - start: 10.73.1.200 - end: 10.73.1.210 - lease_time: 300 - clients: - # SPINE - - name: DC1-SPINE1 - mac: 0c:1d:c0:1d:62:01 - ip4: 192.168.200.101 - - name: DC1-SPINE2 - mac: 0c:1d:c0:1d:62:01 - ip4: 192.168.200.102 - - name: DC1-SPINE3 - mac: 0c:1d:c0:1d:62:01 - ip4: 192.168.200.103 - - name: DC1-SPINE4 - mac: 0c:1d:c0:1d:62:01 - ip4: 192.168.200.104 - # L3LEAF - - name: DC1-LEAF1A - mac: 0c:1d:c0:1d:62:01 - ip4: 192.168.200.105 - - name: DC1-LEAF2A - mac: 0c:1d:c0:1d:62:01 - ip4: 192.168.200.106 - - name: DC1-LEAF2B - mac: 0c:1d:c0:1d:62:01 - ip4: 192.168.200.107 - - name: DC1-SVC3A - mac: 0c:1d:c0:1d:62:01 - ip4: 192.168.200.108 - - name: DC1-SVC3B - mac: 0c:1d:c0:1d:62:01 - ip4: 192.168.200.109 - - name: DC1-BL1A - mac: 0c:1d:c0:1d:62:01 - ip4: 192.168.200.110 - # L2LEAF - - name: DC1-L2LEAF1A - mac: 0c:1d:c0:1d:62:01 - ip4: 192.168.200.112 - - name: DC1-L2LEAF2B - mac: 0c:1d:c0:1d:62:01 - ip4: 192.168.200.114 diff --git a/ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/group_vars/AVD_LAB.yml b/ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/group_vars/AVD_LAB.yml deleted file mode 100644 index 7f1dd687614..00000000000 --- a/ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/group_vars/AVD_LAB.yml +++ /dev/null @@ -1,32 +0,0 @@ -# Nashua EVE-NG LAB shared attributes -root_dir: '{{playbook_dir}}' - -# local users -local_users: - admin: - privilege: 15 - role: network-admin - no_password: true - - cvpadmin: - privilege: 15 - role: network-admin - sha512_password: "$6$rZKcbIZ7iWGAWTUM$TCgDn1KcavS0s.OV8lacMTUkxTByfzcGlFlYUWroxYuU7M/9bIodhRO7nXGzMweUxvbk8mJmQl8Bh44cRktUj." - -# Cloud Vision server -cvp_instance_ips: - - 192.168.200.11 - -cvp_ingestauth_key: telarista - -# OOB Management network default gateway. -mgmt_gateway: 192.168.200.5 - -# dns servers. -name_servers: - - 192.168.200.5 - - 8.8.8.8 - -# NTP Servers IP or DNS name, first NTP server will be prefered, and sourced from Managment -ntp_servers: - - 192.168.200.5 diff --git a/ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/group_vars/DC1_FABRIC.yml b/ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/group_vars/DC1_FABRIC.yml deleted file mode 100644 index 2c91ab416c0..00000000000 --- a/ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/group_vars/DC1_FABRIC.yml +++ /dev/null @@ -1,187 +0,0 @@ ---- - -# L3LS Fabric Values - update these values with caution, some changes could be disruptive. - -fabric_name: DC1_FABRIC - -# Point to Point Network Summary range, assigned as /31 for each uplink interfaces -# Assign range larger then total [ spines * total potential leafs * 2 ] -underlay_p2p_network_summary: 172.31.255.0/24 - -# IP address range for evpn loopback for all switches in fabric, assigned as /32s -# Assign range larger then total spines + total leafs switches -overlay_loopback_network_summary: 192.168.255.0/24 - -# VTEP VXLAN Tunnel source loopback IP for leaf switches, assigned in /32s -# Assign range larger then total leaf switches -vtep_loopback_network_summary: 192.168.254.0/24 - -# mlag pair IP assignment - assign blocks - Assign range larger then total spines + total leafs switches -mlag_ips: - leaf_peer_l3: 10.255.251.0/24 - mlag_peer: 10.255.252.0/24 - -# Enable vlan aware bundles -vxlan_vlan_aware_bundles: true - -# bgp peer groups passwords -bgp_peer_groups: - IPv4_UNDERLAY_PEERS: - password: "AQQvKeimxJu+uGQ/yYvv9w==" - EVPN_OVERLAY_PEERS: - password: "q+VNViP5i4rVjW1cxFv2wA==" - MLAG_IPv4_UNDERLAY_PEER: - password: "vnEaG8gMeQf3d3cN6PktXQ==" - -# Spine Switches -spine: - platform: vEOS-LAB - bgp_as: 65001 - leaf_as_range: 65101-65132 - nodes: - DC1-SPINE1: - id: 1 - mgmt_ip: 192.168.200.101/24 - mac_address: '0c:1d:c0:1d:62:01' - DC1-SPINE2: - id: 2 - mgmt_ip: 192.168.200.102/24 - mac_address: '0c:1d:c0:1d:62:01' - DC1-SPINE3: - id: 3 - mgmt_ip: 192.168.200.103/24 - mac_address: '0c:1d:c0:1d:62:01' - DC1-SPINE4: - id: 4 - mgmt_ip: 192.168.200.104/24 - mac_address: '0c:1d:c0:1d:62:01' - -# Leaf switch groups -# A maximum of two nodes can form a leaf group -# When two nodes are in a leaf group this will automatically form mlag pair - -l3leaf: - defaults: - platform: vEOS-LAB - bgp_as: 65100 - spines: [ DC1-SPINE1, DC1-SPINE2, DC1-SPINE3, DC1-SPINE4 ] - uplink_to_spine_interfaces: [ Ethernet1, Ethernet2, Ethernet3, Ethernet4 ] - mlag_interfaces: [ Ethernet5, Ethernet6 ] - spanning_tree_mode: mstp - spanning_tree_priority: 4096 - virtual_router_mac_address: 00:dc:00:00:00:0a - node_groups: - DC1_LEAF1: - bgp_as: 65101 - filter: - tenants: [ all ] - tags: [ web, app ] - nodes: - DC1-LEAF1A: - id: 1 - mgmt_ip: 192.168.200.105/24 - mac_address: '0c:1d:c0:1d:62:01' - spine_interfaces: [ Ethernet1, Ethernet1, Ethernet1, Ethernet1 ] - DC1_LEAF2: - bgp_as: 65102 - filter: - tenants: [ Tenant_A, Tenant_B, Tenant_C ] - tags: [ opzone, web, app, db, vmotion, nfs ] - nodes: - DC1-LEAF2A: - id: 2 - mgmt_ip: 192.168.200.106/24 - mac_address: '0c:1d:c0:1d:62:01' - spine_interfaces: [ Ethernet2, Ethernet2, Ethernet2, Ethernet2 ] - DC1-LEAF2B: - id: 3 - mgmt_ip: 192.168.200.107/24 - mac_address: '0c:1d:c0:1d:62:01' - spine_interfaces: [ Ethernet3, Ethernet3, Ethernet3, Ethernet3 ] - DC1_SVC3: - bgp_as: 65103 - filter: - tenants: [ Tenant_A, Tenant_B, Tenant_C ] - tags: [ opzone, web, app, db, vmotion, nfs, wan ] - nodes: - DC1-SVC3A: - id: 4 - mgmt_ip: 192.168.200.108/24 - mac_address: '0c:1d:c0:1d:62:01' - spine_interfaces: [ Ethernet4, Ethernet4, Ethernet4, Ethernet4 ] - DC1-SVC3B: - id: 5 - mgmt_ip: 192.168.200.109/24 - mac_address: '0c:1d:c0:1d:62:01' - spine_interfaces: [ Ethernet5, Ethernet5, Ethernet5, Ethernet5 ] - DC1_BL1: - bgp_as: 65104 - filter: - tenants: [ all ] - tags: [ wan ] - nodes: - DC1-BL1A: - id: 6 - mgmt_ip: 192.168.200.110/24 - mac_address: '0c:1d:c0:1d:62:01' - spine_interfaces: [ Ethernet6, Ethernet6, Ethernet6, Ethernet6 ] - DC1-BL1B: - id: 7 - mgmt_ip: 192.168.200.111/24 - spine_interfaces: [ Ethernet7, Ethernet7, Ethernet7, Ethernet7 ] - -l2leaf: - defaults: - platform: vEOS-LAB - parent_l3leafs: [ DC1-SVC3A, DC1-SVC3B ] - uplink_interfaces: [ Ethernet1, Ethernet2 ] - mlag_interfaces: [ Ethernet3, Ethernet4 ] - spanning_tree_mode: mstp - spanning_tree_priority: 16384 - node_groups: - DC1_L2LEAF1: - parent_l3leafs: [ DC1-LEAF2A, DC1-LEAF2B ] - filter: - tenants: [ Tenant_A ] - tags: [ opzone, web, app ] - nodes: - DC1-L2LEAF1A: - id: 8 - mgmt_ip: 192.168.200.112/24 - mac_address: '0c:1d:c0:1d:62:01' - l3leaf_interfaces: [ Ethernet7, Ethernet7 ] - DC1_L2LEAF2: - nodes: - DC1-L2LEAF2A: - id: 9 - mgmt_ip: 192.168.200.113/24 - l3leaf_interfaces: [ Ethernet7, Ethernet7 ] - DC1-L2LEAF2B: - id: 10 - mgmt_ip: 192.168.200.114/24 - mac_address: '0c:1d:c0:1d:62:01' - l3leaf_interfaces: [ Ethernet8, Ethernet8 ] - -#### Override for vEOS Lab Caveats #### - -# Disable update wait-for-convergence and update wait-for-install, which is not supported in vEOS-LAB. - -spine_bgp_defaults: -# - update wait-for-convergence -# - update wait-install - - no bgp default ipv4-unicast - - distance bgp 20 200 200 - -leaf_bgp_defaults: -# - update wait-install - - no bgp default ipv4-unicast - - distance bgp 20 200 200 - -# Upodate p2p mtu 9000 -> 1500 -p2p_uplinks_mtu: 1500 - -# Adjust default bfd values -bfd_multihop: - interval: 1200 - min_rx: 1200 - multiplier: 3 diff --git a/ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/group_vars/DC1_L2LEAFS.yml b/ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/group_vars/DC1_L2LEAFS.yml deleted file mode 100644 index a95f1f169e1..00000000000 --- a/ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/group_vars/DC1_L2LEAFS.yml +++ /dev/null @@ -1 +0,0 @@ -type: l2leaf diff --git a/ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/group_vars/DC1_LEAFS.yml b/ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/group_vars/DC1_LEAFS.yml deleted file mode 100644 index edfda2d30d1..00000000000 --- a/ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/group_vars/DC1_LEAFS.yml +++ /dev/null @@ -1 +0,0 @@ -type: l3leaf diff --git a/ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/group_vars/DC1_SERVERS.yml b/ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/group_vars/DC1_SERVERS.yml deleted file mode 100644 index 91cd371296f..00000000000 --- a/ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/group_vars/DC1_SERVERS.yml +++ /dev/null @@ -1,72 +0,0 @@ -port_profiles: - - TENANT_A_B: - mode: trunk - vlans: "110-111,210-211" - - TENANT_A: - mode: trunk - vlans: "110" - - TENANT_B: - mode: trunk - vlans: "210-211" - - -servers: - - server01: - rack: RackB - adapters: - - server_ports: [ Eth1 ] - switch_ports: [ Ethernet5 ] - switches: [ DC1-LEAF1A ] - profile: TENANT_A - - server_ports: [ Eth2, Eth3 ] - switch_ports: [ Ethernet10, Ethernet10 ] - switches: [ DC1-LEAF2A, DC1-LEAF2B ] - profile: TENANT_B - port_channel: - state: present - description: PortChanne1 - mode: active - - server02: - rack: RackB - adapters: - - server_ports: [ Eth1 ] - switch_ports: [ Ethernet6 ] - switches: [ DC1-LEAF1A ] - profile: TENANT_A - - server_ports: [ Eth2, Eth3 ] - switch_ports: [ Ethernet11, Ethernet11 ] - switches: [ DC1-LEAF2A, DC1-LEAF2B ] - profile: TENANT_B - port_channel: - state: present - description: PortChanne1 - mode: active - - server03: - rack: RackC - adapters: - - server_ports: [ Eth1, Eth2 ] - switch_ports: [ Ethernet10, Ethernet10 ] - switches: [ DC1-SVC3A, DC1-SVC3B ] - profile: TENANT_A_B - port_channel: - state: present - description: PortChanne1 - mode: active - - server04: - rack: RackC - adapters: - - server_ports: [ Eth1, Eth2 ] - switch_ports: [ Ethernet11, Ethernet11 ] - switches: [ DC1-SVC3A, DC1-SVC3B ] - profile: TENANT_A_B - port_channel: - state: present - description: PortChanne1 - mode: active diff --git a/ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/group_vars/DC1_SPINES.yml b/ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/group_vars/DC1_SPINES.yml deleted file mode 100644 index 0633cbe079d..00000000000 --- a/ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/group_vars/DC1_SPINES.yml +++ /dev/null @@ -1 +0,0 @@ -type: spine diff --git a/ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/group_vars/DC1_TENANTS_NETWORKS.yml b/ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/group_vars/DC1_TENANTS_NETWORKS.yml deleted file mode 100644 index f837766c343..00000000000 --- a/ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/group_vars/DC1_TENANTS_NETWORKS.yml +++ /dev/null @@ -1,122 +0,0 @@ -# DC1 Tenants Networks -# Documentation of Tenant specific information - Vlans/VRFs - -tenants: - # Tenant_A Specific Information - VRFs / VLANs - Tenant_A: - mac_vrf_vni_base: 10000 - vrfs: - Tenant_A_OP_Zone: - vrf_vni: 10 - vtep_diagnostic: - loopback: 100 - loopback_ip_range: 10.255.1.0/24 - svis: - 110: - name: Tenant_A_OP_Zone_1 - tags: ['opzone'] - enabled: True - ip_address_virtual: 10.1.10.1/24 - 111: - vni_override: 50111 - name: Tenant_A_OP_Zone_2 - tags: ['opzone'] - enabled: True - ip_address_virtual: 10.1.11.1/24 - Tenant_A_WEB_Zone: - vrf_vni: 11 - svis: - 120: - name: Tenant_A_WEB_Zone_1 - tags: ['web', 'erp1'] - enabled: True - ip_address_virtual: 10.1.20.1/24 - 121: - name: Tenant_A_WEBZone_2 - tags: ['web'] - enabled: True - ip_address_virtual: 10.1.21.1/24 - Tenant_A_APP_Zone: - vrf_vni: 12 - svis: - 130: - name: Tenant_A_APP_Zone_1 - tags: ['app', 'erp1'] - enabled: True - ip_address_virtual: 10.1.30.1/24 - 131: - name: Tenant_A_APP_Zone_2 - tags: ['app'] - enabled: True - ip_address_virtual: 10.1.31.1/24 - Tenant_A_DB_Zone: - vrf_vni: 13 - svis: - 140: - name: Tenant_A_DB_BZone_1 - tags: ['db', 'erp1'] - enabled: True - ip_address_virtual: 10.1.40.1/24 - 141: - name: Tenant_A_DB_Zone_2 - tags: ['db'] - enabled: True - ip_address_virtual: 10.1.41.1/24 - Tenant_A_WAN_Zone: - vrf_vni: 14 - svis: - 150: - name: Tenant_A_WAN_Zone_1 - tags: ['wan'] - enabled: True - ip_address_virtual: 10.1.40.1/24 - # Tenant_B Specific Information - VRFs / VLANs - Tenant_B: - mac_vrf_vni_base: 20000 - vrfs: - Tenant_B_OP_Zone: - vrf_vni: 20 - svis: - 210: - name: Tenant_B_OP_Zone_1 - tags: ['opzone'] - enabled: True - ip_address_virtual: 10.2.10.1/24 - 211: - name: Tenant_B_OP_Zone_2 - tags: ['opzone'] - enabled: True - ip_address_virtual: 10.2.11.1/24 - Tenant_B_WAN_Zone: - vrf_vni: 21 - svis: - 250: - name: Tenant_B_WAN_Zone_1 - tags: ['wan'] - enabled: True - ip_address_virtual: 10.2.50.1/24 - # Tenant_C Specific Information - VRFs / VLANs - Tenant_C: - mac_vrf_vni_base: 30000 - vrfs: - Tenant_C_OP_Zone: - vrf_vni: 30 - svis: - 310: - name: Tenant_C_OP_Zone_1 - tags: ['opzone'] - enabled: True - ip_address_virtual: 10.3.10.1/24 - 311: - name: Tenant_C_OP_Zone_2 - tags: ['opzone'] - enabled: True - ip_address_virtual: 10.3.11.1/24 - Tenant_C_WAN_Zone: - vrf_vni: 31 - svis: - 350: - name: Tenant_C_WAN_Zone_1 - tags: ['wan'] - enabled: True - ip_address_virtual: 10.3.50.1/24 diff --git a/ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/group_vars/TOOLS.yml b/ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/group_vars/TOOLS.yml deleted file mode 100644 index feec70e0a97..00000000000 --- a/ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/group_vars/TOOLS.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -root_dir: '{{playbook_dir}}' -# ZTP & DHCP configuration section -ztp_network_summary: 10.73.1.0/24 -ztp_pool_start: 10.73.1.200 -ztp_pool_end: 10.73.1.210 -ztp_lease_time: 300 -ztp_mode: offline \ No newline at end of file diff --git a/ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/host_vars/all.yml b/ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/host_vars/all.yml deleted file mode 100644 index 6006e2624e0..00000000000 --- a/ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/host_vars/all.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -root_dir: '{{playbook_dir}}' diff --git a/ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/hosts b/ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/hosts deleted file mode 100644 index 202e4ac0f40..00000000000 --- a/ansible_collections/arista/avd/molecule/dhcp_provisionning/inventory/hosts +++ /dev/null @@ -1,64 +0,0 @@ -all: - children: - AVD_LAB: - children: - TOOLS: - hosts: - dhcp_server01: - DC1_FABRIC: - children: - DC1_SPINES: - hosts: - DC1-SPINE1: - ansible_host: 192.168.200.101 - DC1-SPINE2: - ansible_host: 192.168.200.102 - DC1-SPINE3: - ansible_host: 192.168.200.103 - DC1-SPINE4: - ansible_host: 192.168.200.104 - DC1_LEAFS: - children: - DC1_LEAF1: - hosts: - DC1-LEAF1A: - ansible_host: 192.168.200.105 - DC1_LEAF2: - hosts: - DC1-LEAF2A: - ansible_host: 192.168.200.106 - DC1-LEAF2B: - ansible_host: 192.168.200.107 - DC1_SVC3: - hosts: - DC1-SVC3A: - ansible_host: 192.168.200.108 - DC1-SVC3B: - ansible_host: 192.168.200.109 - DC1_BL1: - hosts: - DC1-BL1A: - ansible_host: 192.168.200.110 - DC1-BL1B: - ansible_host: 192.168.200.111 - DC1_L2LEAFS: - children: - DC1_L2LEAF1: - hosts: - DC1-L2LEAF1A: - ansible_host: 192.168.200.112 - DC1_L2LEAF2: - hosts: - DC1-L2LEAF2A: - ansible_host: 192.168.200.113 - DC1-L2LEAF2B: - ansible_host: 192.168.200.114 - DC1_TENANTS_NETWORKS: - children: - DC1_LEAFS: - DC1_L2LEAFS: - - DC1_SERVERS: - children: - DC1_LEAFS: - DC1_L2LEAFS: diff --git a/ansible_collections/arista/avd/molecule/dhcp_provisionning/molecule.yml b/ansible_collections/arista/avd/molecule/dhcp_provisionning/molecule.yml deleted file mode 100644 index fe50291758b..00000000000 --- a/ansible_collections/arista/avd/molecule/dhcp_provisionning/molecule.yml +++ /dev/null @@ -1,65 +0,0 @@ ---- -scenario: - create_sequence: - - dependency - - create - - prepare - converge_sequence: - - dependency - - create - - prepare - - converge - test_sequence: - - dependency - - syntax - - create - - converge - - idempotence - - verify - # cleanup_sequence: - # - destroy -dependency: - name: galaxy - options: - ignore-certs: True - ignore-errors: True - requirements-file: collections.yml -driver: - name: docker -platforms: - - name: dhcp_server01 - image: avdteam/base:3.6 - pre_build_image: true - managed: false - groups: - - TOOLS -provisioner: - name: ansible - # env: - # ANSIBLE_COLLECTIONS_PATHS: '../../../../../' - config_options: - defaults: - jinja2_extensions: 'jinja2.ext.loopcontrols,jinja2.ext.do,jinja2.ext.i18n' - gathering: explicit - command_warnings: False - inventory: - links: - hosts: 'inventory/hosts' - group_vars: 'inventory/group_vars/' - host_vars: 'inventory/host_vars/' - ansible_args: - - --inventory=inventory/hosts -verifier: - name: ansible - inventory: - links: - hosts: 'inventory/hosts' - group_vars: 'inventory/group_vars/' - host_vars: 'inventory/host_vars/' - ansible_args: - - --inventory=inventory/hosts - config_options: - defaults: - jinja2_extensions: 'jinja2.ext.loopcontrols,jinja2.ext.do,jinja2.ext.i18n' - gathering: explicit - command_warnings: False diff --git a/ansible_collections/arista/avd/molecule/dhcp_provisionning/verify.yml b/ansible_collections/arista/avd/molecule/dhcp_provisionning/verify.yml deleted file mode 100644 index a82dd6fd0bc..00000000000 --- a/ansible_collections/arista/avd/molecule/dhcp_provisionning/verify.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -# This is an example playbook to execute Ansible tests. - -- name: Verify - hosts: all - tasks: - - name: Example assertion - assert: - that: true From 5c91ebb239a999f35795da00cb638f1a7b3102c7 Mon Sep 17 00:00:00 2001 From: Thomas Grimonet Date: Sat, 28 Nov 2020 14:34:35 +0100 Subject: [PATCH 5/7] Remove base config --- .../intended/configs/base.cfg | 50 ------------------- 1 file changed, 50 deletions(-) delete mode 100644 ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/base.cfg diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/base.cfg b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/base.cfg deleted file mode 100644 index 7cfb65290e2..00000000000 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/base.cfg +++ /dev/null @@ -1,50 +0,0 @@ -!RANCID-CONTENT-TYPE: arista -! -transceiver qsfp default-mode 4x10G -! -hostname base -! -no aaa root -! -interface Management1 - description oob_management - vrf MGMT - ip address 10.73.255.122/24 -! -banner login -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!***!!!Unauthorized access prohibited!!!***! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -EOF -! -banner motd -. Switch : $(hostname) . -. Site : DC1 . -. Type info for information about the device . -. Type help for information about the aliases . -EOF -! -management api http-commands - protocol http - no shutdown - ! - vrf mgt - no shutdown - ip access-group ACL-API -! -management console - idle-timeout 300 -! -management security - password encryption-key common -! -management ssh - ip access-group ACL-SSH in - ip access-group ACL-SSH-VRF vrf mgt in - ipv6 access-group ACL-SSH6 in - ipv6 access-group ACL-SSH-VRF6 vrf mgt in - idle-timeout 15 - vrf mgt - no shutdown -! -end From a3c97d1bdd0468b9e146e2e70d036c7c292710cd Mon Sep 17 00:00:00 2001 From: Thomas Grimonet Date: Sat, 28 Nov 2020 14:37:20 +0100 Subject: [PATCH 6/7] Update base config --- .../intended/configs/base.cfg | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/base.cfg diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/base.cfg b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/base.cfg new file mode 100644 index 00000000000..7cfb65290e2 --- /dev/null +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/base.cfg @@ -0,0 +1,50 @@ +!RANCID-CONTENT-TYPE: arista +! +transceiver qsfp default-mode 4x10G +! +hostname base +! +no aaa root +! +interface Management1 + description oob_management + vrf MGMT + ip address 10.73.255.122/24 +! +banner login +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!***!!!Unauthorized access prohibited!!!***! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +EOF +! +banner motd +. Switch : $(hostname) . +. Site : DC1 . +. Type info for information about the device . +. Type help for information about the aliases . +EOF +! +management api http-commands + protocol http + no shutdown + ! + vrf mgt + no shutdown + ip access-group ACL-API +! +management console + idle-timeout 300 +! +management security + password encryption-key common +! +management ssh + ip access-group ACL-SSH in + ip access-group ACL-SSH-VRF vrf mgt in + ipv6 access-group ACL-SSH6 in + ipv6 access-group ACL-SSH-VRF6 vrf mgt in + idle-timeout 15 + vrf mgt + no shutdown +! +end From 2a62fe5559e219065c11b5f0b0303111275deb10 Mon Sep 17 00:00:00 2001 From: Thomas Grimonet Date: Sat, 28 Nov 2020 14:43:28 +0100 Subject: [PATCH 7/7] Trace git diff in CI --- .github/git-repo-state-monitor.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/git-repo-state-monitor.sh b/.github/git-repo-state-monitor.sh index 61032eef258..ce4040479e7 100644 --- a/.github/git-repo-state-monitor.sh +++ b/.github/git-repo-state-monitor.sh @@ -13,6 +13,8 @@ if [[ `git status --porcelain` ]]; then # No changes echo 'Some changes' git status --short + echo 'Diffs are:' + git diff exit 1 else # Changes