From 5ff7a6db9213308ad2f19658bee0aa97cd21659f Mon Sep 17 00:00:00 2001 From: pa Date: Sun, 17 Mar 2024 00:04:59 +0000 Subject: [PATCH] update docs --- .../assets/images}/account_settings.png | Bin .../assets/images}/codespaces-secrets.png | Bin docs/avd-cvaas/aa.md | 41 ++++++++++- docs/avd-cvaas/mlag.md | 41 ++++++++++- docs/credits.md | 6 ++ docs/index.md | 65 ++++++++++++++---- mkdocs.yml | 22 +++++- 7 files changed, 159 insertions(+), 16 deletions(-) rename {img => docs/assets/images}/account_settings.png (100%) rename {img => docs/assets/images}/codespaces-secrets.png (100%) create mode 100644 docs/credits.md diff --git a/img/account_settings.png b/docs/assets/images/account_settings.png similarity index 100% rename from img/account_settings.png rename to docs/assets/images/account_settings.png diff --git a/img/codespaces-secrets.png b/docs/assets/images/codespaces-secrets.png similarity index 100% rename from img/codespaces-secrets.png rename to docs/assets/images/codespaces-secrets.png diff --git a/docs/avd-cvaas/aa.md b/docs/avd-cvaas/aa.md index e790025..012803d 100644 --- a/docs/avd-cvaas/aa.md +++ b/docs/avd-cvaas/aa.md @@ -1,4 +1,43 @@ -# AVD CVaaS Active-Active Demo +# AVD CVaaS EVPN Active-Active Demo + +!!! Success "Container Requirements" + + CPUs: 4 + Memory: 16 GB + Storage: 32 GB + + :material-checkbox-marked-outline: Works with default Codespaces sizing! + +[Start The EVPN AA Demo](https://codespaces.new/arista-netdevops-community/one-click-se-demos?quickstart=1&devcontainer_path=.devcontainer%2Favd_cvaas_evpn_aa%2Fdevcontainer.json){ .md-button .md-button--primary } [Slides](https://arista-netdevops-community.github.io/one-click-se-demos/slides/avd_cvaas.html) [PDF Slides](https://arista-netdevops-community.github.io/one-click-se-demos/pdfs/avd_cvaas.pdf) + +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` + +```bash +# 1. start cLab +make start +``` + +???+ Tip "Wait until all devices will start streaming to CVaaS." + + This may take a while. + +```bash +# 2. build configs with AVD +make build +# 3. create CVP change control (1) +make deploy_cvp +# 4. assign tags for CVP topology view (2) +make tags +# 5. validate the deployment with ANTA preview +make test +``` + +1. !!! Tip "Review and execute the change control on CVP when all tasks will be created." +2. !!! Bug "Currently there is a bug with disabling LLDP on Ma0, which prevents topology view from functioning correctly." diff --git a/docs/avd-cvaas/mlag.md b/docs/avd-cvaas/mlag.md index 3d3f3f3..5727889 100644 --- a/docs/avd-cvaas/mlag.md +++ b/docs/avd-cvaas/mlag.md @@ -1,4 +1,43 @@ -# AVD CVaaS MLAG Demo +# AVD CVaaS EVPN MLAG Demo + +!!! Success "Container Requirements" + + CPUs: 4 + Memory: 16 GB + Storage: 32 GB + + :material-checkbox-marked-outline: Works with default Codespaces sizing! + +[Start The EVPN MLAG Demo](https://codespaces.new/arista-netdevops-community/one-click-se-demos?quickstart=1&devcontainer_path=.devcontainer%2Favd_cvaas_evpn_mlag%2Fdevcontainer.json){ .md-button .md-button--primary } [Slides](https://arista-netdevops-community.github.io/one-click-se-demos/slides/avd_cvaas.html) [PDF Slides](https://arista-netdevops-community.github.io/one-click-se-demos/pdfs/avd_cvaas.pdf) + +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` + +```bash +# 1. start cLab +make start +``` + +???+ Tip "Wait until all devices will start streaming to CVaaS." + + This may take a while. + +```bash +# 2. build configs with AVD +make build +# 3. create CVP change control (1) +make deploy_cvp +# 4. assign tags for CVP topology view (2) +make tags +# 5. validate the deployment with ANTA preview +make test +``` + +1. !!! Tip "Review and execute the change control on CVP when all tasks will be created." +2. !!! Bug "Currently there is a bug with disabling LLDP on Ma0, which prevents topology view from functioning correctly." diff --git a/docs/credits.md b/docs/credits.md new file mode 100644 index 0000000..05f9453 --- /dev/null +++ b/docs/credits.md @@ -0,0 +1,6 @@ +# Credits + +- cEOS-lab image is the core of every demo +- Github infrastructure for public repos. Github Actions, Packages, Pages and Codespaces - they are all amazing. One-click demo would not be possible without them. +- Containerlab - it significantly reduces complexity of deploying labs in DevOps way. +- Arista EOS downloader (or sometimes it's shell alternative) - allows to uncage amazing cEOS-lab images hidden behind [arista.com](arista.com) login diff --git a/docs/index.md b/docs/index.md index 000ea34..c28aa41 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,17 +1,58 @@ -# Welcome to MkDocs +# How to Use One-Click Demos -For full documentation visit [mkdocs.org](https://www.mkdocs.org). +## Motivation -## Commands +Every good demo should only take one click to start! +This purpose of this repository is to provide a collection of demos and labs for Arista SEs and customers, that can be started in Github Codespaces by pressing a single button. -* `mkdocs new [dir-name]` - Create a new project. -* `mkdocs serve` - Start the live-reloading docs server. -* `mkdocs build` - Build the documentation site. -* `mkdocs -h` - Print help message and exit. +!!! Warning "WARNING!" -## Project layout + - This repository is still under construction! + - Please make sure you are using the correct Codespaces size when running the demo! - mkdocs.yml # The configuration file. - docs/ - index.md # The documentation homepage. - ... # Other markdown pages, images and other files. +## Codespaces Machine Types + +By default Github provides Codespaces with up to 4 CPUs and 16 GB RAM. That's enough to run some demos and labs in this repository, but not all of them. +As of time of writing [Github provides 120-core/hours of Codespaces for free each month](https://github.com/features/codespaces). That is approximately 30 hours a month with 4 CPUs. +If you need bigger machines, please contact [Github support](https://support.github.com/) to enable them. Keep in mind though, that Github may ask for a payment option to enable them and free time will run out faster with bigger instances. +Github spending limit is always zero by default. That means you remain in full control of your expenses, unless you change the spending limit. + +!!! Warning "WARNING!" + + Do NOT enable pre-builds! This may lead to excessive use of Codespaces storage across different regions and increased costs / reduced free time. We don't need Codespaces pre-builds for any demo and to speed up the container start we simply rely on Github packages that are free for public repositories. + +## Set Required Tokens Before You Start + +!!! Danger "Danger" + + ==**Do NOT set your tokens under the repository settings!**== :skull_and_crossbones: + The repository tokens will be visible to all contributors and someone may occasionally use your token to get restricted access. Only set tokens under you account, keep the token lifetime short enough and refresh them periodically. + +To set the token: + +??? "Step1: Go to the Account Settings (right top corner)" + + ![account settings](../assets/images/account_settings.png){: style="height:50vh" align=right} + +???+ "Step2: Go to `Codespaces > Codespaces secrets > New secret`" + + - add ARTOKEN to auto-download EOS images from [arista.com](arista.com). Under `Repository access` select `arista-netdevops-community/one-click-se-demos` + - add CV_API_TOKEN if CVaaS is part of the demo. Keep in mind, this token has to be created under service account. Device onboarding token is not required as it will be generated automatically. Under `Repository access` select `arista-netdevops-community/one-click-se-demos` + + ![codespaces secrets](../assets/images/codespaces-secrets.png){align=right} + + !!! Warning "WARNING!" + + Do NOT forget to set `Repository access` for your secrets, otherwise they will be inactive. Some containers may provide a hint before you start them if required secrets are not configured correctly. + +## Start and Stop The Demo / Lab + +Please access the corresponding documentation section to start the demo and access the related guides. + +!!! Info + + Codespaces have 30 minutes inactivity timeout. + +!!! Tip + + Please do NOT forget to delete the Codespaces you started when you don't need them any more. You can find the full list of Codespaces here: [github.com/codespaces](https://github.com/codespaces) diff --git a/mkdocs.yml b/mkdocs.yml index 85dd0f1..c3636f7 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: MKDOCs test +site_name: One-Click SE Demos theme: name: material @@ -53,8 +53,26 @@ theme: icon: logo: logo +markdown_extensions: + - attr_list + - admonition + - pymdownx.details + - pymdownx.superfences + - pymdownx.critic + - pymdownx.caret + - pymdownx.keys + - pymdownx.mark + - pymdownx.tilde + - pymdownx.emoji: + emoji_index: !!python/name:material.extensions.emoji.twemoji + emoji_generator: !!python/name:material.extensions.emoji.to_svg + - pymdownx.tabbed: + alternate_style: true + nav: - - Home: index.md + - Home: + - How To Start: index.md + - Credits: credits.md - AVD CVaaS: - MLAG: avd-cvaas/mlag.md - Active-Active: avd-cvaas/aa.md