Skip to content

Commit

Permalink
Merge branch 'main' into gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
camrossi committed Oct 9, 2023
2 parents 903e713 + 3be60a6 commit 5cd9831
Show file tree
Hide file tree
Showing 14 changed files with 1,153 additions and 151 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
app/__pycache__/*
__pycache__/*
.vscode/*\
.vscode/*
my_values.yaml
values_examples_local
17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ Vkaci topology update process

#### Libraries Used

VKACI is a web application using Python 3.9 and Flask as its server technology. To enable graph-based representation, Neo4j is used to save the transformed network topology.
VKACI is a web application using Python 3.10 and Flask as its server technology. To enable graph-based representation, Neo4j is used to save the transformed network topology.

#### Python Libraries

Expand Down Expand Up @@ -156,6 +156,9 @@ Note: VMM Integration is not required nor supported, physical domain for Floatin

2. Kube-router - Kube-router is a project that provides a unified solution for CNI networking for pods, an IPVS-based network service proxy, and network policy enforcement using iptables. Kube-router includes a service proxy hence kube-proxy will not be installed in the cluster [5].

3. Cilium - Cilium is an open source, cloud native solution for providing, securing, and observing network connectivity between workloads, fueled by the revolutionary Kernel technology eBPF
[7].

## Installing

### Connectivity Requirements in Cluster
Expand Down Expand Up @@ -263,6 +266,16 @@ neo4j-standalone:
type: LoadBalancer
loadBalancerIP: 192.168.14.0 #
```
#### LLDP/CDP Requirements

In order to build a complete topology vkaci relies on LLDP or CDP to discover what is connected to the ACI leaf. If the K8s node is a Virtual Machine the Hypervisor needs to be configured with LLDP or CDP.
If the K8s node is baremetal LLDPD needs to be running on every node. The user can isntall LLDPD manually or have vkaci install a daemonSet that runns LLDPD.

**Enabling LLDPD DaemonSet by setting the following in the values.yml**
```yaml
lldpd:
enabled: true
```

**Example values.yml:**

Expand Down Expand Up @@ -400,7 +413,6 @@ This is most likely because your APIC is configured in a way that we have not en

### Potential Improvements

- Add support for the Cilium CNI plugin
- Add support for clusters using NDFC
- Remove the Neo4j direct connection requirement by implementing a REST interface within the Vkaci service for graph data.

Expand All @@ -418,4 +430,5 @@ This is most likely because your APIC is configured in a way that we have not en

[6] Tigera, &quot;About Calico,&quot; _projectcalico.docs.tigera.io_, 2022. <https://projectcalico.docs.tigera.io/about/about-calico> (accessed Mar. 01, 2022).

[7] Cilium - <https://cilium.io/>
© 2022 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public Information.
4 changes: 2 additions & 2 deletions app/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ FROM python:3.10-slim
WORKDIR /app
ENV PATH "$PATH:/app"
COPY requirements.txt requirements.txt
RUN sed -i "s/http/https/g" /etc/apt/sources.list && apt-get update && apt-get install -y --no-install-recommends --fix-missing g++ gcc libxslt-dev libffi-dev make graphviz libgraphviz-dev && pip3 install -r requirements.txt
RUN apt-get update && apt-get install -y --no-install-recommends --fix-missing g++ gcc make && pip3 install -r requirements.txt
COPY . .
RUN chmod +x /app/*
RUN chmod +x /app/*
392 changes: 335 additions & 57 deletions app/graph.py

Large diffs are not rendered by default.

10 changes: 7 additions & 3 deletions app/init.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import logging
import os
import urllib3

urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
# PyACI requires to have the MetaData present locally. Since the metada changes depending on the APIC version I use an init container to pull it.
# No you can't put it in the same container as the moment you try to import pyaci it crashed is the metadata is not there. Plus init containers are cool!
Expand All @@ -14,7 +15,6 @@
logger.addHandler(handler)
logger.setLevel(logging.INFO)


logger.info("Loading ACI Metadata")
try:
url = "https://" + os.environ.get("APIC_IPS").split(',')[0]
Expand All @@ -25,5 +25,9 @@

url = "https://" + os.environ.get("APIC_IPS").split(',')[0] + '/acimeta/aci-meta.json'
r = requests.get(url, verify=False, allow_redirects=True)
open('/app/aci-meta/aci-meta.json','wb').write(r.content)
logger.info("ACI Metadata Loaded")

if os.environ.get("MODE") == "LOCAL":
open('/tmp/aci-meta-vkaci.json','wb').write(r.content)
else:
open('/app/aci-meta/aci-meta.json','wb').write(r.content)
logger.info("ACI Metadata Loaded")
Loading

0 comments on commit 5cd9831

Please sign in to comment.