Update stream definition to deploy with mysql

- This commit eliminates the necessity to supply DB credentials in the stream definition. We could have it automatically bind/negotiate (_with mysql_) through the deployment manifest. 
- Changes to bit.ly links included
This commit is contained in:
Sabby Anandan
2016-11-11 14:03:23 -08:00
committed by GitHub
parent f485568715
commit cb052f9b29

View File

@@ -68,7 +68,7 @@ dataflow:>version
+
```
dataflow:>app import --uri http://bit.ly/stream-applications-kafka-maven
dataflow:>app import --uri http://bit.ly/1-0-4-GA-stream-applications-kafka-maven
```
+
@@ -125,7 +125,7 @@ In order to get started, make sure that you have the following components:
* Local build of https://github.com/spring-cloud/spring-cloud-dataflow[Spring Cloud Data Flow]
* Local build of Spring Cloud Data Flow's https://github.com/spring-cloud/spring-cloud-dataflow-server-cloudfoundry[Cloud Foundry Server]
* Running instance of `rabbit` in Cloud Foundry
* Running instance of `mysql`
* Running instance of `mysql` in Cloud Foundry
* A database utility tool such as link:http://dbeaver.jkiss.org/[DBeaver] or link:https://www.dbvis.com/[DbVisualizer]
* Create the `names` table (in MySQL) using:
+
@@ -209,7 +209,7 @@ dataflow:>version
+
```
dataflow:>app import --uri http://bit.ly/stream-applications-rabbit-maven
dataflow:>app import --uri http://bit.ly/1-0-4-GA-stream-applications-rabbit-maven
```
+
@@ -217,11 +217,17 @@ dataflow:>app import --uri http://bit.ly/stream-applications-rabbit-maven
+
```
dataflow:>stream create --name mysqlstream --definition "http | jdbc --spring.datasource.url='jdbc:mysql://<HOST>:<PORT>/<NAME>' --spring.datasource.username=<USERNAME> --spring.datasource.password=<PASSWORD> --tableName=names --columns=name" --deploy
dataflow:>stream create --name mysqlstream --definition "http | jdbc --tableName=names --columns=name"
Created new stream 'mysqlstream'
dataflow:>stream deploy --name mysqlstream --properties "app.jdbc.spring.cloud.deployer.cloudfoundry.services=mysql"
Deployed stream 'mysqlstream'
Created and deployed new stream 'mysqlstream'
```
+
NOTE: By supplying `mysql` property through `app.jdbc.spring.cloud.deployer.cloudfoundry.services` token, we are deploying the stream with `jdbc-sink` to automatically bind to `mysql` service and only this application in the stream gets the service binding. This also eliminates the requirement to supply `datasource` credentials in stream definition.
+
. Verify the stream is successfully deployed
+
```