4

I have a MarkLogic cluster configured with DHF 5 and ml-gradle. I have multiple HTTP app servers and a couple of query options file.

When I do an mlDeploy, the query options files are deployed to the final app server, but not the others. Is there a way to tell ml-gradle to deploy them to the other app servers? Or even, certain options files to certain app servers?

I can do this manually with curl, but I'd like to avoid having to do that.

eaolson
  • 14,717
  • 7
  • 43
  • 58

2 Answers2

4

There is a built-in task that helps copying them from one context (app server) to another. See on the ml-gradle wiki for details:

https://github.com/marklogic-community/ml-gradle/wiki/How-modules-are-loaded#copying-search-options-to-additional-app-servers

Particularly useful if you have search options you want to expose on both final and staging. The default mlLoadModules uploads it to final, and that task can then propagate it to staging.

HTH!

Mads Hansen
  • 63,927
  • 12
  • 112
  • 147
grtjn
  • 20,254
  • 1
  • 24
  • 35
1

If you are planning to load search options into DHS, then you may need to use a different method to load the search options. The gradle task will only load the options into FINAL app server in one group, and the file is not accessible to use the copy task mentioned in the other answer.

DHS has multiple groups by default:

  • Evaluator (which is the primary group)
  • Analyzer
  • Curator
  • Operator

The static E-node is assigned to the Evaluator group, and dynamic E-nodes will be assigned to one of the other groups.

Place the search options files in your gradle project in the following location:

src/main/ml-modules/root/[Group Name]/[App Server Name]/rest-api/options

This article provides more details on the process:

Deploying REST API Search Query Options in DHS

Mike Gardner
  • 6,611
  • 5
  • 24
  • 34