You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 14, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: spring-cloud-dataflow-docs/src/main/asciidoc/streams-skipper.adoc
+99-9Lines changed: 99 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,8 +5,8 @@ The section <<spring-cloud-dataflow-stream-lifecycle-skipper>> covers the overal
5
5
6
6
This section is a continuation of the getting started section on <<getting-started-deploying-streams-spring-cloud-dataflow>> and shows how Streams can be updated and rolled back using the Local Data Flow server and Skipper.
7
7
The getting started section leaves off with the Stream `httptest` deployed.
8
-
The Stream consists of two applications, the `http` and the `log` sink.
9
-
If you execute the unix command `jps` you can see the two java processes running.
8
+
The Stream consists of two applications, the `http` source and the `log` sink.
9
+
If you execute the Unix command `jps` you can see the two java processes running.
10
10
11
11
[source,bash]
12
12
----
@@ -17,16 +17,16 @@ $ jps | grep rabbit
17
17
18
18
== Upgrading
19
19
We will now upgrade the log sink to version 1.2.0.RELEASE.
20
-
Since we are deploying on the local deployer we will need to set the port to a different value (9001) than the currently running log sink's value of 9000.
21
-
While we are at it, let's update log level to be `ERROR` and configure the Spring Boot actuator endpoints to be accessible without a password.
20
+
Since we are using the local server we will need to set the port to a different value (9001) than the currently running log sink's value of 9000 to avoid a conflict.
21
+
While we are at it, let's update log level to be `ERROR`.
22
22
Create a YAML file named `local-log-update.yml` with the following contents
The manifest is a YAML document that represents the final state of what was deployed to the platform.
100
+
You can view the manifest for any Stream version using the command `stream skipper manifest --name <name-of-stream> --releaseVersion <optional-version>`
101
+
If the `--releaseVersion` is not specified, the manifest for the last version is returned.
The majority of the deployment and application properties were set by Data Flow in order to enable the applications to talk to each other and sending application metrics with identifying labels.
154
+
155
+
If you compare this YAML document to the one for `--releaseVersion=1` you will see the difference in the log application version.
156
+
81
157
== Rolling back
82
158
83
-
To go back to the previous version of the stream, you use the `stream skipper rollback` command
159
+
To go back to the previous version of the stream, use the `stream skipper rollback` command.
84
160
85
161
[source,bash]
86
162
----
87
163
dataflow:>stream skipper rollback --name httptest
88
164
Rollback request has been sent for the stream 'httptest'
89
165
----
90
166
91
-
Executing the unix command `jps` you can see the two java processes running, but now the log application is back to 1.1.0.RELEASE. The http source process has remain unchanged.
167
+
Executing the Unix command `jps` you can see the two java processes running, but now the log application is back to 1.1.0.RELEASE. The http source process has remain unchanged.
92
168
93
169
[source,bash]
94
170
----
@@ -120,6 +196,20 @@ dataflow:> http post --target http://localhost:9000 --data "hello world upgraded
120
196
And the log message in the log sink will now be back at the info error level.
121
197
[source,bash]
122
198
----
123
-
INFO 23939 --- [http.httptest-1] log-sink : hello world rollback
199
+
INFO 23939 --- [http.httptest-1] log-sink : hello world rollback
124
200
----
125
201
202
+
The history command now shows the third version of the stream hsa been deployed.
https://cloud.spring.io/spring-cloud-skipper/[Skipper] is a server that allows you to discover Spring Boot applications and manage their lifecycle on multiple Cloud Platforms.
863
863
864
-
Applications in Skipper are bundled as packages which contain templated configuration files. They also contain an option `values` file that contains default values using to fill in template placeholders.
864
+
Applications in Skipper are bundled as packages which contain templated configuration files. They also contain an optional `values` file that contains default values using to fill in template placeholders. You can find out more about the format of the package .zip file in Skipper's documentation on https://docs.spring.io/spring-cloud-skipper/docs/1.0.0.M2/reference/htmlsingle/#packages[Packages].
865
865
Skipper's templated configuration files contain placeholders for application properties, application version, and deployment properties.
866
-
Packages are uploaded to Skipper and stored in a package repository.
866
+
Package .zip files are uploaded to Skipper and stored in a package repository.
867
867
Skipper's package repository is analogous to those found in tools such as `apt-get` or `brew`.
868
868
869
869
You can override template values when installing or upgrading a package.
870
870
Skipper orchestrates the upgrade/rollback procedure of applications between different versions, taking the minimal set of actions to bring the system to the desired state.
871
+
For example, if only one application in a stream has been updated, only that single application is deployed with a new version and the old version undeployed.
871
872
An application is considered different when upgrading if any of it's application properties, deployment properties (excluding count), or application version (e.g. 1.0.0.RELEASE) is different from the currently installed application.
872
873
873
874
Spring Cloud Data Flow is integrated with Skipper by generating a Skipper package when deploying a Stream.
@@ -890,13 +891,11 @@ There is an important optional command argument to the `stream skipper deploy` c
890
891
Skipper can be configured to deploy to multiple platforms.
891
892
Skipper is pre-configured with a platform named `default` which will deploys applications to the local machine where Skipper is running.
892
893
The default value of the command line argument `--platformName` is `default`.
893
-
If you are commonly deploying to one platform, when installing Skipper you can override the configuration of the `default` platform. Otherwise, specify the platformName if you want to deploy to platforms such as PCF and Kubernetes.
894
-
894
+
If you are commonly deploying to one platform, when installing Skipper you can override the configuration of the `default` platform.
895
+
Otherwise, specify the platformName to one of the values returned by the command `stream skipper platform-list`
895
896
896
897
NOTE: In future releases, only the local Data Flow server will be configured with the `default` platform.
897
898
898
-
NOTE: In the current release of Data Flow, there is not yet a command/REST endpoint to list the platforms that Skipper is configured to use.
899
-
As such, you will have to find out the platform name to use by either running the Skipper Shell or knowing how you configured the platforms for Skipper when installing Skipper.
NOTE: The `--propertiesFile` can be in a YAML format, which is preferred since the underlying model that Skipper uses is YAML based and the translation from java.util.Properties format to YAML does not cover all possible YAML documents.
911
+
=== Stream versions
912
+
Skipper keeps a history of the Streams that were deployed.
913
+
After updating a Stream, there will be a second version of the stream.
914
+
You can query for the history of the versions using the command `stream skipper history --name <name-of-stream>`.
Skipper keeps an "manifest" of the all the applications, their application properties and deployment properties after all values have been substituted.
929
+
This represents the final state of what was deployed to the platform.
930
+
You can view the manifest for any of the versions of a Stream using the command `stream skipper manifest --name <name-of-stream> --releaseVersion <optional-version>`
931
+
If the `--releaseVersion` is not specified, the manifest for the last version is returned.
The majority of the deployment and application properties were set by Data Flow in order to enable the applications to talk to each other and sending application metrics with identifying labels.
@@ -919,9 +990,22 @@ You can rollback to a previous version of the Stream using the command `stream s
919
990
dataflow:>stream skipper rollback --name httptest
920
991
----
921
992
993
+
There is an optional `--releaseVersion` command argument which is the version of the Stream.
994
+
If not specified, the rollback goes to the previous stream version.
995
+
996
+
=== Application Count
997
+
998
+
The application count is a dynamic property of the system.
999
+
If due to scaling at runtime, the application to be upgraded has 5 instances running, then 5 instances of the upgraded application will be deployed.
1000
+
1001
+
=== Skipper's Upgrade Strategy
1002
+
1003
+
Skipper has a simple 'red/black' upgrade strategy. It deploys the new version of the applications, as many instances as the currently running version, and checks the `/health` endpoint of the application.
1004
+
If the health of the new application is good, then the previous application is undeployed.
1005
+
If the health of the new application is bad, then all new applications are undeployed and the upgrade is considered not successful.
922
1006
923
-
NOTE: There is an optional `--releaseVersion` command argument which is the version of the Stream. In the current release of Data Flow, there is not yet a command/REST endpoint to list all the versions of the Stream that have been deployed.
924
-
As such, if you want to rollback to something other than the previous release, you will need to run the Skipper Shell.
1007
+
The upgrade strategy is not a rolling upgrade, so if 5 applications of the application to upgrade are runningn, then in a sunny day scenario, 5 of the new applications will also be running before the older version is undeployed.
1008
+
Future versions of Skipper will support rolling upgrades and other types of checks, e.g. manual, to continue to upgrade process.
0 commit comments