-
Notifications
You must be signed in to change notification settings - Fork 237
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
RFC separating plugins from nornir "core" #486
Comments
Yes, I think it is a good idea. Looking at both NAPALM and Ansible, the burden of contributed code starts to become a huge issue and creates big conflicts on either side (i.e. maintainers are frustrated that they can't manage the amount of work and contributors are frustrated that fixes/improvements don't happen). I think we should probably consider some of the issues we ran into when we broke the napalm project into separate repositories. In other words, we probably need some way to declare plugin-core version so we don't have to try to make core and plugins move in sync in some way (which basically becomes impossible). Which maybe is some meta information that both core contains and the plugin must have like We should also think more about plugin testing and potentially have boilerplate for testing (that is just included in the I wonder if for discoverability we want a bit more. Might be interesting to research any project that has done this well. Potentially meta information on the plugin side that could be pulled in/read via tooling so that if there was a command-line tool you could list the plugins and other information. Anyways might be worth researching more. |
I really like this idea, and there's some tools built into |
Fortunately here the scope is very different. Plugins should be compatible (guaranteed as per our semver rules) for a major version. The problem with napalm was that even non-breaking changes required coordination. So basically what that means is that plugins should have as a dependency the major version they were written for in their requirements.txt
Yeah, I like that idea. What I was thinking was that repos with plugins would have some file with well-known metadata (in a yaml or similar). In the docs we would maintain a list of repos with plugins and then pull the metadata from those repos daily or so.
Don't think we need anything so fancy. Today you import netmiko tasks as |
Does poetry have something like setup.py extras? If so, could have all the core plugins (stuff that exists now) already "attached" to the project in that way i.e. You could then do This would be a super minor thing but could be an easy way to tie/associate the "core" plugins to the project directly, while leaving all the "community" stuff just as the normal If nobody likes that idea/that doesn't exist in poetry, just pretend I said nothing :) Otherwise, I think its all a cool idea! I had been reading about plugins a bit after Dmitry mentioning it recently -- seems like cool stuff! |
@carlmontanari poetry does have extras, but I am not sure we want to go down that path, because it makes plugins defined there first-class citizens, while others become second-class. We want to avoid this bias. |
I agree with most of the points but we still have some risks. For example we could end up with many plugins needing different versions of nornir and I'm afraid the developing of new versions of nornir will slow down because "breaking" changes have a bigger impact of all the plugins someone started and we will think twice if a change should be done or not. Also I am afraid many people will start a new plugin because they have a good idea but will never come to a stable version. And if many plugins are in bad quality the whole nornir image will be affected. |
Hopefully this will help ensuring a minimum amount of quality in the plugins that we refer to in our docs, or at least give you a sense of how much you can/want to trust it. Obviously, if they are not there we can't do much about it but that's no different from today. |
Hello everybody, I have compiled a list plugins in #504. I'd appreciate if people could take a look and confirm if they are interested (assuming they have volunteered) or to let me know if they are interested in helping even in the case they weren't. Thanks! |
We should think of how this impacts the documentation, everything could of course be spread out into its own RTD repo, or we could do some integrations. There's also the issue of very small plugins, like the tcp_ping one, or the two that handles Jinja rendering. Should all of those live in their own repos or should we have some base plugins repo? |
Yeah, I have been thinking about this and short-term I am going to add a "plugins" section to www.nonir.tech with a table that will serve as central repository for plugins. You can see a prototype here: https://nornir.tech/nornir/plugins/ The table is populated from: Medium-Long term we could expand this and have a central repo for documentation too but I think we need to be realistic and start small or we won't get this done. |
This is a request for comments from the community.
As the project grows the community contributes plugins for different use cases. This is great and it's certainly good news for the community but it puts a burden on the core maintainers. Some of these plugins relate to systems which we, the core maintainers, are no experts of so review is slow and, in case of bugs/issues, we can't help much about it.
For this reason I am proposing the following:
nornir-napalm
may contain the connection plugin for napalm + its tasks.nornir-netmiko
may contain the connection plugin for netmiko + its tasks.nornir-netbox
, the inventory plugin for netbox, etc...This means that if you want to use nornir with netmiko and netbox as the inventory you would have to install both
nornir
,nornir-netmiko
andnornir-netbox
. For instance:This has a few extra benefits:
nornir
repo. As a matter of fact this is not necessary today either but the pattern is to contribute everything to the core repo.This has two main issues; overhead of having to package everything and discoverability.
To solve those issues we will:
As the "core maintained" plugins will be separated from the "core" nornir repo those plugins will leverage (1) and (2) as well ensuring there are no first and second class plugins here.
The text was updated successfully, but these errors were encountered: