outroll / vesta

VESTA Control Panel
http://vestacp.com
GNU General Public License v3.0
2.97k stars 1.03k forks source link

Plugin API / Marketplace #1132

Open SysVoid opened 7 years ago

SysVoid commented 7 years ago

Hi Guys,

Have some idea/feature to implement a Plugin / Marketplace system. I'm creating a whitepaper for this, that goes more in detail how to implement it. Maybe before we or I start with this we can make vestaCP more stable, fix the bugs, try to close as many pull requests, ...

To let other developers build their plugins for vestaCP, we can create a Plugin mechanism. By this way, we can give the community a chance to include their own plugins to Vesta. This allows us to focus on the core of vestaCP and give other people the chance of making changes that don't affect the core, so it's update safe.

When the plugin mechanism is ready, it is possible to create a Plugin Marketplace, and developers can create their plugins and distribute these plugins through this official marketplace. Developers can create free and premium (paid) plugins the vestaCP can receive a small fee (30%?) of that to maintain vestaCP.

Some plugin Ideas:

How it can be done:

v-download-plugin 'PLUGINNAME OR ID' and 'KEY'

this script downloads the plugin from the marketplace. And checks that the KEY is active (Paid plugin). Key is needed for paid apps to prevent nulled downloads.

v-active-plugin 'PLUGINNAME or ID' 'PLUGIN KEY'

This script checks the plugin key and activates the PLUGIN if the key is correct.

when the plugin is activated, a script or files needs to be read the check:

  • what kind of plugin it is. (Is it only an API or does it have a GUI)

  • If it has a GUI is it only for admin or not? What files need to be rendered.

  • What files need to be executed and when? (Creating some mechanism for this) (Maybe some WordPress like system.)

v-deactivate-plugin 'PLUGINNAME.'

Deactivates the plugin

v-list-plugins

I guess you know what this means.

v-delete-plugin

Deletes all the files and data of the plugin

v-update-plugin 'PLUGINNAME'

Download new plugin files and run their upgrade script.

v-update-plugins

Vesta CP structure:

/bin

/web

/data

/data/users/{username}

New structure

/bin

/bin/plugins/{plugin-slug}

/web

/web/plugins/{plugin-slug}/

/data/plugin/{plugin-slug}/

/data/users/{username}/{plugin-slug}/

Thinks to think about:

  • Security, plugins have root access?

--> Manuel review of 2 vestaCP developers of the plugins code

  • It can be a big change, but start small? Some basic things

This was suggested via the development mailing list by @madeITBelgium. Let's discuss it here and get some ideas in.

Thanks.

SysVoid commented 7 years ago

1131 would be a great plugin. I think that would be a nice thing to have, but it shouldn't really be included in VestaCP core.

cybernet commented 7 years ago

@SysVoid since this is a discussion, DNS is a very important part ( if not crucial ) of a webpanel, especially when it can cache pages and deliver a custom page when the host is down or overloaded ... other than that it improves user experience, saves the server tons of bandwidth ( when it comes to big sites )

if no one read the #1131 - it's about Cloudflare :)

cybernet commented 7 years ago

csf should also be a part of vesta

anton-reutov commented 7 years ago

only if plugin from third-party developers