Skip to content

Latest commit

 

History

History
77 lines (55 loc) · 3.62 KB

File metadata and controls

77 lines (55 loc) · 3.62 KB

BOSH release for cf-containers-broker

This BOSH release and deployment manifest deploy a cluster of cf-containers-broker.

Dynamically provision containers via Open Service Broker API

This BOSH release includes a cf-containers-broker job provides an API that can provision new Docker containers running PostgreSQL/MySQL/Redis/whatever on demand. The API is Open Service Broker API compatible, which means you can register it with Cloud Foundry, Kubernetes and more.

Allow users to dynamically provision persistent services, running in Docker containers, using the cf Cloud Foundry CLI:

cf-create-service-ctop

The example usage is MySQL 5.6: each provisioned service is running inside a dedicated Docker container. The service provides credentials that look like:

$ cf create-service mysql56 free mysql1
$ cf create-service-key mysql1 mysql1-key
$ cf service-key mysql1 mysql1-key
{
 "dbname": "wcfh1voergicdt9n",
 "hostname": "10.244.33.0",
 "password": "mlasvy5fpq9zx8mb",
 "port": "32770",
 "ports": {
  "3306/tcp": "32770"
 },
 "uri": "mysql://duawbyody1ashrgr:mlasvy5fpq9zx8mb@10.244.33.0:32770/wcfh1voergicdt9n",
 "username": "duawbyody1ashrgr"
}

See docker-broker-deployment for a dedicated repo that is all about deploying an Open Service Broker API compatible cluster that runs your favourite services inside on-demand Docker containers.

This repo is similar/same as manifests folder, which is used for the CI test harness.

Usage

This repository includes base manifests and operator files. They can be used for initial deployments and subsequently used for updating your deployments:

export BOSH_ENVIRONMENT=<bosh-alias>
export BOSH_DEPLOYMENT=docker-broker
git clone https://github.com/cloudfoundry-community/cf-containers-broker-boshrelease.git
bosh deploy cf-containers-broker-boshrelease/manifests/cf-containers-broker.yml \
  -o cf-containers-broker-boshrelease/manifests/operators/services/redis32.yml \
  -o cf-containers-broker-boshrelease/manifests/operators/services/postgresql96.yml \
  -o cf-containers-broker-boshrelease/manifests/operators/services/mysql56.yml

bosh run-errand sanity-test

If your BOSH does not have Credhub/Config Server, then remember --vars-store to allow generation of passwords and certificates.

Update

When new versions of redis-boshrelease are released the manifests/cf-containers-broker.yml file will be updated. This means you can easily git pull and bosh deploy to upgrade.

export BOSH_ENVIRONMENT=<bosh-alias>
export BOSH_DEPLOYMENT=docker-broker
cd cf-containers-broker-boshrelease
git pull
cd -
bosh deploy cf-containers-broker-boshrelease/manifests/cf-containers-broker.yml \
  -o cf-containers-broker-boshrelease/manifests/operators/services/redis32.yml \
  -o cf-containers-broker-boshrelease/manifests/operators/services/postgresql96.yml \
  -o cf-containers-broker-boshrelease/manifests/operators/services/mysql56.yml

bosh run-errand sanity-test

Status of Docker Broker images

This project was original created many years ago, and overtime some of the community Docker images have been maintained; and some have not. All of them have been retained in the manifests/broker/services as examples. If you are excited by one of them but it is a very old version, create an Issue, and we'll help you upgrade it.

See https://github.com/cloudfoundry-community/cf-containers-broker for more information about how services are configured, how to pass properties into Docker images, how credentials are randomly generated, etc.