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 #103 from JulioPDX/ci-ff
Browse files Browse the repository at this point in the history
Updating content for fast-forward approach
  • Loading branch information
mthiel117 authored Oct 16, 2023
2 parents fbfb70f + 8dfcc38 commit f4e7da7
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 16 deletions.
Binary file modified workshops/assets/images/save-fork.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
76 changes: 60 additions & 16 deletions workshops/cicd-basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,73 @@ pip3 config set global.disable-pip-version-check true
pip3 install -r ${ARISTA_AVD_DIR}/arista/avd/requirements.txt
```

## Fork repository
## 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.

!!! note
You can skip this step if the repository was forked during the AVD workshop.
!!! warning
You can skip these steps if you are continuing from the AVD workshop.

![Create fork](assets/images/create-fork.png)

![Save fork](assets/images/save-fork.png)

1. On the IDE terminal, run the following commands:

```shell
cd /home/coder/project/labfiles
```

```shell
git clone <your copied URL>
```

```shell
cd ci-workshops-avd
```

2. Configure your global Git settings.

```shell
git config --global user.name "FirstName LastName"
```

```shell
git config --global user.email "name@example.com"
```

### Fast-forward the main brach

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

!!! warning
You can skip this step if you are continuing from the AVD workshop.

```shell
git merge origin/cicd-ff
```

### Setup lab password environment variable

Each lab comes with a unique password. We set an environment variable called `LABPASSPHRASE` with the following command. The variable is later used to generate local user passwords and connect to our switches to push configs.

!!! warning
You can skip this step if you are continuing from the AVD workshop.

```shell
export LABPASSPHRASE=`cat /home/coder/.config/code-server/config.yaml| grep "password:" | awk '{print $2}'`
```

### Configure the IP Network

The nodes that connect the two sites are out of scope for this workshop. We can get the hosts and EOS nodes in the IP network configured by running the `make preplab` command.

```shell
make preplab
```

The host and IP Network nodes will now be configured.

### Enable GitHub actions

1. Go to Actions
Expand Down Expand Up @@ -139,22 +195,10 @@ Every user will get a unique CVP instance deployed. There are two updates requir
!!! note
These will be the same value. Make sure to remove any prefix like `https://` or anything after `.com`

## Configure global Git settings and sync
## Sync with remote repository

1. From the IDE terminal, run the following:

```shell
cd /home/coder/project/labfiles/ci-workshops-avd
```

```shell
git config --global user.name "FirstName LastName"
```

```shell
git config --global user.email "name@example.com"
```

```shell
git add .
git commit -m "Syncing with remote"
Expand Down

0 comments on commit f4e7da7

Please sign in to comment.