Skip to content

Commit

Permalink
Merge pull request #159 from aristanetworks/cvp-green-release
Browse files Browse the repository at this point in the history
Cvp green release
  • Loading branch information
networkRob authored Jun 13, 2020
2 parents 8a73db2 + fa40f0c commit 8b2e0a6
Show file tree
Hide file tree
Showing 490 changed files with 10,060 additions and 233 deletions.
32 changes: 30 additions & 2 deletions labvm/services/atdFiles/atdFiles.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@
TOPO=$(cat /etc/ACCESS_INFO.yaml | shyaml get-value topology)
ARISTA_PWD=$(cat /etc/ACCESS_INFO.yaml | shyaml get-value login_info.jump_host.pw)

# Get the current arista password:
for i in $(seq 1 $(cat /etc/ACCESS_INFO.yaml | shyaml get-length login_info.veos))
do
TMP=$((i-1))
if [ $( cat /etc/ACCESS_INFO.yaml | shyaml get-value login_info.veos.$TMP.user ) = "arista" ]
then
LAB_ARISTA_PWD=$( cat /etc/ACCESS_INFO.yaml | shyaml get-value login_info.veos.$TMP.pw )
AR_LEN=$( echo -n $LAB_ARISTA_PWD | wc -m)
fi
done


# Adding in temporary pip install/upgrade for rCVP API
pip install rcvpapi
pip install --upgrade rcvpapi
Expand All @@ -25,12 +37,28 @@ chmod +x /usr/local/bin/ConfigureTopology.py
# Add files to arista home
rsync -av /tmp/atd/topologies/$TOPO/files/ /home/arista

# Update arista password and copy the updated guacamole user-mapping.xml file
sed -i "s/{REPLACE_ARISTA}/$LAB_ARISTA_PWD/g" /home/arista/infra/user-mapping.xml
cp /home/arista/infra/user-mapping.xml /etc/guacamole/

# Update file permissions in /home/arista
chown -R arista:arista /home/arista

# Update all occurrences for the arista lab credentials

