paas-compose-broker

command module
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2018 License: MIT Imports: 11 Imported by: 0

README

PaaS Compose Service Broker

This is a work-in-progress implementation of a service broker for services provisioned via the Compose API. It is intended to be deployed as a CloudFoundry application.

Deployment

  • Use the example catalog:

    cp examples/catalog.json .
    
  • Deploy to Cloud Foundry:

    cf push --no-start
    
  • Set the required environment variables:

    cf set-env compose-broker USERNAME compose-broker
    cf set-env compose-broker PASSWORD unguessable
    
  • Start the app:

    cf start compose-broker
    
  • Check the catalog endpoint:

    curl -k -u compose-broker:unguessable https://compose-broker.${DEPLOY_ENV}.cloudfoundry-apps-domain.example.com/v2/catalog
    
  • Register the service broker:

     cf update-service-broker compose-broker compose-broker "$COMPOSE_BROKER_PASS" "https://compose-broker.${APPS_DNS_ZONE_NAME}"
    
  • Enable the service:

    cf enable-service-access mongodb
    cf enable-service-access elasticsearch
    

Environmental variables

USERNAME - broker user name used for basic authentication PASSWORD - username password DB_PREFIX - a prefix that can be used to tag instances. Defaults to compose-broker CLUSTER_NAME - a name of your enterprise cluster if you've got one and want to use it. Defaults to hosted compose COMPOSE_API_KEY - your API key for Compose.

Running tests

Prerequisites:

  • Ginkgo version >= 1.4.0
  • An API key for Compose if running the full tests.

To run all tests (including integration tests):

COMPOSE_API_KEY=<key> make test

To only run the unit tests:

make unit

We automatically generate a fake client, but if you want to regenerate it:

make -B compose/fakes/fake_client.go

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
client
fakes
Code generated by counterfeiter.
Code generated by counterfeiter.
fakes
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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