Giter Club home page Giter Club logo

avd-workshops's Introduction

Arista CI Workshops

Tools Bar

The Arista CI Workshops are intended for engineers looking to learn the fundamentals of automation tools and get hands-on experience deploying network-wide configurations with Arista Validated Designs (AVD). The workshops are split into two in-person sessions allowing time to grasp the basic automation concepts before moving into building Data Models to deploy AVD. The content on this site is an overview of the concepts we will cover in person with full details and examples.

  • Workshop #1 - Automation Fundamentals 101
  • Workshop #2 - Arista CI - AVD
  • Workshop #3 - Arista CI - AVD with CI/CD

Fundamentals

Arista CI

Contributing

If you would like to edit any content or contribute a new workshops, please follow the following guidelines.

  • Fork this repository
  • Create a working branch
  • Run pre-commit on all updates
  • Create pull request

Prepare contributor environment

This repository comes with a devcontainer that you may leverage. If you'd like to work locally, preparing your contributor environment is relatively straight forward.

git clone https://github.com/aristanetworks/avd-workshops.git
cd avd-workshops
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

Run pre-commit

Pre-commit should be installed in your environment.

pre-commit install
pre-commit run --all-files

Preview site updates

Note: This site uses mkdocs material insiders, some changes may not reflect locally.

mkdocs serve

avd-workshops's People

Contributors

alextremblay avatar calvinkane avatar carlbuchmann avatar daniel1820815 avatar juliopdx avatar mitchv85 avatar mjbear avatar mthiel117 avatar philippebureau avatar restlesswanderer avatar skanagal avatar sugetha24 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

avd-workshops's Issues

Split Git Origin Code Block

In the check origin status, the single code block contains the command to run as well as the expected output. This added some confusion for some workshop attendees as they though the entire block was the command. Recommend putting the command in its own code block and adding a new section showing, this is the output, with the output in its own code block.

Verify the location of the remote copy. This should be your local GitHub account.

git remote -v

origin  https://github.com/xxxxxxx/ci-workshops-fundamentals.git (fetch)
origin  https://github.com/xxxxxxx/ci-workshops-fundamentals.git (push)

Docs(CI/CD): Breakup pre-commit codeblocks to separate command from output

Example:

➜  ci-workshops-avd git:(main) ✗ pre-commit run -a
trim trailing whitespace.................................................Passed
fix end of files.........................................................Failed
- hook id: end-of-file-fixer
- exit code: 1
- files were modified by this hook

Break this into 2 code blocks like:

pre-commit run -a

Output:

trim trailing whitespace.................................................Passed
fix end of files.........................................................Failed
- hook id: end-of-file-fixer
- exit code: 1
- files were modified by this hook

Docs: avd-lab-guide.md - grammar and line number references

Hello Arista Engineering people,

Along with #148 and #149...

There are two grammatical and content related items in avd-lab-guide.md I'd like to bring up for discussion.
Based on the outcome of our discussion I will submit a PR to cover the approved items. Thank you.

  1. Change "Login to" to "Log into"

  2. The line numbers no longer exactly correlate. Should the line number reference be updated or changed to a relative statement?

  3. Similar to item 2, the line number is no longer accurate.

Suggesting to add a small section explaining the prod.yml

Hi there! I was going through the CICD Basics workshop and I would like to suggest adding a small section explaining the prod.yml for GitHub Actions similar to the part about the dev.yml.

It could be before or after the following part in my opinion:

At this point, this will kick off our second workflow (prod.yml) against the main branch. This workflow will build and deploy our updates with CVP.

Then it would be clearer (at least for me) how GitHub Actions triggers CVP and creates tasks there. After checking the prod.yml file it was clear but I thought it's missing in the workshop. Other than that great job!

jinja-nested for loop typo

Code block starting line 948: Variable mismatch. Change vrf_params to vrf_values.

Line 986: Change _params to _values

Code block starting line 988: Variable mismatch. Change vrf_params to vrf_values.

jinja-yaml.md - clarify explanation of YAML lists

The following sentence is a bit clunky.

