go_service_broker

module
v0.0.0-...-a003d8d Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2015 License: Apache-2.0

README

go_service_broker

This is a service broker written in Go Language for Cloud Foundry.

  • The service broker supports asynchronously creating EC2 instances with arbitrary parameters. The state of the instance (in progress/succeeded/failed) can be retrieved later.
  • The service broker also support service key feature which means application is not required when binding a service instance. The credentials of the service instance will be created.
  • 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.

This sample project has been presented in CF Summit 2015. Please refer to the presentation and demo videos on youtube:

Getting Started

  • Clone the git repository and setup go environment, make sure $GOPATH is correctly setup.

  • Install godep.

$ go get github.com/tools/godep
  • Build godep.
$ cd ../../tools/godep/
$ go build
$ export PATH=$PATH:$GOPATH/bin
  • Download and install packages with dependencies by using godep.
$ cd -
$ godep get ./...
  • Save the dependencies by godep.
$ godep save ./...
  • Build your executable out/broker.
$ bin/build
  • Before running the service broker, you need to configure your AWS credentials. As 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. Once you get a Access Key ID and Secret Access Key, copy and save it into ~/.aws/credentials file, which might look like:
[default]
aws_access_key_id = AKID1234567890
aws_secret_access_key = MY-SECRET-KEY
  • Run the executable to start the service broker which will listening on port 8001 by default.
$ out/broker

License

This is under Apache 2.0 OSS license.

Directories

Path Synopsis
Godeps
_workspace/src/code.google.com/p/go.crypto/ssh
Package ssh implements an SSH client and server.
Package ssh implements an SSH client and server.
_workspace/src/code.google.com/p/go.crypto/ssh/agent
Package agent implements a client to an ssh-agent daemon.
Package agent implements a client to an ssh-agent daemon.
_workspace/src/code.google.com/p/go.crypto/ssh/terminal
Package terminal provides support functions for dealing with terminals, as commonly found on UNIX systems.
Package terminal provides support functions for dealing with terminals, as commonly found on UNIX systems.
_workspace/src/code.google.com/p/go.crypto/ssh/test
This package contains integration tests for the code.google.com/p/go.crypto/ssh package.
This package contains integration tests for the code.google.com/p/go.crypto/ssh package.
_workspace/src/github.com/awslabs/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/awslabs/aws-sdk-go/internal/apierr
Package apierr represents API error types.
Package apierr represents API error types.
_workspace/src/github.com/awslabs/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/gorilla/context
Package context stores values shared during a request lifetime.
Package context stores values shared during a request lifetime.
_workspace/src/github.com/gorilla/mux
Package gorilla/mux implements a request router and dispatcher.
Package gorilla/mux implements a request router and dispatcher.
_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.

Jump to

Keyboard shortcuts

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