Upgrade to DHF 4.3
Prerequisites
Data Hub Framework 4.3 requires the following software:
-
MarkLogic Server:
-
For DHF 4.3.2, MarkLogic Server 9.0-7 up to the latest 9.x version. (See the version compatibility page for other DHF versions.)
-
If you are upgrading both DHF and MarkLogic, you can upgrade them independently of each other as long as you are running a version of MarkLogic Server that is compatible with the DHF version you plan to install. (See Version Compatibility.) If you are running an older version of MarkLogic Server, then you must upgrade MarkLogic Server before upgrading DHF.
-
If you would like to use MarkLogic Server 10, you must upgrade to Data Hub 5.
-
Deploying to the MarkLogic Data Hub Service requires DHF 4.0.1 or later and MarkLogic 9.0-7 or later. See the Data Hub Service overview and documentation.
-
-
Oracle Java 8 JRE
-
For the QuickStart tool: A modern browser, such as Chrome or Firefox
Upgrade Notes and Procedure
Upgrade Notes for DHF 4.3
The following security roles changed in DHF 4.3.
| old roles | old default users | new roles | new default users |
|---|---|---|---|
| hub-admin-role | hub-admin-user | data-hub-admin-role | (no default) |
| flow-developer-role | flow-developer | ||
| data-hub-role | data-hub-user | flow-operator-role | flow-operator |
You can use your old custom users instead of the new default users. Remember to assign them to the new roles.
flow-developer-role role in DHF is the equivalent of the flowDeveloper role in DHS. You must create a user in DHS to assign to the flowDeveloper role and add that user’s credentials to the gradle.properties file you use for DHS (e.g., gradle-DHS.properties).For more information on roles in DHF, see Security.
The notes and steps in this tab are for the following upgrade paths:
- DHF 4.2.x » 4.3.x
- DHF 4.1.x » 4.3.x
Procedure
-
In your
build.gradlefile, replace all occurrences of your old DHF version number with4.3.2.Example: In the
pluginssection and thedependenciessection,plugins { id 'net.saliman.properties' version '1.4.6' id 'com.marklogic.ml-data-hub' version '4.3.2' } ... dependencies { compile 'com.marklogic:marklogic-data-hub:4.3.2' compile 'com.marklogic:marklogic-xcc:9.0.6' } -
At your project’s root folder, run the
hubUpdate -iGradle task../gradlew hubUpdate -i
gradlew.bat hubUpdate -i
Result: A
gradle-GENERATED.propertiesfile is created. -
Update your
gradle.propertiesfile based on thegradle-GENERATED.propertiesfile.IMPORTANT: Do NOT update
mlUsernameormlPasswordyet, and do NOT delete the oldmlHubUser*andmlHubAdmin*properties yet. You need the old user accounts to access MarkLogic Server in themlDeploytask.a. Add the following properties and replace the values accordingly.
mlDHFVersion=4.3.2 ... mlFlowOperatorRole=flow-operator-role mlFlowOperatorUserName=flow-operator mlFlowOperatorPassword=your-flow-operator-password ... mlFlowDeveloperRole=flow-developer-role mlFlowDeveloperUserName=flow-developer mlFlowDeveloperPassword=your-flow-developer-password ... mlDataHubAdminRole=data-hub-admin-roleb. Assign default module permissions to the new roles.
mlModulePermissions=rest-reader,read,rest-writer,insert,rest-writer,update,rest-extension-user,execute,flow-developer-role,read,flow-developer-role,execute,flow-developer-role,insert,flow-operator-role,read,flow-operator-role,execute -
If your custom code refers to the old roles/users, change them to refer to the new roles/users.
-
At your project’s root folder, run the
mlDeployGradle task../gradlew mlDeploy
gradlew.bat mlDeploy
-
Edit your
gradle.propertiesfile again.a. Update
mlUsernameormlPasswordwith a new user assigned toflow-developer-role(to create and deploy flows) or toflow-operator-role(to run flows).mlUsername=flow-operator mlPassword=your-flow-operator-passwordb. Remove the following properties.
- mlHubUserRole
- mlHubUserName
- mlHubUserPassword
- mlHubAdminRole
- mlHubAdminUserName
- mlHubAdminUserPassword
-
(Optional) Delete the old roles from MarkLogic Server.
- hub-admin-role
- data-hub-role
-
Run your ingest and harmonize flows.
If you use MarkLogic Content Pump for your input flows, run MLCP with the
-transform_moduleoption as follows:-transform_module "/data-hub/4/transforms/mlcp-flow-transform.xqy"
-transform_module "/data-hub/4/transforms/mlcp-flow-transform.sjs"
The notes and steps in this tab are for the following upgrade paths:
- DHF 4.0.3 » 4.3.x
- DHF 4.0.2 » 4.3.x
- DHF 4.0.1 » 4.3.x
Additional Upgrade Notes
-
The
hubUpdatetask makes the following changes.-
Archives existing configuration directories under
your-project-root/src/main. (4.0.x is the old DHF version.)old directory new archive directory hub-internal-confighub-internal-config-4.0.xml-configml-config-4.0.x -
Overwrites the existing databases, server directories, and the security directory.
-
-
Running the
hubUpdatetask with the-ioption (info mode) displays specifically what the task does, including configuration settings that changed.Example: A verbose report.
Upgrading entity-config dir Upgrading hub-internal-config dir Processing /your-project-root/hub-internal-config/databases/job-database.json Setting "schema-database" to "%%mlStagingSchemasDbName%%" Setting "triggers-database" to "%%mlStagingTriggersDbName%%" Adding path range indexes to job-database.json Writing /your-project-root/hub-internal-config/databases/job-database.json to /your-project-root/src/main/hub-internal-config/databases/job-database.json Processing /your-project-root/hub-internal-config/databases/final-database.json Setting "schema-database" to "%%mlFinalSchemasDbName%%" Setting "triggers-database" to "%%mlFinalTriggersDbName%%" Writing /your-project-root/hub-internal-config/databases/final-database.json to /your-project-root/src/main/ml-config/databases/final-database.json Processing /your-project-root/hub-internal-config/databases/staging-database.json Setting "schema-database" to "%%mlStagingSchemasDbName%%" Setting "triggers-database" to "%%mlStagingTriggersDbName%%" Writing /your-project-root/hub-internal-config/databases/staging-database.json to /your-project-root/src/main/hub-internal-config/databases/staging-database.json Writing /your-project-root/hub-internal-config/databases/modules-database.json to /your-project-root/src/main/ml-config/databases/modules-database.json Processing /your-project-root/hub-internal-config/servers/job-server.json Setting "url-rewriter" to "/data-hub/4/tracing/tracing-rewriter.xml" Writing /your-project-root/hub-internal-config/servers/job-server.json to /your-project-root/src/main/hub-internal-config/servers/job-server.json Writing /your-project-root/hub-internal-config/servers/final-server.json to /your-project-root/src/main/ml-config/servers/final-server.json Processing /your-project-root/hub-internal-config/servers/staging-server.json Setting "url-rewriter" to "/data-hub/4/rest-api/rewriter.xml" Setting "error-handler" to "/data-hub/4/rest-api/error-handler.xqy" Writing /your-project-root/hub-internal-config/servers/staging-server.json to /your-project-root/src/main/hub-internal-config/servers/staging-server.json Upgrading user-config dir
Procedure
-
In your
build.gradlefile, replace all occurrences of your old DHF version number with4.3.2.Example: In the
pluginssection and thedependenciessection,plugins { id 'net.saliman.properties' version '1.4.6' id 'com.marklogic.ml-data-hub' version '4.3.2' } ... dependencies { compile 'com.marklogic:marklogic-data-hub:4.3.2' compile 'com.marklogic:marklogic-xcc:9.0.6' } -
At your project’s root folder, run the
hubUpdate -iGradle task../gradlew hubUpdate -i
gradlew.bat hubUpdate -i
Result: A
gradle-GENERATED.propertiesfile is created. -
Update your
gradle.propertiesfile based on thegradle-GENERATED.propertiesfile.IMPORTANT: Do NOT update
mlUsernameormlPasswordyet, and do NOT delete the oldmlHubUser*andmlHubAdmin*properties yet. You need the old user accounts to access MarkLogic Server in themlDeploytask.a. Add the following properties and replace the values accordingly.
mlDHFVersion=4.3.2 ... mlFlowOperatorRole=flow-operator-role mlFlowOperatorUserName=flow-operator mlFlowOperatorPassword=your-flow-operator-password ... mlFlowDeveloperRole=flow-developer-role mlFlowDeveloperUserName=flow-developer mlFlowDeveloperPassword=your-flow-developer-password ... mlDataHubAdminRole=data-hub-admin-roleb. Assign default module permissions to the new roles.
mlModulePermissions=rest-reader,read,rest-writer,insert,rest-writer,update,rest-extension-user,execute,flow-developer-role,read,flow-developer-role,execute,flow-developer-role,insert,flow-operator-role,read,flow-operator-role,execute -
If your custom code refers to the old roles/users, change them to refer to the new roles/users.
-
In
your-project-root/src/main, copy any custom database/server configurations from the archived configuration files to the new ones. (4.0.x is the old DHF version.)copy from files in paste to files in hub-internal-config-4.0.xhub-internal-configml-config-4.0.xml-config -
At your project’s root folder, run the
mlDeployGradle task../gradlew mlDeploy
gradlew.bat mlDeploy
-
Edit your
gradle.propertiesfile again.a. Update
mlUsernameormlPasswordwith a new user assigned toflow-developer-role(to create and deploy flows) or toflow-operator-role(to run flows).mlUsername=flow-operator mlPassword=your-flow-operator-passwordb. Remove the following properties.
- mlHubUserRole
- mlHubUserName
- mlHubUserPassword
- mlHubAdminRole
- mlHubAdminUserName
- mlHubAdminUserPassword
-
(Optional) Delete the old roles from MarkLogic Server.
- hub-admin-role
- data-hub-role
-
Run your ingest and harmonize flows.
If you use MarkLogic Content Pump for your input flows, run MLCP with the
-transform_moduleoption as follows:-transform_module "/data-hub/4/transforms/mlcp-flow-transform.xqy"
-transform_module "/data-hub/4/transforms/mlcp-flow-transform.sjs"
The notes and steps in this tab are for the following upgrade paths:
- DHF 4.0.0 » 4.3.x
Additional Upgrade Notes
-
DHF 4.0.0 is unique among DHF versions because it has two modules databases: one for the final app server/database and one for the staging app server/database. All other DHF versions before and after 4.0.0 have only one modules database. When upgrading, those databases must be commented out in
gradle.properties. -
The
hubUpdatetask makes the following changes.-
Archives existing configuration directories under
your-project-root/src/main.old directory new archive directory hub-internal-confighub-internal-config-4.0.0ml-configml-config-4.0.0 -
Overwrites the existing databases, server directories, and the security directory.
-
-
Running the
hubUpdatetask with the-ioption (info mode) displays specifically what the task does, including configuration settings that changed.Example: A verbose report.
Upgrading entity-config dir Upgrading hub-internal-config dir Processing /your-project-root/hub-internal-config/databases/job-database.json Setting "schema-database" to "%%mlStagingSchemasDbName%%" Setting "triggers-database" to "%%mlStagingTriggersDbName%%" Adding path range indexes to job-database.json Writing /your-project-root/hub-internal-config/databases/job-database.json to /your-project-root/src/main/hub-internal-config/databases/job-database.json Processing /your-project-root/hub-internal-config/databases/final-database.json Setting "schema-database" to "%%mlFinalSchemasDbName%%" Setting "triggers-database" to "%%mlFinalTriggersDbName%%" Writing /your-project-root/hub-internal-config/databases/final-database.json to /your-project-root/src/main/ml-config/databases/final-database.json Processing /your-project-root/hub-internal-config/databases/staging-database.json Setting "schema-database" to "%%mlStagingSchemasDbName%%" Setting "triggers-database" to "%%mlStagingTriggersDbName%%" Writing /your-project-root/hub-internal-config/databases/staging-database.json to /your-project-root/src/main/hub-internal-config/databases/staging-database.json Writing /your-project-root/hub-internal-config/databases/modules-database.json to /your-project-root/src/main/ml-config/databases/modules-database.json Processing /your-project-root/hub-internal-config/servers/job-server.json Setting "url-rewriter" to "/data-hub/4/tracing/tracing-rewriter.xml" Writing /your-project-root/hub-internal-config/servers/job-server.json to /your-project-root/src/main/hub-internal-config/servers/job-server.json Writing /your-project-root/hub-internal-config/servers/final-server.json to /your-project-root/src/main/ml-config/servers/final-server.json Processing /your-project-root/hub-internal-config/servers/staging-server.json Setting "url-rewriter" to "/data-hub/4/rest-api/rewriter.xml" Setting "error-handler" to "/data-hub/4/rest-api/error-handler.xqy" Writing /your-project-root/hub-internal-config/servers/staging-server.json to /your-project-root/src/main/hub-internal-config/servers/staging-server.json Upgrading user-config dir
Procedure
-
In your
build.gradlefile, replace all occurrences of your old DHF version number with4.3.2.Example: In the
pluginssection and thedependenciessection,plugins { id 'net.saliman.properties' version '1.4.6' id 'com.marklogic.ml-data-hub' version '4.3.2' } ... dependencies { compile 'com.marklogic:marklogic-data-hub:4.3.2' compile 'com.marklogic:marklogic-xcc:9.0.6' } -
At your project’s root folder, run the
hubUpdate -iGradle task../gradlew hubUpdate -i
gradlew.bat hubUpdate -i
Result: A
gradle-GENERATED.propertiesfile is created. -
In
your-project-root/src/main, copy any custom database/server configurations from the archived configuration files to the new ones.copy from files in paste to files in hub-internal-config-4.0.0hub-internal-configml-config-4.0.0ml-configIMPORTANT: Do NOT copy any references to the staging(
%%mlStagingModulesDbName%%) and final(%%mlFinalModulesDbName%%) modules databases. These settings are replaced in DHF 4.3.x with%%mlModulesDbName%%. -
Update your
gradle.propertiesfile based on thegradle-GENERATED.propertiesfile.IMPORTANT: Do NOT update
mlUsernameormlPasswordyet, and do NOT delete the oldmlHubUser*andmlHubAdmin*properties yet. You need the old user accounts to access MarkLogic Server in themlDeploytask.a. Add the following properties and replace the values accordingly.
mlDHFVersion=4.3.2 ... mlFlowOperatorRole=flow-operator-role mlFlowOperatorUserName=flow-operator mlFlowOperatorPassword=your-flow-operator-password ... mlFlowDeveloperRole=flow-developer-role mlFlowDeveloperUserName=flow-developer mlFlowDeveloperPassword=your-flow-developer-password ... mlDataHubAdminRole=data-hub-admin-role ... mlModulesDbName=data-hub-MODULES mlModulesForestsPerHost=1b. Assign default module permissions to the new roles.
mlModulePermissions=rest-reader,read,rest-writer,insert,rest-writer,update,rest-extension-user,execute,flow-developer-role,read,flow-developer-role,execute,flow-developer-role,insert,flow-operator-role,read,flow-operator-role,executec. Remove the following properties.
- mlStagingModulesDbName
- mlStagingModulesForestsPerHost
- mlStagingModulePermissions
- mlFinalModulesDbName
- mlFinalModulesForestsPerHost
- mlFinalModulePermissions
-
If your custom code refers to the old roles/users, change them to refer to the new roles/users.
-
At your project’s root folder, run the
mlDeployGradle task../gradlew mlDeploy
gradlew.bat mlDeploy
-
Edit your
gradle.propertiesfile again.a. Update
mlUsernameormlPasswordwith a new user assigned toflow-developer-role(to create and deploy flows) or toflow-operator-role(to run flows).mlUsername=flow-operator mlPassword=your-flow-operator-passwordb. Remove the following properties.
- mlHubUserRole
- mlHubUserName
- mlHubUserPassword
- mlHubAdminRole
- mlHubAdminUserName
- mlHubAdminUserPassword
-
(Optional) Delete the old roles from MarkLogic Server.
- hub-admin-role
- data-hub-role
-
Run your ingest and harmonize flows.
If you use MarkLogic Content Pump for your input flows, run MLCP with the
-transform_moduleoption as follows:-transform_module "/data-hub/4/transforms/mlcp-flow-transform.xqy"
-transform_module "/data-hub/4/transforms/mlcp-flow-transform.sjs"
Remarks
After running mlUndeploy, delete the following obsolete resources:
- data-hub-staging-MODULES database and forest
- data-hub-final-MODULES database and forest
The notes and steps in this tab are for the following upgrade paths:
- DHF 3.0.0 » 4.3.x
- DHF 2.0.6 » 4.3.x
- DHF 2.0.5 » 4.3.x
- DHF 2.0.4 » 4.3.x
Additional Upgrade Notes
-
The
hubUpdateGradle task makes the following changes.-
Renames old configuration directories under your project root.
old directory new directory hub-internal-confighub-internal-config.olduser-configuser-config.oldentity-configentity-config.old -
Creates the new project directory structure (
your-project-root/src/mainand its subdirectories) and new files. -
Copies some settings from the old configuration files to the new ones.
-
Updates all flows to use updated imports. See the notes to upgrade to 4.0.x.
-
-
Running the
hubUpdatetask with the-ioption (info mode) displays specifically what the task does, including configuration settings that changed.Example: A verbose report.
Upgrading entity-config dir Upgrading hub-internal-config dir Processing /your-project-root/hub-internal-config/databases/job-database.json Setting "schema-database" to "%%mlStagingSchemasDbName%%" Setting "triggers-database" to "%%mlStagingTriggersDbName%%" Adding path range indexes to job-database.json Writing /your-project-root/hub-internal-config/databases/job-database.json to /your-project-root/src/main/hub-internal-config/databases/job-database.json Processing /your-project-root/hub-internal-config/databases/final-database.json Setting "schema-database" to "%%mlFinalSchemasDbName%%" Setting "triggers-database" to "%%mlFinalTriggersDbName%%" Writing /your-project-root/hub-internal-config/databases/final-database.json to /your-project-root/src/main/ml-config/databases/final-database.json Processing /your-project-root/hub-internal-config/databases/staging-database.json Setting "schema-database" to "%%mlStagingSchemasDbName%%" Setting "triggers-database" to "%%mlStagingTriggersDbName%%" Writing /your-project-root/hub-internal-config/databases/staging-database.json to /your-project-root/src/main/hub-internal-config/databases/staging-database.json Writing /your-project-root/hub-internal-config/databases/modules-database.json to /your-project-root/src/main/ml-config/databases/modules-database.json Processing /your-project-root/hub-internal-config/servers/job-server.json Setting "url-rewriter" to "/data-hub/4/tracing/tracing-rewriter.xml" Writing /your-project-root/hub-internal-config/servers/job-server.json to /your-project-root/src/main/hub-internal-config/servers/job-server.json Writing /your-project-root/hub-internal-config/servers/final-server.json to /your-project-root/src/main/ml-config/servers/final-server.json Processing /your-project-root/hub-internal-config/servers/staging-server.json Setting "url-rewriter" to "/data-hub/4/rest-api/rewriter.xml" Setting "error-handler" to "/data-hub/4/rest-api/error-handler.xqy" Writing /your-project-root/hub-internal-config/servers/staging-server.json to /your-project-root/src/main/hub-internal-config/servers/staging-server.json Upgrading user-config dir
-
If custom configurations (i.e., from
user-config) are missing, you must manually copy them toml-config. -
Because DHF 3.0.0 and DHF 2.0.4+ had only a single SCHEMAS database and a single TRIGGERS database, you must decide whether to use those existing databases as the staging databases or as the final databases in DHF 4.x. The settings in
gradle.properties(and possibly other configurations) depend on your decision.DHF 3.0.0 and 2.0.4+ DHF 4.x data-hub-SCHEMASdatabasedata-hub-staging-SCHEMASdatabasedata-hub-final-SCHEMASdatabasedata-hub-TRIGGERSdatabasedata-hub-staging-TRIGGERSdatabasedata-hub-final-TRIGGERSdatabase
Procedure
-
In your
build.gradlefile, replace all occurrences of your old DHF version number with4.3.2.Example: In the
pluginssection and thedependenciessection,plugins { id 'net.saliman.properties' version '1.4.6' id 'com.marklogic.ml-data-hub' version '4.3.2' } ... dependencies { compile 'com.marklogic:marklogic-data-hub:4.3.2' compile 'com.marklogic:marklogic-xcc:9.0.6' } -
At your project’s root folder, run the
hubUpdate -iGradle task../gradlew hubUpdate -i
gradlew.bat hubUpdate -i
Result: A
gradle-GENERATED.propertiesfile is created. -
Update your
gradle.propertiesfile based on thegradle-GENERATED.propertiesfile.IMPORTANT: Do NOT update
mlUsernameormlPasswordyet, and do NOT delete the oldmlHubUser*andmlHubAdmin*properties yet. You need the old user accounts to access MarkLogic Server in themlDeploytask.a. Add the following properties and replace the values accordingly.
mlDHFVersion=4.3.2 ... mlFlowOperatorRole=flow-operator-role mlFlowOperatorUserName=flow-operator mlFlowOperatorPassword=your-flow-operator-password ... mlFlowDeveloperRole=flow-developer-role mlFlowDeveloperUserName=flow-developer mlFlowDeveloperPassword=your-flow-developer-password ... mlDataHubAdminRole=data-hub-admin-role ... mlStagingTriggersDbName=data-hub-staging-TRIGGERS mlStagingTriggersForestsPerHost=1 mlStagingSchemasDbName=data-hub-staging-SCHEMAS mlStagingSchemasForestsPerHost=1 ... mlFinalTriggersDbName=data-hub-final-TRIGGERS mlFinalTriggersForestsPerHost=1 mlFinalSchemasDbName=data-hub-final-SCHEMAS mlFinalSchemasForestsPerHost=1b. Assign default module permissions to the new roles.
mlModulePermissions=rest-reader,read,rest-writer,insert,rest-writer,update,rest-extension-user,execute,flow-developer-role,read,flow-developer-role,execute,flow-developer-role,insert,flow-operator-role,read,flow-operator-role,executec. Remove the following properties.
- data-hub-TRACING server
- data-hub-TRACING database
- data-hub-TRIGGERS database
- data-hub-SCHEMAS database
-
If your custom code refers to the old roles/users, change them to refer to the new roles/users.
-
At your project’s root folder, run the
mlDeployGradle task../gradlew mlDeploy
gradlew.bat mlDeploy
-
Edit your
gradle.propertiesfile again.a. Update
mlUsernameormlPasswordwith a new user assigned toflow-developer-role(to create and deploy flows) or toflow-operator-role(to run flows).mlUsername=flow-operator mlPassword=your-flow-operator-passwordb. Remove the following properties.
- mlHubUserRole
- mlHubUserName
- mlHubUserPassword
- mlHubAdminRole
- mlHubAdminUserName
- mlHubAdminUserPassword
-
(Optional) Delete the old roles from MarkLogic Server.
- hub-admin-role
- data-hub-role
-
Run your ingest and harmonize flows.
If you use MarkLogic Content Pump for your input flows, run MLCP with the
-transform_moduleoption as follows:-transform_module "/data-hub/4/transforms/mlcp-flow-transform.xqy"
-transform_module "/data-hub/4/transforms/mlcp-flow-transform.sjs"
Remarks
Before running mlUndeploy, delete the resources associated with the properties that were removed from the gradle.properties file:
- data-hub-TRACING server
- data-hub-TRACING database
- data-hub-TRIGGERS database
- data-hub-SCHEMAS database
The notes and steps in this tab are for the following upgrade paths:
- DHF 2.0.3 and earlier versions » 4.3.x
Procedure
- Upgrade to DHF 2.0.6.
- Follow the steps to upgrade from 3.0.0 or 2.0.4+ to DHF 4.3.x.