{"id":21890448,"url":"https://github.com/jamesclonk/compose-broker","last_synced_at":"2025-04-15T11:38:53.582Z","repository":{"id":57533064,"uuid":"225030690","full_name":"JamesClonk/compose-broker","owner":"JamesClonk","description":":sparkles: a Compose.io service broker for :cloud: Cloud Foundry and :boat: Kubernetes","archived":false,"fork":false,"pushed_at":"2019-12-31T01:33:49.000Z","size":6863,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T19:38:30.417Z","etag":null,"topics":["cloudfoundry","elasticsearch","etcd","kubernetes","mongodb","mysql","postgres","rabbitmq","redis","rethinkdb","scylladb","servicebroker"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JamesClonk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-11-30T15:19:09.000Z","updated_at":"2020-07-15T20:34:00.000Z","dependencies_parsed_at":"2022-09-14T12:02:08.940Z","dependency_job_id":null,"html_url":"https://github.com/JamesClonk/compose-broker","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JamesClonk%2Fcompose-broker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JamesClonk%2Fcompose-broker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JamesClonk%2Fcompose-broker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JamesClonk%2Fcompose-broker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JamesClonk","download_url":"https://codeload.github.com/JamesClonk/compose-broker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249062090,"owners_count":21206622,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cloudfoundry","elasticsearch","etcd","kubernetes","mongodb","mysql","postgres","rabbitmq","redis","rethinkdb","scylladb","servicebroker"],"created_at":"2024-11-28T11:32:40.426Z","updated_at":"2025-04-15T11:38:53.562Z","avatar_url":"https://github.com/JamesClonk.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# :sparkles: compose-broker :game_die:\n\n[![CircleCI](https://circleci.com/gh/JamesClonk/compose-broker.svg?style=svg)](https://circleci.com/gh/JamesClonk/compose-broker)\n[![License](https://img.shields.io/badge/license-Apache--2.0-blue)](https://github.com/JamesClonk/compose-broker/blob/master/LICENSE)\n[![Platform](https://img.shields.io/badge/platform-Cloud%20Foundry-lightgrey)](https://developer.swisscom.com/)\n\n\u003e #### Conquer the Data Layer\n\u003e Performance and reliable data layers for developers who'd rather spend their time building apps than managing databases.\n\n**compose-broker** is a [Compose.io](https://www.compose.com/) [service broker](https://www.openservicebrokerapi.org/) for [Cloud Foundry](https://www.cloudfoundry.org/) and [Kubernetes](https://kubernetes.io/)\n\nIt supports databases and services such as:\n- [🐘 PostgreSQL](https://www.compose.com/databases/postgresql)\n- [🐬 MySQL](https://www.compose.com/databases/mysql)\n- [👻 RethinkDB](https://www.compose.com/databases/rethinkdb)\n- [🐙 ScyllaDB (Cassandra)](https://www.compose.com/databases/scylladb)\n- [🕷 Elasticsearch](https://www.compose.com/databases/elasticsearch)\n- [🐦 Redis](https://www.compose.com/databases/redis)\n- [🐟 etcd](https://www.compose.com/databases/etcd)\n- [🐇 RabbitMQ](https://www.compose.com/databases/rabbitmq)\n\n## Usage\n\n#### Deploy service broker to Cloud Foundry\n\n1. create an [API Token](https://app.compose.io/oauth/api_tokens) on your Compose.io [account](https://app.compose.io/account)\n2. pick a Cloud Foundry provider.\n   I'd suggest the [Swisscom AppCloud](https://developer.swisscom.com/)\n3. push the app, providing the API key and a username/password to secure the service broker with\n4. register the service broker in your space (`--space-scoped`)\n5. check `cf marketplace` to see your new available service plans\n\n![create service broker](https://raw.githubusercontent.com/JamesClonk/compose-broker/recordings/setup-min.gif \"create service broker\")\n\n#### Provision new databases\n\n1. create a new service instance (`cf cs`)\n2. bind the service instance to your app (`cf bs`), or create a service key (`cf csk`)\n3. inspect the service binding/key, have a look at the credentials (`cf env`/`cf sk`)\n4. use the given credentials to connect to your new database\n5. enjoy!\n\n![provision service](https://raw.githubusercontent.com/JamesClonk/compose-broker/recordings/provisioning-min.gif \"provision service\")\n\n## Configuration\n\nAll configuration of the service broker is done through environment variables (provided by `manifest.yml` during a `cf push`) and the included `catalog.yml`.\n\n### manifest.yml\n\nPossible configuration values are:\n```yaml\nBROKER_LOG_LEVEL: info # optional, can be set to debug, info, warning, error or fatal, defaults to info\nBROKER_LOG_TIMESTAMP: false # optional, add timestamp to logging messages (not needed when deployed on Cloud Foundry), defaults to false\nBROKER_SKIP_SSL_VALIDATION: false, # optional, disables SSL certificate verification for API calls, defaults to false\nBROKER_AUTH_USERNAME: broker-username # required, HTTP basic auth username to secure service broker with\nBROKER_AUTH_PASSWORD: broker-password # required, HTTP basic auth password to secure service broker with\nBROKER_CATALOG_FILENAME: catalog.yml # optional, filename containing all catalog information, defaults to catalog.yml\nCOMPOSE_API_URL: https://api.compose.io/2016-07/ # optional, Base URL of Compose.io API, defaults to https://api.compose.io/2016-07\nCOMPOSE_API_TOKEN: e7fb89a0-26f8-4ee5-890e-3c68079b15ea # required, Compose.io API Token\nCOMPOSE_API_DEFAULT_DATACENTER: gce:europe-west1 # optional, defaults to aws:eu-central-1\nCOMPOSE_API_DEFAULT_ACCOUNT_ID: 586eab527c65836dde5533e8 # optional, service broker will try to read it from Compose.io API if not set\n```\n\n### catalog.yml\n\nThe service brokers provided `catalog.yml` configures all available services offerings and plans. (See [OSBAPI spec](https://github.com/openservicebrokerapi/servicebroker/blob/v2.15/spec.md#service-offering-object))\n\nAdjust this file to define your own different service plans with different deployment sizes / units. A plan's metadata allows for optionally configuring custom [unit](https://apidocs.compose.com/docs/scaling) sizes, enabling/disabling Redis' [cache mode](https://help.compose.com/docs/redis-cache-and-storage-modes), specifying explicit software versions or the [datacenter](https://apidocs.compose.com/docs/datacenters) to host the deployment. \n\nReview the included Redis example plans for these properties:\nhttps://github.com/JamesClonk/compose-broker/blob/f7331ef8cc1a18c7fc4b060931e0cb35e7580f5e/catalog.yml#L19-L59\n\n###### Plan metadata example:\n```yaml\nmetadata:\n  # Number of resource units to allocate to the deployment (optional, defaults to 1)\n  units: 2\n  # Whether to optimize the deployment to be used as a cache (optional, Redis only)\n  cache_mode: true\n  # Version of the software to deploy (optional)\n  version: \"4.0.14\"\n  # Datacenter to use for deployment (optional, defaults to $COMPOSE_API_DEFAULT_DATACENTER)\n  datacenter: aws:eu-central-1\n```\n\n#### Account ID \u0026 Datacenter\n\nBy default the service broker will provision new database deployments with the configured account id `COMPOSE_API_DEFAULT_ACCOUNT_ID` and datacenter `COMPOSE_API_DEFAULT_DATACENTER` (see `manifest.yml`).\nIf no account id is configured it will try to read the value over the Compose.io API and take the first account it finds.\nSimilarly if no datacenter is configured it will use `aws:eu-central-1` as default value.\n\nWhen issuing service provisioning requests to the service broker it is possible to provide the account id and/or the datacenter as additional parameters.\n###### Example:\n```bash\ncf create-service etcd default my-etcd -c '{\n  \"account_id\": \"454f3deb8cad236ffb3452e9\", \n  \"datacenter\": \"gce:europe-west1\"\n}'\n```\n\n#### Units\n\nWhen issuing service provisioning requests to the service broker it is also possible to request a specific [unit](https://apidocs.compose.com/docs/scaling) size (which basically determines the scaling for your Compose.io deployments, _memory_ and _disk space_) instead of the configured value in the service brokers `catalog.yml`.\n\nIt is also possible to update existing service instances with `cf update-service`.\n###### Example:\n```bash\ncf create-service scylla default my-scylla-db -c '{ \"units\": 10 }'\n# or\ncf update-service my-postgres-db -c '{ \"units\": 4 }'\n```\n\n#### Version\n\nLast but not least it is also possible during service provisioning to request specific software versions for your database deployments.\nYou can get all available versions from the [Compose.io API](https://apidocs.compose.com/reference#2016-07-get-databases): https://api.compose.io/2016-07/databases\n\n###### Example:\n```bash\ncf create-service rethink default my-rethinkdb -c '{ \"version\": \"2.3.7\" }'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamesclonk%2Fcompose-broker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjamesclonk%2Fcompose-broker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamesclonk%2Fcompose-broker/lists"}