https://github.com/jamesclonk/elephantsql-broker
:elephant: an ElephantSQL service broker for :cloud: Cloud Foundry and :boat: Kubernetes
https://github.com/jamesclonk/elephantsql-broker
cloudfoundry elephantsql kubernetes postgres service-catalog servicebroker
Last synced: about 1 year ago
JSON representation
:elephant: an ElephantSQL service broker for :cloud: Cloud Foundry and :boat: Kubernetes
- Host: GitHub
- URL: https://github.com/jamesclonk/elephantsql-broker
- Owner: JamesClonk
- License: apache-2.0
- Created: 2019-09-27T13:28:01.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-03-10T15:13:13.000Z (about 4 years ago)
- Last Synced: 2025-03-28T19:38:30.847Z (about 1 year ago)
- Topics: cloudfoundry, elephantsql, kubernetes, postgres, service-catalog, servicebroker
- Language: Go
- Homepage:
- Size: 6.18 MB
- Stars: 3
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# :elephant: elephantsql-broker
[](https://circleci.com/gh/JamesClonk/elephantsql-broker)
[](https://github.com/JamesClonk/elephantsql-broker/blob/master/LICENSE)
[](https://developer.swisscom.com/)
> #### PostgreSQL as a Service
> Perfectly configured and optimized PostgreSQL databases ready in 2 minutes.
**elephantsql-broker** is an [ElephantSQL](https://www.elephantsql.com/) [service broker](https://www.openservicebrokerapi.org/) for [Cloud Foundry](https://www.cloudfoundry.org/) and [Kubernetes](https://kubernetes.io/)
## Usage
#### Deploy service broker to Cloud Foundry
1. create an API key for your ElephantSQL [account](https://customer.elephantsql.com/apikeys)
2. pick a Cloud Foundry provider.
I'd suggest the [Swisscom AppCloud](https://developer.swisscom.com/)
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

#### 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!

### 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"}'
```