From 9a02ecbbbdbe8c45ab55c8bf33c50a41acf58af8 Mon Sep 17 00:00:00 2001 From: David Turanski Date: Thu, 18 Jan 2018 11:33:32 -0500 Subject: [PATCH] Use global variable for OOTB stream app uri (#44) * Use global variable for OOTB stream app uri * Change release name --- src/main/asciidoc/analytics/twitter-analytics/main.adoc | 3 ++- src/main/asciidoc/datascience/species-prediction/main.adoc | 4 +++- src/main/asciidoc/functions/main.adoc | 4 +++- src/main/asciidoc/index.adoc | 4 +++- src/main/asciidoc/maven-access.adoc | 2 +- .../asciidoc/streaming/cassandra/http-to-cassandra/local.adoc | 4 +++- .../asciidoc/streaming/cassandra/http-to-cassandra/pcf.adoc | 4 +++- .../custom-apps/celsius-converter-processor/main.adoc | 4 +++- src/main/asciidoc/streaming/gemfire/gemfire-cq-log/local.adoc | 4 +++- src/main/asciidoc/streaming/gemfire/gemfire-cq-log/pcf.adoc | 4 +++- src/main/asciidoc/streaming/gemfire/gemfire-log/local.adoc | 4 +++- src/main/asciidoc/streaming/gemfire/gemfire-log/pcf.adoc | 4 +++- src/main/asciidoc/streaming/gemfire/http-gemfire/local.adoc | 4 +++- src/main/asciidoc/streaming/gemfire/http-gemfire/pcf.adoc | 4 +++- src/main/asciidoc/streaming/jdbc/http-mysql/local.adoc | 4 +++- src/main/asciidoc/streaming/jdbc/http-mysql/pcf.adoc | 4 +++- 16 files changed, 45 insertions(+), 16 deletions(-) diff --git a/src/main/asciidoc/analytics/twitter-analytics/main.adoc b/src/main/asciidoc/analytics/twitter-analytics/main.adoc index d08121b..e17ade7 100644 --- a/src/main/asciidoc/analytics/twitter-analytics/main.adoc +++ b/src/main/asciidoc/analytics/twitter-analytics/main.adoc @@ -23,8 +23,9 @@ include::{docs_dir}/local-server.adoc[] + include::{docs_dir}/maven-access.adoc[] + +[subs="attributes"] ``` -dataflow:>app import --uri http://bit.ly/Bacon-RELEASE-stream-applications-kafka-10-maven +dataflow:>app import --uri {app-import-kafka-maven} ``` + diff --git a/src/main/asciidoc/datascience/species-prediction/main.adoc b/src/main/asciidoc/datascience/species-prediction/main.adoc index fee7a72..1e96989 100644 --- a/src/main/asciidoc/datascience/species-prediction/main.adoc +++ b/src/main/asciidoc/datascience/species-prediction/main.adoc @@ -20,10 +20,12 @@ include::{docs_dir}/local-server.adoc[] + include::{docs_dir}/maven-access.adoc[] + +[subs="attributes"] ``` -dataflow:>app import --uri http://bit.ly/Bacon-RELEASE-stream-applications-kafka-10-maven +dataflow:>app import --uri {app-import-kafka-maven} ``` + ++ . Create and deploy the following stream + ``` diff --git a/src/main/asciidoc/functions/main.adoc b/src/main/asciidoc/functions/main.adoc index ba63c20..3e1125f 100644 --- a/src/main/asciidoc/functions/main.adoc +++ b/src/main/asciidoc/functions/main.adoc @@ -20,10 +20,12 @@ include::{docs_dir}/local-server.adoc[] + include::{docs_dir}/maven-access.adoc[] + +[subs="attributes"] ``` -dataflow:>app import --uri http://bit.ly/Bacon-RELEASE-stream-applications-rabbit-maven +dataflow:>app import --uri {app-import-rabbit-maven} ``` + ++ . Register the out-of-the-box https://github.com/spring-cloud-stream-app-starters/function/blob/master/spring-cloud-starter-stream-app-function/README.adoc[function-runner] application (_we will use the `1.0.0.BUILD-SNAPSHOT` built by the Spring CI system_) + ``` diff --git a/src/main/asciidoc/index.adoc b/src/main/asciidoc/index.adoc index acf95da..85a78e3 100644 --- a/src/main/asciidoc/index.adoc +++ b/src/main/asciidoc/index.adoc @@ -11,7 +11,9 @@ Sabby Anandan; David Turanski; Glenn Renfro; Eric Bottard; Mark Pollack; Chris S :spring-cloud-stream-docs: http://docs.spring.io/spring-cloud-stream/docs/{scst-core-version}/reference/htmlsingle/index.html :github-code: https://github.com/spring-cloud/spring-cloud-dataflow-samples - +:scdf-release-train-name: Celsius-SR1 +:app-import-kafka-maven: http://bit.ly/{scdf-release-train-name}-stream-applications-kafka-10-maven +:app-import-rabbit-maven: http://bit.ly/{scdf-release-train-name}-stream-applications-rabbit-maven ifdef::backend-html5[] diff --git a/src/main/asciidoc/maven-access.adoc b/src/main/asciidoc/maven-access.adoc index d8214a5..0e0a405 100644 --- a/src/main/asciidoc/maven-access.adoc +++ b/src/main/asciidoc/maven-access.adoc @@ -1,6 +1,6 @@ NOTE: These samples assume that the Data Flow Server can access a remote Maven repository, `https://repo.spring.io/libs-release` by default. If your Data Flow server is running behind a firewall, or you are using a maven proxy preventing access to public repositories, you will need to install the sample apps in your internal Maven repository and https://docs.spring.io/spring-cloud-dataflow/docs/current/reference/htmlsingle/#getting-started-maven-configuration[configure] -the server accordingly. The sample applications are typically registered using Data Flow's bulk import facility. For example, the Shell command `dataflow:>app import --uri http://bit.ly/Bacon-RELEASE-stream-applications-rabbit-maven` (The actual URI is release and binder specific so refer to the sample instructions for the actual URL). +the server accordingly. The sample applications are typically registered using Data Flow's bulk import facility. For example, the Shell command `dataflow:>app import --uri {app-import-rabbit-maven}` _(The actual URI is release and binder specific so refer to the sample instructions for the actual URL)_. The bulk import URI references a plain text file containing entries for all of the publicly available Spring Cloud Stream and Task applications published to `https://repo.spring.io`. For example, `source.http=maven://org.springframework.cloud.stream.app:http-source-rabbit:1.2.0.RELEASE` registers the `http` source app at the corresponding Maven address, relative to the remote repository(ies) configured for the Data Flow server. The format is `maven://::` You will need to https://repo.spring.io/libs-release/org/springframework/cloud/stream/app/spring-cloud-stream-app-descriptor/Bacon.RELEASE/spring-cloud-stream-app-descriptor-Bacon.RELEASE.rabbit-apps-maven-repo-url.properties[download] the required apps or https://github.com/spring-cloud-stream-app-starters[build] them and then install them in your Maven repository, using whatever group, artifact, and version you choose. If you do diff --git a/src/main/asciidoc/streaming/cassandra/http-to-cassandra/local.adoc b/src/main/asciidoc/streaming/cassandra/http-to-cassandra/local.adoc index 2012b00..4717fd1 100644 --- a/src/main/asciidoc/streaming/cassandra/http-to-cassandra/local.adoc +++ b/src/main/asciidoc/streaming/cassandra/http-to-cassandra/local.adoc @@ -29,10 +29,12 @@ CREATE TABLE book ( + include::{docs_dir}/maven-access.adoc[] + +[subs="attributes"] ``` -dataflow:>app import --uri http://bit.ly/Bacon-RELEASE-stream-applications-kafka-10-maven +dataflow:>app import --uri {app-import-kafka-maven} ``` + ++ . Create the stream + ``` diff --git a/src/main/asciidoc/streaming/cassandra/http-to-cassandra/pcf.adoc b/src/main/asciidoc/streaming/cassandra/http-to-cassandra/pcf.adoc index 05e44af..6c62817 100644 --- a/src/main/asciidoc/streaming/cassandra/http-to-cassandra/pcf.adoc +++ b/src/main/asciidoc/streaming/cassandra/http-to-cassandra/pcf.adoc @@ -27,10 +27,12 @@ include::{docs_dir}/cloudfoundry-server.adoc[] + include::{docs_dir}/maven-access.adoc[] + +[subs="attributes"] ``` -dataflow:>app import --uri http://bit.ly/Bacon-RELEASE-stream-applications-rabbit-maven +dataflow:>app import --uri {app-import-rabbit-maven} ``` + ++ . Create the stream + diff --git a/src/main/asciidoc/streaming/custom-apps/celsius-converter-processor/main.adoc b/src/main/asciidoc/streaming/custom-apps/celsius-converter-processor/main.adoc index 681b788..c566bcd 100644 --- a/src/main/asciidoc/streaming/custom-apps/celsius-converter-processor/main.adoc +++ b/src/main/asciidoc/streaming/custom-apps/celsius-converter-processor/main.adoc @@ -88,10 +88,12 @@ Once we verify that the app is started and running without any errors, we can st + include::{docs_dir}/maven-access.adoc[] + +[subs="attributes"] ``` -dataflow:>app import --uri http://bit.ly/Bacon-RELEASE-stream-applications-rabbit-maven +dataflow:>app import --uri {app-import-rabbit-maven} ``` + ++ . Register the custom processor + ``` diff --git a/src/main/asciidoc/streaming/gemfire/gemfire-cq-log/local.adoc b/src/main/asciidoc/streaming/gemfire/gemfire-cq-log/local.adoc index c169989..4ea2226 100644 --- a/src/main/asciidoc/streaming/gemfire/gemfire-cq-log/local.adoc +++ b/src/main/asciidoc/streaming/gemfire/gemfire-cq-log/local.adoc @@ -26,9 +26,11 @@ gfsh>create region --name Orders --type=REPLICATE + include::{docs_dir}/maven-access.adoc[] + +[subs="attributes"] ``` -dataflow:>app import --uri http://bit.ly/Bacon-RELEASE-stream-applications-rabbit-maven +dataflow:>app import --uri {app-import-rabbit-maven} ``` ++ . Create the stream + This example creates an gemfire-cq source to which will publish events matching a query criteria on a region. In this case we will monitor the `Orders` region. For simplicity, we will avoid creating a data structure for the order. diff --git a/src/main/asciidoc/streaming/gemfire/gemfire-cq-log/pcf.adoc b/src/main/asciidoc/streaming/gemfire/gemfire-cq-log/pcf.adoc index a895586..8633b65 100644 --- a/src/main/asciidoc/streaming/gemfire/gemfire-cq-log/pcf.adoc +++ b/src/main/asciidoc/streaming/gemfire/gemfire-cq-log/pcf.adoc @@ -18,10 +18,12 @@ include::{docs_dir}/cloudfoundry-server.adoc[] + include::{docs_dir}/maven-access.adoc[] + +[subs="attributes"] ``` -dataflow:>app import --uri http://bit.ly/Bacon-RELEASE-stream-applications-rabbit-maven +dataflow:>app import --uri {app-import-rabbit-maven} ``` + ++ . Get the PCC connection information + ``` diff --git a/src/main/asciidoc/streaming/gemfire/gemfire-log/local.adoc b/src/main/asciidoc/streaming/gemfire/gemfire-log/local.adoc index 48722ac..a0bc8e5 100644 --- a/src/main/asciidoc/streaming/gemfire/gemfire-log/local.adoc +++ b/src/main/asciidoc/streaming/gemfire/gemfire-log/local.adoc @@ -27,9 +27,11 @@ gfsh>create region --name Test --type=REPLICATE + include::{docs_dir}/maven-access.adoc[] + +[subs="attributes"] ``` -dataflow:>app import --uri http://bit.ly/Bacon-RELEASE-stream-applications-rabbit-maven +dataflow:>app import --uri {app-import-rabbit-maven} ``` ++ . Create the stream + This example creates an gemfire source to which will publish events on a region diff --git a/src/main/asciidoc/streaming/gemfire/gemfire-log/pcf.adoc b/src/main/asciidoc/streaming/gemfire/gemfire-log/pcf.adoc index 288bf0d..4513375 100644 --- a/src/main/asciidoc/streaming/gemfire/gemfire-log/pcf.adoc +++ b/src/main/asciidoc/streaming/gemfire/gemfire-log/pcf.adoc @@ -17,10 +17,12 @@ include::{docs_dir}/cloudfoundry-server.adoc[] + include::{docs_dir}/maven-access.adoc[] + +[subs="attributes"] ``` -dataflow:>app import --uri http://bit.ly/Bacon-RELEASE-stream-applications-rabbit-maven +dataflow:>app import --uri {app-import-rabbit-maven} ``` + ++ . Get the PCC connection information + ``` diff --git a/src/main/asciidoc/streaming/gemfire/http-gemfire/local.adoc b/src/main/asciidoc/streaming/gemfire/http-gemfire/local.adoc index cd3ae4b..47ba884 100644 --- a/src/main/asciidoc/streaming/gemfire/http-gemfire/local.adoc +++ b/src/main/asciidoc/streaming/gemfire/http-gemfire/local.adoc @@ -27,9 +27,11 @@ gfsh>create region --name Stocks --type=REPLICATE + include::{docs_dir}/maven-access.adoc[] + +[subs="attributes"] ``` -dataflow:>app import --uri http://bit.ly/Bacon-RELEASE-stream-applications-rabbit-maven +dataflow:>app import --uri {app-import-rabbit-maven} ``` ++ . Create the stream + This example creates an http endpoint to which we will post stock prices as a JSON document containing `symbol` and `price` fields. diff --git a/src/main/asciidoc/streaming/gemfire/http-gemfire/pcf.adoc b/src/main/asciidoc/streaming/gemfire/http-gemfire/pcf.adoc index 0799337..2204635 100644 --- a/src/main/asciidoc/streaming/gemfire/http-gemfire/pcf.adoc +++ b/src/main/asciidoc/streaming/gemfire/http-gemfire/pcf.adoc @@ -17,10 +17,12 @@ include::{docs_dir}/cloudfoundry-server.adoc[] + include::{docs_dir}/maven-access.adoc[] + +[subs="attributes"] ``` -dataflow:>app import --uri http://bit.ly/Bacon-RELEASE-stream-applications-rabbit-maven +dataflow:>app import --uri {app-import-rabbit-maven} ``` + ++ . Get the PCC connection information + ``` diff --git a/src/main/asciidoc/streaming/jdbc/http-mysql/local.adoc b/src/main/asciidoc/streaming/jdbc/http-mysql/local.adoc index b0f1dea..fd03a19 100644 --- a/src/main/asciidoc/streaming/jdbc/http-mysql/local.adoc +++ b/src/main/asciidoc/streaming/jdbc/http-mysql/local.adoc @@ -25,10 +25,12 @@ CREATE TABLE names + include::{docs_dir}/maven-access.adoc[] + +[subs="attributes"] ``` -dataflow:>app import --uri http://bit.ly/Bacon-RELEASE-stream-applications-kafka-10-maven +dataflow:>app import --uri {app-import-kafka-maven} ``` + ++ . Create the stream + ``` diff --git a/src/main/asciidoc/streaming/jdbc/http-mysql/pcf.adoc b/src/main/asciidoc/streaming/jdbc/http-mysql/pcf.adoc index bdec14d..6454f16 100644 --- a/src/main/asciidoc/streaming/jdbc/http-mysql/pcf.adoc +++ b/src/main/asciidoc/streaming/jdbc/http-mysql/pcf.adoc @@ -26,10 +26,12 @@ include::{docs_dir}/cloudfoundry-server.adoc[] + include::{docs_dir}/maven-access.adoc[] + +[source, bash, subs="attributes"] ``` -dataflow:>app import --uri http://bit.ly/Bacon-RELEASE-stream-applications-rabbit-maven +dataflow:>app import --uri {app-import-rabbit-maven} ``` + ++ . Create the stream +