{"id":37164024,"url":"https://github.com/cloudfoundry-samples/go_service_broker","last_synced_at":"2026-01-14T19:29:46.915Z","repository":{"id":30417471,"uuid":"33970366","full_name":"cloudfoundry-samples/go_service_broker","owner":"cloudfoundry-samples","description":"A sample CloudFoundry service broker written in Golang","archived":false,"fork":false,"pushed_at":"2020-10-05T18:45:22.000Z","size":3682,"stargazers_count":27,"open_issues_count":12,"forks_count":33,"subscribers_count":12,"default_branch":"master","last_synced_at":"2024-11-08T11:51:36.542Z","etag":null,"topics":[],"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/cloudfoundry-samples.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":"2015-04-15T03:09:45.000Z","updated_at":"2023-03-22T18:20:23.000Z","dependencies_parsed_at":"2022-09-08T10:40:54.147Z","dependency_job_id":null,"html_url":"https://github.com/cloudfoundry-samples/go_service_broker","commit_stats":null,"previous_names":["xingzhou/go_service_broker"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cloudfoundry-samples/go_service_broker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudfoundry-samples%2Fgo_service_broker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudfoundry-samples%2Fgo_service_broker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudfoundry-samples%2Fgo_service_broker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudfoundry-samples%2Fgo_service_broker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cloudfoundry-samples","download_url":"https://codeload.github.com/cloudfoundry-samples/go_service_broker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudfoundry-samples%2Fgo_service_broker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28432617,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T18:57:19.464Z","status":"ssl_error","status_checked_at":"2026-01-14T18:52:48.501Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2026-01-14T19:29:46.228Z","updated_at":"2026-01-14T19:29:46.901Z","avatar_url":"https://github.com/cloudfoundry-samples.png","language":"Go","readme":"[![Join the chat at https://gitter.im/cloudfoundry-samples/go_service_broker](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/cloudfoundry-samples/go_service_broker?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\ngo_service_broker\n=================\n\nThis is a service broker written in Go Language for Cloud Foundry. This service broker supports creating VMs on AWS or SoftLayer. Since VMs take some to spin up creating them is done asynchronously. \n\nThis broker also supports creating service keys. This is a new feature added to the Service Broker v2.6 APIs. In this broker we implement service keys by creating SSH keys and adding them to the VM.\n\nFinally, this broker also supports arbitrary service parameters. For AWS this is done by allowing the user to pass the `ami-id` to use when spinning up the VM. And for SoftLayer you can specify the Virtual Guest Device Block Device Template Group ID.\n\nNOTE that for AWS, in this implementation, service bind operation will generate a keypair and inject the public key into that EC2 instance and return the corresponding credentials including private key, user name and public IP address information which can be used to ssh login that EC2 instance. The service unbind operation will revoke that public key from the EC2 instance.\n\nPresentations\n=============\n\nThis sample project has been presented in CF Summit 2015:\n\n* [Presentation on CloudFoundry Summit 2015](https://www.youtube.com/watch?v=MrSy4iZZPZE)\n\nVideos for each of the main features of the brokers are in these Youtube videos:\n\n* [Service Async Demo video](https://www.youtube.com/watch?v=Ij5KSKrAq9Q)\n* [Service Key Demo video](https://www.youtube.com/watch?v=V5uzLcPQPmo)\n* [Service Arbitrary Parameters Demo video](https://www.youtube.com/watch?v=Qc3bZljGscs)\n\nThe following blog post on IBM's OpenTech web site covers the broker in much details:\n\n* [CloudFoundry Services Keys and Sample Go Service Broker](https://developer.ibm.com/opentech/2015/07/09/cloudfoundry-services-keys-and-sample-go-service-broker/)\n\nGetting Started\n===============\n\nGet Latest Executable: go_service_broker\n----------------------------------------\n\nAssuming you have a valid [Golang 1.4.2](https://golang.org/dl/) or [later](https://golang.org/dl/) installed for your system, you can quickly build and get the latest `go_service_broker` executable by running the following `go` command:\n\n```\n$ go get github.com/cloudfoundry-samples/go_service_broker\n```\n\nThis will build and place the `go_service_broker` executable built for your operating system in your `$GOPATH/bin` directory.\n\n\nBuilding From Source\n--------------------\n\nClone this repo and build it. Using the following commands on a Linux or Mac OS X system:\n\n```\n$ mkdir -p go_service_broker/src/github.com/cloudfoundry-samples\n$ export GOPATH=$(pwd)/go_service_broker:$GOPATH\n$ cd go_service_broker/src/github.com/cloudfoundry-samples\n$ git clone https://github.com/cloudfoundry-samples/go_service_broker.git\n$ cd go_service_broker\n$ godep restore\n$ ./bin/build\n```\n\nNOTE: you may need to install [godep](https://github.com/tools/godep) on your system, if you have not already. You can with this one line command: `$ go get github.com/tools/godep`\n\nNOTE2: if you get any dependency errors, then use `go get path/to/dependency` to get it, e.g., `go get github.com/onsi/ginkgo` and `go get github.com/onsi/gomega`\n\nThe executable output should now be located in: `out/go_service_broker`. Place it wherever you want, e.g., `/usr/local/bin` on Linux or Mac OS X.\n\nDependencies\n------------\n\nInstall `godep`.\n\n```\n$ go get github.com/tools/godep\n```\n\nDownload and install packages with dependencies by using godep.\n\n```\n$ cd -\n$ godep get ./...\n```\n\nSave the dependencies by godep.\n\n```\n$ godep save ./...\n```\n\nBuild your executable `out/go_service_broker`.\n\n```\n$ bin/build\n```\n\nConfiguring for AWS\n-------------------\n\nBefore running the service broker, you need to configure your AWS account's credentials. If you do not have AWS account, then you can get one for [free here](https://aws.amazon.com/free).\n\nAs a best practice, we recommend creating an IAM user that has access keys rather than relying on root access keys. You can login into your AWS account to create a new user 'service_broker' with the option to generate an access key for this user. \n\nOnce you get a Access Key ID and Secret Access Key, copy and save it into `~/.aws/credentials` file, which might look like:\n\n```\n[default]\naws_access_key_id = YOUR-AWS-ACCESS-KEY-ID\naws_secret_access_key = YOUR-AWS-SECRET-ACCESS-KEY\n```\n\nConfiguring for SoftLayer\n-------------------------\n\nFor SoftLayer the configuration requires you to supply your SL user name and API key. If you do not have an SL account, please get one for [free here](http://www.softlayer.com/promo/freeCloud/freecloud). The API key can be requested once you login to your account.\n\nYou need to setup two environment variables with your SL credentials as follows.\n\n```\n$ export SL_USERNAME=your-softlayer-username@your-company.com\n$ export SL_API_KEY=YOUR-SOFTLAYER-API-KEY\n```\n\nThese two environment variables must exist where you run your broker. Locally, in a VM or server process, or whithin CloudFoundry. See below on details on how to run broker in CF or locally.\n\nRunning Broker\n==============\n\nThe broker can be ran in one of two modes: locally or as an app in a CF environment.\n\nLocally\n-------\n\nRun the executable to start the service broker which will listening on port `8001` by default.\n\n```\n$ out/go_service_broker --cloud AWS\n```\n\nThis will run the broker in `AWS` mode. You can also specify `SoftLayer` mode with:\n\n```\n$ out/go_service_broker --cloud SoftLayer\n```\n\nIf no argument is passed to the `--cloud` flag then AWS mode is assumed/\n\n\nIn CF\n-----\n\nWhen running the broker in a CF environment (including [BOSH lite](https://github.com/cloudfoundry/bosh-lite)). You simply need to:\n\n```\n$ git clone https://github.com/cloudfoundry-samples/go_service_broker.git\n$ cd go_service_broker\n$ cf push\n```\n\nYou, of course, need to have the [CF CLI](https://github.com/cloudfoundry/cli) installed into your system. Also, you can edit the `Procfile` if you want to specify a different mode (AWS or SoftLayer) as well as any additional optional parameters to the CF Golang buildpacks.\n\nUsing Broker\n============\n\nTODO\n\nLicense\n=======\nThis is under [Apache 2.0 OSS license](https://github.com/cloudfoundry-samples/go_service_broker/LICENSE).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudfoundry-samples%2Fgo_service_broker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloudfoundry-samples%2Fgo_service_broker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudfoundry-samples%2Fgo_service_broker/lists"}