Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initialize all hosts in a cluster #434

Open
rjrudin opened this issue Feb 27, 2019 · 0 comments
Open

Initialize all hosts in a cluster #434

rjrudin opened this issue Feb 27, 2019 · 0 comments

Comments

@rjrudin
Copy link
Contributor

rjrudin commented Feb 27, 2019

Sample code courtesy of @derms

task initHosts(type: com.marklogic.gradle.task.MarkLogicTask) {
    doLast{
        def hostManager = new com.marklogic.mgmt.resource.hosts.HostManager(manageClient)
        def key = findProperty("mlLicenseKey")
        def licensee = findProperty("mlLicensee")
        hostManager.hostNames.each{ hostname ->
            println "Init ${hostname} with licenseKey=${key} and licensee=${licensee}"
            def adminConfig = adminManager.adminConfig
            adminConfig.host = hostname
            adminManager.adminConfig = adminConfig
            adminManager.init(key, licensee)
        }
    }
}
@rjrudin rjrudin added this to the 3.13.0 milestone Mar 13, 2019
@rjrudin rjrudin modified the milestones: 3.13.0, 3.14.0 Mar 26, 2019
@rjrudin rjrudin removed this from the 3.14.0 milestone Apr 17, 2019
rjrudin added a commit that referenced this issue Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant