Job | Status |
---|---|
Unit | |
Conformance | |
Dockerhub |
A simple service broker conforming to the Open Service Broker API specification that hosts a dashboard showing information on service instances and bindings created by any platform the broker is registered with.
Other fun features this broker provides include:
The Open Service Broker API project allows developers, ISVs, and SaaS vendors a single, simple, and elegant way to deliver services to applications running within cloud native platforms such as Cloud Foundry, OpenShift, and Kubernetes. The project includes individuals from Fujitsu, Google, IBM, Pivotal, RedHat and SAP.
The latest version of overview-broker
can always be found on
Dockerhub. You can
pull and run the latest image with:
docker pull ismteam/overview-broker
docker run ismteam/overview-broker
git clone git@github.com:cloudfoundry/overview-broker.git
cd overview-broker
npm install
# Start overview-broker
npm start
# Or to run the tests
npm test
BROKER_USERNAME
and
BROKER_PASSWORD
environmental variables. Otherwise the defaults of admin
and password
will be used.ROUTE_URL
environmental variable to a url. It must have https scheme.SYSLOG_DRAIN_URL
environmental variable to a url.EXPOSE_VOLUME_MOUNT_SERVICE
environmental variable to true
.ENABLE_EXAMPLE_SCHEMAS
environmental variable to true
.ASYNCHRONOUS_DELAY_IN_SECONDS
environmental variable to the
number of seconds all operations should take.MAXIMUM_POLLING_DURATION_IN_SECONDS
environmental
variable./last_operation
endpoint for service instances or bindings, set the
POLLING_INTERVAL_IN_SECONDS
environmental variable to the number of seconds
a platform should wait before trying again.SERVICE_NAME
environmental variable.SERVICE_DESCRIPTION
environmental variable.RESPONSE_MODE
environmental
variable to one of the available modes.ERROR_MODE
environmental
variable to one of the available modes.cf push overview-broker -i 1 -m 256M -k 256M --random-route -b https://github.com/cloudfoundry/nodejs-buildpack
wget https://raw.githubusercontent.com/cloudfoundry/overview-broker/master/examples/cloudfoundry/manifest.yaml
cf push
open "https://$(cf app the-best-broker | awk '/routes:/{ print $2 }')/dashboard"
cf create-service-broker --space-scoped overview-broker admin password <url-of-deployed-broker>
The basic auth credentials "admin" and "password" can be specified if needed (see Configuration).
cf marketplace
cf create-service overview-service small my-instance
You can give your service a specific name in the dashboard by providing the
name
configuration parameter:
cf create-service overview-service small my-instance -c '{ "name": "My Service Instance" }'
cf push
. You can then create a new
binding with:
cf bind-service <app-name> my-instance
wget https://raw.githubusercontent.com/cloudfoundry/overview-broker/master/examples/kubernetes/overview-broker-app.yaml
wget https://raw.githubusercontent.com/cloudfoundry/overview-broker/master/examples/kubernetes/overview-broker-service.yaml
kubectl create -f overview-broker-app.yaml
kubectl create -f overview-broker-service.yaml
You can check this has succeeded by running kubectl get deployments
and
kubectl get services
.
open "http://$(kubectl get service overview-broker-service -o json | jq -r .status.loadBalancer.ingress[0].ip)/dashboard"
clusterservicebrokers
custom resource:
BROKER_URL="http://$(kubectl get service overview-broker-service -o json | jq -r .status.loadBalancer.ingress[0].ip)"
cat <<EOF | kubectl create -f -
apiVersion: v1
kind: Secret
metadata:
name: overview-broker-secret
namespace: default
type: Opaque
stringData:
username: admin
password: password
EOF
cat <<EOF | kubectl create -f -
apiVersion: servicecatalog.k8s.io/v1beta1
kind: ClusterServiceBroker
metadata:
name: overview-broker
namespace: default
spec:
url: ${BROKER_URL}
authInfo:
basic:
secretRef:
name: overview-broker-secret
namespace: default
EOF
Note that if you changed the default basic auth credentials (see Configuration), then you will need to change the Secret defined above.
kubectl get clusterserviceclasses
kubectl get clusterserviceplans
cat <<EOF | kubectl create -f -
apiVersion: servicecatalog.k8s.io/v1beta1
kind: ServiceInstance
metadata:
name: my-instance
namespace: default
spec:
clusterServiceClassExternalName: overview-service
clusterServicePlanExternalName: small
EOF
cat <<EOF | kubectl create -f -
apiVersion: servicecatalog.k8s.io/v1beta1
kind: ServiceBinding
metadata:
name: my-instance-binding
namespace: default
spec:
instanceRef:
name: my-instance
secretName: my-instance-secret
EOF
To see the contents of the service binding, you can get the associated secret with:
kubectl get secret my-instance-secret -o yaml
Note that the data shown will be base64 encoded.