From 15f7837a04b41e907bfe13fd097c18c9a4f9aa3e Mon Sep 17 00:00:00 2001 From: roska Date: Fri, 15 Oct 2021 14:25:56 -0400 Subject: [PATCH 1/6] Add advanced settings variable This will allow downstream charts to set arbitrarty settings --- .../pega/charts/installer/config/prpcUtils.properties.tmpl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/charts/pega/charts/installer/config/prpcUtils.properties.tmpl b/charts/pega/charts/installer/config/prpcUtils.properties.tmpl index 5f0ed3c9c..91fe44fe4 100644 --- a/charts/pega/charts/installer/config/prpcUtils.properties.tmpl +++ b/charts/pega/charts/installer/config/prpcUtils.properties.tmpl @@ -1,7 +1,5 @@ # Properties file for use with PRPC Utilities. -################### COMMON PROPERTIES - DB CONNECTION ################## -######################################################################## # CONNECTION INFORMATION pega.jdbc.driver.jar={{ .Env.DRIVER_JAR_PATH }} pega.jdbc.driver.class={{ .Env.JDBC_CLASS }} @@ -42,4 +40,6 @@ pega.engine.classpath=database {{ if .Env.ENGINE_CODESET_VERSION }} pega.codeset.version={{ .Env.ENGINE_CODESET_VERSION }} {{ end -}} -{{ end -}} \ No newline at end of file +{{ end -}} + +{{ if .Env.PRPCUTILS_ADVANCED_SETTINGS }}{{ .Env.PRPCUTILS_ADVANCED_SETTINGS }}{{ end }} From 529de6d7c16790592c9d4332be2d652a7890b3d9 Mon Sep 17 00:00:00 2001 From: roska Date: Fri, 15 Oct 2021 14:49:33 -0400 Subject: [PATCH 2/6] adjust whitespace --- charts/pega/charts/installer/config/prpcUtils.properties.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/pega/charts/installer/config/prpcUtils.properties.tmpl b/charts/pega/charts/installer/config/prpcUtils.properties.tmpl index 91fe44fe4..7094e7a37 100644 --- a/charts/pega/charts/installer/config/prpcUtils.properties.tmpl +++ b/charts/pega/charts/installer/config/prpcUtils.properties.tmpl @@ -42,4 +42,4 @@ pega.codeset.version={{ .Env.ENGINE_CODESET_VERSION }} {{ end -}} {{ end -}} -{{ if .Env.PRPCUTILS_ADVANCED_SETTINGS }}{{ .Env.PRPCUTILS_ADVANCED_SETTINGS }}{{ end }} +{{ if .Env.PRPCUTILS_ADVANCED_SETTINGS }}{{ .Env.PRPCUTILS_ADVANCED_SETTINGS }}{{ end -}} From a820e376a8f23719c79f62aa9c156638d14e4773 Mon Sep 17 00:00:00 2001 From: roska Date: Fri, 15 Oct 2021 15:02:07 -0400 Subject: [PATCH 3/6] update test assertions --- charts/pega/charts/installer/config/prpcUtils.properties.tmpl | 4 +++- .../src/test/pega/data/expectedPRPCUtils.properties.tmpl | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/charts/pega/charts/installer/config/prpcUtils.properties.tmpl b/charts/pega/charts/installer/config/prpcUtils.properties.tmpl index 7094e7a37..ecdcd4a41 100644 --- a/charts/pega/charts/installer/config/prpcUtils.properties.tmpl +++ b/charts/pega/charts/installer/config/prpcUtils.properties.tmpl @@ -1,5 +1,7 @@ # Properties file for use with PRPC Utilities. +################### COMMON PROPERTIES - DB CONNECTION ################## +######################################################################## # CONNECTION INFORMATION pega.jdbc.driver.jar={{ .Env.DRIVER_JAR_PATH }} pega.jdbc.driver.class={{ .Env.JDBC_CLASS }} @@ -42,4 +44,4 @@ pega.codeset.version={{ .Env.ENGINE_CODESET_VERSION }} {{ end -}} {{ end -}} -{{ if .Env.PRPCUTILS_ADVANCED_SETTINGS }}{{ .Env.PRPCUTILS_ADVANCED_SETTINGS }}{{ end -}} +{{ if .Env.PRPCUTILS_ADVANCED_SETTINGS }}{{ .Env.PRPCUTILS_ADVANCED_SETTINGS }}{{ end }} diff --git a/terratest/src/test/pega/data/expectedPRPCUtils.properties.tmpl b/terratest/src/test/pega/data/expectedPRPCUtils.properties.tmpl index 5f0ed3c9c..ecdcd4a41 100644 --- a/terratest/src/test/pega/data/expectedPRPCUtils.properties.tmpl +++ b/terratest/src/test/pega/data/expectedPRPCUtils.properties.tmpl @@ -42,4 +42,6 @@ pega.engine.classpath=database {{ if .Env.ENGINE_CODESET_VERSION }} pega.codeset.version={{ .Env.ENGINE_CODESET_VERSION }} {{ end -}} -{{ end -}} \ No newline at end of file +{{ end -}} + +{{ if .Env.PRPCUTILS_ADVANCED_SETTINGS }}{{ .Env.PRPCUTILS_ADVANCED_SETTINGS }}{{ end }} From 3680b144a554b3cbb09496a8f46313a8c7963095 Mon Sep 17 00:00:00 2001 From: roska Date: Fri, 15 Oct 2021 15:13:08 -0400 Subject: [PATCH 4/6] Try using symlinks instead of copies --- .../expectedMigrateSystem.properties.tmpl | 83 +--------- .../data/expectedPRPCUtils.properties.tmpl | 48 +----- .../pega/data/expectedPRbootstrap.properties | 29 +--- .../src/test/pega/data/expectedPRlog4j2.xml | 147 +----------------- .../src/test/pega/data/expectedPrconfig.xml | 50 +----- .../data/expectedSetupdatabase.properties | 88 +---------- 6 files changed, 6 insertions(+), 439 deletions(-) mode change 100644 => 120000 terratest/src/test/pega/data/expectedMigrateSystem.properties.tmpl mode change 100644 => 120000 terratest/src/test/pega/data/expectedPRPCUtils.properties.tmpl mode change 100644 => 120000 terratest/src/test/pega/data/expectedPRbootstrap.properties mode change 100644 => 120000 terratest/src/test/pega/data/expectedPRlog4j2.xml mode change 100644 => 120000 terratest/src/test/pega/data/expectedPrconfig.xml mode change 100644 => 120000 terratest/src/test/pega/data/expectedSetupdatabase.properties diff --git a/terratest/src/test/pega/data/expectedMigrateSystem.properties.tmpl b/terratest/src/test/pega/data/expectedMigrateSystem.properties.tmpl deleted file mode 100644 index 810e9076c..000000000 --- a/terratest/src/test/pega/data/expectedMigrateSystem.properties.tmpl +++ /dev/null @@ -1,82 +0,0 @@ -# Properties File for use with migrateSystem.xml Update this file -# before using migrate.bat/sh script. -# Set the DB connection - -################### COMMON PROPERTIES - DB CONNECTION ################## -######################################################################## - -#The system where the tables/rules will be migrated from -pega.source.jdbc.driver.jar={{ .Env.DRIVER_JAR_PATH }} -pega.source.jdbc.driver.class={{ .Env.JDBC_CLASS }} -pega.source.database.type={{ .Env.DB_TYPE }} -pega.source.jdbc.url={{ .Env.JDBC_URL }} -pega.source.jdbc.username={{ .Env.DB_USERNAME }} -pega.source.jdbc.password={{ .Env.DB_PASSWORD }} -#Custom connection properties -pega.source.jdbc.custom.connection.properties={{ .Env.JDBC_CUSTOM_CONNECTION }} - -pega.source.rules.schema={{ .Env.RULES_SCHEMA }} -#Set the following property if the source system already contains a split schema. -pega.source.data.schema={{ .Env.DATA_SCHEMA }} -# Used for systems with a separate Customer Data Schema -# The value of pega.source.data is the default value for pega.source.customerdata.schema -pega.source.customerdata.schema={{ .Env.CUSTOMERDATA_SCHEMA }} - -#The system where the tables/rules will be migrated to -pega.target.jdbc.driver.jar={{ .Env.DRIVER_JAR_PATH }} -pega.target.jdbc.driver.class={{ .Env.JDBC_CLASS }} -pega.target.database.type={{ .Env.DB_TYPE }} -pega.target.jdbc.url={{ .Env.JDBC_URL }} -pega.target.jdbc.username={{ .Env.DB_USERNAME }} -pega.target.jdbc.password={{ .Env.DB_PASSWORD }} -#Custom connection properties -pega.target.jdbc.custom.connection.properties={{ .Env.JDBC_CUSTOM_CONNECTION }} - -pega.target.rules.schema={{ .Env.TARGET_RULES_SCHEMA }} -#Used to correctly schema qualify tables in stored procedures, views and triggers. -#This property is not required if migrating before performing an upgrade. -pega.target.data.schema={{ .Env.TARGET_DATA_SCHEMA }} -# Used for systems with a separate Customer Data Schema -# The value of pega.target.data is the default value for pega.target.customerdata.schema -pega.target.customerdata.schema={{ .Env.TARGET_CUSTOMERDATA_SCHEMA }} - -#Set this property to bypass udf generation on the target system. -pega.target.bypass.udf={{ .Env.BYPASS_UDF_GENERATION }} - -#The location of the db2zos site specific properties file. Only used if the target system is a db2zos database. -pega.target.zos.properties=config/db2zos/DB2SiteDependent.properties - -#The commit count to use when loading database tables -db.load.commit.rate={{ .Env.MIGRATION_DB_LOAD_COMMIT_RATE }} - -################### Migrate System Properties ########################################### -#The directory where output from the bulk mover will be stored. This directory will be cleared when pega.bulkmover.unload.db is run. -#This property must be set if either pega.bulkmover.unload.db or pega.bulkmover.load.db is set to true. -pega.bulkmover.directory=/opt/pega/kit/scripts/upgrade/mover - -#The location where a temporary directory will be created for use by the migrate system utilities. -pega.migrate.temp.directory=/opt/pega/kit/scripts/upgrade/migrate - - -######## The operations to be run by the utility, they will only be run if the property is set to true. -#Set to true if migrating before an upgrade. If true admin table(s) required -#for an upgrade will be migrated with the rules tables. -pega.move.admin.table={{ .Env.MOVE_ADMIN_TABLE }} -#Generate an xml document containing the definitions of tables in the source system. It will be found in the schema directory of the -#distribution image. -pega.clone.generate.xml={{ .Env.CLONE_GENERATE_XML }} -#Create ddl from the generated xml document. This ddl can be used to create copies of rule tables found on the source system. -pega.clone.create.ddl={{ .Env.CLONE_CREATE_DDL }} -#Apply the generated clone ddl to the target system. -pega.clone.apply.ddl={{ .Env.CLONE_APPLY_DDL }} -#Unload the rows from the rules tables on the source system into the pega.bulkmover.directory. -pega.bulkmover.unload.db={{ .Env.BULKMOVER_UNLOAD_DB }} -#Load the rows onto the target system from the pega.bulkmover.directory. -pega.bulkmover.load.db={{ .Env.BULKMOVER_LOAD_DB }} - -### The following operations should only be run when migrating upgraded rules -#Generate the rules schema objects (views, triggers, procedures, functions). The objects will be created in the pega.target.rules.schema -#but will contain references to the pega.target.data.schema where appropriate. -pega.rules.objects.generate={{ .Env.RULES_OBJECTS_GENERATE }} -#Apply the rules schema objects (views, triggers, procedures, functions) to pega.target.rules.schema. -pega.rules.objects.apply={{ .Env.RULES_OBJECTS_APPLY }} \ No newline at end of file diff --git a/terratest/src/test/pega/data/expectedMigrateSystem.properties.tmpl b/terratest/src/test/pega/data/expectedMigrateSystem.properties.tmpl new file mode 120000 index 000000000..37666945a --- /dev/null +++ b/terratest/src/test/pega/data/expectedMigrateSystem.properties.tmpl @@ -0,0 +1 @@ +../../../../../charts/pega/charts/installer/config/migrateSystem.properties.tmpl \ No newline at end of file diff --git a/terratest/src/test/pega/data/expectedPRPCUtils.properties.tmpl b/terratest/src/test/pega/data/expectedPRPCUtils.properties.tmpl deleted file mode 100644 index ecdcd4a41..000000000 --- a/terratest/src/test/pega/data/expectedPRPCUtils.properties.tmpl +++ /dev/null @@ -1,47 +0,0 @@ -# Properties file for use with PRPC Utilities. - -################### COMMON PROPERTIES - DB CONNECTION ################## -######################################################################## -# CONNECTION INFORMATION -pega.jdbc.driver.jar={{ .Env.DRIVER_JAR_PATH }} -pega.jdbc.driver.class={{ .Env.JDBC_CLASS }} -pega.database.type={{ .Env.DB_TYPE }} -pega.jdbc.url={{ .Env.JDBC_URL }} -pega.jdbc.username={{ .Env.DB_USERNAME }} -pega.jdbc.password={{ .Env.DB_PASSWORD }} - -# CUSTOM CONNECTION PROPERTIES -jdbc.custom.connection.properties={{ .Env.JDBC_CUSTOM_CONNECTION }} - -# RULES SCHEMA NAME -rules.schema.name={{ .Env.RULES_SCHEMA }} - -# DATA SCHEMA NAME -data.schema.name={{ .Env.DATA_SCHEMA }} - -# CUSTOMER DATA SCHEMA NAME -customerdata.schema.name={{ .Env.CUSTOMERDATA_SCHEMA }} - -# USER TEMP DIRECTORY -# Will use default if not set to valid directory -user.temp.dir=/opt/pega/temp - -# CUSTOM JVM ARGS -# Use this parameter to add jvm arguments other than Max Heap Size so your deployment nodes invoke these arguments each time the nodes start -custom.jvm.args={{ .Env.CUSTOM_JVM_ARGS }} - -############################### SETTINGS FOR CHANGING DYNAMIC SYSTEM SETTINGS ######## -###################################################################################### -dass.filepath=/opt/pega/kit/scripts/upgrade_dass_settings.json -# Load from filesystem if BYPASS_LOAD_ENGINE_CLASSES is true -{{ if isTrue .Env.BYPASS_LOAD_ENGINE_CLASSES }} -pega.engine.classpath=filesystem -pega.codeset.version={{ .Env.PRDEPLOY_CODESET_VERSION }} -{{ else }} -pega.engine.classpath=database -{{ if .Env.ENGINE_CODESET_VERSION }} -pega.codeset.version={{ .Env.ENGINE_CODESET_VERSION }} -{{ end -}} -{{ end -}} - -{{ if .Env.PRPCUTILS_ADVANCED_SETTINGS }}{{ .Env.PRPCUTILS_ADVANCED_SETTINGS }}{{ end }} diff --git a/terratest/src/test/pega/data/expectedPRPCUtils.properties.tmpl b/terratest/src/test/pega/data/expectedPRPCUtils.properties.tmpl new file mode 120000 index 000000000..8393b2dfc --- /dev/null +++ b/terratest/src/test/pega/data/expectedPRPCUtils.properties.tmpl @@ -0,0 +1 @@ +../../../../../charts/pega/charts/installer/config/prpcUtils.properties.tmpl \ No newline at end of file diff --git a/terratest/src/test/pega/data/expectedPRbootstrap.properties b/terratest/src/test/pega/data/expectedPRbootstrap.properties deleted file mode 100644 index 89a6bc7bc..000000000 --- a/terratest/src/test/pega/data/expectedPRbootstrap.properties +++ /dev/null @@ -1,28 +0,0 @@ -install.{{ .Env.DB_TYPE }}.schema={{ .Env.DATA_SCHEMA }} -initialization.settingsource=file -com.pega.pegarules.priv.LogHelper.USE_LOG4JV2=true -maxIdle={{ .Env.MAX_IDLE }} -com.pega.pegarules.bootstrap.engineclasses.tablename={{ .Env.RULES_SCHEMA }}.pr_engineclasses -install.{{ .Env.DB_TYPE }}.rulesSchema={{ .Env.RULES_SCHEMA }} -maxWait={{ .Env.MAX_WAIT }} -install.{{ .Env.DB_TYPE }}.url={{ .Env.JDBC_URL }} -maxActive={{ .Env.MAX_ACTIVE }} -install.{{ .Env.DB_TYPE }}.username={{ .Env.DB_USERNAME }} -{{ .Env.DB_TYPE }}.jdbc.class={{ .Env.JDBC_CLASS }} -com.pega.pegarules.bootstrap.assembledclasses.tablename={{ .Env.RULES_SCHEMA }}.pr_assembledclasses -com.pega.pegarules.bootstrap.assembledclasses.dbcpsource=install.{{ .Env.DB_TYPE }} -com.pega.pegarules.bootstrap.tempdir=/opt/pega/temp -poolPreparedStatements=true -install.{{ .Env.DB_TYPE }}.connectionProperties={{ .Env.JDBC_CUSTOM_CONNECTION }} -install.{{ .Env.DB_TYPE }}.password={{ .Env.DB_PASSWORD }} - -# When we bypass loading engine classes into database, then while querying also, we should not -# look into db. Instead we need to load engine classes from file system only. -# We cannot leave it to empty string as it causes validation failures in engine. -# With engine code set version set to FS_ONLY, we ensure engine classes gets loaded from packed engine -{{- if isTrue .Env.BYPASS_LOAD_ENGINE_CLASSES }} -com.pega.pegarules.bootstrap.codeset.version.Pega-EngineCode=FS_ONLY -{{- else }} -com.pega.pegarules.bootstrap.codeset.version.Pega-EngineCode={{ .Env.CODESET_VERSION }} -{{- end }} -com.pega.pegarules.bootstrap.engineclasses.dbcpsource=install.{{ .Env.DB_TYPE }} \ No newline at end of file diff --git a/terratest/src/test/pega/data/expectedPRbootstrap.properties b/terratest/src/test/pega/data/expectedPRbootstrap.properties new file mode 120000 index 000000000..c4b52d6b6 --- /dev/null +++ b/terratest/src/test/pega/data/expectedPRbootstrap.properties @@ -0,0 +1 @@ +../../../../../charts/pega/charts/installer/config/prbootstrap.properties.tmpl \ No newline at end of file diff --git a/terratest/src/test/pega/data/expectedPRlog4j2.xml b/terratest/src/test/pega/data/expectedPRlog4j2.xml deleted file mode 100644 index e93095dfb..000000000 --- a/terratest/src/test/pega/data/expectedPRlog4j2.xml +++ /dev/null @@ -1,146 +0,0 @@ - - - - - - - - - - - - - - - %d [%20.20t] [%10.10X{pegathread}] [%20.20X{tenantid}] [%20.20X{app}] (%30.30c{3}) %-5p %X{stack} %X{userid} - %m%n - - - - - - - - - - - - - - - - - %m%n - - - - - - - - - - - - - - %m%n - - - - - - - - - - - - - - %8r [%t] %-5p %c - %m%n - - - - - - - - - - - - - %d [%20.20t] [%10.10X{pegathread}] [%20.20X{app}] (%30.30c{3}) %-5p %X{stack} %X{userid} - %m%n - - - - - - - - - - - %d [%20.20t] [%10.10X{pegathread}] [%20.20X{app}] (%30.30c{3}) %-5p %X{stack} %X{userid} - %m%n - - - - - - - - - - - - %d [%20.20t] [%10.10X{pegathread}] [%20.20X{app}] (%30.30c{3}) %-5p %X{stack} %X{userid} - %m%n - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/terratest/src/test/pega/data/expectedPRlog4j2.xml b/terratest/src/test/pega/data/expectedPRlog4j2.xml new file mode 120000 index 000000000..c7a72351e --- /dev/null +++ b/terratest/src/test/pega/data/expectedPRlog4j2.xml @@ -0,0 +1 @@ +../../../../../charts/pega/charts/installer/config/prlog4j2.xml \ No newline at end of file diff --git a/terratest/src/test/pega/data/expectedPrconfig.xml b/terratest/src/test/pega/data/expectedPrconfig.xml deleted file mode 100644 index e5e665953..000000000 --- a/terratest/src/test/pega/data/expectedPrconfig.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/terratest/src/test/pega/data/expectedPrconfig.xml b/terratest/src/test/pega/data/expectedPrconfig.xml new file mode 120000 index 000000000..62a216a31 --- /dev/null +++ b/terratest/src/test/pega/data/expectedPrconfig.xml @@ -0,0 +1 @@ +../../../../../charts/pega/charts/installer/config/prconfig.xml.tmpl \ No newline at end of file diff --git a/terratest/src/test/pega/data/expectedSetupdatabase.properties b/terratest/src/test/pega/data/expectedSetupdatabase.properties deleted file mode 100644 index 2d718e4a8..000000000 --- a/terratest/src/test/pega/data/expectedSetupdatabase.properties +++ /dev/null @@ -1,87 +0,0 @@ -# Properties file for use with Pega Deployment Utilities. -# For more information, see the Pega Platform help. - -################### COMMON PROPERTIES - DB CONNECTION ################## -######################################################################## - -# CONNECTION INFORMATION -pega.jdbc.driver.jar={{ .Env.DRIVER_JAR_PATH }} -pega.jdbc.driver.class={{ .Env.JDBC_CLASS }} -pega.database.type={{ .Env.DB_TYPE }} -pega.jdbc.url={{ .Env.JDBC_URL }} -pega.jdbc.username={{ .Env.DB_USERNAME }} -pega.jdbc.password={{ .Env.DB_PASSWORD }} - -pega.admin.password={{ .Env.ADMIN_PASSWORD }} - -jdbc.custom.connection.properties={{ .Env.JDBC_CUSTOM_CONNECTION }} - -# RULES SCHEMA NAME -rules.schema.name={{ .Env.RULES_SCHEMA }} - -# DATA SCHEMA NAME -data.schema.name={{ .Env.DATA_SCHEMA }} - -# CUSTOMER DATA SCHEMA NAME -customerdata.schema.name={{ .Env.CUSTOMERDATA_SCHEMA }} - -# USER TEMP DIRECTORY -# Will use default if not set to valid directory -user.temp.dir=/opt/pega/temp - -# z/OS SITE-SPECIFIC PROPERTIES FILE -pega.zos.properties={{ .Env.ZOS_PROPERTIES }} - -# BYPASS UDF GENERATION? -bypass.udf.generation={{ .Env.BYPASS_UDF_GENERATION }} - -# BYPASS AUTOMATICALLY TRUNCATING PR_SYS_UPDATESCACHE? -bypass.truncate.updatescache={{ .Env.BYPASS_TRUNCATE_UPDATESCACHE }} - -# REBUILD DATABASE RULES INDEXES -rebuild.indexes={{ .Env.REBUILD_INDEXES }} - -# SYSTEM NAME -system.name={{ .Env.SYSTEM_NAME }} - -# PRODUCTION LEVEL -production.level={{ .Env.PRODUCTION_LEVEL }} - -# MULTITENANT SYSTEM? -# A multitenant system allows organizations to act as separate Pega Platform installations -multitenant.system={{ .Env.MT_SYSTEM }} - -# UPDATE EXISTING APPLICATIONS -update.existing.applications={{ .Env.UPDATE_EXISTING_APPLICATIONS }} - -# UPDATE APPLICATIONS SCHEMA -update.applications.schema={{ .Env.UPDATE_APPLICATIONS_SCHEMA }} - -# WORKLOAD MANAGER -db2zos.udf.wlm={{ .Env.DB2_ZOS_UDF_WLM }} - -# RUN RULESET CLEANUP? -run.ruleset.cleanup={{ .Env.RUN_RULESET_CLEANUP }} - -# CUSTOM CONFIGURATION PROPERTIES FILE -# The congfiguration files are dockerized using .tmpl files and are stored in opt/pega/config -# inside the container. -pegarules.config=/opt/pega/kit/scripts/prconfig.xml -prbootstrap.config=/opt/pega/kit/scripts/prbootstrap.properties -prlogging.config=/opt/pega/kit/scripts/prlog4j2.xml - -# Create schema if absent flag - Only from Docker related deployments -pega.schema.autocreate=true -{{- if isTrue .Env.BYPASS_LOAD_ENGINE_CLASSES }} - -# Load engine classes to database? -bypass.load.engine.classes={{ .Env.BYPASS_LOAD_ENGINE_CLASSES }} -{{- end }} -{{- if isTrue .Env.BYPASS_LOAD_ASSEMBLED_CLASSES }} - -# Load assembly classes to database? -bypass.load.assembled.classes={{ .Env.BYPASS_LOAD_ASSEMBLED_CLASSES }} -{{- end }} - -#Enable adminstrator user after upgrade by default. -upgrade.enable.admin=true \ No newline at end of file diff --git a/terratest/src/test/pega/data/expectedSetupdatabase.properties b/terratest/src/test/pega/data/expectedSetupdatabase.properties new file mode 120000 index 000000000..eb4989708 --- /dev/null +++ b/terratest/src/test/pega/data/expectedSetupdatabase.properties @@ -0,0 +1 @@ +../../../../../charts/pega/charts/installer/config/setupDatabase.properties.tmpl \ No newline at end of file From 0fef5a4b80cce5a6a1d8471796d20cd674f542c4 Mon Sep 17 00:00:00 2001 From: roska Date: Fri, 15 Oct 2021 15:33:53 -0400 Subject: [PATCH 5/6] Revert "Try using symlinks instead of copies" This reverts commit 3680b144a554b3cbb09496a8f46313a8c7963095. --- .../expectedMigrateSystem.properties.tmpl | 83 +++++++++- .../data/expectedPRPCUtils.properties.tmpl | 48 +++++- .../pega/data/expectedPRbootstrap.properties | 29 +++- .../src/test/pega/data/expectedPRlog4j2.xml | 147 +++++++++++++++++- .../src/test/pega/data/expectedPrconfig.xml | 50 +++++- .../data/expectedSetupdatabase.properties | 88 ++++++++++- 6 files changed, 439 insertions(+), 6 deletions(-) mode change 120000 => 100644 terratest/src/test/pega/data/expectedMigrateSystem.properties.tmpl mode change 120000 => 100644 terratest/src/test/pega/data/expectedPRPCUtils.properties.tmpl mode change 120000 => 100644 terratest/src/test/pega/data/expectedPRbootstrap.properties mode change 120000 => 100644 terratest/src/test/pega/data/expectedPRlog4j2.xml mode change 120000 => 100644 terratest/src/test/pega/data/expectedPrconfig.xml mode change 120000 => 100644 terratest/src/test/pega/data/expectedSetupdatabase.properties diff --git a/terratest/src/test/pega/data/expectedMigrateSystem.properties.tmpl b/terratest/src/test/pega/data/expectedMigrateSystem.properties.tmpl deleted file mode 120000 index 37666945a..000000000 --- a/terratest/src/test/pega/data/expectedMigrateSystem.properties.tmpl +++ /dev/null @@ -1 +0,0 @@ -../../../../../charts/pega/charts/installer/config/migrateSystem.properties.tmpl \ No newline at end of file diff --git a/terratest/src/test/pega/data/expectedMigrateSystem.properties.tmpl b/terratest/src/test/pega/data/expectedMigrateSystem.properties.tmpl new file mode 100644 index 000000000..810e9076c --- /dev/null +++ b/terratest/src/test/pega/data/expectedMigrateSystem.properties.tmpl @@ -0,0 +1,82 @@ +# Properties File for use with migrateSystem.xml Update this file +# before using migrate.bat/sh script. +# Set the DB connection + +################### COMMON PROPERTIES - DB CONNECTION ################## +######################################################################## + +#The system where the tables/rules will be migrated from +pega.source.jdbc.driver.jar={{ .Env.DRIVER_JAR_PATH }} +pega.source.jdbc.driver.class={{ .Env.JDBC_CLASS }} +pega.source.database.type={{ .Env.DB_TYPE }} +pega.source.jdbc.url={{ .Env.JDBC_URL }} +pega.source.jdbc.username={{ .Env.DB_USERNAME }} +pega.source.jdbc.password={{ .Env.DB_PASSWORD }} +#Custom connection properties +pega.source.jdbc.custom.connection.properties={{ .Env.JDBC_CUSTOM_CONNECTION }} + +pega.source.rules.schema={{ .Env.RULES_SCHEMA }} +#Set the following property if the source system already contains a split schema. +pega.source.data.schema={{ .Env.DATA_SCHEMA }} +# Used for systems with a separate Customer Data Schema +# The value of pega.source.data is the default value for pega.source.customerdata.schema +pega.source.customerdata.schema={{ .Env.CUSTOMERDATA_SCHEMA }} + +#The system where the tables/rules will be migrated to +pega.target.jdbc.driver.jar={{ .Env.DRIVER_JAR_PATH }} +pega.target.jdbc.driver.class={{ .Env.JDBC_CLASS }} +pega.target.database.type={{ .Env.DB_TYPE }} +pega.target.jdbc.url={{ .Env.JDBC_URL }} +pega.target.jdbc.username={{ .Env.DB_USERNAME }} +pega.target.jdbc.password={{ .Env.DB_PASSWORD }} +#Custom connection properties +pega.target.jdbc.custom.connection.properties={{ .Env.JDBC_CUSTOM_CONNECTION }} + +pega.target.rules.schema={{ .Env.TARGET_RULES_SCHEMA }} +#Used to correctly schema qualify tables in stored procedures, views and triggers. +#This property is not required if migrating before performing an upgrade. +pega.target.data.schema={{ .Env.TARGET_DATA_SCHEMA }} +# Used for systems with a separate Customer Data Schema +# The value of pega.target.data is the default value for pega.target.customerdata.schema +pega.target.customerdata.schema={{ .Env.TARGET_CUSTOMERDATA_SCHEMA }} + +#Set this property to bypass udf generation on the target system. +pega.target.bypass.udf={{ .Env.BYPASS_UDF_GENERATION }} + +#The location of the db2zos site specific properties file. Only used if the target system is a db2zos database. +pega.target.zos.properties=config/db2zos/DB2SiteDependent.properties + +#The commit count to use when loading database tables +db.load.commit.rate={{ .Env.MIGRATION_DB_LOAD_COMMIT_RATE }} + +################### Migrate System Properties ########################################### +#The directory where output from the bulk mover will be stored. This directory will be cleared when pega.bulkmover.unload.db is run. +#This property must be set if either pega.bulkmover.unload.db or pega.bulkmover.load.db is set to true. +pega.bulkmover.directory=/opt/pega/kit/scripts/upgrade/mover + +#The location where a temporary directory will be created for use by the migrate system utilities. +pega.migrate.temp.directory=/opt/pega/kit/scripts/upgrade/migrate + + +######## The operations to be run by the utility, they will only be run if the property is set to true. +#Set to true if migrating before an upgrade. If true admin table(s) required +#for an upgrade will be migrated with the rules tables. +pega.move.admin.table={{ .Env.MOVE_ADMIN_TABLE }} +#Generate an xml document containing the definitions of tables in the source system. It will be found in the schema directory of the +#distribution image. +pega.clone.generate.xml={{ .Env.CLONE_GENERATE_XML }} +#Create ddl from the generated xml document. This ddl can be used to create copies of rule tables found on the source system. +pega.clone.create.ddl={{ .Env.CLONE_CREATE_DDL }} +#Apply the generated clone ddl to the target system. +pega.clone.apply.ddl={{ .Env.CLONE_APPLY_DDL }} +#Unload the rows from the rules tables on the source system into the pega.bulkmover.directory. +pega.bulkmover.unload.db={{ .Env.BULKMOVER_UNLOAD_DB }} +#Load the rows onto the target system from the pega.bulkmover.directory. +pega.bulkmover.load.db={{ .Env.BULKMOVER_LOAD_DB }} + +### The following operations should only be run when migrating upgraded rules +#Generate the rules schema objects (views, triggers, procedures, functions). The objects will be created in the pega.target.rules.schema +#but will contain references to the pega.target.data.schema where appropriate. +pega.rules.objects.generate={{ .Env.RULES_OBJECTS_GENERATE }} +#Apply the rules schema objects (views, triggers, procedures, functions) to pega.target.rules.schema. +pega.rules.objects.apply={{ .Env.RULES_OBJECTS_APPLY }} \ No newline at end of file diff --git a/terratest/src/test/pega/data/expectedPRPCUtils.properties.tmpl b/terratest/src/test/pega/data/expectedPRPCUtils.properties.tmpl deleted file mode 120000 index 8393b2dfc..000000000 --- a/terratest/src/test/pega/data/expectedPRPCUtils.properties.tmpl +++ /dev/null @@ -1 +0,0 @@ -../../../../../charts/pega/charts/installer/config/prpcUtils.properties.tmpl \ No newline at end of file diff --git a/terratest/src/test/pega/data/expectedPRPCUtils.properties.tmpl b/terratest/src/test/pega/data/expectedPRPCUtils.properties.tmpl new file mode 100644 index 000000000..ecdcd4a41 --- /dev/null +++ b/terratest/src/test/pega/data/expectedPRPCUtils.properties.tmpl @@ -0,0 +1,47 @@ +# Properties file for use with PRPC Utilities. + +################### COMMON PROPERTIES - DB CONNECTION ################## +######################################################################## +# CONNECTION INFORMATION +pega.jdbc.driver.jar={{ .Env.DRIVER_JAR_PATH }} +pega.jdbc.driver.class={{ .Env.JDBC_CLASS }} +pega.database.type={{ .Env.DB_TYPE }} +pega.jdbc.url={{ .Env.JDBC_URL }} +pega.jdbc.username={{ .Env.DB_USERNAME }} +pega.jdbc.password={{ .Env.DB_PASSWORD }} + +# CUSTOM CONNECTION PROPERTIES +jdbc.custom.connection.properties={{ .Env.JDBC_CUSTOM_CONNECTION }} + +# RULES SCHEMA NAME +rules.schema.name={{ .Env.RULES_SCHEMA }} + +# DATA SCHEMA NAME +data.schema.name={{ .Env.DATA_SCHEMA }} + +# CUSTOMER DATA SCHEMA NAME +customerdata.schema.name={{ .Env.CUSTOMERDATA_SCHEMA }} + +# USER TEMP DIRECTORY +# Will use default if not set to valid directory +user.temp.dir=/opt/pega/temp + +# CUSTOM JVM ARGS +# Use this parameter to add jvm arguments other than Max Heap Size so your deployment nodes invoke these arguments each time the nodes start +custom.jvm.args={{ .Env.CUSTOM_JVM_ARGS }} + +############################### SETTINGS FOR CHANGING DYNAMIC SYSTEM SETTINGS ######## +###################################################################################### +dass.filepath=/opt/pega/kit/scripts/upgrade_dass_settings.json +# Load from filesystem if BYPASS_LOAD_ENGINE_CLASSES is true +{{ if isTrue .Env.BYPASS_LOAD_ENGINE_CLASSES }} +pega.engine.classpath=filesystem +pega.codeset.version={{ .Env.PRDEPLOY_CODESET_VERSION }} +{{ else }} +pega.engine.classpath=database +{{ if .Env.ENGINE_CODESET_VERSION }} +pega.codeset.version={{ .Env.ENGINE_CODESET_VERSION }} +{{ end -}} +{{ end -}} + +{{ if .Env.PRPCUTILS_ADVANCED_SETTINGS }}{{ .Env.PRPCUTILS_ADVANCED_SETTINGS }}{{ end }} diff --git a/terratest/src/test/pega/data/expectedPRbootstrap.properties b/terratest/src/test/pega/data/expectedPRbootstrap.properties deleted file mode 120000 index c4b52d6b6..000000000 --- a/terratest/src/test/pega/data/expectedPRbootstrap.properties +++ /dev/null @@ -1 +0,0 @@ -../../../../../charts/pega/charts/installer/config/prbootstrap.properties.tmpl \ No newline at end of file diff --git a/terratest/src/test/pega/data/expectedPRbootstrap.properties b/terratest/src/test/pega/data/expectedPRbootstrap.properties new file mode 100644 index 000000000..89a6bc7bc --- /dev/null +++ b/terratest/src/test/pega/data/expectedPRbootstrap.properties @@ -0,0 +1,28 @@ +install.{{ .Env.DB_TYPE }}.schema={{ .Env.DATA_SCHEMA }} +initialization.settingsource=file +com.pega.pegarules.priv.LogHelper.USE_LOG4JV2=true +maxIdle={{ .Env.MAX_IDLE }} +com.pega.pegarules.bootstrap.engineclasses.tablename={{ .Env.RULES_SCHEMA }}.pr_engineclasses +install.{{ .Env.DB_TYPE }}.rulesSchema={{ .Env.RULES_SCHEMA }} +maxWait={{ .Env.MAX_WAIT }} +install.{{ .Env.DB_TYPE }}.url={{ .Env.JDBC_URL }} +maxActive={{ .Env.MAX_ACTIVE }} +install.{{ .Env.DB_TYPE }}.username={{ .Env.DB_USERNAME }} +{{ .Env.DB_TYPE }}.jdbc.class={{ .Env.JDBC_CLASS }} +com.pega.pegarules.bootstrap.assembledclasses.tablename={{ .Env.RULES_SCHEMA }}.pr_assembledclasses +com.pega.pegarules.bootstrap.assembledclasses.dbcpsource=install.{{ .Env.DB_TYPE }} +com.pega.pegarules.bootstrap.tempdir=/opt/pega/temp +poolPreparedStatements=true +install.{{ .Env.DB_TYPE }}.connectionProperties={{ .Env.JDBC_CUSTOM_CONNECTION }} +install.{{ .Env.DB_TYPE }}.password={{ .Env.DB_PASSWORD }} + +# When we bypass loading engine classes into database, then while querying also, we should not +# look into db. Instead we need to load engine classes from file system only. +# We cannot leave it to empty string as it causes validation failures in engine. +# With engine code set version set to FS_ONLY, we ensure engine classes gets loaded from packed engine +{{- if isTrue .Env.BYPASS_LOAD_ENGINE_CLASSES }} +com.pega.pegarules.bootstrap.codeset.version.Pega-EngineCode=FS_ONLY +{{- else }} +com.pega.pegarules.bootstrap.codeset.version.Pega-EngineCode={{ .Env.CODESET_VERSION }} +{{- end }} +com.pega.pegarules.bootstrap.engineclasses.dbcpsource=install.{{ .Env.DB_TYPE }} \ No newline at end of file diff --git a/terratest/src/test/pega/data/expectedPRlog4j2.xml b/terratest/src/test/pega/data/expectedPRlog4j2.xml deleted file mode 120000 index c7a72351e..000000000 --- a/terratest/src/test/pega/data/expectedPRlog4j2.xml +++ /dev/null @@ -1 +0,0 @@ -../../../../../charts/pega/charts/installer/config/prlog4j2.xml \ No newline at end of file diff --git a/terratest/src/test/pega/data/expectedPRlog4j2.xml b/terratest/src/test/pega/data/expectedPRlog4j2.xml new file mode 100644 index 000000000..e93095dfb --- /dev/null +++ b/terratest/src/test/pega/data/expectedPRlog4j2.xml @@ -0,0 +1,146 @@ + + + + + + + + + + + + + + + %d [%20.20t] [%10.10X{pegathread}] [%20.20X{tenantid}] [%20.20X{app}] (%30.30c{3}) %-5p %X{stack} %X{userid} - %m%n + + + + + + + + + + + + + + + + + %m%n + + + + + + + + + + + + + + %m%n + + + + + + + + + + + + + + %8r [%t] %-5p %c - %m%n + + + + + + + + + + + + + %d [%20.20t] [%10.10X{pegathread}] [%20.20X{app}] (%30.30c{3}) %-5p %X{stack} %X{userid} - %m%n + + + + + + + + + + + %d [%20.20t] [%10.10X{pegathread}] [%20.20X{app}] (%30.30c{3}) %-5p %X{stack} %X{userid} - %m%n + + + + + + + + + + + + %d [%20.20t] [%10.10X{pegathread}] [%20.20X{app}] (%30.30c{3}) %-5p %X{stack} %X{userid} - %m%n + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/terratest/src/test/pega/data/expectedPrconfig.xml b/terratest/src/test/pega/data/expectedPrconfig.xml deleted file mode 120000 index 62a216a31..000000000 --- a/terratest/src/test/pega/data/expectedPrconfig.xml +++ /dev/null @@ -1 +0,0 @@ -../../../../../charts/pega/charts/installer/config/prconfig.xml.tmpl \ No newline at end of file diff --git a/terratest/src/test/pega/data/expectedPrconfig.xml b/terratest/src/test/pega/data/expectedPrconfig.xml new file mode 100644 index 000000000..e5e665953 --- /dev/null +++ b/terratest/src/test/pega/data/expectedPrconfig.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/terratest/src/test/pega/data/expectedSetupdatabase.properties b/terratest/src/test/pega/data/expectedSetupdatabase.properties deleted file mode 120000 index eb4989708..000000000 --- a/terratest/src/test/pega/data/expectedSetupdatabase.properties +++ /dev/null @@ -1 +0,0 @@ -../../../../../charts/pega/charts/installer/config/setupDatabase.properties.tmpl \ No newline at end of file diff --git a/terratest/src/test/pega/data/expectedSetupdatabase.properties b/terratest/src/test/pega/data/expectedSetupdatabase.properties new file mode 100644 index 000000000..2d718e4a8 --- /dev/null +++ b/terratest/src/test/pega/data/expectedSetupdatabase.properties @@ -0,0 +1,87 @@ +# Properties file for use with Pega Deployment Utilities. +# For more information, see the Pega Platform help. + +################### COMMON PROPERTIES - DB CONNECTION ################## +######################################################################## + +# CONNECTION INFORMATION +pega.jdbc.driver.jar={{ .Env.DRIVER_JAR_PATH }} +pega.jdbc.driver.class={{ .Env.JDBC_CLASS }} +pega.database.type={{ .Env.DB_TYPE }} +pega.jdbc.url={{ .Env.JDBC_URL }} +pega.jdbc.username={{ .Env.DB_USERNAME }} +pega.jdbc.password={{ .Env.DB_PASSWORD }} + +pega.admin.password={{ .Env.ADMIN_PASSWORD }} + +jdbc.custom.connection.properties={{ .Env.JDBC_CUSTOM_CONNECTION }} + +# RULES SCHEMA NAME +rules.schema.name={{ .Env.RULES_SCHEMA }} + +# DATA SCHEMA NAME +data.schema.name={{ .Env.DATA_SCHEMA }} + +# CUSTOMER DATA SCHEMA NAME +customerdata.schema.name={{ .Env.CUSTOMERDATA_SCHEMA }} + +# USER TEMP DIRECTORY +# Will use default if not set to valid directory +user.temp.dir=/opt/pega/temp + +# z/OS SITE-SPECIFIC PROPERTIES FILE +pega.zos.properties={{ .Env.ZOS_PROPERTIES }} + +# BYPASS UDF GENERATION? +bypass.udf.generation={{ .Env.BYPASS_UDF_GENERATION }} + +# BYPASS AUTOMATICALLY TRUNCATING PR_SYS_UPDATESCACHE? +bypass.truncate.updatescache={{ .Env.BYPASS_TRUNCATE_UPDATESCACHE }} + +# REBUILD DATABASE RULES INDEXES +rebuild.indexes={{ .Env.REBUILD_INDEXES }} + +# SYSTEM NAME +system.name={{ .Env.SYSTEM_NAME }} + +# PRODUCTION LEVEL +production.level={{ .Env.PRODUCTION_LEVEL }} + +# MULTITENANT SYSTEM? +# A multitenant system allows organizations to act as separate Pega Platform installations +multitenant.system={{ .Env.MT_SYSTEM }} + +# UPDATE EXISTING APPLICATIONS +update.existing.applications={{ .Env.UPDATE_EXISTING_APPLICATIONS }} + +# UPDATE APPLICATIONS SCHEMA +update.applications.schema={{ .Env.UPDATE_APPLICATIONS_SCHEMA }} + +# WORKLOAD MANAGER +db2zos.udf.wlm={{ .Env.DB2_ZOS_UDF_WLM }} + +# RUN RULESET CLEANUP? +run.ruleset.cleanup={{ .Env.RUN_RULESET_CLEANUP }} + +# CUSTOM CONFIGURATION PROPERTIES FILE +# The congfiguration files are dockerized using .tmpl files and are stored in opt/pega/config +# inside the container. +pegarules.config=/opt/pega/kit/scripts/prconfig.xml +prbootstrap.config=/opt/pega/kit/scripts/prbootstrap.properties +prlogging.config=/opt/pega/kit/scripts/prlog4j2.xml + +# Create schema if absent flag - Only from Docker related deployments +pega.schema.autocreate=true +{{- if isTrue .Env.BYPASS_LOAD_ENGINE_CLASSES }} + +# Load engine classes to database? +bypass.load.engine.classes={{ .Env.BYPASS_LOAD_ENGINE_CLASSES }} +{{- end }} +{{- if isTrue .Env.BYPASS_LOAD_ASSEMBLED_CLASSES }} + +# Load assembly classes to database? +bypass.load.assembled.classes={{ .Env.BYPASS_LOAD_ASSEMBLED_CLASSES }} +{{- end }} + +#Enable adminstrator user after upgrade by default. +upgrade.enable.admin=true \ No newline at end of file From 461e06e3297334b155d7a0eb373754bcc35cd7a7 Mon Sep 17 00:00:00 2001 From: roska Date: Fri, 15 Oct 2021 15:45:30 -0400 Subject: [PATCH 6/6] adjust whitespace --- charts/pega/charts/installer/config/prpcUtils.properties.tmpl | 2 +- terratest/src/test/pega/data/expectedPRPCUtils.properties.tmpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/pega/charts/installer/config/prpcUtils.properties.tmpl b/charts/pega/charts/installer/config/prpcUtils.properties.tmpl index ecdcd4a41..1f06d94c3 100644 --- a/charts/pega/charts/installer/config/prpcUtils.properties.tmpl +++ b/charts/pega/charts/installer/config/prpcUtils.properties.tmpl @@ -44,4 +44,4 @@ pega.codeset.version={{ .Env.ENGINE_CODESET_VERSION }} {{ end -}} {{ end -}} -{{ if .Env.PRPCUTILS_ADVANCED_SETTINGS }}{{ .Env.PRPCUTILS_ADVANCED_SETTINGS }}{{ end }} +{{ if .Env.PRPCUTILS_ADVANCED_SETTINGS }}{{ .Env.PRPCUTILS_ADVANCED_SETTINGS }}{{ end }} \ No newline at end of file diff --git a/terratest/src/test/pega/data/expectedPRPCUtils.properties.tmpl b/terratest/src/test/pega/data/expectedPRPCUtils.properties.tmpl index ecdcd4a41..1f06d94c3 100644 --- a/terratest/src/test/pega/data/expectedPRPCUtils.properties.tmpl +++ b/terratest/src/test/pega/data/expectedPRPCUtils.properties.tmpl @@ -44,4 +44,4 @@ pega.codeset.version={{ .Env.ENGINE_CODESET_VERSION }} {{ end -}} {{ end -}} -{{ if .Env.PRPCUTILS_ADVANCED_SETTINGS }}{{ .Env.PRPCUTILS_ADVANCED_SETTINGS }}{{ end }} +{{ if .Env.PRPCUTILS_ADVANCED_SETTINGS }}{{ .Env.PRPCUTILS_ADVANCED_SETTINGS }}{{ end }} \ No newline at end of file