Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
*.retry
ansible-*
.vscode
.vscode
.DS_Store

# AVD related files
inventory/reports
logs.txt

# ACT/User guide related files
AVD-test.yml
69 changes: 32 additions & 37 deletions INSTALLATION.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Installation Process

This document explain how to customize demo information and how to setup this environment.
This document explains how to customize demo information and how to setup this environment.

<!-- code_chunk_output -->

Expand Down Expand Up @@ -33,16 +33,16 @@ This document explain how to customize demo information and how to setup this en

- ___CloudVision IP address___:
- Cluster interface: eth0 / Should use your own IP address
- Device interface: eth1 / `10.255.0.1/24`
- ___Management Network___: `10.255.0.0/24`
- _DC1-SPINE1_: `10.255.0.11/24`
- _DC1-SPINE2_: `10.255.0.12/24`
- _DC1-LEAF1A_: `10.255.0.13/24`
- _DC1-LEAF1B_: `10.255.0.14/24`
- _DC1-LEAF2A_: `10.255.0.15/24`
- _DC1-LEAF2B_: `10.255.0.16/24`
- _DC1-L2LEAF1A_: `10.255.0.17/24`
- _DC1-L2LEAF2B_: `10.255.0.18/24`
- Device interface: eth1 / `192.168.0.5/24`
- ___Management Network___: `192.168.0.0/24`
- _DC1-SPINE1_: `192.168.0.11/24`
- _DC1-SPINE2_: `192.168.0.12/24`
- _DC1-LEAF1A_: `192.168.0.13/24`
- _DC1-LEAF1B_: `192.168.0.14/24`
- _DC1-LEAF2A_: `192.168.0.15/24`
- _DC1-LEAF2B_: `192.168.0.16/24`
- _DC1-L2LEAF1A_: `192.168.0.17/24`
- _DC1-L2LEAF2B_: `192.168.0.18/24`
- ___Default Username & Password___:
- admin / arista123
- cvpdamin / arista123
Expand All @@ -67,25 +67,20 @@ $ cd ansible-avd-cloudvision-demo
# Run demo shell using docker
# Makefile approach
$ make shell
# Manual installation
$ docker pull avdteam/base:3.6
$ docker run --rm -it \
-v ./:/projects \
-v /etc/hosts:/etc/hosts avdteam/base:3.6

# Install required ansible collections
# Makefile approach
$ make install
# Manual installation
$ ansible-galaxy collection install arista.avd:==2.0.0
$ ansible-galaxy collection install arista.cvp:==2.1.2
$ ansible-galaxy collection install arista.avd:==3.8.4
$ ansible-galaxy collection install arista.cvp:==3.6.0
```

## Configure DHCP server on CloudVision

In this scenario, we use CloudVision (CV) as ZTP server to provision devices and register them onto CV.

Once you get mac-address of your switches, edit file `/etc/dhcp/dhcpd.conf` in CloudVision. In this scenario, CV use following address to connect to devices: `10.255.0.1`
Once you get mac-address of your switches, edit file `/etc/dhcp/dhcpd.conf` in CloudVision. In this scenario, CV use following address to connect to devices: `192.168.0.5`

If CVP has not been configured to activate ZTP services, it is higly recommended to follow [these steps](https://www.arista.com/en/cg-cv/cv-dhcp-service-for-zero-touch-provisioning-ztp-setup)

Expand All @@ -99,24 +94,24 @@ An ansible playbook is available to configure CloudVision to act as a DHCP serve
vars:
ztp:
default:
registration: 'http://10.255.0.1/ztp/bootstrap'
gateway: 10.255.0.3
registration: 'http://192.168.0.1/ztp/bootstrap'
gateway: 192.168.0.3
nameservers:
- '10.255.0.3'
- '192.168.0.3'
general:
subnets:
- network: 10.255.0.0
- network: 192.168.0.0
netmask: 255.255.255.0
gateway: 10.255.0.3
gateway: 192.168.0.3
nameservers:
- '10.255.0.3'
start: 10.255.0.200
end: 10.255.0.250
- '192.168.0.3'
start: 192.168.0.200
end: 192.168.0.250
lease_time: 300
clients:
- name: DC1-SPINE1
mac: "0c:1d:c0:1d:62:01"
ip4: 10.255.0.11
ip4: 192.168.0.11
```

