This project implements a sample service broker that adheres to the Open Service Broker API using the Spring Cloud Open Service Broker framework. It can be deployed to either Cloud Foundry or Kubernetes, and can be registered as a service broker to either platform.
master - reactive, Spring WebFlux version of the sample app based on Spring Cloud Open Service Broker 3.3 and Spring Boot 2.4.
SCOSB-3.1.x - reactive, Spring WebFlux version of the sample app based on Spring Cloud Open Service Broker 3.1 and Spring Boot 2.2.
SCOSB-2.0.x - imperative, Spring MVC version of the sample app based on Spring Cloud Open Service Broker 2.0.
Getting Started
This service broker manages instances of a bookstore service.
When a service instance is provisioned, a new data structure is allocated in memory.
When a service binding is created, a URL and basic auth credentials are provided in the binding credentials. The bookstore URL and credentials can be used to add, retrieve, delete, and list books in the bookstore. Unique credentials are generated for each service binding.
See the blog post Reactive BookStore Service Broker for more information about the architecture and integration of other Spring projects within this sample app.
Build
This project requires Java 8 at a minimum.
The project is built with Gradle. The Gradle wrapper allows you to build the project on multiple platforms and even if you do not have Gradle installed; run it in place of the gradle command (as ./gradlew) from the root of the main project directory.
To compile the project and run tests
./gradlew build
Deploy
Once the project is built, it can be deployed and registered to either Cloud Foundry or Kubernetes.
Hi Team,
I have deployed the broker and service in k8s cluster and registered it in Cloud Foundry. Everything works fine, except that when I try to access the (add book) endpoint from the service-key in CF, I get the following curl error from my local macOS machine:
curl: (7) Failed to connect to <cf_ip_add> port 443: Operation timed out
Make it possible to configure the service broker application with OAuth2 authentication as a configurable option, with basic auth as the default still.
Provide alternate Kubernetes deployment instructions that specify OAuth2 client instead of basic auth credentials when registering the service broker.
Add support for an optional maxBooks provisioning parameter that limits the number of books that a service instance can store. Attempting to add more books than the specified maximum will result in an error from the service instance endpoints.
The broker catalog should include the schema for the parameter.
An SI dashboard could just display a table with the key/value pairs currently being stored in the SI. It doesn't need to be a fancy UI, just something to demonstrate how dashboard UI endpoints can be added to a broker app.
Async provisioning could be simulated with a simple counter (e.g. the first call to /last_operation could return "in progress" and the second call could return "success"), or with an artificial time delay in creating the key/value store.
Rancher versions: 1.6.21
docker version: 17.03.3-ce
Kubernetes: 1.10.5
helm: 2.8.2
Environment :
Opened k8s rbac in rancher;
Virtual Machines
deploy to Kubernetes:https://github.com/spring-cloud-samples/bookstore-service-broker/blob/master/deploy/kubernetes/README.adoc
Register the service broker to the Service Catalog:
$ kubectl create -f deploy/kubernetes/service-broker.yml
Error:
Error from server (Forbidden): error when creating "deploy/kubernetes/service-broker.yml": clusterservicebrokers.servicecatalog.k8s.io is forbidden: User "system:anonymous" cannot create clusterservicebrokers.servicecatalog.k8s.io at the cluster scope
Add support for an optional readonly=true|false bind parameter that controls whether a service binding is allowed to retrieve, list, write, and delete books or only to retrieve and list books.
The broker catalog should include the schema for the parameter.
Hello team,
I am implementing the service broker using Spring.
I have provided an implementation class for ServiceInstanceBindingService.
In this, according to the OSBAPI specification given here
If someone provides already existing bindingId but with different attributes, we should throw 409 status.
But I am unable to find a way to achieve this.
Will you please help me out.