ODMS Data Upgradability

This section describes the APPINIT component which is introduced and required to support ODMS database upgradeability.

  1. INSTALL

If the Microservice is a new installation for the client, APPINIT component helps to create tables in the database. All the scripts which helps in creating tables are available as part of package under database/scripts/install folder.

  1. UPGRADE

The below versions supports to upgrade for 202301 and higher versions.

202110-202204

202204-202207

202207-202210

202210-202301

If required the client can upgrade from 202110 , 202204 , 202207, 202210 to 202301 and higher versions also. All the scripts which helps in database upgrade are committed to the source and available as part of package under database/scripts/migration folder.

APPINIT Component instructs whether if it is a new installation or an existing database upgrade using the environment property.

K8/AKS/EKS :

A new Container called APPINIT is introduced from 202301 and dbinit is removed to upgrade the existing database of the client. The following properties are required for APPINIT pod.

 env:
			- name: database.key
			value: {{ .Values.env.sqlinit.databaseKey }}
			- name: database.name
			value: {{ .Values.env.sqlinit.databaseName }}
			- name: db.driver.name
			value: {{ .Values.env.sqlinit.dbdriver }}
			- name: db.dialect
			value: {{ .Values.env.sqlinit.dbdialect }}
			- name: db.connection.url
			value: {{ .Values.env.sqlinit.dbconnectionurl }}   
			- name: db.auto.upgrade
			value: {{ .Values.env.sqlinit.dbautoupgrade | quote }}
			- name: temn.msf.database.auto.upgrade
			value: {{ .Values.env.sqlinit.dbautoupgrade | quote }}
			- name: temn.msf.logger.exportType
			value: {{ .Values.env.sqlinit.exportType }}
			- name: temn.msf.logger.socketHost
			value: {{ .Values.env.sqlinit.socketHost | quote }}
			- name: temn.msf.logger.socketPort
			value: {{ .Values.env.sqlinit.socketPort | quote }}
			- name: spring.profiles.active
			value: {{ .Values.env.sqlinit.springProfile }}           
			{{- if eq .Values.env.dbcred "Y" }}
			- name: db.username
			valueFrom:
			secretKeyRef:
			name: appinitsecret
			key: USER_NAME
			- name: db.password
			valueFrom:
			secretKeyRef:
			name: appinitsecret
			key: PASSWORD
			{{ else }}
			- name: db.username
			value: {{ .Values.env.sqlinit.dbusername }}
			- name: db.password
			value: {{ .Values.env.sqlinit.dbpassword }}
			{{- end }}
		restartPolicy: {{ .Values.restartPolicy }}

Azure

The following function APP is introduced for APPINIT. The below URL must be invoked to run the API in the above function app and this upgrades the database. https://${APPINIT_NAME}.azurewebsites.net/api/v1.0.0/dbmigration?code=${MASTER_KEY}.

These properties are mandatory properties that are to be set for function app.

--settings DATABASE_NAME=$DATABASE_NAME 
DB_CONNECTION_URL=$DB_CONNECTION_URL DRIVER_NAME=$DRIVER_NAME DIALECT=$DIALECT 
DB_PASSWORD=$DB_PASSWORD DB_USERNAME=$DB_USERNAME
DATABASE_KEY="sql" temn_msf_name=$MSF_NAME tem_msf_disableInbox=
$TEM_APPINIT_DISABLEINBOX temn_msf_security_authz_enabled=$APPINIT_AUTHZ_ENABLED
temn_msf_database_auto_upgrade=$DB_AUTO_UPGRADE 
JPA_ENABLED=$JPA_ENABLED MIN_POOL_SIZE=1 MAX_POOL_SIZE=10

AWS

Lambda function and API Gateway for campaign-initiate-db and campaign-get-appinit-status are created for APPINIT. The below API is invoked to upgrade database https://${restAPIId}.execute-api.$AWS_REGION.amazonaws.com/ms-campaign-api/v2.0.0/migration -H "x-api-key: ${apiKeyValue}".

The below property is mandatory and it must be set for lamda function.

--environment Variables=\{DRIVER_NAME=com.mysql.jdbc.Driver,
DIALECT=org.hibernate.dialect.
MySQL5InnoDBDialect,HOST=${host},PORT=${port},DATABASE_NAME=${dbname},
DB_USERNAME=root,DB_PASSWORD=campaignroot,
DB_CONNECTION_URL=jdbc:mysql://${host}:${port}/campaign,
DATABASE_KEY=sql,
temn_msf_security_authz_enabled=false,
className_initiateDbMigration=com.temenos.microservice.framework.dbmigration.core.InitiateDbMigrationImpl,
class_inbox_dao=com.temenos.microservice.framework.core.inbox.InboxDaoImpl,
class_outbox_dao=com.temenos.microservice.framework.core.outbox.OutboxDaoImpl,
tem_msf_disableInbox=true,temn_msf_database_auto_upgrade=N,
MIN_POOL_SIZE=5,MAX_POOL_SIZE=10,
JPA_ENABLED=none\}unzip master.zip

Field Name
|
Application/Table name

Temenos Headquarters SA
2 Rue de l'Ecole-de-Chimie
CH - 1205 Geneva
Switzerland

Copyright © 2020- Temenos Headquarters SA

Published on :
Tuesday, May 23, 2023 9:32:25 PM IST