Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Basic vQFX QCOW/VMDK and Containerlab Support #64

Merged
merged 3 commits into from
Oct 2, 2021

Conversation

chriscummings-esnet
Copy link

This adds very basic support for vQFX in containerlab. This combines the work in #49 and vrnetlab#234 as well as making it hopefully easy enough for a user to build multiple types of vQFX (older VMDK based or newer qcow based images). This works in conjunction with srl-labs/containerlab#626 and seems to work just fine in my testing so far (vQFX 20.2R1.10 and 18.4R1.8 have been tested so far, but if someone wants to test with other images I'd be glad to help, I just don't have access to any other images currently.)

I still need to update docs, but if the code looks good and ready to merge, let me know and I can update them before we merge. Unfortunately I couldn't find a good way to auto-convert the vmdks to qcows using the default make target without re-writing the make includes, so I just had to add a separate target that doesn't work as a dependency (long story short, it has to do with the way our make includes happen) and has to be manually run. For now, to build a vmdk image, you have to first run make format-legacy-images and then run the normal make.

Let me know what you think!

@hellt
Copy link
Owner

hellt commented Sep 23, 2021

I wonder can this be simplified the same way as was done for vmx https://github.com/hellt/vrnetlab/blob/master/vmx/Makefile?

@chriscummings-esnet
Copy link
Author

chriscummings-esnet commented Sep 23, 2021

Unfortunately I can't find a good way to make it that simple, but I'm very open to ideas. Essentially what happens is that the $(IMAGES) variable is defined right off the bat in the makefile includes, and that really needs to be defined after the old-style vmdk images are converted to .qcow. And since the include doesn't define $(IMAGES) inside of a target, we can't really over-ride how it's defined just for vQFX, so it would require changing that in the main makefile, which I fear would have some nasty knock-on effects for other vrnetlab make files that depend on it.

Ultimately I kinda wish that things were setup so tha ta user would use the top-level makefile and that would just include the per-NOS makefiles and add them as top level targets (e.g. make vqfx or make nxos at the top level). Unfortunately I think that's well past my knowledge level and would be a pretty substantial re-write of the Make system in vrnetlab.

# TODO: we should make sure we only copy one PFE image (the latest?), in case there are many
docker-pre-build:
cp vqfx10k-pfe*.vmdk docker/

echo "pfe $(PFE_IMAGE)"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we copy only the pfe image? what happens with re?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not entirely sure as that came from the PR#234 in the upstream repo, however, I think the RE gets copied in and added to the image at line 9 of the makefile.include or possibly during line 34 of this Makefile, which calls the make target on line 21 of the makefile.include. This entire step of copying the PFE might actually be redundant and not needed. Let me test without it and see what happens.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, so it is not redundant and is definitely needed. Without having dug too deep, I'm guessing that the built-in stuff only handles 1 disk image, so this is necessary to get the PFE into docker.

@hellt hellt changed the title feat: Basic QCOW/VMDK and Containerlab Support feat: Basic vQFX QCOW/VMDK and Containerlab Support Oct 2, 2021
@hellt
Copy link
Owner

hellt commented Oct 2, 2021

@chriscummings-esnet let me merge this as an experimental stuff
I wiped out the readme so that we can add it later on when we know the tested version and the make process

@hellt hellt merged commit 72e4455 into hellt:master Oct 2, 2021
@chriscummings-esnet
Copy link
Author

Okay, fantastic!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants