rds-broker

command module
v0.0.0-...-3eaf441 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2016 License: CC0-1.0 Imports: 25 Imported by: 0

README

Cloud Foundry RDS Service Broker

wercker status

Cloud Foundry Service Broker to manage RDS instances and a shared RDS Database.

Setup

There are important environment variables that should be overriden inside the manifest.yml file

Note: All environment variables prefixed with DB_ refer to attributes for the database the broker itself will use for internal uses.

  1. DB_URL: The hostname / IP address of the database.
  2. DB_PORT: The port number to access the database.
  3. DB_NAME: The database name.
  4. DB_USER: Username to access the database.
  5. DB_PASS: Password to access the database.
  6. DB_TYPE: The type of database. Currently supported types: postgres and sqlite3.
  7. DB_SSLMODE: The type of SSL Mode to use when connecting to the database. Supported modes: disabled, require and verify-ca.
  8. AWS_ACCESS_KEY_ID: The id credential with access to make requests to the Amazon RDS .
  9. AWS_SECRET_ACCESS_KEY: The secret key (treat like a password) credential to access Amazon RDS.
  10. INSTANCE_TAGS: Tags for the RDS instances.
  11. AWS_SEC_GROUP: The security group for the RDS instances (sg-xxxx).
  12. AWS_DB_SUBNET_GROUP: The name of DB subnet group for the RDS instances.

Note the AWS Environment Variables should be generated by following the instructions here

Make sure the account has write access to RDS and EC2 (particularly for VPC and Subnet).

Example of permissions that suffice: AmazonRDSFullAccess and AmazonEC2FullAccess

How to deploy it

  1. cf push
  2. cf create-service-broker SERVICE-NAME USER PASS https://BROKER-URL
  3. cf enable-service-access rds

How to use it

To use the service you need to create a service instance and bind it:

  1. cf create-service rds shared-psql MYDB
  2. cf bind-service APP MYDB

When you do that you will have all the credentials in the VCAP_SERVICES environment variable with the JSON key rds.

Also, you will have a DATABASE_URL environment variable that will be the connection string to the DB.

Public domain

This project is in the worldwide public domain. As stated in CONTRIBUTING:

This project is in the public domain within the United States, and copyright and related rights in the work worldwide are waived through the CC0 1.0 Universal public domain dedication.

All contributions to this project will be released under the CC0 dedication. By submitting a pull request, you are agreeing to comply with this waiver of copyright interest.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Godeps
_workspace/src/github.com/aws/aws-sdk-go/aws
Package aws provides core functionality for making requests to AWS services.
Package aws provides core functionality for making requests to AWS services.
_workspace/src/github.com/aws/aws-sdk-go/aws/awserr
Package awserr represents API error interface accessors for the SDK.
Package awserr represents API error interface accessors for the SDK.
_workspace/src/github.com/aws/aws-sdk-go/aws/credentials
Package credentials provides credential retrieval and management The Credentials is the primary method of getting access to and managing credentials Values.
Package credentials provides credential retrieval and management The Credentials is the primary method of getting access to and managing credentials Values.
_workspace/src/github.com/aws/aws-sdk-go/internal/endpoints
Package endpoints validates regional endpoints for services.
Package endpoints validates regional endpoints for services.
_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/ec2query
Package ec2query provides serialisation of AWS EC2 requests and responses.
Package ec2query provides serialisation of AWS EC2 requests and responses.
_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/query
Package query provides serialisation of AWS query requests, and responses.
Package query provides serialisation of AWS query requests, and responses.
_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/rest
Package rest provides RESTful serialisation of AWS requests and responses.
Package rest provides RESTful serialisation of AWS requests and responses.
_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/xml/xmlutil
Package xmlutil provides XML serialisation of AWS requests and responses.
Package xmlutil provides XML serialisation of AWS requests and responses.
_workspace/src/github.com/aws/aws-sdk-go/internal/signer/v4
Package v4 implements signing for AWS V4 signer
Package v4 implements signing for AWS V4 signer
_workspace/src/github.com/aws/aws-sdk-go/service/ec2
Package ec2 provides a client for Amazon Elastic Compute Cloud.
Package ec2 provides a client for Amazon Elastic Compute Cloud.
_workspace/src/github.com/aws/aws-sdk-go/service/ec2/ec2iface
Package ec2iface provides an interface for the Amazon Elastic Compute Cloud.
Package ec2iface provides an interface for the Amazon Elastic Compute Cloud.
_workspace/src/github.com/aws/aws-sdk-go/service/rds
Package rds provides a client for Amazon Relational Database Service.
Package rds provides a client for Amazon Relational Database Service.
_workspace/src/github.com/aws/aws-sdk-go/service/rds/rdsiface
Package rdsiface provides an interface for the Amazon Relational Database Service.
Package rdsiface provides an interface for the Amazon Relational Database Service.
_workspace/src/github.com/codegangsta/inject
Package inject provides utilities for mapping and injecting dependencies in various ways.
Package inject provides utilities for mapping and injecting dependencies in various ways.
_workspace/src/github.com/go-martini/martini
Package martini is a powerful package for quickly writing modular web applications/services in Golang.
Package martini is a powerful package for quickly writing modular web applications/services in Golang.
_workspace/src/github.com/lib/pq
Package pq is a pure Go Postgres driver for the database/sql package.
Package pq is a pure Go Postgres driver for the database/sql package.
_workspace/src/github.com/lib/pq/listen_example
Below you will find a self-contained Go program which uses the LISTEN / NOTIFY mechanism to avoid polling the database while waiting for more work to arrive.
Below you will find a self-contained Go program which uses the LISTEN / NOTIFY mechanism to avoid polling the database while waiting for more work to arrive.
_workspace/src/github.com/lib/pq/oid
Package oid contains OID constants as defined by the Postgres server.
Package oid contains OID constants as defined by the Postgres server.
_workspace/src/github.com/martini-contrib/render
Package render is a middleware for Martini that provides easy JSON serialization and HTML template rendering.
Package render is a middleware for Martini that provides easy JSON serialization and HTML template rendering.
_workspace/src/github.com/mattn/go-sqlite3
Package sqlite3 provides interface to SQLite3 databases.
Package sqlite3 provides interface to SQLite3 databases.
_workspace/src/github.com/oxtoacart/bpool
Package bpool implements leaky pools of byte arrays and Buffers as bounded channels.
Package bpool implements leaky pools of byte arrays and Buffers as bounded channels.
_workspace/src/github.com/vaughan0/go-ini
Package ini provides functions for parsing INI configuration files.
Package ini provides functions for parsing INI configuration files.
_workspace/src/gopkg.in/yaml.v2
Package yaml implements YAML support for the Go language.
Package yaml implements YAML support for the Go language.

Jump to

Keyboard shortcuts

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