-
Notifications
You must be signed in to change notification settings - Fork 275
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
FR - Allow for a lab path to be a URL #546
Comments
Was proposed in #344 But we need to keep the downloaded topo file, as this is needed to destroy the lab and do other commands like 'save' Unfortunately today even 'destroy' command requires a user to specify the topo file name. And maybe this is an overkill, since we might be able to delete a lab by removing containers with certain labels |
ok, so based on what I've read the issues are:
Ultimately, I think that it's very easy to introduce a $ containerlab -t http://mylab.yaml deploy
$ containerlab list
[DEBUG] Listing all local labs # Here we can iterate over all runtimes and look for clab's labels
local-lab-1
url-based-lab-2
$ containerlab save -n url-based-lab-2
$ containerlab delete -n url-based-lab-2 |
the name argument was (and likely is still) there, but we (un)naturally deviated from it, since we used topology based approach for most of our commands. If I think about URL based commands, to me it seems it only makes when the lab is self-contained (i.e. no external bindings). or if we clone/download the lab repo via https entirely. The self-container labs are quite common I'd say. I.e. any basic lab is like that if they don't use any mounted configs. And I think it adds benefits to be able to deploy them without asking to clone a repo with a topo file. The labs which are more complicated, with binds or references to license files can (as you mentioned) be looked up via http as well, I agree, but I am not sure that the complexity that it adds (creating the temp dir and putting there all the files that are referenced in the topo and not available locally) beats the flow of cloning a repo? |
I don't think the choice should be between clone and download. Some repose may have more than one lab, like this one, so there's really no point in cloning the entire repo for that. Think of it like helm, there may be a repo with multiple apps and you only install what you need (although helm does package them up in a single tarball) |
@networkop are you working on this ? |
@karimra nope, no plans as of yet |
Some CLI tools, like
kubectl
, allow for a yaml file path to be a URL. For containerlab this makes it possible for users to deploy a full lab without having to download any of the artifacts.For example:
would download the lab and all of the associated artifacts into a temp folder and clean it up before the deploy function exits.
The text was updated successfully, but these errors were encountered: