This is an experimental Cloud Foundry Service Broker for Amazon Relational Database Service (RDS) supporting Aurora, MariaDB, MySQL and PostgreSQL RDS Databases.
More details can be found at this Pivotal P.O.V Blog post.
This is NOT presently a production ready Service Broker. This is a work in progress. It is suitable for experimentation and may not become supported in the future.
Using the standard go install
(you must have Go already installed in your local machine):
$ go install github.com/cloudfoundry-community/pe-rds-broker
$ rds-broker -port=3000 -config=<path-to-your-config-file>
The broker can be deployed to an already existing Cloud Foundry installation:
$ git clone https://github.com/cloudfoundry-community/pe-rds-broker.git
$ cd rds-broker
Modify the included manifest file to include your AWS credentials and optionally the sample configuration file. Then you can push the broker to your Cloud Foundry environment:
$ cp config-sample.json config.json
$ cf push rds-broker
If you want to run the AWS RDS Service Broker on a Docker container, you can use the cfplatformeng/rds-broker Docker image.
$ docker run -d --name rds-broker -p 3000:3000 \
-e AWS_ACCESS_KEY_ID=<your-aws-access-key-id> \
-e AWS_SECRET_ACCESS_KEY=<your-aws-secret-access-key> \
cfplatformeng/rds-broker
The Docker image cames with an embedded sample configuration file. If you want to override it, you can create the Docker image with you custom configuration file by running:
$ git clone https://github.com/cloudfoundry-community/pe-rds-broker.git
$ cd rds-broker
$ bin/build-docker-image
This broker can be deployed using the AWS Service Broker BOSH Release.
Refer to the Configuration instructions for details about configuring this broker.
This broker gets the AWS credentials from the environment variables AWS_ACCESS_KEY_ID
and AWS_SECRET_ACCESS_KEY
. It requires a user with some IAM & RDS permissions. Refer to the iam_policy.json file to check what actions the user must be allowed to perform.
Configure and deploy the broker using one of the above methods. Then:
- Check that your Cloud Foundry installation supports Service Broker API Version v2.6 or greater
- Register the broker within your Cloud Foundry installation;
- Make Services and Plans public;
- Depending on your Cloud Foundry settings, you migh also need to create/bind an Application Security Group to allow access to the RDS DB Instances.
Application Developers can start to consume the services using the standard CF CLI commands.
Depending on the broker configuration, Application Depevelopers can send arbitrary parameters on certain broker calls:
Provision calls support the following optional arbitrary parameters:
Option | Type | Description |
---|---|---|
backup_retention_period | Integer | The number of days that Amazon RDS should retain automatic backups of the DB instance (between 0 and 35 ) (*) |
character_set_name | String | For supported engines, indicates that the DB instance should be associated with the specified CharacterSet (*) |
dbname | String | The name of the Database to be provisioned. If it does not exists, the broker will create it, otherwise, it will reuse the existing one. If this parameter is not set, the broker will use a random Database name |
preferred_backup_window | String | The daily time range during which automated backups are created if automated backups are enabled (*) |
preferred_maintenance_window | String | The weekly time range during which system maintenance can occur (*) |
(*) Refer to the Amazon Relational Database Service Documentation for more details about how to set these properties
Update calls support the following optional arbitrary parameters:
Option | Type | Description |
---|---|---|
apply_immediately | Boolean | Specifies whether the modifications in this request and any pending modifications are asynchronously applied as soon as possible, regardless of the Preferred Maintenance Window setting for the DB instance (*) |
backup_retention_period | Integer | The number of days that Amazon RDS should retain automatic backups of the DB instance (between 0 and 35 ) (*) |
preferred_backup_window | String | The daily time range during which automated backups are created if automated backups are enabled (*) |
preferred_maintenance_window | String | The weekly time range during which system maintenance can occur (*) |
(*) Refer to the Amazon Relational Database Service Documentation for more details about how to set these properties
Bind calls support the following optional arbitrary parameters:
Option | Type | Description |
---|---|---|
dbname | String | The name of the Database to bind the application to (it must be provisioned previously) |
In the spirit of free software, everyone is encouraged to help improve this project.
Here are some ways you can contribute:
- by using alpha, beta, and prerelease versions
- by reporting bugs
- by suggesting new features
- by writing or editing documentation
- by writing specifications
- by writing code (no patch is too small: fix typos, add comments, clean up inconsistent whitespace)
- by refactoring code
- by closing issues
- by reviewing patches
We use the GitHub issue tracker to track bugs and features. Before submitting a bug report or feature request, check to make sure it hasn't already been submitted. You can indicate support for an existing issue by voting it up. When submitting a bug report, please include a Gist that includes a stack trace and any details that may be necessary to reproduce the bug, including your Golang version and operating system. Ideally, a bug report should include a pull request with failing specs.
- Fork the project.
- Create a topic branch.
- Implement your feature or bug fix.
- Commit and push your changes.
- Submit a pull request.
Copyright (c) 2015 Pivotal Software Inc. See LICENSE for details.