Open bacongobbler opened 3 years ago
We should be sure to leverage lessons from other cloud service broker projects such as OSBA - they found this space harder than it looks and it would be good to have the benefit of their experience of where the problems were.
Service Brokers
A service broker is a wrapper to common web services for centralized service creation (known as provisioning). It can work with common on-premise services such as a local PostgreSQL database, or with external software such as Amazon RDS for PostgreSQL.
Service brokers provide commands such as:
Administrators no longer have to manually provision and delegate access to services. Instead, they simply configure a "marketplace" of services and service plans available to users. From there, developers can self-serve, reducing the administrative overhead. Billing information can be generated so that the administrators know how much each team (or app) is spending on services.
Implementation
An administrator can manage all of the service brokers registered with Hippo. They can view the brokers that are connected to the Hippo through the AdminController, which requires that you have been granted the "Administrator" role to access.
(images pulled from https://www.openservicebrokerapi.org/)
To help illustrate the point...
In this image, Hippo's administration portal would be where the administrator "adds it to your CF Marketplace".
Once registered, service brokers are made available to developers as App Bindings (explained below).
App Bindings
Bindings declare how services connect to a function when invoked. For example, a function may wish to read tables from a database, or schedule jobs on a message queue.
Bindings let application developers avoid hard-coding connection information directly in their apps, following 12 factor best practices.
Developers interact with these services through the Hippo CLI:
Users can add new "addons" to their apps using the
hippo addons add
command.Provisioning an add-on will tell the host runtime to expose certain hostcalls to the webassembly runtime (in the meantime, this will be up to the host runtime). e.g. with hostcalls:
Once outbound HTTP support is made available to WASI, environment variables are made available during the function's execution which can be used to establish connections. Applications can then use their own standard libraries to interact with these services. e.g.
Removing an add-on is as easy as adding it:
Users can also switch plans by going up or down tiers. The service broker will handle the service migration to the new tier and update billing appropriately.
Users can view an addon's management portal by using
hippo addons dashboard
(opens a new browser tab).Documentation about the addon can be provided with the
hippo addons docs
command (opens a new browser tab).Rough sketch of an architecture diagram: