jegathis rajkumar
jegathis rajkumar

Reputation: 1

How to setup Clusters in Marklogic via xquery?

I am new to marklogic and I am trying to setup clusters in marklogic. I am able to setup cluster using the admin interface. But my requirement is to setup cluster via xquery code. I have marklogic installed in 3 instances.

Upvotes: 0

Views: 48

Answers (2)

Mike Gardner
Mike Gardner

Reputation: 6651

ml-gradle is definitely the preferred tool, but if you are unable to use it, MarkLogic also has a Scripting Administrative Tasks guide, which includes Scripting Cluster Management. The guide includes sample curl calls, and bash scripts that can be used to create a cluster.

Upvotes: 0

Ganesh
Ganesh

Reputation: 301

If you have the option of using a tool like Gradle, you should look at ml-gradle - https://github.com/marklogic-community/ml-gradle. It abstracts a lot of coding for you and lets you create a cluster with the databases, forests and app servers you need in a configurable manner. And you can also create users, roles and other artifacts using ml-gradle. You can even deploy your modules using ml-gradle. I would urge you to look at that before you try and code this via XQuery.

One other option is to use the REST Management APIs, but you should try ml-gradle first. Good luck.

Upvotes: 3

Related Questions