1

I'm currently working on configuring the resources like databases and app servers for an application using ml-gradle.These configurations would be deployed to ML10 environment.

I have a content database and there are nine hosts in the environment. I have set the ml-gradle property mlContentForestsPerHost=1 ,so it is creating 9 forests in total for the content database.

But I need only 5 forests in total for my content database to be created.

Is there a way to do it via any ml-gradle property or this can be achieved using json forest config only?

Please share your thoughts.

Antony
  • 183
  • 8

1 Answers1

1

See https://github.com/marklogic-community/ml-gradle/wiki/Creating-forests#properties-driven - specifically mlDatabaseHosts or possibly mlDatabaseGroups.

rjrudin
  • 2,108
  • 9
  • 7
  • Yes,I have seen the mlDatabaseHosts property usage but I have saliman properties with my ml- gradle to use it in different environments(dev, test, UAT, and prod).So,I couldn't set a particular environment hosts for this property in gradle.properties. Is it possible that I could have a variable for the list of hosts for each environment in gradle-{env}. properties and then use that variable in gradle.properties file for mlDatabaseHosts property? – Antony Jun 02 '21 at 22:20
  • 1
    You can put a different value for mlDatabaseHosts in each gradle-(env).properties file, and you can also omit it from gradle.properties. That way, when deploying locally - i.e. when not specifying an environment name - you'll get a forest on each host, which is typically just one host when working locally. – rjrudin Jun 03 '21 at 23:15
  • Thanks I'll try this and let you know. What do you mean by deploying locally? – Antony Jun 07 '21 at 13:24
  • Deploying locally = not specifying an environment name, so the Gradle properties plugin will use whatever's in gradle.properties and gradle-local.properties – rjrudin Jun 08 '21 at 15:27