zoosky / helmi

Configurable Open Service Broker using helm & kubectl

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

helmi

Open Service Broker API Implementation using helm & kubectl

alt Logo

Start locally

# start minikube
minikube start

# init helm and install tiller (needed once)
helm init

# build helmi
go get -d github.com/monostream/helmi
cd ${GOPATH:-~/go}/src/github.com/monostream/helmi
go build

# run helmi
./helmi

Start on kubernetes

# create serviceaccount, clusterrolebinding, deployment, service and an optional secret for basic authorization
kubectl create -f docs/kubernetes/kube-helmi-rbac.yaml
kubectl create -f docs/kube-helmi-secret.yaml
kubectl create -f docs/kubernetes/kube-helmi.yaml

# curl to catalog with basic auth
curl --user {username}:{password} http://$(kubernetes ip):30000/v2/catalog

or

./docs/kubernetes/deploy.sh

# curl to catalog with basic auth
curl --user {username}:{password} http://$(kubernetes ip):30000/v2/catalog

Use in Cloud Foundry

Register Helmi Service Broker

cf create-service-broker helmi {username} {password} http://{IP}:5000

List and allow service access

cf service-access
cf enable-service-access {service}

List marketplace and create service instance

cf marketplace
cf create-service {service} {plan} {name}

Bind service to application

cf bind-service {app} {name}

Tests

run tests

go test ./pkg/* -v

Environment Variables

Helmi can use environment variables to define a dns name for connection strings and a username/password for basic authentication.

To use basic authentication set USERNAME and PASSWORD environment variables. In the k8s deployment they are read from a secret, see kube-helmi-secret.yaml

To replace the connection string IPs set an environment variable DOMAIN.

About

Configurable Open Service Broker using helm & kubectl

License:Apache License 2.0


Languages

Language:Go 100.0%