Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into mascore5439
Browse files Browse the repository at this point in the history
  • Loading branch information
tomklapiscak committed Mar 4, 2025
2 parents d9efabe + 5f3f754 commit 9e051d1
Show file tree
Hide file tree
Showing 16 changed files with 106 additions and 62 deletions.
4 changes: 2 additions & 2 deletions .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"files": "^.secrets.baseline$",
"lines": null
},
"generated_at": "2025-02-19T10:22:06Z",
"generated_at": "2025-02-21T13:16:08Z",
"plugins_used": [
{
"name": "AWSKeyDetector"
Expand Down Expand Up @@ -192,7 +192,7 @@
"hashed_secret": "1459943ba5fd876f7ef6e48f566a40b448a2bf08",
"is_secret": false,
"is_verified": false,
"line_number": 473,
"line_number": 477,
"type": "Secret Keyword",
"verified_result": null
}
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,3 @@ Documentation
We welcome every Maximo Application Suite users, developers and enthusiasts to contribute to the MAS Command Line Interface while fixing code issues and implementing new automated functionalities.

You can contribute to this collection by raising [a new issue](https://github.com/ibm-mas/cli/issues) with suggestions on how to make our MAS automation engine even better, or if you want to become a new code contributor, please refer to the [Contributing Guidelines](CONTRIBUTING.md) and learn more about how to get started.

2 changes: 1 addition & 1 deletion docs/catalogs/v9-241107-s390x.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ IBM Maximo Operator Catalog v9 (241107)
Details
-------------------------------------------------------------------------------
<table>
<tr><td>Image</td><td>docker-na-public.artifactory.swg-devops.com/wiotp-docker-local/cpopen/ibm-maximo-operator-catalog</tr></tr>
<tr><td>Image</td><td>icr.io/cpopen/ibm-maximo-operator-catalog</tr></tr>
<tr><td>Tag</td><td>v9-241107-s390x</tr></tr>
<tr><td>Digest</td><td>sha256:30fa9a90569273e7f323b7b673385f3843f06df332c2ed061aaa2ff7aa189a71</tr></tr>
</table>
Expand Down
2 changes: 1 addition & 1 deletion docs/catalogs/v9-241205-s390x.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ IBM Maximo Operator Catalog v9 (241205)
Details
-------------------------------------------------------------------------------
<table>
<tr><td>Image</td><td>docker-na-public.artifactory.swg-devops.com/wiotp-docker-local/cpopen/ibm-maximo-operator-catalog</tr></tr>
<tr><td>Image</td><td>icr.io/cpopen/ibm-maximo-operator-catalog</tr></tr>
<tr><td>Tag</td><td>v9-241205-s390x</tr></tr>
<tr><td>Digest</td><td>sha256:3c24b778b7742e0a09f66bfcc572287a95370a1370fb811e516ae376f67886a1</tr></tr>
</table>
Expand Down
2 changes: 1 addition & 1 deletion docs/catalogs/v9-250109-s390x.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ IBM Maximo Operator Catalog v9 (250109)
Details
-------------------------------------------------------------------------------
<table>
<tr><td>Image</td><td>docker-na-public.artifactory.swg-devops.com/wiotp-docker-local/cpopen/ibm-maximo-operator-catalog</tr></tr>
<tr><td>Image</td><td>icr.io/cpopen/ibm-maximo-operator-catalog</tr></tr>
<tr><td>Tag</td><td>v9-250109-s390x</tr></tr>
<tr><td>Digest</td><td>sha256:82a017b04ac8f15b14719e77435e1000046e8d90c24fa7fce45421f4e289d0fd</tr></tr>
</table>
Expand Down
2 changes: 1 addition & 1 deletion docs/catalogs/v9-250206-s390x.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ IBM Maximo Operator Catalog v9 (250206)
Details
-------------------------------------------------------------------------------
<table>
<tr><td>Image</td><td>docker-na-public.artifactory.swg-devops.com/wiotp-docker-local/cpopen/ibm-maximo-operator-catalog</tr></tr>
<tr><td>Image</td><td>icr.io/cpopen/ibm-maximo-operator-catalog</tr></tr>
<tr><td>Tag</td><td>v9-250206-s390x</tr></tr>
<tr><td>Digest</td><td>sha256:b9ef2ef8d16bd9bb1015d8f2597c5f4f7daadbbefab700268c914f1b07582d25</tr></tr>
</table>
Expand Down
8 changes: 8 additions & 0 deletions image/cli/mascli/functions/gitops_db2u_database
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ IBM DB2U:
--is-replica-task ${COLOR_YELLOW}IS_REPLICA_TASK${TEXT_RESET} To check if this is invoked by replica task
--mas-annotations ${COLOR_YELLOW}MAS_ANNOTATIONS${TEXT_RESET} MAS Annotations
--auto-backup ${COLOR_YELLOW}AUTO_BACKUP${TEXT_RESET} Flag whether to install the Auto DB2 backup feature or not
--manually-set-enhanced-hadr ${COLOR_YELLOW}MANUALLY_SET_ENHANCED_HADR${TEXT_RESET} Flag to indicate whether enhanced HADR was configured manually
Secrets Manager:
--secrets-path ${COLOR_YELLOW}SECRETS_PATH${TEXT_RESET} Secrets Manager path
Expand Down Expand Up @@ -293,6 +294,9 @@ function gitops_db2u_database_noninteractive() {
--auto-backup)
export AUTO_BACKUP=$1 && shift
;;
--manually-set-enhanced-hadr)
export MANUALLY_SET_ENHANCED_HADR=$1 && shift
;;


# Automatic GitHub Push
Expand Down Expand Up @@ -506,6 +510,9 @@ DB2_WORKLOAD: '${DB2_WORKLOAD}'"
if [[ -z $AUTO_BACKUP ]]; then
export AUTO_BACKUP=false
fi
if [[ -z $MANUALLY_SET_ENHANCED_HADR ]]; then
export MANUALLY_SET_ENHANCED_HADR=false
fi
export DB2_NAMESPACE="db2u-${MAS_INSTANCE_ID}"
export DB2_DBNAME=${DB2_DBNAME:-"BLUDB"}
export JDBC_ROUTE=${JDBC_ROUTE:-"default"}
Expand Down Expand Up @@ -603,6 +610,7 @@ DB2_WORKLOAD: '${DB2_WORKLOAD}'"
echo_reset_dim "is-replica-task ............................... ${COLOR_MAGENTA}${IS_REPLICA_TASK}"
echo_reset_dim "mas-annotations ............................... ${COLOR_MAGENTA}${MAS_ANNOTATIONS}"
echo_reset_dim "auto-backup ................................... ${COLOR_MAGENTA}${AUTO_BACKUP}"
echo_reset_dim "manually-set-enhanced-hadr .................... ${COLOR_MAGENTA}${MANUALLY_SET_ENHANCED_HADR}"
reset_colors


Expand Down
14 changes: 13 additions & 1 deletion image/cli/mascli/functions/gitops_deprovision_db2u_database
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ GitOps Configuration:
-c, --cluster-id ${COLOR_YELLOW}CLUSTER_ID${TEXT_RESET} Cluster ID
-m, --mas-instance-id ${COLOR_YELLOW}MAS_INSTANCE_ID${TEXT_RESET} IBM Suite Maximo Application Suite Instance ID
--mas-app-id ${COLOR_YELLOW}MAS_APP_ID${TEXT_RESET} IBM Suite Maximo Application Suite App that uses this db2u instance
--is-replica-task ${COLOR_YELLOW}IS_REPLICA_TASK${TEXT_RESET} To deprovision standby database
Secrets Manager:
--secrets-path ${COLOR_YELLOW}SECRETS_PATH${TEXT_RESET} Secrets Manager path
Expand Down Expand Up @@ -88,6 +89,9 @@ function gitops_deprovision_db2u_database_noninteractive() {
--db2-instance-name)
export DB2_INSTANCE_NAME=$1 && shift
;;
--is-replica-task)
export IS_REPLICA_TASK=$1 && shift
;;

