cf mysql broker #1

  • By prismakov
  • Latest version (#1)
  • trusty
  • Stable
  • Edge

Description

CF MySQL Broker provides MySQL databases as a Cloud Foundry service.
This broker demonstrates the v2 services API between cloud controllers and service brokers.
The broker does not include a MySQL server. Instead, it is meant to be deployed alongside a MySQL server, which it manages.


Overview

This charm provides Cloud Foundry MySQL Broker.

CF MySQL Broker provides MySQL databases as a Cloud Foundry service.
This broker demonstrates the v2 services API between cloud controllers and service brokers.
The broker does not include a MySQL server. Instead, it is meant to be deployed alongside a MySQL server, which it manages.

The charm installs, configures and starts one daemon (upstart job) - cf-mysql-broker.

Usage

To deploy the MySQL Broker service:

juju deploy cf-mysql-broker

Managing MySQL service instance with CLI

You need:
- CF credentials (login and password)
- CF CLI installed
- Address of the CF Router from your CF deployment
- Address of the MySQL service broker from your CF deployment

  1. To get address of the router use Juju CLI:

$juju status cf-go-router

  1. Find line in the output like "public-address: 192.168.122.228"
    and use the address from it for the next command:

$cf api http://api.192.168.122.228.xip.io

Use this technique to get an address of the MySQL broker. It will be used later.

  1. Authenticate yourself in CF (instaed of "user" and "password" use your own values):

$cf auth user password

  1. Select a target organisation:

$cf target -o my-org

  1. If you have not created a space yet, create one:

$cf create-space my-space

  1. Select a target space:

$cf target -s my-space

  1. Register the service broker in CF. Use the broker address from the step 2:

$cf create-service-broker mysql cc secret http://192.168.122.229

  1. To make service plan public we have to find service plan's guid:

$cf curl /v2/service_plans/cf curl /v2/service_plans -X 'GET'|grep "\"guid\"" | head -n 1 | sed 's/ *\"guid\": \"//' | sed 's/\", *//' -X 'PUT' -d '{"public":true}'

  1. Create a new MySQL service instance:

$cf create-service p-mysql-local 5mb mysql

You can use the cf services command to list all available service instances that you have created.
$ cf services

Before using a service in application, you must bind the service to your application. Use the cf bind-service command:
$ cf bind-service

Scale out Usage

Not implemented yet.

Known Limitations and Issues

There are no known limitations.

Configuration

broker_port - A port on which the mysql broker listens to connections. Default value: 80

Contact Information

cf-charmers cf-charmers@lists.launchpad.net

Upstream Project

Configuration

broker_port
(int) A port on which the mysql broker listens to connections
80