docs/static/v0.4/extensibility/providers/index.html
Meshery offers Providers as a point of extensibility. With a built-in Local Provider (named “None”), Meshery Remote Providers are designed to be pluggable. Remote Providers offer points of extension to users / integrators to deliver enhanced functionality, using Meshery as a platform.A specific type of provider can be enforced in a Meshery instance by passing it with the env variable ENFORCED_PROVIDER.
Meshery’s Remote Provider extensbility framework is designed to enable:
What a given Remote Provider offers might vary broadly between providers. Meshery offers extension points that Remote Providers are able to use to inject different functionality - functionality specific to that provider.
Authentication and Authorization
Long-Term Persistence
Enhanced Visualization
Reporting
Two types of providers are defined in Meshery: local and remote. The Local provider is built-into Meshery. Remote providers are may be implemented by anyone or organization that wishes to integrate with Meshery. Any number of Remote providers may be available in your Meshery deployment.
Use of a Remote Provider, puts Meshery into multi-user mode and requires user authentication. Use a Remote provider when your use of Meshery is ongoing or used in a team environment (used by multiple people).
Name: “Meshery” (default)
Use of the Local Provider, “None”, puts Meshery into single-user mode and does not require authentication. Use the Local provider when your use of Meshery is intended to be shortlived.
Name: “None”
Meshery interfaces with Providers through a Go interface. The Provider implementations have to be placed in the code and compiled together today. A Provider instance will have to be injected into Meshery when the program starts.
Meshery keeps the implementation of Remote Providers separate so that they are brought in through a separate process and injected into Meshery at runtime (OR) change the way the code works to make the Providers invoke Meshery.
Interwoven into Meshery’s web-based, user interface are a variety of extension points. Each extension point is carefully carved out to afford a seamless user experience. Each extension point is identified by a name and type. The following Meshery UI extension points are available:
Name: user_prefs Type: Single Component Description: This is supposed to be remote react components which will get placed in a pre-existing page and will not have a dedicated endpoint. As of now, the only place where this extension can be loaded is the “User Preference” section under meshery settings.
Name: /extension/**Type:** Full Page Description:
The Provider package is unzipped into Meshery server filesystem under /app/provider-pkg/<package-name>.
Remote Providers must fulfill the following endpoints:
/login - return valid token/logout - invalidating token/capabilities - return capabilities.jsonAll UI extensions will be hosted under the endpoint <mesheryserver:port/provider>
The UserPrefs extension point expects and loads a component to be displayed into /userpreferences page.
The Navigator extension point loads a set of menu items to be displayed in the menu bar on the left hand side of the Meshery UI.
Meshery Seerver will proxy all requests to remote provider endpoints. Endpoints are dynamically determined and identified in the “capabilities” section of the /capabilities endpoint. Providers as an object have the following attributes (this must be returned as a response to /capabilities endpoint):
{
"provider_type": "remote",
"package_version": "v0.1.0",
"package_url": "https://layer5labs.github.io/meshery-extensions-packages/provider.tar.gz",
"provider_name": "Meshery",
"provider_description": [
"Persistent sessions",
"Save environment setup",
"Retrieve performance test results",
"Free use"
],
"extensions": {
"navigator": [
{
"title": "MeshMap",
"href": {
"uri": "/meshmap",
"external": false
},
"component": "provider/navigator/meshmap/index.js",
"icon": "provider/navigator/img/meshmap-icon.svg",
"link:": true,
"show": true,
"children": [
{
"title": "View: Single Mesh",
"href": {
"uri": "/meshmap/mesh/all",
"external": false
},
"component": "navigator/meshmap/index.js",
"icon": "navigator/img/singlemesh-icon.svg",
"link": false,
"show": true
}
]
}
],
"user_prefs": [
{
"component": "userprefs/meshmap-preferences.js"
}
]
},
"capabilities": [
{ "feature": "sync-prefs", "endpoint": "/user/preferences" },
{ "feature": "persist-results", "endpoint": "/results" },
{ "feature": "persist-result", "endpoint": "/result" },
{ "feature": "persist-smi-results", "endpoint": "/smi/results" },
{ "feature": "persist-metrics", "endpoint": "/result/metrics" },
{ "feature": "persist-smp-test-profile", "endpoint": "/user/test-config" }
]
}
Meshery enables you as a service mesh owner to customize your service mesh deployment.
Remote Provider extensions are kept out-of-tree from Meshery (server and UI). You might need to build your extensions under the same environment and set of dependencies as Meshery. The Meshery framework of extensibility has been designed such that in-tree extensions can be safely avoided while still providing a robust platform from which to extend Meshery’s functionality. Often, herein lies the delineation of open vs. closed functionality within Meshery. Remote Providers can bring (plugin) what functionality that they want behind this extensible interface (more about Meshery extensibility), at least that is up to the point that Meshery has provided a way to plug that feature in.
Offering out-of-tree support for Meshery extensions means that:
Through clearly defined extension points, Meshery extensions may be offered as closed source capabilities that plug into open source Meshery code. To facilitate integration of your Meshery extensions, you might automate the building and releasing of your separate, but interdependent code repositories. You will be responsible for sustaining both your ReactJS and Golang-based extensions.