Skip to content

Allow specification of any schema name in MREF SaaS - #588

Open
Sakshi-Singhroha1 wants to merge 4 commits into
mainfrom
MASCORE-10022-pr
Open

Sakshi-Singhroha1 wants to merge 4 commits into
mainfrom
MASCORE-10022-pr

Conversation

@Sakshi-Singhroha1

@Sakshi-Singhroha1 Sakshi-Singhroha1 commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Issue
https://jsw.ibm.com/browse/MASCORE-10022
https://jsw.ibm.com/browse/MASCORE-15753
https://jsw.ibm.com/browse/MASCORE-17866

Description

Some non-standard implementations of TRIRIGA in SaaS and on-prem use a schema name other than TRIDATA. When migrating these into MREF, if we can specify the same schema name as on the source system, we can use a DB2 backup/restore approach rather than engaging TEL to perform a full DB migration — avoiding additional cost and complexity.

This change makes the TRIRIGA DB2 schema name fully configurable across all affected Helm charts and scripts via a new facilities_db2_schema value, defaulting to TRIDATA so all existing deployments are completely unaffected.

Changes made:

  • Added facilities_db2_schema: "TRIDATA" to 120-ibm-db2u-database/values.yaml and 120-ibm-dbs-rds-database/values.yaml
  • 07-postsync-setup-db2_Job.yaml — DB2_SCHEMA now reads from .Values.facilities_db2_schema | default "TRIDATA"
  • create-tablespaces.sh.j2 — tablespace names use { db2_schema } placeholder replaced at runtime
  • runstats_volatile.sh — schema uses { db2_schema } placeholder replaced at runtime
  • grant_check.sh — schema reads from DB2_SCHEMA env var with TRIDATA fallback
  • 00-configmap.yaml (RDS) — tablespaces use dynamic tririga_schema from env var
  • 01-dbs-rds-postsync-setup.yaml — TRIRIGA_SCHEMA env var injected, version bumped to v3
  • 510-550-ibm-mas-suite-app-config/values.yaml — documented tririga_db_schema hint
  • 510-550-ibm-mas-masapp-configs.yaml — tririga_db_schema forwarded in facilities block

Test Results
Tested end-to-end on noble10/inst02

facilities_db2_schema: MYSCHEMA written correctly to gitops-envs via pipeline
Postsync job completed successfully
Tablespaces MYSCHEMA _DATA and MYSCHEMA _INDX created in DB2
Schema MYSCHEMA created, owned by DB2_FACILITIES user
db2wh-inst02-facilities DB2uInstance reached Ready state
image

…b2u scripts

- Parameterise SCHEMA in files/facilities/runstats_volatile.sh via { db2_schema } placeholder
  so the periodic runstats cron job targets the correct schema on the pod
- Parameterise TRIDATA_DATA/TRIDATA_INDX tablespace names in
  files/facilities/create-tablespaces.sh.j2 with { db2_schema }_DATA/_INDX placeholders
  so tablespaces are created with names matching the configured schema
- Update the sed command for create-tablespaces.sh.j2 in 07-postsync-setup-db2_Job.yaml
  to substitute { db2_schema } at template-time (was only substituting db2_dbname)
- Replace plain cp of runstats_volatile.sh in 07-postsync-setup-db2_Job.yaml with a sed
  call so the { db2_schema } placeholder is resolved before the script reaches the pod
- Add DB2_SCHEMA env-driven variable in files/grant_check.sh (defaults to TRIDATA) and
  replace hardcoded 'TRIDATA' in the syscat.SCHEMATA IN-list so the recurring grant
  cron job discovers and maintains roles for non-standard schema names
@Sakshi-Singhroha1 Sakshi-Singhroha1 changed the title Schema MYSCHEMA created, owned by DB2_FACILITIES user Allow specification of any schema name in MREF SaaS Sep 7, 2026
- name: DB2_DATABASE_CONFIG
value: {{ .Values.db2_database_db_config | toJson | quote }}
{{- end }}
- name: TRIRIGA_SCHEMA

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this change is required in RDS as well, then corresponding cli and tekton files should also be updated

{{- end }}
{{- end }}
{{- end }}
{{- if $value.tririga_db_schema }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this tririga_db_schema value and where is it coming from?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants