Skip to content

Commit 3d373c0

Browse files
feat: release upgrading support (#379)
* add release upgrade functionality * error handling and include/exclude operators in/from upgrading * docs and autogenerated parts * only upgrade installed operators and specifically included ones * update docs * add changelog entry * add progress reporting to upgrade * use to_string() instead format * use client with cache to fetch CRDs * Update rust/stackablectl/src/cmds/release.rs Co-authored-by: Nick <[email protected]> * use Debug impl for String in Error * add gvk info to KubeClientReplace Error * return error on no release found, exit main with error if error from run * chore: use indicatif_(e)println * chore: Reuse existing error variant, and reformat it * use Debug impl for String in Errors * refactor unnamed interpolations --------- Co-authored-by: Nick <[email protected]> Co-authored-by: Nick Larsen <[email protected]>
1 parent 86248de commit 3d373c0

File tree

35 files changed

+858
-174
lines changed

35 files changed

+858
-174
lines changed

docs/modules/stackablectl/pages/commands/release.adoc

Lines changed: 61 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,35 @@ To list the available Stackable releases run the following command:
1414
[source,console]
1515
----
1616
$ stackablectl release list
17-
┌───┬─────────┬──────────────┬─────────────────────────────────────────────────────────────────────────────┐
18-
│ # ┆ RELEASE ┆ RELEASE DATE ┆ DESCRIPTION │
19-
╞═══╪═════════╪══════════════╪═════════════════════════════════════════════════════════════════════════════╡
20-
│ 1 ┆ 23.7 ┆ 2023-07-26 ┆ Sixth release focusing on resources and pod overrides │
21-
├╌╌╌┼╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
22-
│ 2 ┆ 23.4 ┆ 2023-05-17 ┆ Fifth release focusing on affinities and product status │
23-
├╌╌╌┼╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
24-
│ 3 ┆ 23.1 ┆ 2023-01-27 ┆ Fourth release focusing on image selection and logging │
25-
├╌╌╌┼╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
26-
│ 4 ┆ 22.11 ┆ 2022-11-14 ┆ Third release focusing on resource management │
27-
├╌╌╌┼╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
28-
│ 5 ┆ 22.09 ┆ 2022-09-09 ┆ Second release focusing on security and OpenShift support │
29-
├╌╌╌┼╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
30-
│ 6 ┆ 22.06 ┆ 2022-06-30 ┆ First official release of the Stackable Data Platform │
31-
├╌╌╌┼╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
32-
│ 7 ┆ latest ┆ 2023-07-26 ┆ Always pointing to the latest stable version of the Stackable Data Platform │
33-
├╌╌╌┼╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
34-
│ 8 ┆ dev ┆ 2023-01-27 ┆ Development versions from main branch. Not stable! │
35-
└───┴─────────┴──────────────┴─────────────────────────────────────────────────────────────────────────────┘
17+
┌────┬─────────┬──────────────┬─────────────────────────────────────────────────────────────────────────────────┐
18+
│ # ┆ RELEASE ┆ RELEASE DATE ┆ DESCRIPTION │
19+
╞════╪═════════╪══════════════╪═════════════════════════════════════════════════════════════════════════════════╡
20+
│ 1 ┆ 25.3 ┆ 2025-03-24 ┆ The March 2025 release │
21+
├╌╌╌╌┼╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
22+
│ 2 ┆ 24.11 ┆ 2024-11-18 ┆ The November 2024 release │
23+
├╌╌╌╌┼╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
24+
│ 3 ┆ 24.7 ┆ 2024-07-24 ┆ Security focused release to reduce CVEs and to build product images from source │
25+
├╌╌╌╌┼╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
26+
│ 4 ┆ 24.3 ┆ 2024-03-20 ┆ Security focused release to improve platform authentication and authorization │
27+
├╌╌╌╌┼╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
28+
│ 5 ┆ 23.11 ┆ 2023-11-30 ┆ Seventh release focusing on PodDisruptionBudgets and graceful shutdown │
29+
├╌╌╌╌┼╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
30+
│ 6 ┆ 23.7 ┆ 2023-07-26 ┆ Sixth release focusing on resources and pod overrides │
31+
├╌╌╌╌┼╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
32+
│ 7 ┆ 23.4 ┆ 2023-05-17 ┆ Fifth release focusing on affinities and product status │
33+
├╌╌╌╌┼╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
34+
│ 8 ┆ 23.1 ┆ 2023-01-27 ┆ Fourth release focusing on image selection and logging │
35+
├╌╌╌╌┼╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
36+
│ 9 ┆ 22.11 ┆ 2022-11-14 ┆ Third release focusing on resource management │
37+
├╌╌╌╌┼╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
38+
│ 10 ┆ 22.09 ┆ 2022-09-09 ┆ Second release focusing on security and OpenShift support │
39+
├╌╌╌╌┼╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
40+
│ 11 ┆ 22.06 ┆ 2022-06-30 ┆ First official release of the Stackable Data Platform │
41+
├╌╌╌╌┼╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
42+
│ 12 ┆ latest ┆ 2025-03-24 ┆ Always pointing to the latest stable version of the Stackable Data Platform │
43+
├╌╌╌╌┼╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
44+
│ 13 ┆ dev ┆ 1970-01-01 ┆ Development versions from main branch. Not stable! │
45+
└────┴─────────┴──────────────┴─────────────────────────────────────────────────────────────────────────────────┘
3646
----
3747

3848
Detailed information of a release can be queried with the `stackablectl release describe` command:
@@ -128,3 +138,35 @@ Installed product trino=23.7.0
128138
Installed product zookeeper=23.7.0
129139
Installed release 23.7
130140
----
141+
142+
== Upgrading Releases
143+
144+
As described in the xref:home::release-notes.adoc[Upgrade sections of the Release Notes], the upgrade process can be achieved by the following three steps:
145+
146+
. Uninstalling the previous release with `stackablectl release uninstall <RELEASE>`
147+
. Replacing the CRDs with `kubectl replace`
148+
. Installing the next release with `stackablectl release install <RELEASE>`
149+
150+
For convenience `stackablectl` also provides an upgrade functionality which executes those steps by itself.
151+
To upgrade a release, run the following command:
152+
153+
[source,console]
154+
----
155+
$ stackablectl release upgrade 25.3
156+
157+
Upgraded to release '25.3'
158+
159+
Use "stackablectl operator installed" to list installed operators.
160+
----
161+
162+
The above command only upgrades the currently installed operators.
163+
To include additional operators in the installation step, use the `--include`/`-i` subcommands and specify the desired operators.
164+
165+
For example
166+
[source,console]
167+
----
168+
$ stackablectl release upgrade 25.3 -i druid -i nifi
169+
----
170+
would upgrade the existing operators as well as install the Stackable operators for Apache Druid and Apache NiFi.
171+
172+
Likewise, operators can be exluded from the upgrade using the `--exclude`/`-e` subcommands.

docs/modules/stackablectl/partials/commands/release.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Commands:
1010
describe Print out detailed release information
1111
install Install a specific release
1212
uninstall Uninstall a release
13+
upgrade Upgrade a release
1314
help Print this message or the help of the given subcommand(s)
1415
1516
Options:

extra/completions/_stackablectl

Lines changed: 55 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)