How to create a marklogic most basic 3-node-cluster from dockerhub marklogic images via gradle

I am looking for any sample project to create MarkLogic 3 Nodes Cluster directly from ML Docker Hub image (https://hub.docker.com/_/marklogic) via Gradle on a single machine.

The idea is to auto spin off different ML versions for the dev enviroment set up.

Current three node cluster example in gitbub ml-gradle is to install ML from rpm installation package. I would like to directly use the ML docker hub image instead.

Upvotes: 1

Views: 88

Answers (2)

Dave Cassel
Dave Cassel

Reputation: 8422

MarkLogic on Docker Hub includes instructions for spinning up a cluster with this simple command:

docker-compose -f cluster.yml up -d --scale dnode=2

To run this, pull down the Docker image (you'll need an account on Docker Hub (free) and you'll need to do the checkout process to get access to the MarkLogic image (also free)). Then you can create the cluster.yml file using the example given on the setup instructions page on Docker Hub.

As @rjrudin points out, you can set up a gradle task to do this.

Upvotes: 1

rjrudin
rjrudin

Reputation: 2236

ml-gradle is typically used to deploy an application to an existing ML cluster. To actually create the ML cluster, you use the "docker" executable. You can automate this via Gradle's Exec task if you wish, but doing so is outside the scope of ml-gradle which assumes that you already have an ML cluster setup.

Upvotes: 1

Related Questions