GithubHelp home page GithubHelp logo

cloudfoundry / csb-brokerpak-gcp Goto Github PK

View Code? Open in Web Editor NEW
6.0 10.0 8.0 83.7 MB

License: Apache License 2.0

Shell 5.01% JavaScript 0.60% HCL 11.80% Makefile 2.06% Go 78.94% Java 1.58%
cff-wg-service-management

csb-brokerpak-gcp's Introduction

csb-brokerpak-gcp

A brokerpak for the Cloud Service Broker that provides support for GCP services.

Development Requirements

  • Either an up-to-date version of Go or Docker
  • make - covers development lifecycle steps

GCP account information

To provision services, the brokerpak currently requires GCP credentials. The brokerpak expects them in environment variables:

  • GOOGLE_CREDENTIALS
  • GOOGLE_PROJECT

Development Tools

A Makefile supports the full local development lifecycle for the brokerpak.

The make targets can be run either with Docker or installing the required libraries in the local OS.

Available make targets can be listed by running make.

Running with docker

  1. Install Docker
  2. Launch an interactive shell into some supported image containing all necessary tools. For example:
    # From the root of this repo run:
    docker run -it --rm -v "${PWD}:/repo" --workdir "/repo" --entrypoint "/bin/bash" golang:latest
    make
    

Running with Go

  1. Make sure you have the right Go version installed (see go.mod file).

The make targets will build the source using the local go installation.

Other targets

There is a make target to push the broker and brokerpak into a CloudFoundry foundation. It will be necessary to manually configure a few items for the broker to work.

  • make push-broker will cf push the broker into CloudFoundry. Requires the cf cli to be installed.
  • make run-integration-tests will test the brokerpak with the latest version of CSB

The broker gets pushed into CloudFoundry as cloud-service-broker-gcp It will be necessary to bind a MySQL database to the broker to provide broker state storage. See GCP Installation docs for more info.

Broker

The version of Cloud Service Broker to use with this brokerpak is encoded in the go.mod file. The make targets will use this version by default.

Tests

Example tests

Services definitions declare examples for each plan they provide. Those examples are then run through the whole cycle of provision, bind, unbind, and delete when running

terminal 1
>> make run

terminal 2
>> make run-examples

Acceptance tests

See acceptance tests

csb-brokerpak-gcp's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

csb-brokerpak-gcp's Issues

Unable to enable ssl on cloud-mysql instance

Is your feature request related to a problem? Please describe.
Hello ,
I have this service broker installed on our environment but it doesn't have ssl enabled when the cloud-sql instances are created.
Please let us know if there is any option to be specified to enable ssl when provisioning the cloudsql-mysql instances?

A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like

A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

[BUG] gcp postgresql fails binding second app

Description

When the spring-music-validator app is bound, it fails to start because the binding doesn't have permission to read the albums table. Something about the created credentials doesn't have access.

Expected Behavior

The second app should successfully bind

Actual Behavior

it fails to start because the binding doesn't have permission to read the albums table.

Possible Fix

Fix permissions, add GCP Postgres to acceptance testing

Steps to Reproduce

  1. Spin up an app (App A)
  2. Bind GCP Postgres
  3. Spin up another app (App B)
  4. Try to bind GCP Postgres to App B

Context

Team found this bug, but it has been de-prioritized until we have folks using the broker for GCP Postgres which, to our knowledge, we do not.

Your Environment

This will fail in all environments

Unable to create service instance - Google postgressql

Hi - I am using beta version of cloud service broker, and am getting the following error when I try to create the service instacne of the service broker.

Tile version: beta -> https://network.pivotal.io/products/cloud-service-broker-gcp/

Since I could not find the correct documentation, I tried with the documentation reference of gcp broker as it is similar in implementation.

Command used for create service:

cf create-service csb-google-postgres small debug11-postgressql -c '{"role":"cloudsql.editor"}'
Result: create failed.

cf service

Showing info of service debug11-postgressql in org pvt-internal / space sandbox as admin...

name: debug11-postgressql
service: csb-google-postgres
tags:
plan: small
description: PostgreSQL is a fully managed service for the Google Cloud Platform.
documentation: https://cloud.google.com/sql/docs/postgres
dashboard:
service broker: cloud-service-broker-gcp

Showing status of last operation from service debug11-postgressql...

status: create failed
message: Error: Error, failed to create instance csb-postgres-21c5e67d-78e2-4786-8301-f77667155fcb: googleapi: Error 400: Invalid request: At least one of Public IP or Private
IP connectivity must be enabled.., invalid on brokertemplate/definition.tf line 69, in resource "google_sql_database_instance" "instance": 69: resource
"google_sql_database_instance" "instance" { exit status 1
started: 2021-03-18T20:36:29Z
updated: 2021-03-18T20:37:33Z

There are no bound apps for this service.

Upgrades are not supported by this broker.

Please reply back on this.

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.