Skip to content

Commit

Permalink
[minor] Support November Catalog Update (#606)
Browse files Browse the repository at this point in the history
Co-authored-by: David Parker <[email protected]>
Co-authored-by: Sanjay Prabhakar <[email protected]>
  • Loading branch information
3 people authored Nov 27, 2023
1 parent b605808 commit 47ef48a
Show file tree
Hide file tree
Showing 9 changed files with 496 additions and 27 deletions.
12 changes: 12 additions & 0 deletions catalogs/v8-231128-amd64.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
name: ibm-operator-catalog
namespace: openshift-marketplace
spec:
displayName: IBM Maximo Operators (v8-231128-amd64)
publisher: IBM
description: Static Catalog Source for IBM Maximo Application Suite
sourceType: grpc
image: icr.io/cpopen/ibm-maximo-operator-catalog@sha256:01b1cdf421f0228930af9cc057cc7b157840312220dc5b8d59f1d13ee9a9887d
priority: 90
1 change: 1 addition & 0 deletions docs/catalogs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ To receive security updates and bug fixes you must periodically update the versi
#### 2023
| Catalog | OCP Support | Recommended CLI | End of Support |
| ------------------------------------- | ----------- | --------------- | ------------------------------- |
| [v8-231128-amd64](v8-231128-amd64.md) | 4.11 - 4.12 | latest | OCP 4.12 EOS January 17, 2025 |
| [v8-231031-amd64](v8-231031-amd64.md) | 4.11 - 4.12 | latest | OCP 4.12 EOS January 17, 2025 |
| [v8-231004-amd64](v8-231004-amd64.md) | 4.11 - 4.12 | latest | OCP 4.12 EOS January 17, 2025 |
| [v8-230926-amd64](v8-230926-amd64.md) | 4.11 - 4.12 | latest | OCP 4.12 EOS January 17, 2025 |
Expand Down
2 changes: 1 addition & 1 deletion docs/catalogs/v8-231004-amd64.md
Original file line number Diff line number Diff line change
Expand Up @@ -427,5 +427,5 @@ Package Manifest
### Eclipse Amlen
| Package | Default Channel | Channel | Latest Version |
|------------------------|-------------------|-----------|------------------|
| eclipse-amlen-operator | 1.x | 1.x | 1.0.0 |
| eclipse-amlen-operator | 1.x | 1.x | 1.0.1 |

2 changes: 1 addition & 1 deletion docs/catalogs/v8-231031-amd64.md
Original file line number Diff line number Diff line change
Expand Up @@ -426,5 +426,5 @@ Package Manifest
### Eclipse Amlen
| Package | Default Channel | Channel | Latest Version |
|------------------------|-------------------|-----------|------------------|
| eclipse-amlen-operator | 1.x | 1.x | 1.0.0 |
| eclipse-amlen-operator | 1.x | 1.x | 1.0.1 |

414 changes: 414 additions & 0 deletions docs/catalogs/v8-231128-amd64.md

Large diffs are not rendered by default.

Binary file removed image/cli/install-ansible/ibm-mas_devops.tar.gz
Binary file not shown.
59 changes: 38 additions & 21 deletions image/cli/mascli/functions/internal/catalog_utils
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,34 @@
# a static catalog. We only support converting from v8-amd64 to the latest static catalog
# because any other change would be a downgrade and would result in the HEAD bundle in
# our packages regressing, which would confuse OLM.
MOST_RECENT_CATALOG=v8-231031-amd64
MOST_RECENT_CATALOG=v8-231128-amd64

# Choose a catalog only
# -----------------------------------------------------------------------------
# Currently only used in the mas update function. The user does not need to select
# the version of MAS, only the version of the catalog to update to.
function choose_catalog_version() {
echo -e "${COLOR_YELLOW}Select MAS Catalog:"
echo " 1) October 31 2023 Update (MAS 8.11.2 & 8.10.6)"
echo " 2) October 04 2023 Update (MAS 8.11.1 & 8.10.5)"
echo " 3) August 29 2023 Update (MAS 8.10.4 & 8.9.9)"
echo " 1) November 28 2023 Update (MAS 8.11.3 & 8.10.7)"
echo " 2) October 31 2023 Update (MAS 8.11.2 & 8.10.6)"
echo " 3) October 04 2023 Update (MAS 8.11.1 & 8.10.5)"
echo " 4) August 29 2023 Update (MAS 8.10.4 & 8.9.9)"
reset_colors

echo
prompt_for_input "Select Catalog Version" MAS_CATALOG_SELECTION "1"

case $MAS_CATALOG_SELECTION in
1)
MAS_CATALOG_VERSION=v8-231031-amd64
MAS_CATALOG_VERSION=v8-231128-amd64
;;
2)
MAS_CATALOG_VERSION=v8-231004-amd64
MAS_CATALOG_VERSION=v8-231031-amd64
;;
3)
MAS_CATALOG_VERSION=v8-231004-amd64
;;
4)
MAS_CATALOG_VERSION=v8-230829-amd64
;;
*)
Expand All @@ -40,6 +44,7 @@ function choose_catalog_version() {
esac
}

