This repository contains a BOSH release for a Cloud Foundry PostgreSQL service broker.
git clone https://github.com/Infra-Red/postgresql-service-broker-boshrelease.git ~/workspace/postgresql-service-broker-boshrelease
cd ~/workspace/postgresql-service-broker-boshrelease
git submodule update --init --recursive
Populate a vars file (using manifest/vars-file.yml
as a template), save it to
secrets/vars.yml
. You will need values from both your cloud-config and secrets
from your cf-deployment.
To deploy:
bosh upload-stemcell https://s3.amazonaws.com/bosh-aws-light-stemcells/light-bosh-stemcell-3541.9-aws-xen-hvm-ubuntu-trusty-go_agent.tgz
bosh deploy --vars-file secrets/vars.yml manifest/cf-postgres-template.yml
After registering the service broker, the PostgreSQL service will be visible in the Services Marketplace; using the CLI, run cf marketplace
.
$ bosh -e YOUR_ENV -d postgresql-service-broker run-errand broker-registrar
-
First register the broker using the
cf
CLI. You must be logged in as an admin.$ cf create-service-broker shared-postgresql-broker BROKER_USERNAME BROKER_PASSWORD URL
BROKER_USERNAME
andBROKER_PASSWORD
are the credentials Cloud Foundry will use to authenticate when making API calls to the service broker. Use the values for manifest propertiesjobs.postgresql-service-broker.properties.broker.username
andjobs.postgresql-service-broker.properties.broker.password
.URL
specifies where the Cloud Controller will access the PostgreSQL broker. Use the IP address ofpostgresql-service-broker
instance and port ofpostgresql-service-broker
job. By default, port is set to8080
.For more information, see Managing Service Brokers.
The following commands are destructive and are intended to be run in conjuction with deleting your BOSH deployment.
$ bosh -e YOUR_ENV -d postgresql-service-broker run-errand broker-deregistrar
Run the following:
$ cf purge-service-offering a.postgresql
$ cf delete-service-broker shared-postgresql-broker