ml-gradle | Gradle plugin for automating everything involving MarkLogic | Plugin library

 by   marklogic-community Groovy Version: 4.4.0 License: Non-SPDX

kandi X-RAY | ml-gradle Summary

kandi X-RAY | ml-gradle Summary

ml-gradle is a Groovy library typically used in Plugin, Gradle, Maven applications. ml-gradle has no bugs, it has no vulnerabilities and it has low support. However ml-gradle has a Non-SPDX License. You can download it from GitHub.

[Known Vulnerabilities] Automate everything involving MarkLogic with Gradle. ml-gradle depends on at least [Java 9] and [MarkLogic 9 or 10] so if you have those installed, you’re just a couple minutes away from using ml-gradle to start a new project and deploy an application from it. If you’re using ml-gradle 2.x or 3.x, you only need Java 8.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              ml-gradle has a low active ecosystem.
              It has 68 star(s) with 79 fork(s). There are 26 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 17 open issues and 521 have been closed. On average issues are closed in 59 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of ml-gradle is 4.4.0

            kandi-Quality Quality

              ml-gradle has 0 bugs and 0 code smells.

            kandi-Security Security

              ml-gradle has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              ml-gradle code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              ml-gradle has a Non-SPDX License.
              Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.

            kandi-Reuse Reuse

              ml-gradle releases are available to install and integrate.
              Installation instructions are not available. Examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of ml-gradle
            Get all kandi verified functions for this library.

            ml-gradle Key Features

            No Key Features are available at this moment for ml-gradle.

            ml-gradle Examples and Code Snippets

            No Code Snippets are available at this moment for ml-gradle.

            Community Discussions

            QUESTION

            mlUnitTest throws a java.nio.file.NoSuchFileException at the end of the tests
            Asked 2022-Feb-04 at 15:36

            I try to use mlunitTest with ml-gradle 3.17.1 and Marklogic marklogic-unit-test-client:1.0.0

            All the tests are OK, I test with my test user on the UI and with ml-gradle.

            But when ml-gradle wants to access the results in a directory [build\test-results\marklogic-unit-test\TEST-{test-name}], java throws an error because the file isn't there.

            Just before there is a comment who precises that it clears the directory.

            Does anyone use the mlunitTest without this problem? it's the same if i give the name of the result directory with the parameter : -PunitTestResultsPath=testML

            Here are the traces of this part of execution :

            ...

            ANSWER

            Answered 2022-Feb-04 at 15:36

            QUESTION

            Adding permission for ml-data folder using ml-gradle
            Asked 2021-Sep-30 at 13:54

            I'm using ml-gradle plugin to deploy the data and modules to a ML10 database. I have used mlModulePermissions property to set permissions for modules.

            Is there a similar property to set permissions for the files loaded from ml-data directory?

            ...

            ANSWER

            Answered 2021-Sep-30 at 13:54

            There is an equivalent property for data permissions:

            mlDataPermissions Comma-delimited list of permissions (role1,capability1,role2,capability2,etc) assigned to each document. No default value (which typically means you'll get rest-reader/read and rest-writer/update as permissions on each document).

            https://github.com/marklogic-community/ml-app-deployer/wiki/Loading-data

            Source https://stackoverflow.com/questions/69342615

            QUESTION

            How to send XQuery Code to eval at one particular MarkLogic App server that configured to use local file as its Module DB?
            Asked 2021-Sep-05 at 14:25

            MarkLogic Visual Studio Code Extension provides a way to dynamically send the Xquery code to different MarkLogic enviroments by changing mlxps:setting in its header comment block.

            However, it does not work if the Xquery will need to refer to other Xquery library files stored on the local drive, as there is no option to set which ML Http server that the Xquery should be evaluated at.

            In contrast, if we need to run the same Xquery from QConsole,

            Here is the screenshot if I try send it to port 8300 which is the used for that http server form visual studio code.

            Any solution for that? Does it mean this mlxprs could only work for Module in Module DB? (This is the same problem for sending Xquery form ml-gradle, as one could not specify which App server the XQuery will be sent to.)

            ...

            ANSWER

            Answered 2021-Sep-05 at 14:25

            I think there may be an issue that in order to eval code against the appserver, it needs to use the /v1/eval endpoint, and that appserver needs to be configured as a REST-API server.

            However, configuring the modules database to use the filesystem is not supported for REST API appservers.

            The path of least resistance would be to use a modules database and deploy your modules, rather than trying to use the filesystem, but it is an inconvenient limitation.

            Source https://stackoverflow.com/questions/69027119

            QUESTION

            Any performance difference between loading ML Module (Xquery / Javascript) from physical disk localation and loading from ML Module DB inside ML?
            Asked 2021-Aug-25 at 13:23

            By default, ML HTTP server will use the Module DB inside ML. (It seems all ML training materials refer to that type of configuration.) Any changes in the XQuery programs will need to upload into the Module DB first. That could be accomplished by using mlLoadModules or mlReloadModules ml-gradle commands. CI/CD does not access the ML cluster directly. Everything is via ml-gradle from a machine dedicated from code deployment to different ML enviroments like dev/uat/prod etc.

            However it is also possible to configure the ML app server to use the XQuery program from physical disk location like below screenshot. With that configuration, it is not required to reload the programs into ML Module DB. The changes in the program have to be in the ML server itself. CI/CD will need to access to the ML cluster directly. One advantage of this way is that developer will easily see whether the changes in the program have been indeed deployed, as all changes are sitting as physical readable text files in the disk.

            Questions:

            1. Which way is better? Why?
            2. Any ML query perforemance difference between these two different approaches?
            3. For the physical file approach, does it mean that CI/CD will need to deploy the program changes to all the ML hosts in the ML cluster? (I guess it is not a concern if HTTP server refers XQuery programs from Module DB inside ML. ML cluster will auto sync the code among different hosts.)
            ...

            ANSWER

            Answered 2021-Aug-25 at 13:23

            In general, it's recommended to deploy modules to a database rather than the filesystem.

            This makes deployment more simple and easy, as you only have to load the module once into the modules database, rather than putting the file on every single host. If you use the filesystem, then you need to put those files on every host in the cluster.

            With a modules database, if you were to add nodes to the cluster, you don't have to also deploy the modules. You can then also take advantage of High Availability, backup and restore, and all the other features of a database.

            Once a module is read, it is loaded into caches, so the performance impact should be negligible.

            If you plan to use REST extensions, then you would need a modules database so that the configurations can be installed in that database.

            Some might look to use filesystem for simple development on a single node, in which changes saved to the filesystem are made available without re-deploying. However, you could use something like the ml-gradle mlWatch task to auto-deploy modules as they are modified on the filesystem and achieve effectively the same thing using a modules database.

            Source https://stackoverflow.com/questions/68915633

            QUESTION

            Is there a way to reverse generate the ml-gradle project configuration setting based on existing ML application server?
            Asked 2021-Aug-24 at 11:03

            mlDeploy and mlUndeploy enable to rebuild the ML application from CI/CD. Using ml-gradle is the default way to manage new ML app server. That is great.

            How to migrate existing ML app to use ml-gradle to manage? How to automatically rebuild the ML gradle project from an existing ML app servers, particaully different indexes? (We have over 50 different types of indexes on one existing ML app server.) It is really slow and easy to make human mistake by recreating the ml-gradle project manually.

            Any suggestions to automate that reverse engineering?

            ...

            ANSWER

            Answered 2021-Aug-24 at 11:03

            This is the best approach - https://github.com/marklogic-community/ml-gradle/wiki/Exporting-resources .

            The challenge is that MarkLogic doesn't have the concept of an "application" - i.e. once you deploy your resources, they're effectively the same as all the OOTB resources and thus it's difficult to know what you deployed vs what's OOTB.

            Source https://stackoverflow.com/questions/68889401

            QUESTION

            How to create a marklogic most basic 3-node-cluster from dockerhub marklogic images via gradle
            Asked 2021-Aug-23 at 13:31

            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.

            ...

            ANSWER

            Answered 2021-Aug-23 at 00:41

            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.

            Source https://stackoverflow.com/questions/68877787

            QUESTION

            Setting total number of Marklogic forests for a database in ml-gradle
            Asked 2021-Jun-02 at 18:09

            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.

            ...

            ANSWER

            Answered 2021-Jun-02 at 18:09

            QUESTION

            Can I use mlDatabasesWithForestsOnOneHost with replicas?
            Asked 2021-May-11 at 17:15

            mlPrintForestPlan gives an error when I try to use mlDatabasesWithForestsOnOneHost with replicas in a 3-node cluster.

            ...

            ANSWER

            Answered 2021-May-11 at 17:15

            If it's not working, it sounds like an untested scenario - just create a new ticket in ml-app-deployer to capture support for creating replicas for databases that are configured to only have forests on one host.

            Source https://stackoverflow.com/questions/67488694

            QUESTION

            MarkLogic ml-gradle versions
            Asked 2021-Feb-01 at 12:58

            I need to export a project from a 4.x Data Hub. I can use mlhubExportProject command for a 5.x Data Hub, but am unsure of the equivelent command/process for 4.x Data Hub.

            ( Can I also confirm which version ml-gradle plugin should be used with a combination of Gradle 5.1.1 , Data Hub 4.1.1 and openJDK 1.8.0_262? )

            Thanks in advance.

            ...

            ANSWER

            Answered 2021-Feb-01 at 12:58

            Note that hubExportProject in DHF 5.x is just creating a zip based on the project directory - it's not exporting anything from MarkLogic. There's not an equivalent task in DHF 4.x, but you can effectively do the same thing by zipping up your project directory. I would first delete the non-version-controlled directories though, like "build" in particular.

            Source https://stackoverflow.com/questions/65987752

            QUESTION

            How to import a certificate's public and private keys via ml-gradle?
            Asked 2021-Jan-14 at 12:49

            How can I add public and private keys for a certificate to a certificate template via ml-gradle?

            I'm trying to configure some new servers entirely via ml-gradle + DHF 5. I can set up the certificate templates by adding a configuration file to ml-config/security/certificate-templates. I already have an SSL certificate for these servers, but can't figure out how to import them without using the admin web interface.

            There is a REST endpoint for performing certificate operations at /manage/v2/certificate-templates/{id|name}, so I guess I just want to invoke that as part of the deployment process in the right order.

            ...

            ANSWER

            Answered 2021-Jan-14 at 12:49

            You'd need to do that via a custom task today - https://github.com/marklogic-community/ml-gradle/wiki/Writing-your-own-task .

            If you think of a way for how you'd like to store those files in your project directory such that ml-gradle knows what calls to make for them, definitely open a ticket in ml-gradle with your idea.

            Source https://stackoverflow.com/questions/65705790

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install ml-gradle

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/marklogic-community/ml-gradle.git

          • CLI

            gh repo clone marklogic-community/ml-gradle

          • sshUrl

            git@github.com:marklogic-community/ml-gradle.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Plugin Libraries

            jquery

            by jquery

            select2

            by select2

            YouCompleteMe

            by ycm-core

            telegraf

            by influxdata

            Try Top Libraries by marklogic-community

            marklogic-samplestack

            by marklogic-communityJavaScript

            slush-marklogic-node

            by marklogic-communityJavaScript

            corb2

            by marklogic-communityJava

            RunDMC

            by marklogic-communityJavaScript

            mlxprs

            by marklogic-communityTypeScript