#TODO: UPDATE BELOW

# Choose a catalog and the MAS channel
# -----------------------------------------------------------------------------
Expand All @@ -50,14 +55,17 @@ function choose_mas_version() {
echo " ┌───┬──────────────┬────────┬──────────────────────────────────────────────────────────────────────┐"
echo " │ # │ Catalog │ Core │ Assist | IoT | Manage | Monitor | Optimizer | Predict | Inspection |"
echo " ├───┼──────────────┼────────┼────────┤───────┼────────┼─────────┼───────────┼─────────┼────────────┤"
echo " │ 1 │ Oct 31 2023 | 8.11.2 │ 8.8.1 | 8.8.1 | 8.7.1 | 8.11.1 | 8.5.0 | 8.9.0 | 8.9.0 |"
echo " │ 2 │ │ 8.10.6 │ 8.7.2 | 8.7.5 | 8.6.6 | 8.10.4 | 8.4.1 | 8.8.2 | 8.8.1 |"
echo " │ 1 │ Nov 28 2023 | 8.11.3 │ 8.8.1 | 8.8.2 | 8.7.2 | 8.11.2 | 8.5.1 | 8.9.0 | 8.9.0 |"
echo " │ 2 │ │ 8.10.7 │ 8.7.2 | 8.7.6 | 8.6.7 | 8.10.6 | 8.4.2 | 8.8.2 | 8.8.1 |"
echo " ├───┼──────────────┼────────┼────────┤───────┼────────┼─────────┼───────────┼─────────┼────────────┤"
echo " │ 3 │ Oct 04 2023 | 8.11.1 │ 8.8.0 | 8.8.0 | 8.7.0 | 8.11.0 | 8.5.0 | 8.9.0 | 8.9.0 |"
echo " │ 4 │ │ 8.10.5 │ 8.7.2 | 8.7.4 | 8.6.5 | 8.10.4 | 8.4.1 | 8.8.2 | 8.8.1 |"
echo " │ 3 │ Oct 31 2023 | 8.11.2 │ 8.8.1 | 8.8.1 | 8.7.1 | 8.11.1 | 8.5.0 | 8.9.0 | 8.9.0 |"
echo " │ 4 │ │ 8.10.6 │ 8.7.2 | 8.7.5 | 8.6.6 | 8.10.4 | 8.4.1 | 8.8.2 | 8.8.1 |"
echo " ├───┼──────────────┼────────┼────────┤───────┼────────┼─────────┼───────────┼─────────┼────────────┤"
echo " │ 5 │ Aug 29 2023 | 8.10.4 │ 8.7.2 | 8.7.4 | 8.6.4 | 8.10.4 | 8.4.1 | 8.8.2 | 8.8.1 |"
echo " │ 6 │ │ 8.9.9 │ 8.6.5 | 8.6.9 | 8.5.8 | 8.9.6 | 8.3.3 | 8.7.2 | 8.7.1 |"
echo " │ 5 │ Oct 04 2023 | 8.11.1 │ 8.8.0 | 8.8.0 | 8.7.0 | 8.11.0 | 8.5.0 | 8.9.0 | 8.9.0 |"
echo " │ 6 │ │ 8.10.5 │ 8.7.2 | 8.7.4 | 8.6.5 | 8.10.4 | 8.4.1 | 8.8.2 | 8.8.1 |"
echo " ├───┼──────────────┼────────┼────────┤───────┼────────┼─────────┼───────────┼─────────┼────────────┤"
echo " │ 7 │ Aug 29 2023 | 8.10.4 │ 8.7.2 | 8.7.4 | 8.6.4 | 8.10.4 | 8.4.1 | 8.8.2 | 8.8.1 |"
echo " │ 8 │ │ 8.9.9 │ 8.6.5 | 8.6.9 | 8.5.8 | 8.9.6 | 8.3.3 | 8.7.2 | 8.7.1 |"
echo " ├───┼──────────────┼────────┼────────┤───────┼────────┼─────────┼───────────┼─────────┼────────────┤"
reset_colors
echo
Expand All @@ -66,29 +74,38 @@ function choose_mas_version() {
prompt_for_input "Select Catalog Source" MAS_CHANNEL_SELECTION "1"

case $MAS_CHANNEL_SELECTION in
# October 2023
# November 2023
1)
MAS_CHANNEL=8.11.x
MAS_CATALOG_VERSION=v8-231031-amd64
MAS_CATALOG_VERSION=v8-231128-amd64
;;
2)
MAS_CHANNEL=8.10.x
MAS_CATALOG_VERSION=v8-231031-amd64
MAS_CATALOG_VERSION=v8-231128-amd64
;;
# October 2023
3)
MAS_CHANNEL=8.11.x
MAS_CATALOG_VERSION=v8-231004-amd64
MAS_CATALOG_VERSION=v8-231031-amd64
;;
4)
MAS_CHANNEL=8.10.x
MAS_CATALOG_VERSION=v8-231031-amd64
;;
5)
MAS_CHANNEL=8.11.x
MAS_CATALOG_VERSION=v8-231004-amd64
;;
6)
MAS_CHANNEL=8.10.x
MAS_CATALOG_VERSION=v8-231004-amd64
;;
# August 2023
5)
7)
MAS_CHANNEL=8.10.x
MAS_CATALOG_VERSION=v8-230829-amd64
;;
6)
8)
MAS_CHANNEL=8.9.x
MAS_CATALOG_VERSION=v8-230829-amd64
;;
Expand Down Expand Up @@ -125,7 +142,7 @@ function db2_channel_selection() {
case $MAS_CATALOG_VERSION in
# Db2 Channel selection
# -------------------------------------------------------------------------
v8-amd64|v8-230414-amd64|v8-230518-amd64|v8-230526-amd64|v8-230616-amd64|v8-230627-amd64|v8-230721-amd64|v8-230725-amd64|v8-230829-amd64|v8-230926-amd64|v8-231004-amd64|v8-231031-amd64)
v8-amd64|v8-230414-amd64|v8-230518-amd64|v8-230526-amd64|v8-230616-amd64|v8-230627-amd64|v8-230721-amd64|v8-230725-amd64|v8-230829-amd64|v8-230926-amd64|v8-231004-amd64|v8-231031-amd64|v8-231128-amd64)
DB2_CHANNEL=v110508.0
;;
v8-230111-amd64|v8-230217-amd64|v8-230314-amd64|v8-230328-amd64)
Expand All @@ -145,7 +162,7 @@ function db2_channel_selection() {
function cp4d_channel_selection() {
case $MAS_CATALOG_VERSION in
# CP4D v4.6.6 was added in the September 2023 catalog update
v8-amd64|v8-230926-amd64|v8-231004-amd64|v8-231031-amd64)
v8-amd64|v8-230926-amd64|v8-231004-amd64|v8-231031-amd64|v8-231128-amd64)
CP4D_VERSION=4.6.6
;;
# CP4D v4.6.4 was added in the June 2023 catalog update
Expand Down Expand Up @@ -180,7 +197,7 @@ function cp4d_channel_selection() {
function sls_prompt_selection() {
case $MAS_CATALOG_VERSION in
# SLS 3.8.x and up
v8-amd64|v8-230926-amd64|v8-231004-amd64|v8-231031-amd64)
v8-amd64|v8-230926-amd64|v8-231004-amd64|v8-231031-amd64|v8-231128-amd64)
SLS_PROMPT_LICENSE_ID="false"
SLS_PROMPT_ICR_CP="false"
;;
Expand Down
32 changes: 28 additions & 4 deletions image/cli/mascli/functions/update
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ Maximo Operator Catalog Selection (Required):
-c, --catalog ${COLOR_YELLOW}MAS_CATALOG_VERSION${TEXT_RESET} Maximo Operator Catalog Version (e.g. v8-221129)
Update Dependencies (Optional):
--db2u-namespace ${COLOR_YELLOW}DB2_NAMESPACE${TEXT_RESET} DB2 namespace where instances update will be performed
--mongodb-namespace ${COLOR_YELLOW}MONGODB_NAMESPACE${TEXT_RESET} Namespace where MongoCE operator and instance will be updated
--kafka-namespace ${COLOR_YELLOW}KAFKA_NAMESPACE${TEXT_RESET} Namespace where Kafka operator and instance will be updated
--kafka-provider ${COLOR_YELLOW}KAFKA_PROVIDER${TEXT_RESET} Set Kafka provider. Supported options are 'redhat' (Red Hat AMQ Streams), or 'strimzi'
--db2u-namespace ${COLOR_YELLOW}DB2_NAMESPACE${TEXT_RESET} DB2 namespace where instances update will be performed
--mongodb-namespace ${COLOR_YELLOW}MONGODB_NAMESPACE${TEXT_RESET} Namespace where MongoCE operator and instance will be updated
--mongodb-v5-upgrade ${COLOR_YELLOW}MONGODB_V5_UPGRADE${TEXT_RESET} Confirms that Mongo can be upgraded to version 5 if needed as part of the update
--kafka-namespace ${COLOR_YELLOW}KAFKA_NAMESPACE${TEXT_RESET} Namespace where Kafka operator and instance will be updated
--kafka-provider ${COLOR_YELLOW}KAFKA_PROVIDER${TEXT_RESET} Set Kafka provider. Supported options are 'redhat' (Red Hat AMQ Streams), or 'strimzi'
Other Commands:
--no-confirm Launch the update without prompting for confirmation
Expand Down Expand Up @@ -112,6 +113,9 @@ function update_noninteractive() {
--mongodb-namespace)
MONGODB_NAMESPACE=$1 && shift
;;
--mongodb-v5-update)
MONGODB_V5_UPGRADE=true
;;
--kafka-namespace)
KAFKA_NAMESPACE=$1 && shift
;;
Expand Down Expand Up @@ -164,6 +168,7 @@ function update_interactive() {
oc get Operator db2u-operator.ibm-common-services > /dev/null 2>&1
if [ "$?" == "0" ]; then
prompt_for_input "Db2u Universal Operator detected. Db2u namespace to update?" DB2_NAMESPACE "db2u"
echo
fi

# Auto-detect MongoDb
Expand All @@ -172,6 +177,23 @@ function update_interactive() {
MONGODB_NAMESPACE=`oc get mongodbcommunity.mongodbcommunity.mongodb.com -A -o jsonpath='{.items[0].metadata.namespace}' 2> /dev/null`
fi

# Lookup existing MongoDb instance
MONGODB_CURRENT_VERSION=`oc get mongodbcommunity.mongodbcommunity.mongodb.com -A -o jsonpath='{.items[0].status.version}' 2> /dev/null`
MONGODB_REQUIRED_VERSION="5.0.21" # required version for Nov 2023 catalog

# If existing MongoDb instance version is lower than the minimum version required, then let users know that Mongo will be upgraded
if [ ! "$(printf '%s\n' "$MONGODB_REQUIRED_VERSION" "$MONGODB_CURRENT_VERSION" | sort -V | head -n1)" = "$MONGODB_REQUIRED_VERSION" ]; then
echo -e "${COLOR_YELLOW}MongoDB Community Edition is currently running on version ${MONGODB_CURRENT_VERSION} and will be upgraded to version ${MONGODB_REQUIRED_VERSION}.${COLOR_RESET}"
echo -e "${COLOR_YELLOW}It is recommended that you backup your MongoDB instance before proceeding:${COLOR_RESET}"
echo -e "${COLOR_YELLOW}https://www.ibm.com/docs/en/mas-cd/continuous-delivery?topic=suite-backing-up-mongodb-maximo-application ${COLOR_RESET}"
echo
MONGODB_V5_UPGRADE=true
fi

MONGODB_CURRENT_VERSION=$(oc get mongodbcommunity.mongodbcommunity.mongodb.com -A -o jsonpath='{.items[0].status.version}' 2> /dev/null)


# Detect Kafka in cluster and set namespace
# Auto-detect Kafka
# ---------------------------------------------------------------------------
if [ -z "$KAFKA_NAMESPACE" ]; then
Expand All @@ -191,6 +213,7 @@ function update_interactive() {
fi
fi


}


Expand All @@ -208,6 +231,7 @@ function update() {
export MAS_CATALOG_VERSION
export DB2_NAMESPACE
export MONGODB_NAMESPACE
export MONGODB_V5_UPGRADE
export KAFKA_NAMESPACE
export KAFKA_PROVIDER

Expand Down
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ nav:
- "must-gather": commands/must-gather.md
- "Catalogs":
- "All Catalogs": catalogs/index.md
- "Nov 28 2023": catalogs/v8-231128-amd64.md
- "Oct 31 2023": catalogs/v8-231031-amd64.md
- "Oct 04 2023": catalogs/v8-231004-amd64.md
- "Aug 29 2023": catalogs/v8-230829-amd64.md
Expand Down

0 comments on commit 47ef48a

Please sign in to comment.