Skip to content
This repository has been archived by the owner on Nov 7, 2024. It is now read-only.

Commit

Permalink
Merge pull request #110 from JulioPDX/ansible-fix
Browse files Browse the repository at this point in the history
Hard coding the ansible-core version
  • Loading branch information
mitchv85 authored Oct 18, 2023
2 parents 8f3acb8 + 42cc521 commit 414cf82
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 39 deletions.
7 changes: 4 additions & 3 deletions workshops/avd-lab-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,15 @@ git config --global user.name "FirstName LastName"
git config --global user.email "name@example.com"
```

### STEP #3 - Update AVD to the latest version
### STEP #3 - Update AVD

AVD has been pre-installed in your lab environment. However, it may be on an older version. The following steps will update AVD and modules to the latest versions.
AVD has been pre-installed in your lab environment. However, it may be on an older version (in some cases a newer version). The following steps will update AVD and modules to the valid versions for the lab.

``` bash
pip3 config set global.disable-pip-version-check true
pip3 install "ansible-core<2.15.0"
ansible-galaxy collection install -r requirements.yml
export ARISTA_AVD_DIR=$(ansible-galaxy collection list arista.avd --format yaml | head -1 | cut -d: -f1)
pip3 config set global.disable-pip-version-check true
pip3 install -r ${ARISTA_AVD_DIR}/arista/avd/requirements.txt
```

Expand Down
7 changes: 4 additions & 3 deletions workshops/avd.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,16 @@ Attendees will need the following:
The ATD lab environment was provisioned with Ansible and Git. First, however, we must update AVD and the required modules to the latest version. The following commands will install AVD and the needed modules.

``` bash
ansible-galaxy collection install arista.avd arista.cvp --force
export ARISTA_AVD_DIR=$(ansible-galaxy collection list arista.avd --format yaml | head -1 | cut -d: -f1)
pip3 config set global.disable-pip-version-check true
pip3 install "ansible-core<2.15.0"
ansible-galaxy collection install -r requirements.yml
export ARISTA_AVD_DIR=$(ansible-galaxy collection list arista.avd --format yaml | head -1 | cut -d: -f1)
pip3 install -r ${ARISTA_AVD_DIR}/arista/avd/requirements.txt
```

???+ Note

IMPORTANT: The above steps must be run each time you start your lab.
IMPORTANT: The installation steps assume the [repository](https://github.com/aristanetworks/ci-workshops-avd) has already been forked and cloned to the IDE. The above steps must be run each time you start your lab.

### Other Environments

Expand Down
67 changes: 34 additions & 33 deletions workshops/cicd-basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,39 +31,6 @@ export ARISTA_AVD_DIR=$(ansible-galaxy collection list arista.avd --format yaml
pip3 install -r ${ARISTA_AVD_DIR}/arista/avd/requirements.txt
```

### ATD programmability IDE installation

You can ensure the appropriate AVD version is installed by running the following command.

```shell
ansible-galaxy collection list
```

```shell hl_lines="9"
➜ ci-workshops-avd git:(main) ansible-galaxy collection list

# /home/coder/.ansible/collections/ansible_collections
Collection Version
----------------- -------
ansible.netcommon 4.1.0
ansible.posix 1.4.0
ansible.utils 2.8.0
arista.avd 4.1.0
arista.cvp 3.6.1
arista.eos 6.0.0
community.general 6.2.0
➜ ci-workshops-avd git:(main)
```

If AVD version `4.0.0` or greater is not present, please upgrade to the latest stable version.

```shell
ansible-galaxy collection install -r requirements.yml
export ARISTA_AVD_DIR=$(ansible-galaxy collection list arista.avd --format yaml | head -1 | cut -d: -f1)
pip3 config set global.disable-pip-version-check true
pip3 install -r ${ARISTA_AVD_DIR}/arista/avd/requirements.txt
```

## Fork and clone the repository

You will be creating your own CI/CD pipeline in this workflow. Log in to your GitHub account and fork the [`ci-workshops-avd`](https://github.com/aristanetworks/ci-workshops-avd/) repository to get started.
Expand Down Expand Up @@ -99,6 +66,40 @@ You will be creating your own CI/CD pipeline in this workflow. Log in to your Gi
git config --global user.email "name@example.com"
```

### ATD programmability IDE installation

You can check the current AVD version by running the following command:

```shell
ansible-galaxy collection list
```

```shell hl_lines="9"
➜ ci-workshops-avd git:(main) ansible-galaxy collection list

# /home/coder/.ansible/collections/ansible_collections
Collection Version
----------------- -------
ansible.netcommon 4.1.0
ansible.posix 1.4.0
ansible.utils 2.8.0
arista.avd 4.1.0
arista.cvp 3.6.1
arista.eos 6.0.0
community.general 6.2.0
➜ ci-workshops-avd git:(main)
```

Run the following commands to install the required packages within the ATD environment.

```shell
pip3 config set global.disable-pip-version-check true
pip3 install "ansible-core<2.15.0"
ansible-galaxy collection install -r requirements.yml
export ARISTA_AVD_DIR=$(ansible-galaxy collection list arista.avd --format yaml | head -1 | cut -d: -f1)
pip3 install -r ${ARISTA_AVD_DIR}/arista/avd/requirements.txt
```

### Fast-forward the main brach

On the programmability IDE, merge the `cicd-ff` branch into the `main` branch.
Expand Down

0 comments on commit 414cf82

Please sign in to comment.