Skip to content

Commit bfc7ec7

Browse files
authored
Merge pull request #3147 from marklogic/DHFPROD-3448
Dhfprod-3448: marklogic 9.10 compatibility
2 parents c199823 + 8a5c48a commit bfc7ec7

File tree

43 files changed

+6941
-3327
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+6941
-3327
lines changed

examples/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
This folder contains working examples of various DHF usage scenarios.
44

5-
1. [barebones](https://github.com/marklogic/marklogic-data-hub/tree/master/examples/barebones) - an example of the minimum configuration necessary to run a Gradle based Data Hub
5+
1. [barebones](https://github.com/marklogic/marklogic-data-hub/tree/master/examples/barebones) - an example of the minimum configuration necessary to run a Gradle based Data Hub
6+
1. [custom-tokens](https://github.com/marklogic/marklogic-data-hub/tree/master/examples/custom-tokens) - an example where gradle environment properties are used in substitutions of configuration files that is based off of the barebones example
67
1. [healthcare](https://github.com/marklogic/marklogic-data-hub/tree/master/examples/healthcare) - an example of a Healthcare 360 Data Hub
78
1. [hr-hub](https://github.com/marklogic/marklogic-data-hub/tree/master/examples/hr-hub) - an example used for our 1.x tutorial. This example harmonizes data from various HR systems
89
1. [load-binaries](https://github.com/marklogic/marklogic-data-hub/tree/master/examples/load-binaries) - an example of how to ingest binaries via an MLCP Input Flow

examples/barebones/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ plugins {
1313
// it includes ml-gradle. This plugin is what lets you
1414
// run DHF (Data Hub Framework) tasks from the
1515
// command line
16-
id 'com.marklogic.ml-data-hub' version '2.0.6'
16+
id 'com.marklogic.ml-data-hub' version '2.0.7'
1717
}
1818
```
1919

examples/barebones/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ plugins {
77
// it includes ml-gradle. This plugin is what lets you
88
// run DHF (Data Hub Framework) tasks from the
99
// command line
10-
id 'com.marklogic.ml-data-hub' version '2.0.6'
10+
id 'com.marklogic.ml-data-hub' version '2.0.7'
1111
}

examples/custom-tokens/README.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Custom Tokens Example
2+
3+
This example demonstrates how to utilize gradle environment properties that are substituted in configuraton files within the MarkLogic deployment process. We are basing this example off of the [barebones example](https://github.com/marklogic/marklogic-data-hub/tree/master/examples/barebones).
4+
5+
This example utilizes gradle environment properties that are substituted in the configuration files for a user defined database and application server. You can see the environment properties that are defined at the bottom of the `gradle.properties` file.
6+
7+
Inside of the `gradle.properties` file, you can see the following information:
8+
9+
```
10+
# Custom properties defined here
11+
TEST_DATABASE_NAME=custom-tokens-test-database
12+
TEST_SERVER_NAME=custom-tokens-test-database-server
13+
TEST_SERVER_PORT=8014
14+
TEST_TRACE_AUTH=digest
15+
```
16+
17+
To utilize the custom tokens, then you will need to refer to them as `%%TEST_DATABASE_NAME%%` if you want to reference the `TEST_DATABASE_NAME` name token within your gradle deployment. You can change the default token prefix and suffix from "%%" by utilizing the following tokens in your `gradle.properties` file by setting the appropriate prefix and suffix values according:
18+
19+
```
20+
mlTokenPrefix=
21+
mlTokenSuffix=
22+
```
23+
For more information regarding this, then you can refer to the [ml-gradle wiki](https://github.com/marklogic-community/ml-gradle/wiki/Configuring-resources)
24+
25+
You can see that we are referencing the new custom tokens within the `custom-tokens-test-server.json` file. We are utilizing the four (4) custom tokens that we defined in our properties file which are the following: `%%TEST_SERVER_NAME%%`, `%%TEST_SERVER_PORT%%`, `%%TEST_DATABASE_NAME%%`, and `%%TEST_TRACE_AUTH%%`.
26+
27+
```json
28+
{
29+
"server-name": "%%TEST_SERVER_NAME%%",
30+
"server-type": "http",
31+
"root": "/",
32+
"group-name": "%%GROUP%%",
33+
"port": "%%TEST_SERVER_PORT%%",
34+
"modules-database": "%%mlModulesDbName%%",
35+
"content-database": "%%TEST_DATABASE_NAME%%",
36+
"authentication": "%%TEST_TRACE_AUTH%%",
37+
"default-error-format": "json",
38+
"error-handler": "/MarkLogic/rest-api/error-handler.xqy",
39+
"url-rewriter": "/MarkLogic/rest-api/rewriter.xml",
40+
"rewrite-resolves-globally": true
41+
}
42+
```
43+
44+
Next, Initialize your DHF app:
45+
46+
```bash
47+
gradle hubInit
48+
```
49+
50+
Then Bootstrap your DHF app with the user defined database and application that utilized custom tokens:
51+
52+
```bash
53+
gradle mlDeploy
54+
```
55+
Once the deployment is complete, then you can login to the admin console and see the new test database and test database application server that were created with the values that were specified from our properties file. Now that you've mastered utilizing custom tokens for your gradle deployment, you can continue on with your DHF app development.
56+
57+
For a complete list of gradle tasks, check here: [https://github.com/marklogic/marklogic-data-hub/wiki/Gradle-Tasks](https://github.com/marklogic/marklogic-data-hub/wiki/Gradle-Tasks)
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
plugins {
2+
// this plugin lets you create properties files
3+
// for multiple environments... like dev, qa, prod
4+
id 'net.saliman.properties' version '1.4.6'
5+
6+
// this is the data hub framework gradle plugin
7+
// it includes ml-gradle. This plugin is what lets you
8+
// run DHF (Data Hub Framework) tasks from the
9+
// command line
10+
id 'com.marklogic.ml-data-hub' version '2.0.4'
11+
}
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# These settings are used by the Data Hub Framework when
2+
# communicating with MarkLogic.
3+
# The values in this file are meant as project-wide settings.
4+
# You can override these properties for a specific environment
5+
# by creating a gradle-{environment}.properties file.
6+
# For example, to create a properties file for your prod environment create a file
7+
# named gradle-prod.properties.
8+
#
9+
# ....
10+
mlHost=localhost
11+
12+
# Your MarkLogic Username and Password
13+
mlUsername=admin
14+
mlPassword=admin
15+
16+
# If specified, the manage username/password combo is used with the ML Management REST API for managing application
17+
# resources; this user must have the manage-admin and rest-admin roles.
18+
#
19+
# If these are not set, then mlUsername/mlPassword is used for managing application resources.
20+
# mlManageUsername=
21+
# mlManagePassword=
22+
23+
# If specified, the admin username/password combo is used with the ML Management REST API for creating users and roles. This
24+
# user must have the manage-admin or admin role. A good practice is to use your admin account here to create app-specific
25+
# users and roles, which can then be used as mlManageUsername/mlManagePassword and mlUsername/mlPassword.
26+
#
27+
# These properties are also used for connecting to the admin application on port 8001 - e.g. for initializing ML and for
28+
# waiting for ML to restart.
29+
#
30+
# If these properties are not set, then mlUsername/mlPassword will be used.
31+
# mlAdminUsername=
32+
# mlAdminPassword=
33+
34+
# If specified, these values can override where the DHF thinks
35+
# MarkLogic default ports are at. You would only use this if you
36+
# have changed the ports on which MarkLogic listens
37+
#
38+
# mlAppServicesPort=8000
39+
# mlAdminPort=8001
40+
# mlManagePort=8002
41+
42+
mlStagingAppserverName=data-hub-STAGING
43+
mlStagingPort=8010
44+
mlStagingDbName=data-hub-STAGING
45+
mlStagingForestsPerHost=4
46+
mlStagingAuth=digest
47+
48+
mlFinalAppserverName=data-hub-FINAL
49+
mlFinalPort=8011
50+
mlFinalDbName=data-hub-FINAL
51+
mlFinalForestsPerHost=4
52+
mlFinalAuth=digest
53+
54+
mlTraceAppserverName=data-hub-TRACING
55+
mlTracePort=8012
56+
mlTraceDbName=data-hub-TRACING
57+
mlTraceForestsPerHost=1
58+
mlTraceAuth=digest
59+
60+
mlJobAppserverName=data-hub-JOBS
61+
mlJobPort=8013
62+
mlJobDbName=data-hub-JOBS
63+
mlJobForestsPerHost=1
64+
mlJobAuth=digest
65+
66+
mlModulesDbName=data-hub-MODULES
67+
mlModulesForestsPerHost=1
68+
69+
mlTriggersDbName=data-hub-TRIGGERS
70+
mlTriggersForestsPerHost=1
71+
72+
mlSchemasDbName=data-hub-SCHEMAS
73+
mlSchemasForestsPerHost=1
74+
75+
# You can override this to specify an alternate folder for your
76+
# custom forest info. Defaults to user-config/forests/
77+
# mlCustomForestPath=forests
78+
79+
# The name of the Role to create for Hub Access
80+
mlHubUserRole=data-hub-role
81+
mlHubUserName=data-hub-user
82+
# this password is autogenerated for you via the 'gradle hubInit' task
83+
mlHubUserPassword=b$I7'3Ya|&;Ohw.ZzsDY
84+
85+
# Custom properties defined here
86+
TEST_DATABASE_NAME=custom-tokens-test-database
87+
TEST_SERVER_NAME=custom-tokens-test-database-server
88+
TEST_SERVER_PORT=8014
89+
TEST_TRACE_AUTH=digest
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"database-name": "%%TEST_DATABASE_NAME%%"
3+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"server-name": "%%TEST_SERVER_NAME%%",
3+
"server-type": "http",
4+
"root": "/",
5+
"group-name": "%%GROUP%%",
6+
"port": "%%TEST_SERVER_PORT%%",
7+
"modules-database": "%%mlModulesDbName%%",
8+
"content-database": "%%TEST_DATABASE_NAME%%",
9+
"authentication": "%%TEST_TRACE_AUTH%%",
10+
"default-error-format": "json",
11+
"error-handler": "/MarkLogic/rest-api/error-handler.xqy",
12+
"url-rewriter": "/MarkLogic/rest-api/rewriter.xml",
13+
"rewrite-resolves-globally": true
14+
}

examples/healthcare/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ The sample data is located in the input/ folder.
1515
```
1616

1717
# TLDR; How do I run it?
18-
1. Download the [latest quick-start war](https://github.com/marklogic/marklogic-data-hub/releases/download/v2.0.6/quick-start-2.0.6.war) into this folder.
18+
1. Download the [latest quick-start war](https://github.com/marklogic/marklogic-data-hub/releases/download/v2.0.7/quick-start-2.0.7.war) into this folder.
1919

20-
1. Run the quick-start jar `java -jar quick-start-2.0.6.war`
20+
1. Run the quick-start jar `java -jar quick-start-2.0.7.war`
2121

2222
1. Open your web browser to [http://localhost:8080](http://localhost:8080).
2323

examples/load-binaries/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
This example shows how to load binary documents with the Hub Framework.
33

44
# TLDR; How do I run it?
5-
1. Download the [latest quick-start war](https://github.com/marklogic/marklogic-data-hub/releases/download/v2.0.6/quick-start-2.0.6.war) into this folder.
5+
1. Download the [latest quick-start war](https://github.com/marklogic/marklogic-data-hub/releases/download/v2.0.7/quick-start-2.0.7.war) into this folder.
66

7-
1. Run the quick-start war `java -jar quick-start-2.0.6.war`
7+
1. Run the quick-start war `java -jar quick-start-2.0.7.war`
88

99
1. Open your web browser to [http://localhost:8080](http://localhost:8080).
1010

0 commit comments

Comments
 (0)