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

Multi-provider topologies #699

Closed
ipspace opened this issue Dec 21, 2022 · 2 comments
Closed

Multi-provider topologies #699

ipspace opened this issue Dec 21, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@ipspace
Copy link
Owner

ipspace commented Dec 21, 2022

Wouldn't it be nice if you could run a few nodes in VMs and a few others in containers? That's what I'll try to do with multi-provider topologies. Obviously we'll be limited in what can be done. I can see these easy combos:

  • libvirt + containerlab
  • anything + external (happily ignoring connectivity issues)

Configuration would be extremely easy: add provider attribute to nodes to specify which provider a node should use. The main provider (top-level topology attribute) would have a list of allowed secondary providers so we'll stop the unsupported combinations.

Using external provider with another one is a piece of cake (conceptually, still needs to be done): call the proper netlab up/down hooks at the proper time and move on.

Combining libvirt and clab providers will be more fun.

netlab create (or equivalent) will have to:

  • Set link type to bridge for any mixed-provider segment - libvirt provider hook
  • Create Vagrantfile
  • Modify the lab topology (remove libvirt nodes, clean up links...) - libvirt provider hook
  • Create prototype clab.yml - potentially from within the same libvirt provider hook

netlab up will have to:

  • Execute vagrant up
  • Collect Linux bridge names from libvirt bridge names and modify the prototype clab.yml file
  • Start the containerlab part of the lab (potentially just execute containerlab deploy command)

netlab down will have to:

  • Execute containerlab destroy command to bring down the containers
  • Execute vagrant destroy -f to bring down the VMs
  • Execute cleanup
@ipspace ipspace added the enhancement New feature or request label Dec 22, 2022
@ipspace
Copy link
Owner Author

ipspace commented Dec 25, 2022

Initial implementation in mp-699 branch, documentation in docs/providers.md. Have fun ;)

@ipspace
Copy link
Owner Author

ipspace commented Jan 5, 2023

Implemented in #706

@ipspace ipspace closed this as completed Jan 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant