cf-postgresql-broker

command module
v0.0.0-...-ce6c3d4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 17, 2018 License: Apache-2.0 Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

cf-postgresql-broker

PostgreSQL single-database-instance service broker for the Cloud Foundry.

Installation

Clone the git repository and compile the package:

$ git clone https://github.com/Altoros/cf-postgresql-broker.git
$ cd cf-postgresql-broker

Push the compiled binary to the Cloud Foundry:

$ cf push --no-start

Set up the environment:

$ BASIC_AUTH_USERNAME=admin
$ BASIC_AUTH_PASSWORD=admin
$ PG_SOURCE=postgresql://username:password@host:port/dbname
$ PG_SERVICES='[{
  "id": "service-postgresql-{GUID}",
  "name": "postgres",
  "description": "DBaaS",
  "bindable": true,
  "plan_updateable": false,
  "plans": [{
    "id": "plan-basic-{GUID}",
    "name": "basic",
    "description": "Single database plan"
  }]
}]'

$ cf set-env cf-postgresql-broker BASIC_AUTH_USERNAME "$BASIC_AUTH_USERNAME"
$ cf set-env cf-postgresql-broker BASIC_AUTH_PASSWORD "$BASIC_AUTH_PASSWORD"
$ cf set-env cf-postgresql-broker PG_SOURCE "$PG_SOURCE"
$ cf set-env cf-postgresql-broker PG_SERVICES "$PG_SERVICES"
  • PG_SERVICES can be customized according to this go library
  • {GUID} will be replaced with its runtime value

Start the application and register a service broker:

$ cf start cf-postgresql-broker
$ BROKER_URL=$(cf app cf-postgresql-broker | grep urls: | awk '{print $2}')
$ cf create-service-broker cf-postgresql-broker $BASIC_AUTH_USERNAME $BASIC_AUTH_PASSWORD http://$BROKER_URL
$ cf enable-service-access postgres

Then you should see cf-postgresql-broker in $ cf marketplace

Binding applications

$ cf create-service postgres basic my-psql-db
$ cf bind-service my-app my-psql-db
$ cf restage my-app

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址