chore: Repository cleanup - Remove unnecessary files (#16)

## Summary

Repository cleanup to remove unnecessary files and streamline documentation after the successful EVPN-VXLAN lab implementation.

Closes #15

---

## Changes

### Files Removed (13 files total)

**Scripts folder:**
- `scripts/deploy.sh`
- `scripts/test-connectivity.sh`
- `scripts/cleanup.sh`

**Root-level markdown files:**
- `BRANCH_SUMMARY.md`
- `BUGFIX_EVPN_ACTIVATION.md`
- `DEPLOYMENT_GUIDE.md`
- `FIXES_APPLIED.md`
- `TESTING_CHECKLIST.md`
- `VLAN_TAGGING_FIX_EXPLANATION.md`

**docs/ folder (entire folder removed):**
- `docs/HOST_INTERFACE_CONFIGURATION.md`
- `docs/configuration-guide.md`
- `docs/quick-reference.md`
- `docs/validation-commands.md`

### Files Updated
- `hosts/README.md` - Fixed broken links
- `README.md` - Updated repository structure section

---

## Final Repository Structure

```
├── .gitignore
├── README.md                    # Main documentation
├── TROUBLESHOOTING.md           # Troubleshooting guide
├── END_TO_END_TESTING.md        # Testing procedures
├── evpn-lab.clab.yml            # ContainerLab topology
├── configs/                     # Switch configurations (10 files)
└── hosts/                       # Host interface configs (5 files)
```

---

## Testing

- [x] Lab redeployed successfully with `containerlab deploy -t evpn-lab.clab.yml`
- [x] L2 VXLAN connectivity verified (host1 ↔ host3)
- [x] L3 VXLAN connectivity verified (host2 ↔ host4)
- [x] All BGP EVPN sessions established
- [x] MLAG pairs operational

Reviewed-on: #16
This commit was merged in pull request #16.
This commit is contained in:
2025-11-30 19:07:22 +00:00
parent 1080bf07bb
commit db54e56b41
15 changed files with 16 additions and 2889 deletions

View File

@@ -1,91 +0,0 @@
#!/bin/bash
# Cleanup script for Arista EVPN-VXLAN lab
set -e
# Colors
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m'
print_info() {
echo -e "${GREEN}[INFO]${NC} $1"
}
print_warning() {
echo -e "${YELLOW}[WARNING]${NC} $1"
}
print_error() {
echo -e "${RED}[ERROR]${NC} $1"
}
echo "========================================="
echo " EVPN-VXLAN Lab Cleanup"
echo "========================================="
echo ""
# Check if running as root
if [ "$EUID" -ne 0 ]; then
print_error "Please run with sudo"
exit 1
fi
# Confirm cleanup
print_warning "This will destroy the lab and clean up all resources!"
read -p "Are you sure you want to continue? (yes/no): " confirm
if [ "$confirm" != "yes" ]; then
print_info "Cleanup cancelled."
exit 0
fi
# Destroy the lab
print_info "Destroying ContainerLab topology..."
if containerlab destroy -t evpn-lab.clab.yml --cleanup 2>/dev/null; then
print_info "Lab destroyed successfully"
else
print_warning "Lab may not be running or already destroyed"
fi
# Clean up any remaining containers
print_info "Checking for remaining lab containers..."
containers=$(docker ps -a | grep "clab-arista-evpn-fabric" | awk '{print $1}' || true)
if [ -n "$containers" ]; then
print_info "Removing remaining containers..."
echo "$containers" | xargs docker rm -f
else
print_info "No remaining containers found"
fi
# Clean up networks
print_info "Checking for lab networks..."
networks=$(docker network ls | grep "evpn-mgmt" | awk '{print $1}' || true)
if [ -n "$networks" ]; then
print_info "Removing lab networks..."
echo "$networks" | xargs docker network rm
else
print_info "No lab networks found"
fi
# Clean up clab directory
print_info "Cleaning up clab directory..."
if [ -d "clab-arista-evpn-fabric" ]; then
rm -rf clab-arista-evpn-fabric
print_info "Removed clab directory"
fi
# Optional: Clean up docker system
read -p "Do you want to run docker system prune? (y/N): " prune
if [[ $prune =~ ^[Yy]$ ]]; then
print_info "Running docker system prune..."
docker system prune -f
fi
echo ""
print_info "Cleanup complete!"
echo ""
print_info "To redeploy the lab, run:"
print_info " sudo ./scripts/deploy.sh deploy"
echo ""

View File

@@ -1,248 +0,0 @@
#!/bin/bash
# Deployment script for Arista EVPN-VXLAN ContainerLab
set -e
# Colors for output
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m' # No Color
# Function to print colored output
print_info() {
echo -e "${GREEN}[INFO]${NC} $1"
}
print_warning() {
echo -e "${YELLOW}[WARNING]${NC} $1"
}
print_error() {
echo -e "${RED}[ERROR]${NC} $1"
}
# Function to check prerequisites
check_prerequisites() {
print_info "Checking prerequisites..."
# Check if running as root or with sudo
if [ "$EUID" -ne 0 ]; then
print_error "Please run with sudo"
exit 1
fi
# Check if containerlab is installed
if ! command -v containerlab &> /dev/null; then
print_error "ContainerLab is not installed. Please install it first."
print_info "Visit: https://containerlab.dev/install/"
exit 1
fi
# Check if docker is running
if ! docker info &> /dev/null; then
print_error "Docker is not running. Please start Docker first."
exit 1
fi
# Check if cEOS image exists
if ! docker images | grep -q "ceos.*4.35.0"; then
print_warning "cEOS 4.35.0 image not found."
print_info "Please import the cEOS image first:"
print_info " docker import cEOS64-lab-4.35.0F.tar ceos:4.35.0"
read -p "Do you want to continue anyway? (y/N) " -n 1 -r
echo
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
exit 1
fi
fi
print_info "All prerequisites met!"
}
# Function to deploy the lab
deploy_lab() {
print_info "Deploying Arista EVPN-VXLAN lab..."
# Deploy with containerlab
if containerlab deploy -t evpn-lab.clab.yml; then
print_info "Lab deployed successfully!"
echo ""
print_info "Lab Details:"
containerlab inspect -t evpn-lab.clab.yml
echo ""
print_info "Access devices using:"
print_info " ssh admin@<container-name>"
print_info " Default password: admin"
echo ""
print_info "Or use docker exec:"
print_info " docker exec -it clab-arista-evpn-fabric-leaf1 Cli"
else
print_error "Deployment failed!"
exit 1
fi
}
# Function to display status
show_status() {
print_info "Lab Status:"
containerlab inspect -t evpn-lab.clab.yml
}
# Function to destroy the lab
destroy_lab() {
print_warning "This will destroy the entire lab!"
read -p "Are you sure? (y/N) " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
print_info "Destroying lab..."
containerlab destroy -t evpn-lab.clab.yml --cleanup
print_info "Lab destroyed successfully!"
else
print_info "Destruction cancelled."
fi
}
# Function to restart the lab
restart_lab() {
print_info "Restarting lab..."
destroy_lab
if [[ $? -eq 0 ]]; then
sleep 2
deploy_lab
fi
}
# Function to show device access info
show_access_info() {
print_info "Device Access Information:"
echo ""
echo "SSH Access (password: admin):"
echo " Spines:"
echo " ssh admin@clab-arista-evpn-fabric-spine1"
echo " ssh admin@clab-arista-evpn-fabric-spine2"
echo ""
echo " Leafs:"
for i in {1..8}; do
echo " ssh admin@clab-arista-evpn-fabric-leaf$i"
done
echo ""
echo "Docker Exec:"
echo " docker exec -it clab-arista-evpn-fabric-<device-name> Cli"
echo ""
echo "Management IPs:"
containerlab inspect -t evpn-lab.clab.yml | grep -E "spine|leaf" | awk '{print $2, $6}'
}
# Function to run basic validation
validate_lab() {
print_info "Running basic validation..."
# Check if containers are running
if ! docker ps | grep -q "clab-arista-evpn-fabric"; then
print_error "No lab containers found. Deploy the lab first."
exit 1
fi
print_info "Checking BGP EVPN status on spine1..."
docker exec clab-arista-evpn-fabric-spine1 Cli -p 15 -c "show bgp evpn summary"
print_info "Checking VXLAN status on leaf1..."
docker exec clab-arista-evpn-fabric-leaf1 Cli -p 15 -c "show vxlan vtep"
print_info "Checking MLAG status on leaf1..."
docker exec clab-arista-evpn-fabric-leaf1 Cli -p 15 -c "show mlag"
print_info "Validation complete! Check output above for any issues."
}
# Main menu
show_menu() {
echo ""
echo "========================================="
echo " Arista EVPN-VXLAN Lab Manager"
echo "========================================="
echo "1. Deploy Lab"
echo "2. Show Status"
echo "3. Destroy Lab"
echo "4. Restart Lab"
echo "5. Show Access Info"
echo "6. Validate Lab"
echo "7. Exit"
echo "========================================="
}
# Main script
main() {
# Check prerequisites first
check_prerequisites
# If arguments provided, execute directly
if [ $# -gt 0 ]; then
case "$1" in
deploy)
deploy_lab
;;
status)
show_status
;;
destroy)
destroy_lab
;;
restart)
restart_lab
;;
access)
show_access_info
;;
validate)
validate_lab
;;
*)
print_error "Unknown command: $1"
echo "Usage: $0 {deploy|status|destroy|restart|access|validate}"
exit 1
;;
esac
exit 0
fi
# Interactive menu
while true; do
show_menu
read -p "Select option [1-7]: " choice
case $choice in
1)
deploy_lab
;;
2)
show_status
;;
3)
destroy_lab
;;
4)
restart_lab
;;
5)
show_access_info
;;
6)
validate_lab
;;
7)
print_info "Exiting..."
exit 0
;;
*)
print_error "Invalid option. Please select 1-7."
;;
esac
echo ""
read -p "Press Enter to continue..."
done
}
# Run main function
main "$@"