> Please ensure to use quote to define your mac-address. Otherwise in some cases, ansible might consider them as HEX string.
Expand Down Expand Up @@ -170,18 +165,18 @@ On your DHCP server, create configuration for all your devices. Below is an exam
```shell
$ vi /etc/dhcp/dhcpd.conf

subnet 10.255.0.0 netmask 255.255.255.0 {
range 10.255.0.200 10.255.0.250;
option routers 10.255.0.1;
subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.200 192.168.0.250;
option routers 192.168.0.1;
option domain-name-servers 10.83.28.52, 10.83.29.222;
option bootfile-name "http://10.255.0.1/ztp/bootstrap";
option bootfile-name "http://192.168.0.1/ztp/bootstrap";
}

host DC1-SPINE1 {
option host-name "DC1-SPINE1";
hardware ethernet 0c:1d:c0:1d:62:01;
fixed-address 10.255.0.11;
option bootfile-name "http://10.255.0.1/ztp/bootstrap";
fixed-address 192.168.0.11;
option bootfile-name "http://192.168.0.1/ztp/bootstrap";
}

[...]
Expand Down Expand Up @@ -243,11 +238,11 @@ In this example, we only use `spine` and `l3leafs` devices. Below is an example
nodes:
DC1-LEAF1A:
id: 1
mgmt_ip: 10.255.0.13/24
mgmt_ip: 192.168.0.13/24
spine_interfaces: [ Ethernet1, Ethernet1 ]
DC1-LEAF1B:
id: 2
mgmt_ip: 10.255.0.14/24
mgmt_ip: 192.168.0.14/24
spine_interfaces: [ Ethernet2, Ethernet2 ]
```

Expand Down Expand Up @@ -288,6 +283,6 @@ You must use same user on CVP and EOS for the demo.

```yaml
# Cloud Vision server information
cvp_instance_ip: 10.255.0.1
cvp_instance_ip: 192.168.0.1
cvp_ingestauth_key: ''
```
35 changes: 29 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
CONTAINER ?= avdteam/base:3.8-edge
CONTAINER ?= ghcr.io/arista-netdevops-community/avd-all-in-one-container/avd-all-in-one
VSCODE_CONTAINER ?= avdteam/vscode:latest
VSCODE_PORT ?= 8080
HOME_DIR = $(shell pwd)
AVD_COLLECTION_VERSION ?= 3.1.0
CVP_COLLECTION_VERSION ?= 3.2.0
AVD_UID ?= $(shell id -u)
GIT_USERNAME ?= $(shell git config --get user.name)
GIT_EMAIL ?= $(shell git config --get user.email)
AVD_COLLECTION_VERSION ?= 3.8.4
CVP_COLLECTION_VERSION ?= 3.6.0
COLLECTION_PATH = $(shell ansible-galaxy collection list arista.avd --format yaml | sed -n -e 's/://g' -e '1 p')

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}'
Expand All @@ -14,16 +18,32 @@ help: ## Display help message

.PHONY: build
build: ## Run ansible playbook to build EVPN Fabric configuration.
ansible-playbook playbooks/dc1-fabric-deploy-cvp.yml --tags build
ansible-playbook playbooks/dc1-fabric-deploy-cvp.yml --tags build ${OPTIONS}

.PHONY: build-act
build-act: ## Run ansible playbook to build EVPN Fabric configuration when following ACT User guide
ansible-playbook playbooks/dc1-fabric-deploy-cvp.yml --tags build -i inventory/inventory.yml -i inventory/AVD-test.yml

.PHONY: provision
provision: ## Run ansible playbook to deploy EVPN Fabric.
ansible-playbook playbooks/dc1-fabric-deploy-cvp.yml --tags provision
ansible-playbook playbooks/dc1-fabric-deploy-cvp.yml --tags provision ${OPTIONS}

.PHONY: provision-act
provision-act: ## Run ansible playbook to deploy EVPN Fabric when following ACT User guide.
ansible-playbook playbooks/dc1-fabric-deploy-cvp.yml --tags provision -i inventory/inventory.yml -i inventory/AVD-test.yml

.PHONY: deploy
deploy: ## Run ansible playbook to deploy EVPN Fabric.
ansible-playbook playbooks/dc1-fabric-deploy-cvp.yml --extra-vars "execute_tasks=true" --tags "build,provision,apply"

