function-avd runs Arista AVD in Kubernetes. It builds each device's configuration from an AVD repository, pushes it to the device over eAPI, and pushes it again if someone changes the device by hand.
Two Crossplane packages:
configuration-avd: the API, with the kindsFabric,FabricInputandDevice.function-avd: the function that runs AVD.configuration-avdinstalls it.
netadopt writes the objects from an AVD
repository. example/single-dc-l3ls.yaml is what it writes
for AVD's single-dc-l3ls example.
Needs Crossplane v2.4.0 or later. Apply, in this order:
-
example/runtime.yaml: the function's CPU and memory.
-
The Configuration, with a version from Releases:
apiVersion: pkg.crossplane.io/v1 kind: Configuration metadata: name: configuration-avd spec: package: xpkg.upbound.io/netclab/configuration-avd:<version>
-
example/providerconfig.yaml, once the Configuration is healthy: it needs provider-http, which the Configuration installs.
If the cluster pulls packages through a mirror, change the prefix in runtime.yaml to
the mirror's address.
Applying a Fabric changes the devices. Each device is configured at the address in
its Ansible variables (ansible_host, ansible_user, ansible_password, and the
ansible_httpapi_* settings). To use a lab instead, override them in
spec.extraVars.
- A push replaces the whole running configuration.
- The configuration must keep eAPI on, or the device is unreachable after the first push.
- Deleting a Device or a Fabric stops the pushes and leaves the configuration on the device.
- The build runs Ansible on the repository's variables inside the cluster, so anything in them runs there too.
# Fabric
status:
missing: {inputs: [], configMaps: []} # what it lists and cannot find; the build waits
error: "" # why the last build failed; Devices keep their config
---
# Device
status:
configHash: sha256:9f2c... # the eos.cfg built from spec.structuredConfig
invalid: [] # problems in the structured config; if any, no push
error: "" # eAPI's error from the last push
deployed: {configHash: sha256:9f2c...} # the config the device runsUsually a second plus the build. Creating a fabric opens Crossplane's circuit breaker
for it (Responsive=False, WatchCircuitOpen); while it is open, a change takes up to
10 s plus the build. A larger --circuit-breaker-burst in Crossplane's Helm args
keeps it closed for larger fabrics.
A build of 26 devices takes 16 s on 10 cores and 54 s on 2. Crossplane stops a build after 120 s.
- Each release uses one AVD version: the
pyavdversion inpyproject.toml. - Only
arista.avdand the collections it needs are installed. custom_templatesineos_cli_config_genare not supported yet.
Apache-2.0. Uses Arista AVD, also Apache-2.0.