Skip to content

Commit

Permalink
v3.2
Browse files Browse the repository at this point in the history
- Multigraph customization
- Multigraph dead paths colorization (if any)
- New multigraph legend to include dead paths
- Adding different exit/error codes
- Homogenize 'sed' escaped characters
- Improving 'cout' function for void messages
- Fixing multigraph corner case with empty RES array
  • Loading branch information
pamoedom committed Mar 16, 2021
1 parent 3c78823 commit 434e4b9
Show file tree
Hide file tree
Showing 15 changed files with 1,076 additions and 1,887 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
*v3.2
- Multigraph customization
- Multigraph dead paths colorization (if any)
- New multigraph legend to include dead paths
- Adding different exit/error codes
- Homogenize 'sed' escaped characters
- Improving 'cout' function for void messages
- Fixing multigraph corner case with empty RES array

*v3.1
- Fixing multigraph bug for other archs when first target is not suitable
- Fixing multigraph bug for other archs when first target is not suitable
- Modifying multigraph channel type selection to be fully dynamic
- Homogenize output file names

Expand Down
47 changes: 25 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ OpenShift4 (OCP4) Upgrade Paths Checker
## Description
This is a BASH script that generates a graphical output of the possible OpenShift4 **minor upgrade paths** using "stable", "fast" and "eus" production-ready [channels](https://docs.openshift.com/container-platform/4.6/updating/updating-cluster-between-minor.html#understanding-upgrade-channels_updating-cluster-between-minor).

**NOTE**: there is also a "candidate" channel that shouldn't be used for production purposes, if you want the script to also contemplate that one, simply modify `CHANDEF` variable in this [line](https://github.com/pamoedom/ocp4upc/blob/master/ocp4upc.sh#L8) and the script will do the rest ;)
**NOTE**: there is also a "candidate" channel that shouldn't be used for production purposes, if you want the script to also contemplate that one, simply modify `CHANDEF` variable in this [line](https://github.com/pamoedom/ocp4upc/blob/master/ocp4upc.sh#L8) and include it.

## Installation
~~~
Expand All @@ -17,52 +17,55 @@ $ ln -s ${PWD}/ocp4upc/ocp4upc.sh ~/bin/ocp4upc
## Usage
~~~
$ ocp4upc
-------------------------------------------------------------------
OCP4 Upgrade Paths Checker (stable fast eus) v3.1
-----------------------------------------------------------------
OCP4 Upgrade Paths Checker (stable fast eus) v3.2
Usage:
/home/pamoedo/bin/ocp4upc version [arch]
/home/pamoedo/bin/ocp4upc <release/mode> [arch]
Version/Mode:
Release/Mode (mandatory):
4.x Extract default graphs using same-minor channels
4.x.z Generate upgrade paths using next-minor channels
4.x.z. Generate upgrade paths using same-minor channels
4.x.z-4.y Generate upgrade paths using multi-minor channels (experimental)
4.x.z-4.y Generate upgrade paths using multi-minor channels
Arch (optional):
amd64 x86_64 (default)
s390x IBM System/390
ppc64le POWER8/9 little endian
-------------------------------------------------------------------
-----------------------------------------------------------------
~~~

## Examples
~~~
$ ocp4upc 4.5.20
$ ocp4upc.sh 4.6.15
[INFO] Checking prerequisites (curl jq dot)... [SUCC]
[INFO] Checking if '4.5.20' (amd64) is a valid release... [SUCC]
[INFO] Detected mode '4.x.z', targeting channels '4.6' for upgrade path generation.
[WARN] Skipping channel 'eus-4.6_amd64', version not found.
[INFO] Result exported as 'stable-4.6_4.5.20_amd64_20210208.svg'
[INFO] Result exported as 'fast-4.6_4.5.20_amd64_20210208.svg'
[INFO] Checking if '4.6.15' (amd64) is a valid release... [SUCC]
[INFO] Detected mode '4.x.z', targeting channels '4.7' for upgrade path generation.
[WARN] Skipping channel 'eus-4.7_amd64', it's empty.
[WARN] Skipping channel 'stable-4.7_amd64', version not found.
[INFO] Result exported as 'fast-4.7_4.6.15_amd64_20210316.svg'
~~~
![stable-4.6](https://github.com/pamoedom/ocp4upc/blob/master/examples/stable-4.6_4.5.20_amd64_20210208.png)
![fast-4.7](https://github.com/pamoedom/ocp4upc/blob/master/examples/fast-4.7_4.6.15_amd64_20210316.png)

~~~
$ ocp4upc 4.2.26-4.6
$ ocp4upc.sh 4.1.34-4.7
[INFO] Checking prerequisites (curl jq dot)... [SUCC]
[INFO] Checking if '4.2.26' (amd64) is a valid release... [SUCC]
[INFO] Detected mode '4.x.z-', targeting channels '4.3 4.4 4.5 4.6' for multigraph generation.
[WARN] This is an EXPERIMENTAL mode targeting only 2 latest releases per channel.
[INPT] Select channel type from the list [stable fast eus]: stable
[INFO] Checking if '4.1.34' (amd64) is a valid release... [SUCC]
[INFO] Detected mode '4.x.z-', targeting channels '4.2 4.3 4.4 4.5 4.6 4.7' for multigraph generation.
[INPT] Select channel from [stable fast eus], press Enter for default value (stable):
[INPT] Select max depth between [1-9], press Enter for default value (2):
[WARN] Targeting '6' diff minor versions with '2' releases per target (12 edges), please be patient.
[INFO] Processing 'stable-4.2' edges...
[INFO] Processing 'stable-4.3' edges...
[INFO] Processing 'stable-4.4' edges...
[INFO] Processing 'stable-4.5' edges...
[INFO] Processing 'stable-4.6' edges...
[WARN] Skipping file 'stable-4.6_4.5.30.gv', no upgrade paths available.
[INFO] Result exported as 'stable-multigraph_4.2.26-4.6_amd64_20210208.svg'
[INFO] Processing 'stable-4.7' edges...
[WARN] Skipping file 'stable-4.7_4.6.19.gv', version not found.
[INFO] Result exported as 'stable-multigraph_4.1.34-4.7_amd64_20210316.svg'
~~~
![stable-multigraph-4.6](https://github.com/pamoedom/ocp4upc/blob/master/examples/stable-multigraph_4.2.26-4.6_amd64_20210208.png)
![stable-multigraph-4.1](https://github.com/pamoedom/ocp4upc/blob/master/examples/stable-multigraph_4.1.34-4.7_amd64_20210316.png)

## Dependencies
- [`curl`](https://curl.haxx.se/)
Expand Down
Loading

0 comments on commit 434e4b9

Please sign in to comment.