Skip to content

Commit

Permalink
Update apps version refs to 5.0.0 / 3.0.0 (#5896)
Browse files Browse the repository at this point in the history
* Update stream apps version refs to 5.0.0
* Update task apps version refs to 3.0.0

See #5897
  • Loading branch information
onobc authored Aug 21, 2024
1 parent d9bb024 commit b1028e6
Show file tree
Hide file tree
Showing 42 changed files with 188 additions and 188 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Downloads all applications needed by `create-containers.sh` from Maven repositor

Usage: `download-apps.sh [version] [broker] [filter]`

* `version` is the stream applications version like `3.2.1` or default is `3.2.2-SNAPSHOT`
* `version` is the stream applications version like `5.0.0` or default is `5.0.1-SNAPSHOT`
* `broker` is one of rabbitmq, rabbit or kafka
* `filter` is a name of an application or a partial name that will be matched.

Expand All @@ -96,9 +96,9 @@ This script requires link:https://github.com/GoogleContainerTools/jib/tree/maste

Usage: `create-containers.sh [version] [broker] [jre-version] [filter]`

* `version` is the stream-applications version like `3.2.1` or default is `3.2.2-SNAPSHOT`
* `version` is the stream-applications version like `5.0.0` or default is `5.0.1-SNAPSHOT`
* `broker` is one of rabbitmq, rabbit or kafka
* `jre-version` should be one of 11, 17
* `jre-version` must be 17
* `filter` is a name of an application or a partial name that will be matched.

If the file is not present required to create the container the script will skip the one.
Expand All @@ -110,9 +110,9 @@ This script requires link:https://buildpacks.io/docs/tools/pack[packeto pack]

Usage: `pack-containers.sh [version] [broker] [jre-version] [filter]`

* `version` is the stream-applications version like `3.2.1` or default is `3.2.2-SNAPSHOT`
* `version` is the stream-applications version like `5.0.0` or default is `5.0.1-SNAPSHOT`
* `broker` is one of rabbitmq, rabbit or kafka
* `jre-version` should be one of 11, 17
* `jre-version` must be 17
* `filter` is a name of an application or a partial name that will be matched.

If the required file is not present to create the container the script will skip that one.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ The default _app-name_ is `scdf-${SCDF_TYPE}`.
| register-apps.sh
| <broker> [stream-application-version]
| _broker_ must be one of rabbit or kafka.
_stream-application-version_ is optional and will install the latest version. The latest version is 2021.1.2
_stream-application-version_ is optional and will install the latest version. The latest version is 2024.0.0
|===

NOTE: Take note that the registration of application in the _pro_ version can take a few minutes since it retrieves all version information and metadata upfront.
Expand Down
4 changes: 2 additions & 2 deletions spring-cloud-dataflow-docs/src/main/asciidoc/dashboard.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ The following examples show typical application definitions:
====
[source,subs=properties]
----
task.timestamp=maven://org.springframework.cloud.task.app:timestamp-task:1.2.0.RELEASE
processor.transform=maven://org.springframework.cloud.stream.app:transform-processor-rabbit:1.2.0.RELEASE
task.timestamp=maven://org.springframework.cloud.task.app:timestamp-task:3.0.0
processor.transform=maven://org.springframework.cloud.stream.app:transform-processor-rabbit:5.0.0
----
====

Expand Down
14 changes: 7 additions & 7 deletions spring-cloud-dataflow-docs/src/main/asciidoc/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ Sabby Anandan; Marius Bogoevici; Eric Bottard; Mark Fisher; Ilayaperumal Gopinat
:scs-stream-apps-docs: https://docs.spring.io/stream-applications/docs/current/reference/html
:dataflow-asciidoc-images: https://raw.githubusercontent.com/spring-cloud/spring-cloud-dataflow/main/spring-cloud-dataflow-docs/src/main/asciidoc/images

:docker-http-source-rabbit-version: 3.2.1
:docker-time-source-rabbit-version: 3.2.1
:docker-log-sink-rabbit-version: 3.2.1
:docker-log-sink-kafka-version: 3.2.1
:docker-http-source-kafka-version: 3.2.1
:docker-time-source-kafka-version: 3.2.1
:docker-timestamp-task-version: 2.0.2
:docker-http-source-rabbit-version: 5.0.0
:docker-time-source-rabbit-version: 5.0.0
:docker-log-sink-rabbit-version: 5.0.0
:docker-log-sink-kafka-version: 5.0.0
:docker-http-source-kafka-version: 5.0.0
:docker-time-source-kafka-version: 5.0.0
:docker-timestamp-task-version: 3.0.0

ifdef::backend-html5[]

Expand Down
54 changes: 27 additions & 27 deletions spring-cloud-dataflow-docs/src/main/asciidoc/streams.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,8 @@ applications built with the RabbitMQ binder, you could do the following:
====
[source,bash]
----
dataflow:>app register --name http --type source --uri maven://org.springframework.cloud.stream.app:http-source-rabbit:3.2.1
dataflow:>app register --name log --type sink --uri maven://org.springframework.cloud.stream.app:log-sink-rabbit:3.2.1
dataflow:>app register --name http --type source --uri maven://org.springframework.cloud.stream.app:http-source-rabbit:5.0.0
dataflow:>app register --name log --type sink --uri maven://org.springframework.cloud.stream.app:log-sink-rabbit:5.0.0
----
====

Expand All @@ -218,8 +218,8 @@ For example, to register the snapshot versions of the `http` and `log` applicati
====
[source,bash]
----
source.http=maven://org.springframework.cloud.stream.app:http-source-rabbit:3.2.1
sink.log=maven://org.springframework.cloud.stream.app:log-sink-rabbit:3.2.1
source.http=maven://org.springframework.cloud.stream.app:http-source-rabbit:5.0.0
sink.log=maven://org.springframework.cloud.stream.app:log-sink-rabbit:5.0.0
----
====

Expand Down Expand Up @@ -340,20 +340,20 @@ The following table includes the `dataflow.spring.io` links to the stream applic
|Artifact Type |Stable Release |SNAPSHOT Release

|RabbitMQ + Maven
|https://dataflow.spring.io/rabbitmq-maven-latest
|https://dataflow.spring.io/rabbitmq-maven-latest-snapshot
|https://dataflow.spring.io/rabbitmq-maven-5-0-x
|https://dataflow.spring.io/rabbitmq-maven-5-0-x-snapshot

|RabbitMQ + Docker
|https://dataflow.spring.io/rabbitmq-docker-latest
|https://dataflow.spring.io/rabbitmq-docker-latest-snapshot
|https://dataflow.spring.io/rabbitmq-docker-5-0-x
|https://dataflow.spring.io/rabbitmq-docker-5-0-x-snapshot

|Apache Kafka + Maven
|https://dataflow.spring.io/kafka-maven-latest
|https://dataflow.spring.io/kafka-maven-latest-snapshot
|https://dataflow.spring.io/kafka-maven-5-0-x
|https://dataflow.spring.io/kafka-maven-5-0-x-snapshot

|Apache Kafka + Docker
|https://dataflow.spring.io/kafka-docker-latest
|https://dataflow.spring.io/kafka-docker-latest-snapshot
|https://dataflow.spring.io/kafka-docker-5-0-x
|https://dataflow.spring.io/kafka-docker-5-0-x-snapshot
|======================

NOTE: By default, the out-of-the-box app's actuator endpoints are secured. You can disable security by deploying streams by setting the following property: `[small]#app.*.spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration#`
Expand All @@ -370,12 +370,12 @@ The following table includes the `dataflow.spring.io` links to the task applicat
|Artifact Type |Stable Release |SNAPSHOT Release

|Maven
|https://dataflow.spring.io/task-maven-latest
|https://dataflow.spring.io/task-maven-latest-snapshot
|https://dataflow.spring.io/task-maven-3-0-x
|https://dataflow.spring.io/task-maven-3-0-x-snapshot

|Docker
|https://dataflow.spring.io/task-docker-latest
|https://dataflow.spring.io/task-docker-latest-snapshot
|https://dataflow.spring.io/task-docker-3-0-x
|https://dataflow.spring.io/task-docker-3-0-x-snapshot
|======================

For more information about the available out-of-the-box stream applications see the https://cloud.spring.io/spring-cloud-task-app-starters/[Spring Cloud Stream Applications] project page.
Expand All @@ -387,7 +387,7 @@ As an example, if you would like to register all out-of-the-box stream applicati
====
[source,bash,subs=attributes]
----
$ dataflow:>app import --uri https://dataflow.spring.io/kafka-maven-latest
$ dataflow:>app import --uri https://dataflow.spring.io/kafka-maven-5-0-x
----
====

Expand All @@ -396,7 +396,7 @@ Alternatively, you can register all the stream applications with the Rabbit bind
====
[source,bash,subs=attributes]
----
$ dataflow:>app import --uri https://dataflow.spring.io/rabbitmq-maven-latest
$ dataflow:>app import --uri https://dataflow.spring.io/rabbitmq-maven-5-0-x
----
====

Expand Down Expand Up @@ -486,9 +486,9 @@ The following listing shows the exposed properties for the `time` application:
----
dataflow:> app info --name time --type source
Information about source application 'time':
Version: '3.2.1':
Version: '5.0.0':
Default application version: 'true':
Resource URI: maven://org.springframework.cloud.stream.app:time-source-rabbit:3.2.1
Resource URI: maven://org.springframework.cloud.stream.app:time-source-rabbit:5.0.0
╔══════════════════════════════╤══════════════════════════════╤══════════════════════════════╤══════════════════════════════╗
║ Option Name │ Description │ Default │ Type ║
╠══════════════════════════════╪══════════════════════════════╪══════════════════════════════╪══════════════════════════════╣
Expand Down Expand Up @@ -521,9 +521,9 @@ The following listing shows the exposed properties for the `log` application:
----
dataflow:> app info --name log --type sink
Information about sink application 'log':
Version: '3.2.1':
Version: '5.0.0':
Default application version: 'true':
Resource URI: maven://org.springframework.cloud.stream.app:log-sink-rabbit:3.2.1
Resource URI: maven://org.springframework.cloud.stream.app:log-sink-rabbit:5.0.0
╔══════════════════════════════╤══════════════════════════════╤══════════════════════════════╤══════════════════════════════╗
║ Option Name │ Description │ Default │ Type ║
╠══════════════════════════════╪══════════════════════════════╪══════════════════════════════╪══════════════════════════════╣
Expand Down Expand Up @@ -790,13 +790,13 @@ Stream Deployment properties: {
----
====

Then the following command updates the stream to use the `3.2.1` version of the log application.
Then the following command updates the stream to use the `5.0.0` version of the log application.
Before updating the stream with the specific version of the application, we need to make sure that the application is registered with that version:

====
[source,bash]
----
dataflow:>app register --name log --type sink --uri maven://org.springframework.cloud.stream.app:log-sink-rabbit:3.2.1
dataflow:>app register --name log --type sink --uri maven://org.springframework.cloud.stream.app:log-sink-rabbit:5.0.0
Successfully registered application 'sink:log'
----
====
Expand All @@ -806,7 +806,7 @@ Then we can update the application:
====
[source,bash]
----
dataflow:>stream update --name httptest --properties version.log=3.2.1
dataflow:>stream update --name httptest --properties version.log=5.0.0
----
====

Expand All @@ -829,11 +829,11 @@ Stream Deployment properties: {
"spring.cloud.deployer.indexed" : "true",
"spring.cloud.deployer.count" : "1",
"spring.cloud.deployer.group" : "httptest",
"maven://org.springframework.cloud.stream.app:log-sink-rabbit" : "3.2.1"
"maven://org.springframework.cloud.stream.app:log-sink-rabbit" : "5.0.0"
},
"http" : {
"spring.cloud.deployer.group" : "httptest",
"maven://org.springframework.cloud.stream.app:http-source-rabbit" : "3.2.1"
"maven://org.springframework.cloud.stream.app:http-source-rabbit" : "5.0.0"
}
}
----
Expand Down
2 changes: 1 addition & 1 deletion spring-cloud-dataflow-docs/src/main/asciidoc/tasks.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ For example, if you would like to register all the task applications that ship w
====
[source,bash]
----
dataflow:>app import --uri https://dataflow.spring.io/task-maven-latest
dataflow:>app import --uri https://dataflow.spring.io/task-maven-3-0-x
----
====

Expand Down
2 changes: 1 addition & 1 deletion spring-cloud-dataflow-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<joda-time.version>2.12.7</joda-time.version>
<aws-java-sdk-ecr.version>1.12.513</aws-java-sdk-ecr.version>
<!-- only used for dataflow managed stream applications, e.g., tasklauncher -->
<stream-applications.version>3.2.1</stream-applications.version>
<stream-applications.version>5.0.0</stream-applications.version>
<wavefront-spring-boot-bom.version>3.2.0</wavefront-spring-boot-bom.version>
<spring-cloud-dataflow-apps-docs-plugin.version>1.0.14</spring-cloud-dataflow-apps-docs-plugin.version>
<spring-cloud-dataflow-apps-metadata-plugin.version>1.0.14</spring-cloud-dataflow-apps-metadata-plugin.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -394,12 +394,23 @@ private AppRegistration createAppRegistrations(Map<String, AppRegistration> regi
}
String type = typeName[0].trim();
String name = typeName[1].trim();
String version = getResourceVersion(lineSplit[1]);
String extra = typeName.length == 3 ? typeName[2] : null;
String version = "bootVersion".equals(extra) ? null : getResourceVersion(lineSplit[1]);
// This is now versioned key
String key = type + name + version;
if (!registrations.containsKey(key) && registrations.containsKey(type + name + "latest")) {
key = type + name + "latest";
}
// Allow bootVersion in descriptor file (already in 5.0.x stream app descriptor)
if("bootVersion".equals(extra)) {
if (previous == null) {
throw new IllegalArgumentException("Expected uri for bootVersion:" + lineSplit[0]);
}
ApplicationType appType = ApplicationType.valueOf(type);
Assert.isTrue(appType == previous.getType() && name.equals(previous.getName()), "Expected previous to be same type and name for:" + lineSplit[0]);
// Do nothing with bootVersion though
return previous;
}
AppRegistration ar = registrations.getOrDefault(key, new AppRegistration());
ar.setName(name);
ar.setType(ApplicationType.valueOf(type));
Expand All @@ -413,14 +424,15 @@ private AppRegistration createAppRegistrations(Map<String, AppRegistration> regi
throw new IllegalArgumentException(e);
}
} else if (typeName.length == 3) {
if (extra.equals("metadata")) {
// metadata app uri
try {
ar.setMetadataUri(new URI(lineSplit[1]));
warnOnMalformedURI(lineSplit[0], ar.getMetadataUri());
} catch (Exception e) {
throw new IllegalArgumentException(e);
}

}
}
registrations.put(key, ar);
return ar;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ private String getDockerImageTag(DockerResource dockerResource) {
/**
* Parse the version number from a {@link UrlResource}. It can match a simple
* {@code <artifactId>-<version>.jar} formatted name. For example, a resource ending in
* {@code file-sink-rabbit-1.2.0.RELEASE.jar} will return {@code 1.2.0.RELEASE}. Snapshot
* builds of the form {@code file-sink-rabbit-1.2.0.BUILD-SNAPSHOT.jar} and
* {@code file-sink-rabbit-1.2.0-SNAPSHOT.jar} and {@code file-sink-rabbit-1.2.0-SNAPSHOT-metadata.jar} are also supported
* {@code file-sink-rabbit-5.0.0.jar} will return {@code 5.0.0}. Snapshot
* builds of the form {@code file-sink-rabbit-5.0.1-SNAPSHOT.jar} and
* {@code file-sink-rabbit-5.0.1-SNAPSHOT-metadata.jar} are also supported
* @param urlResource
* @return
*/
Expand Down
Loading

0 comments on commit b1028e6

Please sign in to comment.