infra: add Cisco NX-OS (n9kv) to EC2 image bootstrap#181
Merged
Conversation
Wires the lab builder for Cisco Nexus 9000v qcow2 images so a nexus9300v64.<version>.qcow2 dropped in infra/images/ and uploaded to S3 builds the vrnetlab/cisco_n9kv:<version> container on first launch and is loaded directly thereafter. ec2-setup.sh changes: - Refactor image classification into a classify_image helper used by both the docker-tarball load path and the qcow2 build path. Add the Cisco mapping (nexus9300v*|nexus9500v*|nxosv*|n9kv*|*nxos* -> vrnetlab/cisco/n9kv). - vrnetlab's cisco/n9kv Makefile globs n9kv-<version>.qcow2; rename Cisco's nexus9300v64.<version>.qcow2 to that form when staging into the vrnetlab tree so the resulting docker tag is vrnetlab/cisco_n9kv:<version>. - Run the qcow2 build path in addition to (rather than instead of) the pre-built tarball path, filtered by --images and what was already loaded. Previously, presence of any pre-built tarball in S3 would short-circuit qcow2 builds for other vendors. - Tolerate `grep` no-match in the post-build docker-tag lookup (`grep ... || true`) and treat upload failures as warnings rather than aborting the bootstrap. Without this, set -euo pipefail killed cloud-final after a successful build whenever the docker-tag grep pattern did not match. ec2-launch.sh / README: document `nxos` in the --images filter values. Smoke-tested end to end on a fresh m8i.2xlarge: built vrnetlab/cisco_n9kv:10.3.9.M from nexus9300v64.10.3.9.M.qcow2, deployed it under containerlab as cisco_n9kv, and confirmed `show version` reports NX-OS 10.3(9) over SSH. ---- Prompt: ``` I want to add Cisco VMs to our setup. For NX-OS 10, I have: [Cisco download page listing nexus9300v64-lite/full and nexus9500v64 in .box / .ova / .qcow2 / .vagrant variants] I don't know what to look for for IOS XE, ASA, or IOS XR ``` Follow-ups in the same task: picked nexus9300v64.10.3.9.M.qcow2 (full features, KVM); confirmed infra/ec2-setup.sh + ec2-launch.sh did not yet recognize NX-OS; authorized wiring it up end-to-end on a fresh EC2 instance separate from another running lab-validation session, including upload to S3, build, smoke-test, and teardown. commit-id:c0af1752
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #181 +/- ##
=======================================
Coverage 83.59% 83.59%
=======================================
Files 87 87
Lines 4194 4194
=======================================
Hits 3506 3506
Misses 688 688
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Wires the lab builder for Cisco Nexus 9000v qcow2 images so a
nexus9300v64..qcow2 dropped in infra/images/ and uploaded to
S3 builds the vrnetlab/cisco_n9kv: container on first launch
and is loaded directly thereafter.
ec2-setup.sh changes:
both the docker-tarball load path and the qcow2 build path. Add the
Cisco mapping (nexus9300v*|nexus9500v*|nxosv*|n9kv*|nxos ->
vrnetlab/cisco/n9kv).
Cisco's nexus9300v64..qcow2 to that form when staging into
the vrnetlab tree so the resulting docker tag is
vrnetlab/cisco_n9kv:.
pre-built tarball path, filtered by --images and what was already
loaded. Previously, presence of any pre-built tarball in S3 would
short-circuit qcow2 builds for other vendors.
grepno-match in the post-build docker-tag lookup(
grep ... || true) and treat upload failures as warnings ratherthan aborting the bootstrap. Without this, set -euo pipefail killed
cloud-final after a successful build whenever the docker-tag grep
pattern did not match.
ec2-launch.sh / README: document
nxosin the --images filter values.Smoke-tested end to end on a fresh m8i.2xlarge: built
vrnetlab/cisco_n9kv:10.3.9.M from
nexus9300v64.10.3.9.M.qcow2, deployed it under containerlab as
cisco_n9kv, and confirmed
show versionreports NX-OS 10.3(9) overSSH.
Prompt:
Follow-ups in the same task: picked
nexus9300v64.10.3.9.M.qcow2 (full features, KVM); confirmed
infra/ec2-setup.sh + ec2-launch.sh did not yet recognize NX-OS;
authorized wiring it up end-to-end on a fresh EC2 instance separate
from another running lab-validation session, including upload to S3,
build, smoke-test, and teardown.
Stack: