-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
55 lines (43 loc) · 1.84 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
CONTAINER ?= avdteam/base:3.6
HOME_DIR = $(shell pwd)
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}'
################################################################################
# AVD Commands
################################################################################
.PHONY: build
build: ## Run ansible playbook to build EVPN Fabric configuration.
ansible-playbook playbooks/dc1-fabric-deploy-cvp.yml --tags build
.PHONY: provision
provision: ## Run ansible playbook to deploy EVPN Fabric.
ansible-playbook playbooks/dc1-fabric-deploy-cvp.yml --tags provision
.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: reset
reset: ## Run ansible playbook to reset all devices.
ansible-playbook playbooks/dc1-fabric-reset-cvp.yml
.PHONY: ztp
ztp: ## Configure ZTP server
ansible-playbook playbooks/dc1-ztp-configuration.yml
.PHONY: configlet-upload
configlet-upload: ## Upload configlets available in configlets/ to CVP.
ansible-playbook playbooks/dc1-upload-configlets.yml
.PHONY: install
install: ## Install Ansible collections
git clone https://github.com/aristanetworks/ansible-avd.git
git clone https://github.com/aristanetworks/ansible-cvp.git
pip3 install -r requirements.txt
.PHONY: uninstall
uninstall: ## Remove collection from ansible
rm -rf ansible-avd
rm -rf ansible-cvp
.PHONY: webdoc
webdoc: ## Build documentation to publish static content
mkdocs build -f mkdocs.yml
.PHONY: shell
shell: ## Start docker to get a preconfigured shell
docker pull $(CONTAINER) && \
docker run --rm -it \
-v $(HOME_DIR)/:/projects \
-v /etc/hosts:/etc/hosts $(CONTAINER)