mlgradle doesn't create replica forests

20 Views Asked by At

I read the examples about the creation of replicas, I do it last year, but the almost same properties file doesn't now create them on a new database. My forests description are :

mlForestsPerHost=he-content,2,he-content-MEDIA,2,he-media-content-TRIGGERS,1,he-media-content-SCHEMAS,1,he-content-TRIGGERS,1,he-content-SCHEMAS,1,he-test-triggers,1,he-test-schemas,1,he-test-content,1

mlDatabaseNamesAndReplicaCounts=he-content,2,he-content-MEDIA,1,he-content-media-TRIGGERS,1,he-content-media-SCHEMAS,1,he-content-TRIGGERS,1,he-content-SCHEMAS,1,he-test-triggers,0,he-test-schemas,0,he-test-content,0

When I run a mlPrintForestPlan task without any bases on my server, the JSON generated has the replicas description, but when I do a mldeploydatabase I don't have the replicas created

from mlPrintForestPlan

    {
  "forest-name" : "he-content-1",
  "host" : "ip-10-205-72-217.eu-west-1.compute.internal",
  "database" : "he-content",
  "forest-replica" : [ {
    "host" : "ip-10-205-73-136.eu-west-1.compute.internal",
    "replica-name" : "he-content-1-replica-1"
  }, {
    "host" : "ip-10-205-73-47.eu-west-1.compute.internal",
    "replica-name" : "he-content-1-replica-2"
  } ]
}
{
  "forest-name" : "he-content-2",
  "host" : "ip-10-205-72-217.eu-west-1.compute.internal",
  "database" : "he-content",
  "forest-replica" : [ {
    "host" : "ip-10-205-73-47.eu-west-1.compute.internal",
    "replica-name" : "he-content-2-replica-1"
  }, {
    "host" : "ip-10-205-73-136.eu-west-1.compute.internal",
    "replica-name" : "he-content-2-replica-2"
  } ]
}
{
  "forest-name" : "he-content-3",
  "host" : "ip-10-205-73-136.eu-west-1.compute.internal",
  "database" : "he-content",
  "forest-replica" : [ {
    "host" : "ip-10-205-73-47.eu-west-1.compute.internal",
    "replica-name" : "he-content-3-replica-1"
  }, {
    "host" : "ip-10-205-72-217.eu-west-1.compute.internal",
    "replica-name" : "he-content-3-replica-2"
  } ]
}
{
  "forest-name" : "he-content-4",
  "host" : "ip-10-205-73-136.eu-west-1.compute.internal",
  "database" : "he-content",
  "forest-replica" : [ {
    "host" : "ip-10-205-72-217.eu-west-1.compute.internal",
    "replica-name" : "he-content-4-replica-1"
  }, {
    "host" : "ip-10-205-73-47.eu-west-1.compute.internal",
    "replica-name" : "he-content-4-replica-2"
  } ]
}
{
  "forest-name" : "he-content-5",
  "host" : "ip-10-205-73-47.eu-west-1.compute.internal",
  "database" : "he-content",
  "forest-replica" : [ {
    "host" : "ip-10-205-72-217.eu-west-1.compute.internal",
    "replica-name" : "he-content-5-replica-1"
  }, {
    "host" : "ip-10-205-73-136.eu-west-1.compute.internal",
    "replica-name" : "he-content-5-replica-2"
  } ]
}
{
  "forest-name" : "he-content-6",
  "host" : "ip-10-205-73-47.eu-west-1.compute.internal",
  "database" : "he-content",
  "forest-replica" : [ {
    "host" : "ip-10-205-73-136.eu-west-1.compute.internal",
    "replica-name" : "he-content-6-replica-1"
  }, {
    "host" : "ip-10-205-72-217.eu-west-1.compute.internal",
    "replica-name" : "he-content-6-replica-2"
  } ]
}

from mldeploydatabase

     {
      "forest-name" : "he-content-1",
      "host" : "ip-10-205-72-217.eu-west-1.compute.internal",
      "database" : "he-content"
    }, {
      "forest-name" : "he-content-2",
      "host" : "ip-10-205-72-217.eu-west-1.compute.internal",
      "database" : "he-content"
    }, {
      "forest-name" : "he-content-3",
      "host" : "ip-10-205-73-136.eu-west-1.compute.internal",
      "database" : "he-content"
    }, {
      "forest-name" : "he-content-4",
      "host" : "ip-10-205-73-136.eu-west-1.compute.internal",
      "database" : "he-content"
    }, {
      "forest-name" : "he-content-5",
      "host" : "ip-10-205-73-47.eu-west-1.compute.internal",
      "database" : "he-content"
    }, {
      "forest-name" : "he-content-6",
      "host" : "ip-10-205-73-47.eu-west-1.compute.internal",
      "database" : "he-content"
    } 

I don't understand why

mlgradle version 4.6.1

1

There are 1 best solutions below

3
Mads Hansen On

Given this note on the wiki: https://github.com/marklogic/ml-gradle/wiki/Creating-forests#previewing-forest-creation

This task will use all of the above configuration properties to determine what forests and replicas will be created when you run "mlDeploy" (or via a combination of "mlDeployDatabases" and "mlConfigureForestReplicas").

It would seem that you would want to run both mlDeployDatabases AND the mlConfigureForestReplicas tasks, or just run mlDeploy.