diff --git a/.devcontainer/avd-single-dc-l3ls/devcontainer.json b/.devcontainer/avd-single-dc-l3ls/devcontainer.json new file mode 100644 index 0000000..007d1c2 --- /dev/null +++ b/.devcontainer/avd-single-dc-l3ls/devcontainer.json @@ -0,0 +1,33 @@ +{ + "image": "ghcr.io/${localEnv:GITHUB_REPOSITORY}:single-dc-l3ls", + // containerEnv set the variables applied to entire container + "containerEnv": { + "ARISTA_TOKEN": "${localEnv:ARTOKEN}", + "CONTAINERWSF": "${containerWorkspaceFolder}", + "GITHUB_REPOSITORY": "${localEnv:GITHUB_REPOSITORY}", + "AVD_GITHUB_REPO": "${localEnv:AVD_GITHUB_REPO}", + "AVD_BRANCH_NAME": "${localEnv:AVD_BRANCH_NAME}" + }, + "secrets": { + "ARTOKEN": { + "description": "token to auto-download EOS images from arista.com." + // "documentationUrl": "https://example.com/link/to/info" + }, + "AVD_GITHUB_REPO": { + "description": "The name of the repository that will be used to install AVD collection. Set `aristanetworks/avd` to install from the original repository or use a fork." + // "documentationUrl": "https://example.com/link/to/info" + }, + "AVD_BRANCH_NAME": { + "description": "The name of the branch that will be used to install AVD collection. For example: `devel`" + // "documentationUrl": "https://example.com/link/to/info" + } + }, + "hostRequirements": { + "cpus": 8, + "memory": "32gb", + "storage": "64gb" + }, + "postCreateCommand": "postCreate.sh", + "workspaceMount": "source=${localWorkspaceFolder}/demos/${containerWorkspaceFolder},target=/${containerWorkspaceFolder},type=bind", + "workspaceFolder": "/avd-single-dc-l3ls" +} \ No newline at end of file diff --git a/.github/workflows/avd-single-dc-l3ls.yml b/.github/workflows/avd-single-dc-l3ls.yml new file mode 100644 index 0000000..c609c22 --- /dev/null +++ b/.github/workflows/avd-single-dc-l3ls.yml @@ -0,0 +1,25 @@ +--- +name: build container for Single DC L3LS + +on: + push: + branches: [main] + paths: + - .github/workflows/avd-single-dc-l3ls.yml + - .github/workflows/container-build-child-workflow.yml + - containers/avd-single-dc-l3ls/** + workflow_dispatch: + branches: [main] + +jobs: + build-demo-container: + uses: ./.github/workflows/container-build-child-workflow.yml + with: + container_name: "avd" + image_tags: "single-dc-l3ls" + from_image: "ghcr.io/aristanetworks/avd/dev" + from_variant: "python3.11" + username: "avd" + clab_version: "0.54.2" + ceos_lab_version: "4.32.0.1F" + git_init: True diff --git a/containers/avd-single-dc-l3ls/.devcontainer/Dockerfile b/containers/avd-single-dc-l3ls/.devcontainer/Dockerfile new file mode 100644 index 0000000..7333bd1 --- /dev/null +++ b/containers/avd-single-dc-l3ls/.devcontainer/Dockerfile @@ -0,0 +1,42 @@ +ARG FROM_IMAGE +ARG FROM_VARIANT + +FROM ${FROM_IMAGE}:${FROM_VARIANT} + +ARG USERNAME +ARG CLAB_VERSION +ARG CEOS_LAB_VERSION_ARG +ARG GIT_INIT_ARG + +ENV CEOS_LAB_VERSION=${CEOS_LAB_VERSION_ARG} +ENV GIT_INIT=${GIT_INIT_ARG} + +USER root + +# install some basic tools inside the container +RUN apt-get update \ + && apt-get install -y --no-install-recommends \ + sshpass \ + iputils-ping \ + htop \ + && rm -rf /var/lib/apt/lists/* \ + && rm -Rf /usr/share/doc && rm -Rf /usr/share/man \ + && apt-get clean + +# copy postCreate script +COPY ./postCreate.sh /bin/postCreate.sh +RUN chmod +x /bin/postCreate.sh +# copy addAliases script +COPY ./addAliases.sh /bin/addAliases.sh +RUN chmod +x /bin/addAliases.sh + +USER ${USERNAME} + +RUN /bin/addAliases.sh + +# install the latest containerlab, yamllint, cook-and-cut and eos-downloader +RUN bash -c "$(curl -sL https://get.containerlab.dev)" -- -v ${CLAB_VERSION} \ + && pip3 install --user yamllint \ + && pip install --user "eos-downloader>=0.10.1" \ + && pip install --user passlib \ + && pip3 install anta==0.12.0 diff --git a/containers/avd-single-dc-l3ls/.devcontainer/addAliases.sh b/containers/avd-single-dc-l3ls/.devcontainer/addAliases.sh new file mode 100644 index 0000000..b09119c --- /dev/null +++ b/containers/avd-single-dc-l3ls/.devcontainer/addAliases.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +set +e + + +echo "alias dc1-spine1='sshpass -p ansible ssh -o \"StrictHostKeyChecking no\" ansible@172.16.1.11'" >> ~/.zshrc +echo "alias dc1-spine2='sshpass -p ansible ssh -o \"StrictHostKeyChecking no\" ansible@172.16.1.12'" >> ~/.zshrc +echo "alias dc1-leaf1a='sshpass -p ansible ssh -o \"StrictHostKeyChecking no\" ansible@172.16.1.101'" >> ~/.zshrc +echo "alias dc1-leaf1b='sshpass -p ansible ssh -o \"StrictHostKeyChecking no\" ansible@172.16.1.102'" >> ~/.zshrc +echo "alias dc1-leaf2a='sshpass -p ansible ssh -o \"StrictHostKeyChecking no\" ansible@172.16.1.103'" >> ~/.zshrc +echo "alias dc1-leaf2b='sshpass -p ansible ssh -o \"StrictHostKeyChecking no\" ansible@172.16.1.104'" >> ~/.zshrc +echo "alias dc1-leaf1c='sshpass -p ansible ssh -o \"StrictHostKeyChecking no\" ansible@172.16.1.151'" >> ~/.zshrc +echo "alias dc1-leaf2c='sshpass -p ansible ssh -o \"StrictHostKeyChecking no\" ansible@172.16.1.152'" >> ~/.zshrc + +echo "alias dc1-leaf1-server1='sshpass -p ansible ssh -o \"StrictHostKeyChecking no\" ansible@172.16.1.201'" >> ~/.zshrc +echo "alias dc1-leaf2-server1='sshpass -p ansible ssh -o \"StrictHostKeyChecking no\" ansible@172.16.1.202'" >> ~/.zshrc \ No newline at end of file diff --git a/containers/avd-single-dc-l3ls/.devcontainer/devcontainer.json b/containers/avd-single-dc-l3ls/.devcontainer/devcontainer.json new file mode 100644 index 0000000..b3819b2 --- /dev/null +++ b/containers/avd-single-dc-l3ls/.devcontainer/devcontainer.json @@ -0,0 +1,36 @@ +{ + "build": { + "dockerfile": "Dockerfile", + "args": { + "FROM_IMAGE": "${localEnv:FROM_IMAGE}", + "FROM_VARIANT": "${localEnv:FROM_VARIANT}", + "USERNAME": "${localEnv:USERNAME}", + "CLAB_VERSION": "${localEnv:CLAB_VERSION}", + "CEOS_LAB_VERSION_ARG": "${localEnv:CEOS_LAB_VERSION_ARG}", + "GIT_INIT_ARG": "${localEnv:GIT_INIT_ARG}" + } + }, + "customizations": { + "vscode": { + "extensions": [ + // git essentials + "piotrpalarz.vscode-gitignore-generator", + "mhutchie.git-graph", + "donjayamanne.githistory", + // spell checker + "streetsidesoftware.code-spell-checker", + // drawio and tldraw + // excalidraw is pre-installed in universal + "hediet.vscode-drawio", + "tldraw-org.tldraw-vscode", + // markdown + "yzhang.markdown-all-in-one", + "bierner.markdown-checkbox", + "DavidAnson.vscode-markdownlint", + // various tools + "tuxtina.json2yaml", + "mutantdino.resourcemonitor" + ] + } + } +} \ No newline at end of file diff --git a/containers/avd-single-dc-l3ls/.devcontainer/postCreate.sh b/containers/avd-single-dc-l3ls/.devcontainer/postCreate.sh new file mode 100644 index 0000000..536d674 --- /dev/null +++ b/containers/avd-single-dc-l3ls/.devcontainer/postCreate.sh @@ -0,0 +1,25 @@ +#!/usr/bin/env bash + +set +e + +# replace all markdown vars in demo directory +grep -rl '{{gh.repo_name}}' . --exclude-dir .git | xargs sed -i 's/'{{gh.repo_name}}'/'"${GITHUB_REPOSITORY##*/}"'/g' +grep -rl '{{gh.org_name}}' . --exclude-dir .git | xargs sed -i 's/'{{gh.org_name}}'/'"${GITHUB_REPOSITORY%%/*}"'/g' +grep -rl '{{gh.repository}}' . --exclude-dir .git | xargs sed -i 's@'{{gh.repository}}'@'"${GITHUB_REPOSITORY}"'@g' + +ardl get eos --image-type cEOS --version ${CEOS_LAB_VERSION} --import-docker + +# copy AVD inventory +mkdir ${CONTAINERWSF}/avd_inventory/ +cp -r /home/avd/.ansible/collections/ansible_collections/arista/avd/examples/single-dc-l3ls/* ${CONTAINERWSF}/avd_inventory/ + +# init demo dir as Git repo if requested for this demo env +if ${GIT_INIT}; then + cd ${CONTAINERWSF} + git init + git config --global --add safe.directory ${PWD} + if [ -z "$(git config user.name)" ]; then git config user.name "Lab User"; fi + if [ -z "$(git config user.email)" ]; then git config user.email user@one-click.lab; fi + git add . + git commit -m "git init" +fi diff --git a/demos/avd-avd-extended-workshop--part-1/Makefile b/demos/avd-avd-extended-workshop--part-1/Makefile index 188f635..4b4473a 100644 --- a/demos/avd-avd-extended-workshop--part-1/Makefile +++ b/demos/avd-avd-extended-workshop--part-1/Makefile @@ -11,3 +11,15 @@ start: ## Deploy ceos lab .PHONY: stop stop: ## Destroy ceos lab sudo containerlab destroy --debug --topo $(CURRENT_DIR)/clab/topology.clab.yml --cleanup + +.PHONY: build +build: ## Generate AVD configs + cd $(CURRENT_DIR)/avd_inventory; ansible-playbook build.yml + +.PHONY: deploy_eapi +deploy_eapi: ## Deploy AVD configs using eAPI + cd $(CURRENT_DIR)/avd_inventory; ansible-playbook deploy.yml + +.PHONY: deploy_cvp +deploy_cvp: ## Deploy AVD configs using eAPI + cd $(CURRENT_DIR)/avd_inventory; ansible-playbook deploy-cvp.yml diff --git a/demos/avd-single-dc-l3ls/.gitignore b/demos/avd-single-dc-l3ls/.gitignore new file mode 100644 index 0000000..0cd6d28 --- /dev/null +++ b/demos/avd-single-dc-l3ls/.gitignore @@ -0,0 +1,120 @@ +# File created using '.gitignore Generator' for Visual Studio Code: https://bit.ly/vscode-gig +# Created by https://www.toptal.com/developers/gitignore/api/visualstudiocode,macos,ansible,linux,windows +# Edit at https://www.toptal.com/developers/gitignore?templates=visualstudiocode,macos,ansible,linux,windows + +### Ansible ### +*.retry + +### Linux ### +*~ + +# temporary files which can be created if a process still has a handle open of a deleted file +.fuse_hidden* + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* + +# .nfs files are created when an open file is removed but is still being accessed +.nfs* + +### macOS ### +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +### macOS Patch ### +# iCloud generated files +*.icloud + +### VisualStudioCode ### +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +!.vscode/*.code-snippets + +# Local History for Visual Studio Code +.history/ + +# Built Visual Studio Code Extensions +*.vsix + +### VisualStudioCode Patch ### +# Ignore all local history of files +.history +.ionide + +### Windows ### +# Windows thumbnail cache files +Thumbs.db +Thumbs.db:encryptable +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + +# End of https://www.toptal.com/developers/gitignore/api/visualstudiocode,macos,ansible,linux,windows + +# Custom rules (everything added below won't be overriden by 'Generate .gitignore File' if you use 'Update' option) + +# ignore clab files +clab-* +*.bak + +# ignore cv onboarding token +clab/cv-onboarding-token + +# discard all config backups as we don't need them +avd_inventory/config_backup/ + +# gitignore downloaded cEOS-lab images +cEOS-lab-* + +# ingnore images and other files not to be uploaded to GitHub +.gitignored/* +!.gitignored/.gitkeep diff --git a/demos/avd-single-dc-l3ls/Makefile b/demos/avd-single-dc-l3ls/Makefile new file mode 100644 index 0000000..188f635 --- /dev/null +++ b/demos/avd-single-dc-l3ls/Makefile @@ -0,0 +1,13 @@ +CURRENT_DIR := $(shell pwd) + +.PHONY: help +help: ## Display help message + @grep -E '^[0-9a-zA-Z_-]+\.*[0-9a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' + +.PHONY: start +start: ## Deploy ceos lab + sudo containerlab deploy --debug --topo $(CURRENT_DIR)/clab/topology.clab.yml --max-workers 10 --timeout 5m --reconfigure + +.PHONY: stop +stop: ## Destroy ceos lab + sudo containerlab destroy --debug --topo $(CURRENT_DIR)/clab/topology.clab.yml --cleanup diff --git a/demos/avd-single-dc-l3ls/README.md b/demos/avd-single-dc-l3ls/README.md new file mode 100644 index 0000000..36e352e --- /dev/null +++ b/demos/avd-single-dc-l3ls/README.md @@ -0,0 +1,18 @@ +# Single DC L3LS + +This lab is tested for: + + cEOS-lab version: 4.32.0.1F + Containerlab Version: 0.54.2 + Codespace Container Size + CPUs: 8 + memory: 32 GB + storage: 64 GB + +Last reviewed: 05/06/2024 + +Please check the lab materials: + +- [Lab Documentation](https://{{gh.org_name}}.github.io/{{gh.repo_name}}/avd-single-dc-l3ls/avd-single-dc-l3ls/) +- [HTML Slides](https://{{gh.org_name}}.github.io/{{gh.repo_name}}/slides/avd-single-dc-l3ls.html) +- [PDF Slides](https://{{gh.org_name}}.github.io/{{gh.repo_name}}/pdfs/avd-single-dc-l3ls.pdf) diff --git a/demos/avd-single-dc-l3ls/clab/init-configs/dc1-leaf1-server1.cfg b/demos/avd-single-dc-l3ls/clab/init-configs/dc1-leaf1-server1.cfg new file mode 100644 index 0000000..e444576 --- /dev/null +++ b/demos/avd-single-dc-l3ls/clab/init-configs/dc1-leaf1-server1.cfg @@ -0,0 +1,36 @@ +hostname dc1-spine1 +! +no aaa root +! +username ansible privilege 15 role network-admin secret ansible +! +vrf instance MGMT +! +ip name-server vrf MGMT 8.8.8.8 +dns domain avd.lab +! +ntp local-interface vrf MGMT Management0 +ntp server vrf MGMT time.apple.com +ntp server vrf MGMT time.google.com +ntp server vrf MGMT time.windows.com +! +service routing protocols model multi-agent +! +management api http-commands + protocol https + no shutdown + ! + vrf MGMT + no shutdown +! +aaa authorization exec default local +! +interface Management0 + vrf MGMT + ip address 172.16.1.11/24 +! +ip route vrf MGMT 0.0.0.0/0 172.16.1.1 +! +ip name-server vrf MGMT 8.8.8.8 +! +end \ No newline at end of file diff --git a/demos/avd-single-dc-l3ls/clab/init-configs/dc1-leaf1a.cfg b/demos/avd-single-dc-l3ls/clab/init-configs/dc1-leaf1a.cfg new file mode 100644 index 0000000..c0fce28 --- /dev/null +++ b/demos/avd-single-dc-l3ls/clab/init-configs/dc1-leaf1a.cfg @@ -0,0 +1,36 @@ +hostname dc1-leaf1a +! +no aaa root +! +username ansible privilege 15 role network-admin secret ansible +! +vrf instance MGMT +! +ip name-server vrf MGMT 8.8.8.8 +dns domain avd.lab +! +ntp local-interface vrf MGMT Management0 +ntp server vrf MGMT time.apple.com +ntp server vrf MGMT time.google.com +ntp server vrf MGMT time.windows.com +! +service routing protocols model multi-agent +! +management api http-commands + protocol https + no shutdown + ! + vrf MGMT + no shutdown +! +aaa authorization exec default local +! +interface Management0 + vrf MGMT + ip address 172.16.1.101/24 +! +ip route vrf MGMT 0.0.0.0/0 172.16.1.1 +! +ip name-server vrf MGMT 8.8.8.8 +! +end \ No newline at end of file diff --git a/demos/avd-single-dc-l3ls/clab/init-configs/dc1-leaf1b.cfg b/demos/avd-single-dc-l3ls/clab/init-configs/dc1-leaf1b.cfg new file mode 100644 index 0000000..be829a7 --- /dev/null +++ b/demos/avd-single-dc-l3ls/clab/init-configs/dc1-leaf1b.cfg @@ -0,0 +1,36 @@ +hostname dc1-leaf1b +! +no aaa root +! +username ansible privilege 15 role network-admin secret ansible +! +vrf instance MGMT +! +ip name-server vrf MGMT 8.8.8.8 +dns domain avd.lab +! +ntp local-interface vrf MGMT Management0 +ntp server vrf MGMT time.apple.com +ntp server vrf MGMT time.google.com +ntp server vrf MGMT time.windows.com +! +service routing protocols model multi-agent +! +management api http-commands + protocol https + no shutdown + ! + vrf MGMT + no shutdown +! +aaa authorization exec default local +! +interface Management0 + vrf MGMT + ip address 172.16.1.102/24 +! +ip route vrf MGMT 0.0.0.0/0 172.16.1.1 +! +ip name-server vrf MGMT 8.8.8.8 +! +end \ No newline at end of file diff --git a/demos/avd-single-dc-l3ls/clab/init-configs/dc1-leaf1c.cfg b/demos/avd-single-dc-l3ls/clab/init-configs/dc1-leaf1c.cfg new file mode 100644 index 0000000..a38defb --- /dev/null +++ b/demos/avd-single-dc-l3ls/clab/init-configs/dc1-leaf1c.cfg @@ -0,0 +1,36 @@ +hostname dc1-leaf1c +! +no aaa root +! +username ansible privilege 15 role network-admin secret ansible +! +vrf instance MGMT +! +ip name-server vrf MGMT 8.8.8.8 +dns domain avd.lab +! +ntp local-interface vrf MGMT Management0 +ntp server vrf MGMT time.apple.com +ntp server vrf MGMT time.google.com +ntp server vrf MGMT time.windows.com +! +service routing protocols model multi-agent +! +management api http-commands + protocol https + no shutdown + ! + vrf MGMT + no shutdown +! +aaa authorization exec default local +! +interface Management0 + vrf MGMT + ip address 172.16.1.151/24 +! +ip route vrf MGMT 0.0.0.0/0 172.16.1.1 +! +ip name-server vrf MGMT 8.8.8.8 +! +end \ No newline at end of file diff --git a/demos/avd-single-dc-l3ls/clab/init-configs/dc1-leaf2-server1.cfg b/demos/avd-single-dc-l3ls/clab/init-configs/dc1-leaf2-server1.cfg new file mode 100644 index 0000000..e1b2d5d --- /dev/null +++ b/demos/avd-single-dc-l3ls/clab/init-configs/dc1-leaf2-server1.cfg @@ -0,0 +1,36 @@ +hostname dc1-spine2 +! +no aaa root +! +username ansible privilege 15 role network-admin secret ansible +! +vrf instance MGMT +! +ip name-server vrf MGMT 8.8.8.8 +dns domain avd.lab +! +ntp local-interface vrf MGMT Management0 +ntp server vrf MGMT time.apple.com +ntp server vrf MGMT time.google.com +ntp server vrf MGMT time.windows.com +! +service routing protocols model multi-agent +! +management api http-commands + protocol https + no shutdown + ! + vrf MGMT + no shutdown +! +aaa authorization exec default local +! +interface Management0 + vrf MGMT + ip address 172.16.1.12/24 +! +ip route vrf MGMT 0.0.0.0/0 172.16.1.1 +! +ip name-server vrf MGMT 8.8.8.8 +! +end \ No newline at end of file diff --git a/demos/avd-single-dc-l3ls/clab/init-configs/dc1-leaf2a.cfg b/demos/avd-single-dc-l3ls/clab/init-configs/dc1-leaf2a.cfg new file mode 100644 index 0000000..90440da --- /dev/null +++ b/demos/avd-single-dc-l3ls/clab/init-configs/dc1-leaf2a.cfg @@ -0,0 +1,36 @@ +hostname dc1-leaf2a +! +no aaa root +! +username ansible privilege 15 role network-admin secret ansible +! +vrf instance MGMT +! +ip name-server vrf MGMT 8.8.8.8 +dns domain avd.lab +! +ntp local-interface vrf MGMT Management0 +ntp server vrf MGMT time.apple.com +ntp server vrf MGMT time.google.com +ntp server vrf MGMT time.windows.com +! +service routing protocols model multi-agent +! +management api http-commands + protocol https + no shutdown + ! + vrf MGMT + no shutdown +! +aaa authorization exec default local +! +interface Management0 + vrf MGMT + ip address 172.16.1.103/24 +! +ip route vrf MGMT 0.0.0.0/0 172.16.1.1 +! +ip name-server vrf MGMT 8.8.8.8 +! +end \ No newline at end of file diff --git a/demos/avd-single-dc-l3ls/clab/init-configs/dc1-leaf2b.cfg b/demos/avd-single-dc-l3ls/clab/init-configs/dc1-leaf2b.cfg new file mode 100644 index 0000000..3a5ed6c --- /dev/null +++ b/demos/avd-single-dc-l3ls/clab/init-configs/dc1-leaf2b.cfg @@ -0,0 +1,36 @@ +hostname dc1-leaf2b +! +no aaa root +! +username ansible privilege 15 role network-admin secret ansible +! +vrf instance MGMT +! +ip name-server vrf MGMT 8.8.8.8 +dns domain avd.lab +! +ntp local-interface vrf MGMT Management0 +ntp server vrf MGMT time.apple.com +ntp server vrf MGMT time.google.com +ntp server vrf MGMT time.windows.com +! +service routing protocols model multi-agent +! +management api http-commands + protocol https + no shutdown + ! + vrf MGMT + no shutdown +! +aaa authorization exec default local +! +interface Management0 + vrf MGMT + ip address 172.16.1.104/24 +! +ip route vrf MGMT 0.0.0.0/0 172.16.1.1 +! +ip name-server vrf MGMT 8.8.8.8 +! +end \ No newline at end of file diff --git a/demos/avd-single-dc-l3ls/clab/init-configs/dc1-leaf2c.cfg b/demos/avd-single-dc-l3ls/clab/init-configs/dc1-leaf2c.cfg new file mode 100644 index 0000000..4e78369 --- /dev/null +++ b/demos/avd-single-dc-l3ls/clab/init-configs/dc1-leaf2c.cfg @@ -0,0 +1,36 @@ +hostname dc1-leaf2c +! +no aaa root +! +username ansible privilege 15 role network-admin secret ansible +! +vrf instance MGMT +! +ip name-server vrf MGMT 8.8.8.8 +dns domain avd.lab +! +ntp local-interface vrf MGMT Management0 +ntp server vrf MGMT time.apple.com +ntp server vrf MGMT time.google.com +ntp server vrf MGMT time.windows.com +! +service routing protocols model multi-agent +! +management api http-commands + protocol https + no shutdown + ! + vrf MGMT + no shutdown +! +aaa authorization exec default local +! +interface Management0 + vrf MGMT + ip address 172.16.1.152/24 +! +ip route vrf MGMT 0.0.0.0/0 172.16.1.1 +! +ip name-server vrf MGMT 8.8.8.8 +! +end \ No newline at end of file diff --git a/demos/avd-single-dc-l3ls/clab/init-configs/dc1-spine1.cfg b/demos/avd-single-dc-l3ls/clab/init-configs/dc1-spine1.cfg new file mode 100644 index 0000000..e444576 --- /dev/null +++ b/demos/avd-single-dc-l3ls/clab/init-configs/dc1-spine1.cfg @@ -0,0 +1,36 @@ +hostname dc1-spine1 +! +no aaa root +! +username ansible privilege 15 role network-admin secret ansible +! +vrf instance MGMT +! +ip name-server vrf MGMT 8.8.8.8 +dns domain avd.lab +! +ntp local-interface vrf MGMT Management0 +ntp server vrf MGMT time.apple.com +ntp server vrf MGMT time.google.com +ntp server vrf MGMT time.windows.com +! +service routing protocols model multi-agent +! +management api http-commands + protocol https + no shutdown + ! + vrf MGMT + no shutdown +! +aaa authorization exec default local +! +interface Management0 + vrf MGMT + ip address 172.16.1.11/24 +! +ip route vrf MGMT 0.0.0.0/0 172.16.1.1 +! +ip name-server vrf MGMT 8.8.8.8 +! +end \ No newline at end of file diff --git a/demos/avd-single-dc-l3ls/clab/init-configs/dc1-spine2.cfg b/demos/avd-single-dc-l3ls/clab/init-configs/dc1-spine2.cfg new file mode 100644 index 0000000..e1b2d5d --- /dev/null +++ b/demos/avd-single-dc-l3ls/clab/init-configs/dc1-spine2.cfg @@ -0,0 +1,36 @@ +hostname dc1-spine2 +! +no aaa root +! +username ansible privilege 15 role network-admin secret ansible +! +vrf instance MGMT +! +ip name-server vrf MGMT 8.8.8.8 +dns domain avd.lab +! +ntp local-interface vrf MGMT Management0 +ntp server vrf MGMT time.apple.com +ntp server vrf MGMT time.google.com +ntp server vrf MGMT time.windows.com +! +service routing protocols model multi-agent +! +management api http-commands + protocol https + no shutdown + ! + vrf MGMT + no shutdown +! +aaa authorization exec default local +! +interface Management0 + vrf MGMT + ip address 172.16.1.12/24 +! +ip route vrf MGMT 0.0.0.0/0 172.16.1.1 +! +ip name-server vrf MGMT 8.8.8.8 +! +end \ No newline at end of file diff --git a/demos/avd-single-dc-l3ls/clab/sn/dc1-leaf1a.txt b/demos/avd-single-dc-l3ls/clab/sn/dc1-leaf1a.txt new file mode 100644 index 0000000..a88db10 --- /dev/null +++ b/demos/avd-single-dc-l3ls/clab/sn/dc1-leaf1a.txt @@ -0,0 +1,2 @@ +SERIALNUMBER=1C68470A1E0CD6EF7418D78A95829B83 +SYSTEMMACADDR=001c.7301.4645 \ No newline at end of file diff --git a/demos/avd-single-dc-l3ls/clab/sn/dc1-leaf1b.txt b/demos/avd-single-dc-l3ls/clab/sn/dc1-leaf1b.txt new file mode 100644 index 0000000..b3423ba --- /dev/null +++ b/demos/avd-single-dc-l3ls/clab/sn/dc1-leaf1b.txt @@ -0,0 +1,2 @@ +SERIALNUMBER=1C68470A1E0CD6EF7418D78A958296BD +SYSTEMMACADDR=001c.7301.934C \ No newline at end of file diff --git a/demos/avd-single-dc-l3ls/clab/sn/dc1-leaf1c.txt b/demos/avd-single-dc-l3ls/clab/sn/dc1-leaf1c.txt new file mode 100644 index 0000000..d4fe2d7 --- /dev/null +++ b/demos/avd-single-dc-l3ls/clab/sn/dc1-leaf1c.txt @@ -0,0 +1,2 @@ +SERIALNUMBER=1C68470A1E0CD6EF7418D78A9582C8D8 +SYSTEMMACADDR=001c.7301.90A5 \ No newline at end of file diff --git a/demos/avd-single-dc-l3ls/clab/sn/dc1-leaf2a.txt b/demos/avd-single-dc-l3ls/clab/sn/dc1-leaf2a.txt new file mode 100644 index 0000000..2d9b667 --- /dev/null +++ b/demos/avd-single-dc-l3ls/clab/sn/dc1-leaf2a.txt @@ -0,0 +1,2 @@ +SERIALNUMBER=1C68470A1E0CD6EF7418D78A9582C8C8 +SYSTEMMACADDR=001c.7301.33F1 \ No newline at end of file diff --git a/demos/avd-single-dc-l3ls/clab/sn/dc1-leaf2b.txt b/demos/avd-single-dc-l3ls/clab/sn/dc1-leaf2b.txt new file mode 100644 index 0000000..df69a8b --- /dev/null +++ b/demos/avd-single-dc-l3ls/clab/sn/dc1-leaf2b.txt @@ -0,0 +1,2 @@ +SERIALNUMBER=1C68470A1E0CD6EF7418D78A95829268 +SYSTEMMACADDR=001c.7301.0737 \ No newline at end of file diff --git a/demos/avd-single-dc-l3ls/clab/sn/dc1-leaf2c.txt b/demos/avd-single-dc-l3ls/clab/sn/dc1-leaf2c.txt new file mode 100644 index 0000000..835337c --- /dev/null +++ b/demos/avd-single-dc-l3ls/clab/sn/dc1-leaf2c.txt @@ -0,0 +1,2 @@ +SERIALNUMBER=1C68470A1E0CD6EF7418D78A9582A496 +SYSTEMMACADDR=001c.7301.5FC0 \ No newline at end of file diff --git a/demos/avd-single-dc-l3ls/clab/sn/dc1-spine1.txt b/demos/avd-single-dc-l3ls/clab/sn/dc1-spine1.txt new file mode 100644 index 0000000..fd87811 --- /dev/null +++ b/demos/avd-single-dc-l3ls/clab/sn/dc1-spine1.txt @@ -0,0 +1,2 @@ +SERIALNUMBER=1C68470A1E0CD6EF7418D78A95827B73 +SYSTEMMACADDR=001c.7301.0585 \ No newline at end of file diff --git a/demos/avd-single-dc-l3ls/clab/sn/dc1-spine2.txt b/demos/avd-single-dc-l3ls/clab/sn/dc1-spine2.txt new file mode 100644 index 0000000..70adda1 --- /dev/null +++ b/demos/avd-single-dc-l3ls/clab/sn/dc1-spine2.txt @@ -0,0 +1,2 @@ +SERIALNUMBER=1C68470A1E0CD6EF7418D78A95820733 +SYSTEMMACADDR=001c.7301.F058 \ No newline at end of file diff --git a/demos/avd-single-dc-l3ls/clab/topology.clab.yml b/demos/avd-single-dc-l3ls/clab/topology.clab.yml new file mode 100644 index 0000000..3b5a7ab --- /dev/null +++ b/demos/avd-single-dc-l3ls/clab/topology.clab.yml @@ -0,0 +1,86 @@ +--- +name: Single DC L3LS +prefix: "" + +mgmt: + network: custom_mgmt + ipv4-subnet: 172.16.1.0/24 + +topology: + kinds: + ceos: + enforce-startup-config: true + image: arista/ceos:4.32.0.1F + defaults: + kind: ceos + nodes: + dc1-spine1: + mgmt-ipv4: 172.16.1.11 + binds: + - sn/dc1-spine1.txt:/mnt/flash/ceos-config:ro + startup-config: init-configs/dc1-spine1.cfg + dc1-spine2: + mgmt-ipv4: 172.16.1.12 + binds: + - sn/dc1-spine2.txt:/mnt/flash/ceos-config:ro + startup-config: init-configs/dc1-spine2.cfg + dc1-leaf1a: + mgmt-ipv4: 172.16.1.101 + binds: + - sn/dc1-leaf1a.txt:/mnt/flash/ceos-config:ro + startup-config: init-configs/dc1-leaf1a.cfg + dc1-leaf1b: + mgmt-ipv4: 172.16.1.102 + binds: + - sn/dc1-leaf1b.txt:/mnt/flash/ceos-config:ro + startup-config: init-configs/dc1-leaf1b.cfg + dc1-leaf2a: + mgmt-ipv4: 172.16.1.103 + binds: + - sn/dc1-leaf2a.txt:/mnt/flash/ceos-config:ro + startup-config: init-configs/dc1-leaf2a.cfg + dc1-leaf2b: + mgmt-ipv4: 172.16.1.104 + binds: + - sn/dc1-leaf2b.txt:/mnt/flash/ceos-config:ro + startup-config: init-configs/dc1-leaf2b.cfg + dc1-leaf1c: + mgmt-ipv4: 172.16.1.151 + binds: + - sn/dc1-leaf1c.txt:/mnt/flash/ceos-config:ro + startup-config: init-configs/dc1-leaf1c.cfg + dc1-leaf2c: + mgmt-ipv4: 172.16.1.152 + binds: + - sn/dc1-leaf2c.txt:/mnt/flash/ceos-config:ro + startup-config: init-configs/dc1-leaf2c.cfg + dc1-leaf1-server1: + mgmt-ipv4: 172.16.1.201 + startup-config: init-configs/dc1-leaf1-server1.cfg + dc1-leaf2-server1: + mgmt-ipv4: 172.16.1.202 + startup-config: init-configs/dc1-leaf2-server1.cfg + + links: + - endpoints: ["dc1-leaf1a:eth1", "dc1-spine1:eth1"] + - endpoints: ["dc1-leaf1a:eth2", "dc1-spine2:eth1"] + - endpoints: ["dc1-leaf1b:eth1", "dc1-spine1:eth2"] + - endpoints: ["dc1-leaf1b:eth2", "dc1-spine2:eth2"] + - endpoints: ["dc1-leaf2a:eth1", "dc1-spine1:eth3"] + - endpoints: ["dc1-leaf2a:eth2", "dc1-spine2:eth3"] + - endpoints: ["dc1-leaf2b:eth1", "dc1-spine1:eth4"] + - endpoints: ["dc1-leaf2b:eth2", "dc1-spine2:eth4"] + - endpoints: ["dc1-leaf1a:eth3", "dc1-leaf1b:eth3"] + - endpoints: ["dc1-leaf1a:eth4", "dc1-leaf1b:eth4"] + - endpoints: ["dc1-leaf2a:eth3", "dc1-leaf2b:eth3"] + - endpoints: ["dc1-leaf2a:eth4", "dc1-leaf2b:eth4"] + - endpoints: ["dc1-leaf1c:eth1", "dc1-leaf1a:eth8"] + - endpoints: ["dc1-leaf1c:eth2", "dc1-leaf1b:eth8"] + - endpoints: ["dc1-leaf2c:eth1", "dc1-leaf2a:eth8"] + - endpoints: ["dc1-leaf2c:eth2", "dc1-leaf2b:eth8"] + - endpoints: ["dc1-leaf1-server1:eth1", "dc1-leaf1a:eth5"] + - endpoints: ["dc1-leaf1-server1:eth2", "dc1-leaf1b:eth5"] + - endpoints: ["dc1-leaf1-server1:eth3", "dc1-leaf1c:eth5"] + - endpoints: ["dc1-leaf2-server1:eth1", "dc1-leaf2a:eth5"] + - endpoints: ["dc1-leaf2-server1:eth2", "dc1-leaf2b:eth5"] + - endpoints: ["dc1-leaf2-server1:eth3", "dc1-leaf2c:eth5"] diff --git a/docs/assets/img/avd-single-dc-l3ls/.gitkeep b/docs/assets/img/avd-single-dc-l3ls/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/docs/avd-single-dc-l3ls.md b/docs/avd-single-dc-l3ls.md new file mode 100644 index 0000000..892b3cb --- /dev/null +++ b/docs/avd-single-dc-l3ls.md @@ -0,0 +1,51 @@ +# Single DC L3LS + +!!! Warning "Lab Documents Not Finished" + + DO NOT ENTER! :skull_and_crossbones:{ .heartbeat } + + ![stay back](assets/img/pexels-danne-555709.jpg) + + This document is created from a Cookiecutter template. + If you see this message - the lab is not finished and likely published for testing purposes. + Don't use it unless you are the author. + +## Demo Details + +!!! Warning "Container Requirements" + + CPUs: 8 + Memory: 32 GB + Storage: 64 GB + + :material-alert-circle-outline:{ .heartbeat } Please request high spec Codespace machines from [Github support](https://support.github.com/) first! + +[Start "Single DC L3LS" in Codespace](https://codespaces.new/'{{gh.repository}}'?quickstart=1&devcontainer_path=.devcontainer%2Favd-single-dc-l3ls%2Fdevcontainer.json){ .md-button .md-button--primary target=_blank} + +!!! Info "Last reviewed: 05/06/2024" + + Demos and labs reviewed over 6 month age may be outdated. + +## How To Run The Lab on Your Machine + +It is possible to run the lab on your local machine (or any server) instead of using Github Codespaces. +You can [download all required lab files here](https://{{gh.org_name}}.github.io/one-click-se-demos/lab_archives/avd-single-dc-l3ls.tar.gz). +However you must take care of you VSCode setup and setting up environment variables. Also keep in mind that auto-downloaded image will not work on ARM-based MacBooks. + +## How To Run The Demo + +???+ Tip "Wait until cEOS-lab image will be imported" + + You can confirm if image was imported correctly with `docker image ls`. + In some rare cases the cEOS-lab image may fail to be downloaded. + For example due to incorrecte token or other API failure on arista.com. + In that case you can upload the image manually by right-clicking the Explorer tab of the VSCode interface. + +```bash +# 1. start cLab +make start +``` + +???+ Tip "Wait until all devices will start streaming to CVaaS." + + This may take a while. diff --git a/mkdocs.yml b/mkdocs.yml index 07cb61d..66ffa4c 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -135,6 +135,8 @@ nav: - Workshops: # - AVD Extended Workshop: avd/workshops/avd-extended-workshop/avd-extended-workshop.md - AVD Extended Workshop, Part 1: avd-avd-extended-workshop--part-1.md + - Examples: + - Single DC L3LS: avd-single-dc-l3ls.md - cLab: - Workshops: - Build Containerlab with cEOS: clab-build-containerlab-with-ceos.md