View File

@@ -1,146 +0,0 @@
#!/bin/bash
# Connectivity test script for Arista EVPN-VXLAN lab
set -e
# Colors
GREEN='\033[0;32m'
RED='\033[0;31m'
YELLOW='\033[1;33m'
NC='\033[0m'
print_test() {
echo -e "${YELLOW}[TEST]${NC} $1"
}
print_pass() {
echo -e "${GREEN}[PASS]${NC} $1"
}
print_fail() {
echo -e "${RED}[FAIL]${NC} $1"
}
# Test counter
TESTS_RUN=0
TESTS_PASSED=0
TESTS_FAILED=0
run_test() {
local test_name="$1"
local device="$2"
local command="$3"
local expected="$4"
TESTS_RUN=$((TESTS_RUN + 1))
print_test "$test_name"
if output=$(docker exec "clab-arista-evpn-fabric-$device" Cli -p 15 -c "$command" 2>&1); then
if echo "$output" | grep -q "$expected"; then
print_pass "$test_name"
TESTS_PASSED=$((TESTS_PASSED + 1))
return 0
else
print_fail "$test_name - Expected pattern not found"
TESTS_FAILED=$((TESTS_FAILED + 1))
return 1
fi
else
print_fail "$test_name - Command failed"
TESTS_FAILED=$((TESTS_FAILED + 1))
return 1
fi
}
echo "========================================="
echo " EVPN-VXLAN Connectivity Tests"
echo "========================================="
echo ""
# Test 1: BGP Underlay - Spine to Leaf
echo "--- Testing BGP Underlay ---"
run_test "Spine1 BGP IPv4 neighbors" "spine1" "show bgp ipv4 unicast summary" "Estab"
run_test "Spine2 BGP IPv4 neighbors" "spine2" "show bgp ipv4 unicast summary" "Estab"
run_test "Leaf1 BGP IPv4 neighbors" "leaf1" "show bgp ipv4 unicast summary" "Estab"
echo ""
# Test 2: BGP EVPN Overlay
echo "--- Testing BGP EVPN Overlay ---"
run_test "Spine1 BGP EVPN neighbors" "spine1" "show bgp evpn summary" "Estab"
run_test "Spine2 BGP EVPN neighbors" "spine2" "show bgp evpn summary" "Estab"
run_test "Leaf1 BGP EVPN neighbors" "leaf1" "show bgp evpn summary" "Estab"
run_test "Leaf3 BGP EVPN neighbors" "leaf3" "show bgp evpn summary" "Estab"
echo ""
# Test 3: Loopback Reachability
echo "--- Testing Loopback Reachability ---"
run_test "Leaf1 can reach Spine1 loopback" "leaf1" "ping 10.0.250.1 repeat 3" "3 received"
run_test "Leaf1 can reach Spine2 loopback" "leaf1" "ping 10.0.250.2 repeat 3" "3 received"
run_test "Leaf1 can reach Leaf3 loopback" "leaf1" "ping 10.0.250.13 repeat 3" "3 received"
echo ""
# Test 4: MLAG Status
echo "--- Testing MLAG ---"
run_test "Leaf1 MLAG state" "leaf1" "show mlag" "Active"
run_test "Leaf2 MLAG state" "leaf2" "show mlag" "Active"
run_test "Leaf3 MLAG state" "leaf3" "show mlag" "Active"
run_test "Leaf4 MLAG state" "leaf4" "show mlag" "Active"
echo ""
# Test 5: VXLAN Interface
echo "--- Testing VXLAN ---"
run_test "Leaf1 VXLAN interface" "leaf1" "show interface vxlan1" "line protocol is up"
run_test "Leaf3 VXLAN interface" "leaf3" "show interface vxlan1" "line protocol is up"
run_test "Leaf5 VXLAN interface" "leaf5" "show interface vxlan1" "line protocol is up"
run_test "Leaf7 VXLAN interface" "leaf7" "show interface vxlan1" "line protocol is up"
echo ""
# Test 6: VXLAN VTEPs Discovery
echo "--- Testing VTEP Discovery ---"
run_test "Leaf1 discovers remote VTEPs" "leaf1" "show vxlan vtep" "10.0.255"
run_test "Leaf3 discovers remote VTEPs" "leaf3" "show vxlan vtep" "10.0.255"
run_test "Leaf5 discovers remote VTEPs" "leaf5" "show vxlan vtep" "10.0.255"
echo ""
# Test 7: EVPN Routes
echo "--- Testing EVPN Routes ---"
run_test "Leaf1 has EVPN Type-2 routes" "leaf1" "show bgp evpn route-type mac-ip" "RD:"
run_test "Leaf3 has EVPN Type-5 routes" "leaf3" "show bgp evpn route-type ip-prefix ipv4" "RD:"
run_test "Leaf7 has EVPN Type-5 routes" "leaf7" "show bgp evpn route-type ip-prefix ipv4" "RD:"
echo ""
# Test 8: VRF Routing
echo "--- Testing VRF Routing ---"
run_test "Leaf3 VRF gold exists" "leaf3" "show vrf" "gold"
run_test "Leaf3 has routes in VRF gold" "leaf3" "show ip route vrf gold" "10."
run_test "Leaf7 VRF gold exists" "leaf7" "show vrf" "gold"
run_test "Leaf7 has routes in VRF gold" "leaf7" "show ip route vrf gold" "10."
echo ""
# Test 9: VRF Connectivity
echo "--- Testing VRF Connectivity ---"
run_test "Leaf3 can reach Leaf7 in VRF gold" "leaf3" "ping vrf gold 10.78.78.1 repeat 3" "received"
run_test "Leaf7 can reach Leaf3 in VRF gold" "leaf7" "ping vrf gold 10.34.34.1 repeat 3" "received"
echo ""
# Test 10: ECMP Paths
echo "--- Testing ECMP ---"
run_test "Leaf1 has ECMP to remote loopbacks" "leaf1" "show ip route 10.0.250.13" "via"
echo ""
# Summary
echo "========================================="
echo " Test Summary"
echo "========================================="
echo "Total Tests Run: $TESTS_RUN"
echo -e "Tests Passed: ${GREEN}$TESTS_PASSED${NC}"
echo -e "Tests Failed: ${RED}$TESTS_FAILED${NC}"
echo "========================================="
if [ $TESTS_FAILED -eq 0 ]; then
echo -e "${GREEN}All tests passed!${NC}"
exit 0
else
echo -e "${RED}Some tests failed. Check the output above.${NC}"
exit 1
fi