Skip to content

Commit

Permalink
[minor] [MASCORE-3026] implement role/tasks for new deployments of Mo…
Browse files Browse the repository at this point in the history
…ngoDB CE v7.0 (#1232)
  • Loading branch information
twhart authored Sep 6, 2024
1 parent 94b4f8d commit 831e892
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 0 deletions.
9 changes: 9 additions & 0 deletions image/cli/mascli/functions/mirror_images
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ Content Selection (Other Dependencies):
--mirror-mongo Mirror images for MongoDb Community Edition
--mirror-mongo-v5 Mirror images for MongoDb Community Edition version 5
--mirror-mongo-v6 Mirror images for MongoDb Community Edition version 6
--mirror-mongo-v7 Mirror images for MongoDb Community Edition version 7
--mirror-db2 Mirror images for IBM Db2
--mirror-appconnect Mirror images for IBM AppConnect
Expand Down Expand Up @@ -97,6 +98,7 @@ function mirror_everything() {
MIRROR_MONGOCE_V4=true
MIRROR_MONGOCE_V5=true
MIRROR_MONGOCE_V6=true
MIRROR_MONGOCE_V7=true

MIRROR_DB2U=true
MIRROR_APPCONNECT=true
Expand Down Expand Up @@ -130,6 +132,7 @@ function mirror_to_registry_noninteractive() {
MIRROR_MONGOCE_V4=false
MIRROR_MONGOCE_V5=false
MIRROR_MONGOCE_V6=false
MIRROR_MONGOCE_V7=false
MIRROR_DB2U=false
MIRROR_CP4D=false
MIRROR_WSL=false
Expand Down Expand Up @@ -245,6 +248,9 @@ function mirror_to_registry_noninteractive() {
--mirror-mongo-v6)
MIRROR_MONGOCE_V6=true
;;
--mirror-mongo-v7)
MIRROR_MONGOCE_V7=true
;;
--mirror-db2)
MIRROR_DB2U=true
;;
Expand Down Expand Up @@ -506,6 +512,7 @@ function mirror_to_registry() {
export MIRROR_MONGOCE_V4
export MIRROR_MONGOCE_V5
export MIRROR_MONGOCE_V6
export MIRROR_MONGOCE_V7
export MIRROR_DB2U
export MIRROR_CP4D
export MIRROR_WML
Expand All @@ -529,6 +536,7 @@ function mirror_to_registry() {
"$MIRROR_MONGOCE_V4" == true ||
"$MIRROR_MONGOCE_V5" == true ||
"$MIRROR_MONGOCE_V6" == true ||
"$MIRROR_MONGOCE_V7" == true ||
"$MIRROR_DB2U" == true ||
"$MIRROR_APPCONNECT" == true ||
"$MIRROR_CP4D" == true ||
Expand Down Expand Up @@ -604,6 +612,7 @@ function mirror_to_registry() {
show_mirror_status "+ Version 4 ........................." $MIRROR_MONGOCE_V4
show_mirror_status "+ Version 5 ........................." $MIRROR_MONGOCE_V5
show_mirror_status "+ Version 6 ........................." $MIRROR_MONGOCE_V6
show_mirror_status "+ Version 7 ........................." $MIRROR_MONGOCE_V7
show_mirror_status "IBM Db2 ............................." $MIRROR_DB2U
show_mirror_status "IBM AppConnect ......................" $MIRROR_APPCONNECT

Expand Down
1 change: 1 addition & 0 deletions python/src/mas/cli/update/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def update(self, argv):
"mongodb_namespace",
"mongodb_v5_upgrade",
"mongodb_v6_upgrade",
"mongodb_v7_upgrade",
"kafka_namespace",
"kafka_provider",
"dro_migration",
Expand Down
8 changes: 8 additions & 0 deletions python/src/mas/cli/update/argParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,14 @@
help="Required to confirm a major version update for MongoDb to version 6",
)

depsArgGroup.add_argument(
'--mongodb-v7-upgrade',
required=False,
action="store_const",
const="true",
help="Required to confirm a major version update for MongoDb to version 7",
)

depsArgGroup.add_argument(
'--kafka-namespace',
required=False,
Expand Down
6 changes: 6 additions & 0 deletions tekton/src/pipelines/update.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,10 @@ spec:
type: string
description: Approves the MongoDb upgrade to version 6 if needed
default: ""
- name: mongodb_v7_upgrade
type: string
description: Approves the MongoDb upgrade to version 7 if needed
default: ""

# kafka update
# -------------------------------------------------------------------------
Expand Down Expand Up @@ -404,6 +408,8 @@ spec:
value: $(params.mongodb_version)
- name: mongodb_v6_upgrade
value: $(params.mongodb_v6_upgrade)
- name: mongodb_v7_upgrade
value: $(params.mongodb_v7_upgrade)
- name: mongodb_replicas
value: $(params.mongodb_replicas)

Expand Down
6 changes: 6 additions & 0 deletions tekton/src/tasks/dependencies/mongodb.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ spec:
type: string
description: Approves the MongoDb upgrade to version 6 if needed
default: ""
- name: mongodb_v7_upgrade
type: string
description: Approves the MongoDb upgrade to version 7 if needed
default: ""

# Dependencies - IBM Cloud MongoDb
# -------------------------------------------------------------------------
Expand Down Expand Up @@ -115,6 +119,8 @@ spec:
value: $(params.mongodb_v5_upgrade)
- name: MONGODB_V6_UPGRADE
value: $(params.mongodb_v6_upgrade)
- name: MONGODB_V7_UPGRADE
value: $(params.mongodb_v7_upgrade)

# Dependencies - IBM Cloud MongoDb
- name: IBM_MONGO_NAME
Expand Down

0 comments on commit 831e892

Please sign in to comment.