LATEST VERSION: 1.0 - CHANGELOG
Spring Cloud Data Flow v1.0

Using User-Provided Service Instances

You can configure a Spring Cloud Data Flow service instance at create time to use Cloud Foundry user-provided services for its dependent data services instead of the default MySQL for PCF for the relational database service, RabbitMQ for PCF for the messaging service, and Redis for PCF for the analytics service. See below for information about configuring a Data Flow service instance to use an alternative dependent data service.

Dependent Service Parameters

You can specify that a Data Flow service instance should use a user-provided service instance by passing configuration parameters to the cf create-service command in JSON using the -c flag. The parameters used to configure alternative dependent data services for a Data Flow service instance are listed below.

Parameter Function
relational-data-service.user-provided A JSON object containing connection information for the relational database service used to store task history.
messaging-data-service.user-provided A JSON object containing connection information for the messaging service used for event messaging.
analytics-data-service.user-provided A JSON object containing connection information for the Redis service used for an analytics store.

See the following sections for information about using these parameters.

User-Provided Relational Database Service

You can use the relational-data-service parameter to supply the configuration for a user-provided relational database service. This parameter contains a JSON object user-provided, with fields for each of the connection values needed to provision a Cloud Foundry user-provided relational database service instance.

The relational database service can be the default MySQL for PCF service or any other relational database service. It must provide a relational database.

An example of fields contained in the user-provided object for a relational database service is shown below.

{
  "uri":"mysql://kempercrabb:fake-password@123.234.456.879:3306/vigil",
  "username": "kempercrabb",
  "password": "fake-password",
  "dbname": "vigil",
  "host": "123.234.456.879",
  "port": 3306,
  "tags": ["mysql"]
}

To create a Spring Cloud Data Flow service instance using these connection values for the service instance’s relational database service instance:

$ cf cs p-dataflow standard data-flow -c {"relational-data-service": { "user-provided": {"uri":"mysql://kempercrabb:fake-password@123.234.456.879:3306/vigil","username":"kempercrabb","password":"fake-password","dbname":"vigil","host":"123.234.456.879","port":3306,"tags":["mysql"]} }}

User-Provided Messaging Service

You can use the messaging-data-service parameter to supply the configuration for a user-provided messaging service. This parameter contains a JSON object user-provided, with fields for each of the connection values needed to provision a Cloud Foundry user-provided messaging service instance.

The messaging data service can be the default RabbitMQ for PCF service or another messaging service. It must provide either a RabbitMQ server or a Kafka server.

An example of fields contained in the user-provided object for a messaging service is shown below.

{ 
  "dashboard_url": "https://api.cloudamqp.com/console/a-GUID-would-go-here/details",
  "username": "buckstorm", 
  "vhost": "buckstorm", 
  "password": "fake-password",
  "ssl": false,
  "hostname": "stonehill.rmq.cloudamqp.com",
  "uri": "amqp://buckstorm:fake-password@stonehill.rmq.cloudamqp.com/buckstorm",
  "http_api_uri": "http://buckstorm:fake-password@stonehill.rmq.cloudamqp.com:1883/api",
  "tags": ["rabbitmq"]
}

To create a Spring Cloud Data Flow service instance using these connection values for the service instance’s messaging service instance:

$ cf cs p-dataflow standard dataflow -c {"messaging-data-service": { "user-provided": {"dashboard_url":"https://api.cloudamqp.com/console/a-GUID-would-go-here/details","username":"buckstorm","vhost":"buckstorm","password":"fake-password","ssl":false,"hostname":"stonehill.rmq.cloudamqp.com","uri":"amqp://buckstorm:fake-password@stonehill.rmq.cloudamqp.com/buckstorm","http_api_uri":"http://buckstorm:fake-password@stonehill.rmq.cloudamqp.com:1883/api","tags":["rabbitmq"]} }}

User-Provided Analytics Service

You can use the analytics-data-service parameter to supply the configuration for a user-provided analytics service. This parameter contains a JSON object user-provided, with fields for each of the connection values needed to provision a Cloud Foundry user-provided Redis service instance.

The analytics service can be the default Redis for PCF service or any other Redis service. It must provide a Redis database.

An example of fields contained in the user-provided object for an analytics service is shown below.

{
  "host": "garrels.gce.cloud.redislabs.com", 
  "uri": "redis://:fake-password@garrels.gce.cloud.redislabs.com:11781/boars-head", 
  "port": 11781,
  "dbname": "boars-head", 
  "password": "fake-password", 
  "tags": ["redis"]
}

To create a Spring Cloud Data Flow service instance using these connection values for the service instance’s analytics service instance:

$ cf cs p-dataflow standard dataflow -c {"analytics-data-service": { "user-provided": {"host":"garrels.gce.cloud.redislabs.com","uri":"redis://:fake-password@garrels.gce.cloud.redislabs.com:11781/boars-head","port":11781,"dbname":"boars-head","password":"fake-password","tags":["redis"]} }}
Create a pull request or raise an issue on the source for this page in GitHub