if [ $AR_LEN == 7 ]
then
FIRST='| ``password: "{REPLACE_ARISTA}"`` |'
FREPLACE='| ``password: "'$LAB_ARISTA_PWD'"`` |'
SECOND='| Sets the password to ``{REPLACE_ARISTA}`` |'
FSECOND='| Sets the password to ``'$LAB_ARISTA_PWD'`` |'
sed -i "s/$FIRST/$FREPLACE/g" /tmp/atd/topologies/$TOPO/labguides/source/*.rst
sed -i "s/$SECOND/$FSECOND/g" /tmp/atd/topologies/$TOPO/labguides/source/*.rst
fi
sed -i "s/{REPLACE_ARISTA}/$LAB_ARISTA_PWD/g" /tmp/atd/topologies/$TOPO/labguides/source/*.rst

# Update the Arista user password for connecting to the labvm
sed -i "s/{REPLACE_PWD}/$ARISTA_PWD/g" /tmp/atd/topologies/$TOPO/labguides/source/connecting.rst
sed -i "s/{REPLACE_PWD}/$ARISTA_PWD/g" /tmp/atd/topologies/$TOPO/labguides/source/programmability_connecting.rst
sed -i "s/{REPLACE_PWD}/$ARISTA_PWD/g" /tmp/atd/topologies/$TOPO/labguides/source/*.rst

# Build the lab guides html files
cd /tmp/atd/topologies/$TOPO/labguides
Expand Down
14 changes: 10 additions & 4 deletions topologies/available_topo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,31 @@ topologies: [
{ Topology_Name: 'Data Center - Latest',
Topology_File: '/datacenter-latest/Datacenter.yml',
Topology_Access: 'standard',
Topology_Desc: 'Two Spines, Four Leafs. Focused on EOS fundamentals within the Data Center w/CV 2019',
Topology_Desc: 'Two Spines, Four Leafs. Focused on EOS fundamentals within the Data Center w/CV 2020.1.1',
Topology_Backend: '10.16.129.222',
},
{ Topology_Name: 'Data Center - CVP 2019.1.2',
Topology_File: '/datacenter-2019/Datacenter.yml',
Topology_Access: 'standard',
Topology_Desc: 'Two Spines, Four Leafs. Focused on EOS fundamentals within the Data Center w/CV 2019.1.2',
Topology_Backend: '10.16.129.5',
},
{ Topology_Name: 'Data Center',
Topology_File: '/datacenter/ADCATDBluePrint.yml',
Topology_Access: 'standard',
Topology_Desc: 'Two Spines, Four Leafs. Focused on EOS fundamentals within the Data Center w/CV 2018',
Topology_Desc: 'Two Spines, Four Leafs. Focused on EOS fundamentals within the Data Center w/CV 2018.2.2',
Topology_Backend: '10.16.129.5',
},
{ Topology_Name: 'Advanced Routing',
Topology_File: '/routing/Routing.yml',
Topology_Access: 'admin',
Topology_Desc: 'Twenty nodes. Focused on advanced routing, L2VPN and L3VPN topics',
Topology_Backend: '10.16.129.5',
Topology_Backend: '10.16.129.222',
},
{ Topology_Name: 'BETA - Data Center - Latest',
Topology_File: '/beta-datacenter/topo_build.yml',
Topology_Access: 'admin',
Topology_Desc: 'BETA TESTING - Two Spines, Four Leafs. Focused on EOS fundamentals within the Data Center w/CV 2019',
Topology_Desc: 'BETA TESTING - Two Spines, Four Leafs. Focused on EOS fundamentals within the Data Center w/CV 2020',
Topology_Backend: '10.16.129.222',
},
{ Topology_Name: 'BETA - Advanced Routing',
Expand Down
8 changes: 5 additions & 3 deletions topologies/beta-datacenter/configlets/Leaf1-L2EVPN-Lab
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,24 @@ interface Vlan12
ip address virtual 172.16.112.1/24
!
interface Port-Channel4
description HOST1
switchport access vlan 12
!
interface Ethernet1
shutdown
!
interface Ethernet2
description SPINE1
no switchport
ip address 172.16.200.2/30
!
interface Ethernet3
description SPINE2
no switchport
ip address 172.16.200.18/30
!
interface Ethernet4
description HOST1
channel-group 4 mode active
lacp timer fast
!
Expand All @@ -31,7 +35,6 @@ interface Loopback0
!
interface Loopback1
ip address 1.1.1.1/32
ip address 99.99.99.99/32 secondary
!
interface Vxlan1
vxlan source-interface Loopback1
Expand All @@ -48,10 +51,9 @@ router bgp 65101
neighbor SPINE remote-as 65001
neighbor SPINE maximum-routes 12000
neighbor SPINE-EVPN-TRANSIT peer group
neighbor SPINE-EVPN-TRANSIT next-hop-unchanged
neighbor SPINE-EVPN-TRANSIT update-source Loopback0
neighbor SPINE-EVPN-TRANSIT ebgp-multihop
neighbor SPINE-EVPN-TRANSIT send-community extended
neighbor SPINE-EVPN-TRANSIT send-community
neighbor SPINE-EVPN-TRANSIT remote-as 65001
neighbor SPINE-EVPN-TRANSIT maximum-routes 0
neighbor 172.16.0.1 peer group SPINE-EVPN-TRANSIT
Expand Down
8 changes: 5 additions & 3 deletions topologies/beta-datacenter/configlets/Leaf1-L3EVPN-Lab
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,34 @@ vlan 2001
vrf instance vrf1
!
interface Port-Channel5
description HOST1
switchport access vlan 2001
!
interface Ethernet1
shutdown
!
interface Ethernet2
description SPINE1
no switchport
ip address 172.16.200.2/30
!
interface Ethernet3
description SPINE2
no switchport
ip address 172.16.200.18/30
!
interface Ethernet4
shutdown
!
interface Ethernet5
description HOST1
channel-group 5 mode active
!
interface Loopback0
ip address 172.16.0.3/32
!
interface Loopback1
ip address 1.1.1.1/32
ip address 99.99.99.99/32 secondary
!
interface Loopback901
vrf vrf1
Expand Down Expand Up @@ -57,10 +60,9 @@ router bgp 65101
neighbor SPINE remote-as 65001
neighbor SPINE maximum-routes 12000
neighbor SPINE-EVPN-TRANSIT peer group
neighbor SPINE-EVPN-TRANSIT next-hop-unchanged
neighbor SPINE-EVPN-TRANSIT update-source Loopback0
neighbor SPINE-EVPN-TRANSIT ebgp-multihop
neighbor SPINE-EVPN-TRANSIT send-community extended
neighbor SPINE-EVPN-TRANSIT send-community
neighbor SPINE-EVPN-TRANSIT remote-as 65001
neighbor SPINE-EVPN-TRANSIT maximum-routes 0
neighbor 172.16.0.1 peer group SPINE-EVPN-TRANSIT
Expand Down
9 changes: 6 additions & 3 deletions topologies/beta-datacenter/configlets/Leaf3-L2EVPN-Lab
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,26 @@ interface Vlan12
ip address virtual 172.16.112.1/24
!
interface Port-Channel4
description HOST2
switchport access vlan 12
!
interface Ethernet1
shutdown
!
interface Ethernet2
description SPINE1
no switchport
ip address 172.16.200.10/30
!
interface Ethernet3
description SPINE2
no switchport
ip address 172.16.200.26/30
!
interface Ethernet4
description HOST2
channel-group 4 mode active
lacp timer fast
!
interface Ethernet5
shutdown
Expand All @@ -30,7 +35,6 @@ interface Loopback0
!
interface Loopback1
ip address 3.3.3.3/32
ip address 99.99.99.99/32 secondary
!
interface Vxlan1
vxlan source-interface Loopback1
Expand All @@ -47,10 +51,9 @@ router bgp 65103
neighbor SPINE remote-as 65001
neighbor SPINE maximum-routes 12000
neighbor SPINE-EVPN-TRANSIT peer group
neighbor SPINE-EVPN-TRANSIT next-hop-unchanged
neighbor SPINE-EVPN-TRANSIT update-source Loopback0
neighbor SPINE-EVPN-TRANSIT ebgp-multihop
neighbor SPINE-EVPN-TRANSIT send-community extended
neighbor SPINE-EVPN-TRANSIT send-community
neighbor SPINE-EVPN-TRANSIT remote-as 65001
neighbor SPINE-EVPN-TRANSIT maximum-routes 0
neighbor 172.16.0.1 peer group SPINE-EVPN-TRANSIT
Expand Down
9 changes: 5 additions & 4 deletions topologies/beta-datacenter/configlets/Leaf3-L3EVPN-Lab
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,34 @@ vlan 2003
vrf instance vrf1
!
interface Port-Channel5
description HOST2
switchport access vlan 2003
!
interface Ethernet1
shutdown
!
interface Ethernet2
description SPINE1
no switchport
ip address 172.16.200.10/30
!
interface Ethernet3
description SPINE2
no switchport
ip address 172.16.200.26/30
!
interface Ethernet4
shutdown
!
interface Ethernet5
description HOST2
channel-group 5 mode active

!
interface Loopback0
ip address 172.16.0.5/32
!
interface Loopback1
ip address 3.3.3.3/32
ip address 99.99.99.99/32 secondary
!
interface Loopback901
vrf vrf1
Expand Down Expand Up @@ -58,10 +60,9 @@ router bgp 65103
neighbor SPINE remote-as 65001
neighbor SPINE maximum-routes 12000
neighbor SPINE-EVPN-TRANSIT peer group
neighbor SPINE-EVPN-TRANSIT next-hop-unchanged
neighbor SPINE-EVPN-TRANSIT update-source Loopback0
neighbor SPINE-EVPN-TRANSIT ebgp-multihop
neighbor SPINE-EVPN-TRANSIT send-community extended
neighbor SPINE-EVPN-TRANSIT send-community
neighbor SPINE-EVPN-TRANSIT remote-as 65001
neighbor SPINE-EVPN-TRANSIT maximum-routes 0
neighbor 172.16.0.1 peer group SPINE-EVPN-TRANSIT
Expand Down
86 changes: 86 additions & 0 deletions topologies/beta-datacenter/files/infra/user-mapping.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
<user-mapping>

<!-- Per-user authentication and config information -->

<!-- A user using md5 to hash the password
arista user and its md5 hashed password below is used to
login to Guacamole Web UI-->
<authorize
username="arista"
password="dff0516218630b32d06657ba7cd13aa5"
encoding="md5">

<!-- Authorized connection -->
<connection name="devbox">
<protocol>vnc</protocol>
<param name="hostname">127.0.0.1</param>
<param name="port">6100</param>
<param name="password">@rista123</param>
</connection>
<connection name="spine1">
<protocol>ssh</protocol>
<param name="hostname">192.168.0.10</param>
<param name="port">22</param>
<param name="username">arista</param>
<param name="password">{REPLACE_ARISTA}</param>
</connection>
<connection name="spine2">
<protocol>ssh</protocol>
<param name="hostname">192.168.0.11</param>
<param name="port">22</param>
<param name="username">arista</param>
<param name="password">{REPLACE_ARISTA}</param>
</connection>
<connection name="leaf1">
<protocol>ssh</protocol>
<param name="hostname">192.168.0.14</param>
<param name="port">22</param>
<param name="username">arista</param>
<param name="password">{REPLACE_ARISTA}</param>
</connection>
<connection name="leaf2">
<protocol>ssh</protocol>
<param name="hostname">192.168.0.15</param>
<param name="port">22</param>
<param name="username">arista</param>
<param name="password">{REPLACE_ARISTA}</param>
</connection>
<connection name="leaf3">
<protocol>ssh</protocol>
<param name="hostname">192.168.0.16</param>
<param name="port">22</param>
<param name="username">arista</param>
<param name="password">{REPLACE_ARISTA}</param>
</connection>
<connection name="leaf4">
<protocol>ssh</protocol>
<param name="hostname">192.168.0.17</param>
<param name="port">22</param>
<param name="username">arista</param>
<param name="password">{REPLACE_ARISTA}</param>
</connection>
<connection name="host1">
<protocol>ssh</protocol>
<param name="hostname">192.168.0.31</param>
<param name="port">22</param>
<param name="username">arista</param>
<param name="password">{REPLACE_ARISTA}</param>
</connection>
<connection name="host2">
<protocol>ssh</protocol>
<param name="hostname">192.168.0.32</param>
<param name="port">22</param>
<param name="username">arista</param>
<param name="password">{REPLACE_ARISTA}</param>
</connection>
<connection name="cvx">
<protocol>ssh</protocol>
<param name="hostname">192.168.0.44</param>
<param name="port">22</param>
<param name="username">arista</param>
<param name="password">{REPLACE_ARISTA}</param>
</connection>

</authorize>

</user-mapping>
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ and enter:
ansible veos -i ~/Desktop/hosts -m raw -a "show version" -u arista -k
Enter the password **arista** when prompted.
Enter the password **{REPLACE_ARISTA}** when prompted.
This probably looks complicated at first, but let’s step through it:

Expand Down Expand Up @@ -133,7 +133,7 @@ it’s doing:
+-----------------------------------+-----------------------------------+
|       ``username: "arista"`` | Sets the username to ``arista`` |
+-----------------------------------+-----------------------------------+
|       ``password: "arista"`` | Sets the password to ``arista`` |
| ``password: "{REPLACE_ARISTA}"`` | Sets the password to ``{REPLACE_ARISTA}`` |
+-----------------------------------+-----------------------------------+
|       ``authorize: yes`` | Enables once connected |
+-----------------------------------+-----------------------------------+
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Ansible playbook (``ntp.yml``):
    provider:
     host: "{{ ansible_host }}"
      username: "arista"
      password: "arista"
      password: "{REPLACE_ARISTA}"
      authorize: yes
      transport: eapi
      validate_certs: no
Expand Down Expand Up @@ -211,7 +211,7 @@ Now let’s create the playbook on your desktop named ``interfaces.yml``:
   provider:
     host: "{{ ansible_host }}"
     username: "arista"
     password: "arista"
     password: "{REPLACE_ARISTA}"
     authorize: yes
     transport: eapi
     validate_certs: no
Expand Down
Loading

0 comments on commit 8b2e0a6

Please sign in to comment.