.PHONY: validate
validate: ## Run ansible playbook to validate EVPN Fabric.
ansible-playbook playbooks/dc1-fabric-validate.yml $(OPTIONS)

.PHONY: validate-act
validate-act: ## Run ansible playbook to validate EVPN Fabric when following ACT User guide.
ansible-playbook playbooks/dc1-fabric-validate.yml -i inventory/inventory.yml -i inventory/AVD-test.yml

.PHONY: reset
reset: ## Run ansible playbook to reset all devices.
ansible-playbook playbooks/dc1-fabric-reset-cvp.yml
Expand All @@ -46,6 +66,7 @@ install-git: ## Install Ansible collections from git
install: ## Install Ansible collections
ansible-galaxy collection install arista.avd:==${AVD_COLLECTION_VERSION}
ansible-galaxy collection install arista.cvp:==${CVP_COLLECTION_VERSION}
pip3 install -r ${COLLECTION_PATH}/arista/avd/requirements.txt

.PHONY: uninstall
uninstall: ## Remove collection from ansible
Expand All @@ -60,7 +81,9 @@ webdoc: ## Build documentation to publish static content
shell: ## Start docker to get a preconfigured shell
docker pull $(CONTAINER) && \
docker run --rm -it \
-v $(HOME_DIR)/:/projects \
-e AVD_GIT_USER="$(GIT_USERNAME)" \
-e AVD_GIT_EMAIL="$(GIT_EMAIL)" \
-v $(HOME_DIR)/:/home/avd/projects/ \
-v /etc/hosts:/etc/hosts $(CONTAINER)

.PHONY: vscode
Expand Down
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ It helps to demonstrate how to bring up an Arista EVPN/VXLAN Fabric from the fir

For detailed setup and demo, please refer to [resources](#resources) below.

> It is recommended to use [docker image](https://hub.docker.com/repository/docker/avdteam/base) with all [arista.cvp](https://github.com/aristanetworks/ansible-cvp) and [arista.avd](https://github.com/aristanetworks/ansible-avd) [requirements](https://avd.sh/en/latest/docs/installation/requirements/). It is done with `make shell` command.
> It is recommended to use [docker image](https://github.com/arista-netdevops-community/avd-all-in-one-container/pkgs/container/avd-all-in-one-container%2Favd-all-in-one) which includes [arista.cvp](https://github.com/aristanetworks/ansible-cvp) and [arista.avd](https://github.com/aristanetworks/ansible-avd) and all the [requirements](https://avd.sh/en/latest/docs/installation/requirements/). It is done with `make shell` command.

```shell
# Clone repository
Expand All @@ -28,13 +28,13 @@ $ cd ansible-avd-cloudvision-demo
$ make shell

# Install required ansible collections
$ ansible-galaxy collection install arista.avd:==2.0.0
$ ansible-galaxy collection install arista.cvp:==2.1.2
# This is no longer required if using the default avd-all-in-one image
# make install

# Edit Inventory information & Authentication information
# Edit Inventory information & Authentication information if required
$ vim inventory/inventory.yml

# Edit ZTP information
# Edit ZTP information if required
$ vim inventory/group_vars/CVP.yml

# Provision Zero Touch Provisioning server
Expand All @@ -45,6 +45,8 @@ $ ansible-playbook playbooks/dc1-ztp-configuration.yml

# Run Ansible playbook
$ ansible-playbook playbooks/dc1-fabric-deploy-cvp.yml
# or use
$ make build
```

> Getting started does not include management IP configuration. For complete installation, please refer to [installation guide](INSTALLATION.md) to configure correct environment.
Expand Down
3 changes: 2 additions & 1 deletion ansible.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ collections_paths = ~/.ansible/collections:./ansible-cvp:./ansible-avd:../ansibl
action_plugins = /usr/lib/python2.7/site-packages/napalm_ansible/plugins/action
jinja2_extensions = jinja2.ext.loopcontrols,jinja2.ext.do,jinja2.ext.i18n
# enable the YAML callback plugin.
stdout_callback = yaml
# stdout_callback = yaml
# enable the stdout_callback when running ad-hoc commands.
bin_ansible_callbacks = True
command_warnings=False
log_path = ./logs.txt

[persistent_connection]
connect_timeout = 120
Expand Down
Loading