A brokerpak for the Cloud Service Broker that provides support for AWS services.
- Either an up-to-date version of Go or Docker
- make - covers development lifecycle steps
To provision services, the brokerpak currently requires AWS access key id and secret. The brokerpak expects them in environment variables:
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
A Makefile supports the full local development lifecycle for the brokerpak.
The make targets can be run either with Docker or installing the required libraries in the local OS.
Available make targets can be listed by running make
.
- Install Docker
- Launch an interactive shell into some supported image containing all necessary tools. For example:
# From the root of this repo run: docker run -it --rm -v "${PWD}:/repo" --workdir "/repo" --entrypoint "/bin/bash" golang:latest make
- Make sure you have the right Go version installed (see
go.mod
file).
The make targets will build the source using the local go installation.
There is a make target to push the broker and brokerpak into a CloudFoundry foundation. It will be necessary to manually configure a few items for the broker to work.
make push-broker
willcf push
the broker into CloudFoundry. Requires thecf
cli to be installed.
The broker gets pushed into CloudFoundry as cloud-service-broker-aws. It will be necessary to bind a MySQL database to the broker to provide broker state storage. See AWS Installation docs for more info.
The version of Cloud Service Broker to use with this brokerpak is encoded in the go.mod
file.
The make targets will use this version by default.
Services definitions declare examples for each plan they provide. Those examples are then run through the whole cycle of provision
, bind
, unbind
, and delete
when running
$ make examples # Lists example tests
$ make run-examples # Runs example tests
See acceptance tests
Integration tests can be run with the following command:
make run-integration-tests