Lists, which are sometimes also called sequences, are similar to arrays in development.
https://github.com/aristanetworks/avd-workshops/blob/main/workshops/jinja-yaml.md?plain=1#L172

In regard to the "in development" wording, was the message meant to be that lists in YAML are similar to arrays in other programming languages?

(I'm fine submitting a PR once this is sorted out.)
Maybe it could be written as:

Lists, sometimes called sequences, are similar to arrays in other programming languages.
or
Lists, sometimes called sequences, are similar to arrays in other programming languages and technologies.

Docs(CICD): Add a note to assist user to fix below error when merging origin/cicd-ff branch

When user tries to merge the branch below, they receive this error because they forgot to uncheck copy the main branch only when forking the repo.

git merge origin/cicd-ff

Error Message:

merge: origin/cicd-ff - not something we can merge

Steps to fix the issue without re-forking the repo. This is useful if running a virtual workshop and users are having issues.

git remote add upstream https://github.com/aristanetworks/ci-workshops-avd.git
git fetch upstream
git merge upstream/cicd-ff

Updates to Workshop

Seen under the Ansible components section

image

  • update output for correct ansible-core version
  • Add note on main page to leverage with ATD or personal but needs additional requirements
  • update official doc references to 4.5 (current build of workshops)
  • Remove old lab credentials and replicate what students see
  • Add ATD specific note
  • Update ansible galaxy collection list output

Docs: avd-lab-guide.md - set LABPASSPHRASE in zsh config

Hello Arista Engineering people,

On the heels of issue #148, I have a suggestion that the method for setting LABPASSPHRASE. For the students' benefit, it should still be explained early in the avd-lab-guide.md, but be made an (automatic) entry in the zsh config as a usability/life improvement when opening new shells. 😁

I'm game to include this in a PR (most likely along with #148 should that be blessed).

Thoughts?

Thank you!

Docs: Fix markdown in jinja-yaml.md

Fix markdown errors:

  • MD033/no-inline-html: Inline HTML [Element: table]
  • MD025/single-title/single-h1: Multiple top-level headings in the same document
  • MD046/code-block-style: Code block style [Expected: fenced; Actual: indented]

Docs: Update dev.yml file example for GitHub Actions versions

Hello Arista Engineering people,

💡 In the markdown there is an example for dev.yml that needs updated. The rest of this will be placed in an issue over in the main AVD repository.

I still had some time on the temporary ATD lab environment and couldn't resist working through the CI/CD section!
In going through that section I discovered that GitHub has made some changes to supported versions of Node.js so some versions of GitHub Actions need adjusted.

Please test that you too have issues with the GitHub Actions at the pinned versions the lab uses.
➡️ I'd be glad to submit a PR after receiving your blessing. Thank you!

Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, actions/setup-python@v3, actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.

In dev.yml I made the following changes:

uses: actions/checkout@v3 >> v4

uses: actions/setup-python@v3 >> v5

uses: dorny/paths-filter@v2 >> v3
(in two locations)

In prod.yml I made the same changes as dev:

uses: actions/checkout@v3 >> v4

uses: actions/setup-python@v3 >> v5

uses: dorny/paths-filter@v2 >> v3
(in two locations)

Additionally I've opened up an issue and eventually a PR against the aristanetworks/ci-workshops-avd repository.

Docs: avd-lab-guide.md - simplify the expression used to set LABPASSPHRASE

Hello Arista Engineering people,

Mr. T asked me to put in issues before I open up PRs. I fully intend to open up PRs once suggestions are agreed upon. 😎

In both avd-lab-guide.md and cicd-basics.md there is an expression (piped shell commands) used to retrieve the LABPASSPHRASE from config.yaml. I have a suggestion that simplifies it greatly to exclusively an awk command.

Are you good with me submitting this as a PR?

Thank you!

Tech Leads unable to Merge PRs

Background:

At the end of the Git Section, there are instructions create a PR and Merge it to the main repo. Tech Leads are unable to actually do the merge operation creating some confusion at how to sync fork with the upstream repo.

Decision:

Add a note to inform the Tech Leads that the PR should actually be merged into main repo, else they will need to set the repo back for the next class. Explain to the students what would happen vs actually doing it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.