Skip to content

🐘 an ElephantSQL service broker for ☁️ Cloud Foundry and ⛵ Kubernetes

License

Notifications You must be signed in to change notification settings

JamesClonk/elephantsql-broker

Repository files navigation

🐘 elephantsql-broker

CircleCI License Platform

PostgreSQL as a Service

Perfectly configured and optimized PostgreSQL databases ready in 2 minutes.

elephantsql-broker is an ElephantSQL service broker for Cloud Foundry and Kubernetes

Usage

Deploy service broker to Cloud Foundry

  1. create an API key for your ElephantSQL account
  2. pick a Cloud Foundry provider. I'd suggest the Swisscom AppCloud
  3. push the app, providing the API key and a username/password to secure the service broker with
  4. register the service broker in your space (--space-scoped)
  5. check cf marketplace to see your new available service plans

create service broker

Provision new databases

  1. create a new service instance (cf cs)
  2. bind the service instance to your app (cf bs), or create a service key (cf csk)
  3. inspect the service binding/key, have a look at the credentials (cf env/cf sk)
  4. use the given credentials to connect to your new Postgres database
  5. enjoy!

provision service

Default Region

By default the service broker will provision new elephantsql database instances in the configured region BROKER_API_DEFAULT_REGION (see manifest.yml) or if none configured at all it will use azure-arm::westeurope as default value. When issuing service provisioning requests to the service broker it is also possible to provide the region as an additional parameter.

Example:
$ cf create-service elephantsql hippo my-db -c '{"region": "amazon-web-services::eu-west-3"}'