Coder Social home page Coder Social logo

pivotal-cf / on-demand-services-sdk Goto Github PK

View Code? Open in Web Editor NEW
13.0 82.0 13.0 4.82 MB

SDK for building Service Adapters for the Cloud Foundry On-Demand Service Broker

Home Page: https://docs.pivotal.io/on-demand-service-broker/creating.html#sdk

License: Apache License 2.0

Go 99.23% Shell 0.77%
cloudfoundry golang-library sdk-go on-demand-broker service-broker

on-demand-services-sdk's Introduction

Build Service Adapters for the Cloud Foundry On-Demand Service Broker (ODB) in Golang


This is an SDK for writing service adapters for ODB in Golang. It encapsulates the command line invocation handling, parameter parsing, response serialization and error handling so the adapter authors can focus on the service-specific logic in the adapter. This will speed up the time to meeting the service author deliverables outlined here.

Before creating a service adapter you will need to have BOSH release for the service that you wish to deploy.

After creating the service adapter and service BOSH release, you will be able to configure the ODB provision new dedicated service instances from Cloud Foundry!


Usage

Please use the SDK tag that matches the ODB release you are targeting.

For example if using ODB 0.15.1 release, use the 0.15.1 SDK tag.

Getting Started

Follow this guide to try out an example product.

Examples Service Adapters

Kafka Service Adapter: https://github.com/pivotal-cf-experimental/kafka-example-service-adapter

Redis Service Adapter: https://github.com/pivotal-cf-experimental/redis-example-service-adapter

Packaging

To integrate with the ODB we recommend that you package the service adapter in a BOSH release.

Examples

Kafka Service Adapter Release: https://github.com/pivotal-cf-experimental/kafka-example-service-adapter-release

Redis Service Adapter Release: https://github.com/pivotal-cf-experimental/redis-example-service-adapter-release


Documentation

SDK Documentation: https://docs.pivotal.io/on-demand-service-broker/creating.html#sdk

On-Demand Services Documentation: https://docs.pivotal.io/on-demand-service-broker/index.html


On Demand Services SDK

Copyright (c) 2016 - Present Pivotal Software, Inc. All Rights Reserved.

This product is licensed to you under the Apache License, Version 2.0 (the "License").
You may not use this product except in compliance with the License.

This product may include a number of subcomponents with separate copyright notices and license terms. Your use of these subcomponents is subject to the terms and conditions of the subcomponent's license, as noted in the LICENSE file.

on-demand-services-sdk's People

Contributors

abg avatar alex-slynko avatar avade avatar blgm avatar craigfurman avatar dependabot-preview[bot] avatar dependabot[bot] avatar dlresende avatar felisiam avatar frodenas avatar gabrielecipriano avatar gagank4ur avatar jacknewberry avatar kirederik avatar mariantalla avatar ryanwittrup avatar simonjjones avatar st3v avatar terminatingcode avatar tinygrasshopper avatar winnab avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

on-demand-services-sdk's Issues

Generated manifest only supports per-instance-group properties

With BOSH 2.0 it's encouraged to un-namespace properties (e.g. atc.bind_port just becomes bind_port since it's already on the atc job) and use per-job properties in the manifest.

The current manifest scheme only supports two tiers of properties: the toplevel global ones, and the per-instance-group properties. We'll need per-job properties for Concourse as we have multiple jobs with the same property name (e.g. bind_port), and these jobs are typically co-located.

Another quirk of this is that each job will minimally need an empty properties: {} section on each job entry to convince BOSH to not do silly global property namespace flattening (which in our case would result in two colocated jobs with different defaults for bind_port dueling for whose default wins, and both trying to bind on the same port).

Parsing the manifest fails if max_in_flight is set with a percentage

Hello there.

In the docs (http://bosh.io/docs/manifest-v2.html#update) it’s stated that max_in_flight can be an integer or a percentage. We’re trying to use percentage and we’re having the error cannot unmarshal !!str "100%" into int

Trying to track the source of the problem, we found that int the file/line below, MaxInFlight is defined as an int, which is probably the problem.

MaxInFlight int `yaml:"max_in_flight"`

I could do a PR to change it to string, but I don't really know the implications of this.

Any thoughts?

Add support for advanced BOSH agent configuration for an instance group

I have a service adapter that needs to make use of the advanced BOSH agent configuration, however currently the InstanceGroups struct does not support the env [Hash, optional] functionality of BOSH.

See: https://github.com/pivotal-cf/on-demand-services-sdk/blob/master/bosh/bosh_manifest.go#L46

Specifically I need to configure the BOSH agent instance group with both string and bosh [Hash, optional] values

The generated manifest would look something like:

env:
  bosh:
    swap_size: 0
  persistent_disk_fs: xfs

You can look at https://bosh.io/docs/manifest-v2.html for more info on the advanced BOSH agent configuration.

Can we add input mapping support on-demand service?

E.g. For a service that use keepalived to do high availability. One additional IP address(this address can not be managed by bosh) need to be assigned to each deployment.
The use case looks like tihs:

  1. An operator inputs a IP range (e.g. 192.168.0.1 to 192.168.0.100) in Ops Manager for that on-demand service tile.
  2. A user creates a service, and our broker picks up a value in that IP range(e.g. 192.168.0.1), and assigns to this deployment.
  3. A user deletes a service, and our broker releases that IP (e.g. 192.168.0.1) .

To support this requirement, what we need to implement is:

  1. persistent storage (E.g. a internal database ) to store used and available data
  2. Events: create service sucessfully/failed, and service is deleted. to notify our service adapter to allocate/release the IP( and any values that needs managed)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.