# Automatic GitHub Push
-P|--github-push)
Expand Down Expand Up @@ -136,8 +140,15 @@ function gitops_deprovision_db2u_database_noninteractive() {
[[ -z "$GITHUB_REPO" ]] && gitops_deprovision_db2u_database_help "GITHUB_REPO is not set"
[[ -z "$GIT_BRANCH" ]] && gitops_deprovision_db2u_database_help "GIT_BRANCH is not set"
fi
if [[ -z $IS_REPLICA_TASK ]]; then
export IS_REPLICA_TASK='false'
fi
if [[ -z $DB2_INSTANCE_NAME ]]; then
export DB2_INSTANCE_NAME=db2wh-${MAS_INSTANCE_ID}-${MAS_APP_ID}
if [[ $IS_REPLICA_TASK == 'true' ]]; then
export DB2_INSTANCE_NAME=db2wh-${MAS_INSTANCE_ID}-${MAS_APP_ID}-sdb
else
export DB2_INSTANCE_NAME=db2wh-${MAS_INSTANCE_ID}-${MAS_APP_ID}
fi
fi
}

Expand Down Expand Up @@ -207,6 +218,7 @@ function gitops_deprovision_db2u_database() {
echo "${TEXT_DIM}"
echo_h2 "DB2 Cluster Configuration" " "
echo_reset_dim "db2-instance-name ....................... ${COLOR_MAGENTA}${DB2_INSTANCE_NAME}"
echo_reset_dim "is-replica-task ......................... ${COLOR_MAGENTA}${IS_REPLICA_TASK}"
reset_colors

TEMP_DIR=$GITOPS_WORKING_DIR/tmp-deprovision-db2u-database
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,43 @@ db2_tls_version: {{DB2_TLS_VERSION}}
db2_table_org: {{DB2_TABLE_ORG}}
db2_node_label: {{DB2_NODE_LABEL}}
db2_dedicated_node: {{DB2_DEDICATED_NODE}}
replica_db: {{REPLICA_DB}}
db2_instance_registry:
{% filter indent(width=2) -%}
{{ DB2_INSTANCE_REGISTRY }}
{%- endfilter %}
{% if REPLICA_DB == 'true' %}
{% filter indent(width=2) -%}
DB2_STANDBY_ISO: 'UR'
DB2_HADR_ROS: 'ON'
DB2_HADR_ROS_AVOID_REPLAY_ONLY_WINDOW: 'ON'
{%- endfilter %}
{% endif %}
db2_database_db_config:
{% filter indent(width=2) -%}
{{ DB2_DATABASE_DB_CONFIG }}
{%- endfilter %}
{% if REPLICA_DB == 'true' %}
{% filter indent(width=2) -%}
HADR_SYNCMODE: 'NEARSYNC'
HADR_REMOTE_INST: 'db2inst1'
LOGINDEXBUILD: 'ON'
{% if MANUALLY_SET_ENHANCED_HADR != 'true' %}
HADR_LOCAL_HOST: 'c-{{DB2_INSTANCE_NAME}}-db2u-0|c-{{DB2_INSTANCE_NAME}}-db2u-0.c-{{DB2_INSTANCE_NAME}}-db2u-internal.{{DB2_NAMESPACE}}.svc.cluster.local'
{% if 'sdb' in DB2_INSTANCE_NAME %}
HADR_LOCAL_SVC: '60007|60007'
HADR_REMOTE_HOST: 'c-{{DB2_INSTANCE_NAME[:-4]}}-db2u-0.c-{{DB2_INSTANCE_NAME[:-4]}}-db2u-internal.{{DB2_NAMESPACE}}.svc.cluster.local'
HADR_REMOTE_SVC: '60006'
HADR_TARGET_LIST: 'c-{{DB2_INSTANCE_NAME[:-4]}}-db2u-0.c-{{DB2_INSTANCE_NAME[:-4]}}-db2u-internal.{{DB2_NAMESPACE}}.svc.cluster.local:60006'
{% else %}
HADR_LOCAL_SVC: '60006|60006'
HADR_REMOTE_HOST: 'c-{{DB2_INSTANCE_NAME}}-sdb-db2u-0.c-{{DB2_INSTANCE_NAME}}-sdb-db2u-internal.{{DB2_NAMESPACE}}.svc.cluster.local'
HADR_REMOTE_SVC: '60007'
HADR_TARGET_LIST: 'c-{{DB2_INSTANCE_NAME}}-sdb-db2u-0.c-{{DB2_INSTANCE_NAME}}-sdb-db2u-internal.{{DB2_NAMESPACE}}.svc.cluster.local:60007'
{% endif %}
{% endif %}
{%- endfilter %}
{% endif %}
{% if DB2_ADDONS_AUDIT_CONFIG %}
db2_addons_audit_config:
{% filter indent(width=2) -%}
Expand Down Expand Up @@ -88,4 +117,4 @@ db2_backup_bucket_access_key: <path:{{ SECRETS_PATH }}:{{ SECRET_KEY_DB2_BACKUP_
db2_backup_bucket_secret_key: <path:{{ SECRETS_PATH }}:{{ SECRET_KEY_DB2_BACKUP_BUCKET_SECRET_KEY }}>
db2_backup_notify_slack_url: {{DB2_BACKUP_NOTIFY_SLACK_URL}}
db2_backup_icd_auth_key: <path:{{ SECRETS_PATH }}:{{ SECRET_KEY_DB2_BACKUP_ICD_AUTH_KEY }}>
{% endif %}
{% endif %}
39 changes: 39 additions & 0 deletions tekton/src/pipelines/gitops/gitops-mas-apps.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,9 @@ spec:
- name: replica_db
type: string
default: "false"
- name: manually_set_enhanced_hadr
type: string
default: "false"

- name: custom_labels
type: string
Expand Down Expand Up @@ -828,6 +831,10 @@ spec:
value: $(params.db2_timezone)
- name: db2_backup_notify_slack_url
value: $(params.db2_backup_notify_slack_url)
- name: replica_db
value: $(params.replica_db)
- name: manually_set_enhanced_hadr
value: $(params.manually_set_enhanced_hadr)
- name: auto_backup
value: $(params.auto_backup)

Expand Down Expand Up @@ -993,6 +1000,8 @@ spec:
value: "false"
- name: replica_db
value: $(params.replica_db)
- name: manually_set_enhanced_hadr
value: $(params.manually_set_enhanced_hadr)
- name: mas_annotations
value: $(params.mas_annotations)
- name: is_replica_task
Expand Down Expand Up @@ -1868,6 +1877,36 @@ spec:
- input: "$(params.mas_edition)"
operator: in
values: ["essentials-maintenance", "standard", "premium"]

# 6.5 Manage Replica Config
- name: gitops-deprovision-db2u-replica-database-manage
runAfter:
- gitops-deprovision-mas-app-install-manage
params:
{{ lookup('template', pipeline_src_dir ~ '/taskdefs/gitops/common/gitops-params.yml.j2') | indent(8) }}
{{ lookup('template', pipeline_src_dir ~ '/taskdefs/gitops/common/secrets-params.yml.j2') | indent(8) }}
{{ lookup('template', pipeline_src_dir ~ '/taskdefs/gitops/common/git-params.yml.j2') | indent(8) }}

- name: mas_instance_id
value: $(params.mas_instance_id)
- name: mas_app_id
value: manage
- name: is_replica_task
value: 'true'

taskRef:
kind: Task
name: gitops-deprovision-db2u-database
workspaces:
- name: configs
workspace: configs
when:
- input: "$(params.mas_app_channel_manage)"
operator: in
values: [""]
- input: "$(params.mas_edition)"
operator: in
values: ["essentials-maintenance", "standard", "premium"]

# 7. IoT Deprovision
# -------------------------------------------------------------------------
Expand Down
15 changes: 0 additions & 15 deletions tekton/src/pipelines/taskdefs/fvt-manage/phase3.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# - fvt-manage-base-ui-classification (selenium)
# - fvt-manage-base-ui-helplinks (selenium)
# - fvt-manage-base-ui-wo-basic (selenium)
# - fvt-manage-base-ui-mas-navigation (selenium)
# - fvt-manage-base-ui-requestreport-pages (selenium)
# - fvt-manage-base-api-scheduler-qualification (pytest)
# -------------------------------------------------------------
Expand Down Expand Up @@ -50,20 +49,6 @@
- fvt-manage-base-api-system
- fvt-manage-base-api-mif

# Manage FVT Mas Navigation Scenario
- name: fvt-manage-base-ui-mas-navigation
{{ lookup('template', 'taskdefs/fvt-manage/ui/taskref.yml.j2') | indent(2) }}
{{ lookup('template', 'taskdefs/fvt-manage/ui/when.yml.j2') | indent(2) }}
params:
{{ lookup('template', 'taskdefs/fvt-manage/ui/params.yml.j2') | indent(4) }}
- name: fvt_test_suite_prefix
value: base-ui
- name: fvt_test_suite
value: mas-navigation
runAfter:
- fvt-manage-base-api-system
- fvt-manage-base-api-mif

# Manage FVT Generate Request Pages for Reports
- name: fvt-manage-base-ui-requestreport-pages
{{ lookup('template', 'taskdefs/fvt-manage/ui/taskref.yml.j2') | indent(2) }}
Expand Down
5 changes: 0 additions & 5 deletions tekton/src/pipelines/taskdefs/fvt-manage/phase4.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
- fvt-manage-base-ui-classification
- fvt-manage-base-ui-helplinks
- fvt-manage-base-ui-wo-basic
- fvt-manage-base-ui-mas-navigation
- fvt-manage-base-api-scheduler-qualification
- fvt-manage-base-ui-requestreport-pages

Expand All @@ -37,7 +36,6 @@
- fvt-manage-base-ui-classification
- fvt-manage-base-ui-helplinks
- fvt-manage-base-ui-wo-basic
- fvt-manage-base-ui-mas-navigation
- fvt-manage-base-api-scheduler-qualification
- fvt-manage-base-ui-requestreport-pages

Expand All @@ -55,7 +53,6 @@
- fvt-manage-base-ui-classification
- fvt-manage-base-ui-helplinks
- fvt-manage-base-ui-wo-basic
- fvt-manage-base-ui-mas-navigation
- fvt-manage-base-api-scheduler-qualification
- fvt-manage-base-ui-requestreport-pages

Expand All @@ -73,7 +70,6 @@
- fvt-manage-base-ui-classification
- fvt-manage-base-ui-helplinks
- fvt-manage-base-ui-wo-basic
- fvt-manage-base-ui-mas-navigation
- fvt-manage-base-api-scheduler-qualification
- fvt-manage-base-ui-requestreport-pages

Expand All @@ -91,6 +87,5 @@
- fvt-manage-base-ui-classification
- fvt-manage-base-ui-helplinks
- fvt-manage-base-ui-wo-basic
- fvt-manage-base-ui-mas-navigation
- fvt-manage-base-api-scheduler-qualification
- fvt-manage-base-ui-requestreport-pages
18 changes: 0 additions & 18 deletions tekton/src/pipelines/taskdefs/fvt-manage/phase5.yml.j2
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# -------------------------------------------------------------
# PHASE 5
# - fvt-manage-base-ui-sec-audit-log (selenium)
# - fvt-manage-base-ui-sec-inactive-auth (selenium)
# - fvt-manage-base-ui-wo-doclink (selenium)
# - fvt-manage-base-ui-directprint (selenium)
# - fvt-manage-base-ui-adhoc-report (selenium)
Expand All @@ -24,23 +23,6 @@
- fvt-manage-base-ui-user-consumption
- fvt-manage-base-ui-communication-temp

# Manage FVT Inactive User Authentication
- name: fvt-manage-base-ui-sec-inactive-auth
{{ lookup('template', pipeline_src_dir ~ '/taskdefs/fvt-manage/ui/taskref.yml.j2') | indent(2) }}
{{ lookup('template', pipeline_src_dir ~ '/taskdefs/fvt-manage/ui/when.yml.j2') | indent(2) }}
params:
{{ lookup('template', pipeline_src_dir ~ '/taskdefs/fvt-manage/ui/params.yml.j2') | indent(4) }}
- name: fvt_test_suite_prefix
value: base-ui
- name: fvt_test_suite
value: sec-inactive-auth
runAfter:
- fvt-manage-base-ui-escalation-action
- fvt-manage-base-ui-birt-report
- fvt-manage-base-ui-user-crud
- fvt-manage-base-ui-user-consumption
- fvt-manage-base-ui-communication-temp

# Manage FVT Work Order Attachments
- name: fvt-manage-base-ui-wo-doclink
{{ lookup('template', pipeline_src_dir ~ '/taskdefs/fvt-manage/ui/taskref.yml.j2') | indent(2) }}
Expand Down
15 changes: 0 additions & 15 deletions tekton/src/tasks/fvt/fvt-manage-last-phase.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -145,21 +145,6 @@ spec:

steps:

# Manage FVT Application Designer
- name: fvt-manage-application-designer
image: '$(params.fvt_image_registry)/fvt-manage/fvt-ibm-mas-manage@$(params.fvt_image_digest)'
imagePullPolicy: $(params.image_pull_policy)
timeout: 150m # Ensure bad FVTs don't run forever
onError: continue # Ensure bad FVTs don't break the pipeline
resources: {}
workingDir: /opt/ibm/test/src
volumeMounts:
- mountPath: /dev/shm
name: dshm
env:
- name: FVT_TEST_SUITE
value: application-designer

# Manage FVT Start Center
- name: fvt-manage-startcenter-config
image: '$(params.fvt_image_registry)/fvt-manage/fvt-ibm-mas-manage@$(params.fvt_image_digest)'
Expand Down
5 changes: 5 additions & 0 deletions tekton/src/tasks/gitops/gitops-db2u-database.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@ spec:
- name: mas_annotations
type: string
default: ""
- name: manually_set_enhanced_hadr
type: string
default: ""
stepTemplate:
name: gitops-db2u-database
env:
Expand Down Expand Up @@ -243,6 +246,8 @@ spec:
value: $(params.is_replica_task)
- name: MAS_ANNOTATIONS
value: $(params.mas_annotations)
- name: MANUALLY_SET_ENHANCED_HADR
value: $(params.manually_set_enhanced_hadr)
envFrom:
- configMapRef:
name: environment-properties
Expand Down
Loading

0 comments on commit 9e051d1

Please sign in to comment.