You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2020/05/15 02:14:07 UTC

[GitHub] [incubator-apisix] damonchen opened a new issue #1593: [discuss] Better management of plugins by users and third-party developers apisix

damonchen opened a new issue #1593:
URL: https://github.com/apache/incubator-apisix/issues/1593


   - Start Date: 2020-05-12
   - Target Major Version: 2.0
   - Reference Issues:
   - Implementation PR:
   
   # Summary
   
   Better management of plugins by users and third-party developers
   
   # Motivation
   
   If the plugin has a security problem or a bug which must be fixed at that time,
   the user who use the apisix also must upgrade the version. The problem is that
   if you upgrade the plugin, you should also upgrade the apisix core. If the
   new version of the apisix core is not compatible of the old
   apisix core. How would you do it?
   
   When you are in a company and want to write a plugin for your privacy service.
   You should more careful to maintain you plugin about how to install, upgrade, etc.
   Everyone who writes the plugin for privacy service also will do what you have done.
   There are many duplicate works.
   
   When the user of the apisix need some features, which may be developed by some other developer, how can we found in the web? cloning the apisxi repository and then search the plugin
   are not very effective and intuitive.
   
   What we should to do is separating the apisix core implement and the plugin implement, introducing a plugin center registry, adding a new cli tool for managing plugin for installing, upgrading, removing, searching, etc, and must be in accordance with the sematic version rule both of the apisix core and the plugin. If we do this, we could solved the above problems.
   
   # Detailed design
   
   ### Detail
   
   The following image show how to separate the apisix core and the plugin.
   
   ![image-20200511231348008](https://user-images.githubusercontent.com/1255097/82004098-a70a0780-9694-11ea-8778-99f1d648a3dd.png)
   
   1. All the plugins will be placed the apisix core subdirectory named "plugins", eg: If we install the apisix in the path `/opt/apisix`, then all the plugins will be found in `/opt/apisix/plugins`
   2. Every plugin has a unique directory name.
   3. The plugin directory name should be in the form of `{company|person}.{name}`. `{company|person}` will be replaced with the company name or person developer name, **and the `{name}` is the current plugin name.** eg. current version of the apisix have a plugin named `basic-auth`,which will be changed to `apisix.basic-auth` if applying the above rule.
   4. Every plugin have an entry file for apisix core searching, which named `index.lua`.The file `index.lua` will export `_M` table ,which is the same as before.
   5. Extends the `_M` table description of the plugin.
   
   ### The CLI
   
   The system will be introduced a new command named `a6`. The following shows all subcommands and describes functions:
   
   - `a6 install {company|person}.{name}`: which will download `{company|person}.{name}` from the center registry and install the `{company|person}.{name}` to the plugins directory.
   - `a6 search name` will show all plugin's names and descriptions that is matched `name`
   - `a6 list` will list all installed plugins in the local system.
   - `a6 init [{company|person}.{name}]` will be init a plugin directory with some templates file.
   - `a6 push` will push the current plugin directory to the remote center registry with an authenticated account.
   
   ### The Center Registry
   
   The center registry will have a public domain, so the `a6` command will download the plugin from the domain by default.
   
   The center registry will have a search page, which may be shown as below:
   
   ![image-20200512082003115](https://user-images.githubusercontent.com/1255097/82004112-b1c49c80-9694-11ea-9989-654a9f8ed17f.png)
   
   
   
   If click the box, then show the detail page as below:
   
   ![image-20200512082035688](https://user-images.githubusercontent.com/1255097/82004123-b8ebaa80-9694-11ea-9bbf-13113eff88a7.png)
   
   
   
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-apisix] juzhiyuan edited a comment on issue #1593: [discuss] Better management of plugins by users and third-party developers apisix

Posted by GitBox <gi...@apache.org>.
juzhiyuan edited a comment on issue #1593:
URL: https://github.com/apache/incubator-apisix/issues/1593#issuecomment-630206507


   ![image](https://user-images.githubusercontent.com/2106987/82222472-eade6480-9953-11ea-923c-ec125fb1181a.png)
   
   Love this style, and the new dashboard is under development on the Next branch! We may achieve this in the future 🤔


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-apisix] ShiningRush commented on issue #1593: [discuss] Better management of plugins by users and third-party developers apisix

Posted by GitBox <gi...@apache.org>.
ShiningRush commented on issue #1593:
URL: https://github.com/apache/incubator-apisix/issues/1593#issuecomment-629941262


   This sounds pretty cool, a bit similar to docker hub and helm.
   But I think we may not need such a complicated solution (at least for now)
   Because the scenes using plugins are limited, there will not be too many different plugins. You can refer to Kong, it has been around for a long time, but there are only dozens of plugins.
   So for now, I think spending so much works to develop and maintain a Plugins Hub will not bring much value.
   Maybe we should complete other features first, such as service discovery.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-apisix] juzhiyuan commented on issue #1593: [discuss] Better management of plugins by users and third-party developers apisix

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on issue #1593:
URL: https://github.com/apache/incubator-apisix/issues/1593#issuecomment-630206507


   ![image](https://user-images.githubusercontent.com/2106987/82222472-eade6480-9953-11ea-923c-ec125fb1181a.png)
   
   Love this style, and the new dashboard is under development on the Next branch!


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org