GithubHelp home page GithubHelp logo

abhinavmishra14 / ml-gradle Goto Github PK

View Code? Open in Web Editor NEW

This project forked from marklogic/ml-gradle

0.0 2.0 0.0 1.74 MB

Gradle plugin for automating everything involving MarkLogic

License: Other

Groovy 95.56% Java 3.05% Shell 1.39%

ml-gradle's Introduction

GitHub release GitHub last commit License Known Vulnerabilities

Automate everything involving MarkLogic with Gradle

ml-gradle is a Gradle plugin that can automate everything you do with MarkLogic. Deploy an application, add a host, backup a database, stub out a new project, load modules as you modify them, run an MLCP or CoRB or Data Movement job - if it involves MarkLogic, ml-gradle either automates it already or can be extended to do so.

You can use ml-gradle right away with the simple tutorial below, or learn more:

Don't want to use Gradle? Then consider using the ml-app-deployer Java library on which ml-gradle depends. ml-app-deployer provides most of the functionality within ml-gradle without having any dependency on Gradle or Groovy - ml-gradle is then a fairly thin wrapper around ml-app-deployer to expose its functionality within a Gradle environment.

Start using ml-gradle

ml-gradle depends on at least Java 8 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.

First, install Gradle - it is recommended to use the latest version, though note that ml-gradle 4.3.0 is the first version that can run on Gradle 7.

Then, in an empty directory, create a file named "build.gradle" with your favorite text editor and enter the following:

plugins { id "com.marklogic.ml-gradle" version "4.3.6" }

Then run:

gradle mlNewProject

This starts a project wizard to stub out files for your new application. You can accept all the defaults, but be sure to enter a valid port number for the "REST API port" question. ml-gradle will then print the following logging:

Updating build.gradle so that the Gradle properties plugin can be applied
Writing: build.gradle
Writing: gradle.properties
Writing: gradle-dev.properties
Writing: gradle-local.properties
Writing: gradle-qa.properties
Writing: gradle-prod.properties
Making directory: src/main/ml-config
Making directory: src/main/ml-modules
Writing project scaffolding files

You now have an ml-gradle project stubbed out with support for deploying to multiple environments via the Gradle properties plugin.

Now deploy it!

gradle mlDeploy

And you should see more ml-gradle logging like this:

:mlDeleteModuleTimestampsFile
:mlPrepareBundles
:mlDeployApp
:mlPostDeploy UP-TO-DATE
:mlDeploy
BUILD SUCCESSFUL

And once that's complete, you can go to the MarkLogic Admin UI on port 8001 to see the resources that have been created (the names of these resources start with the application name you selected in the project wizard, which defaults to myApp):

  • Under App Servers, a new REST server named myApp on the port you chose
  • Under Databases, a new content datase named myApp-content and a new modules database named myApp-modules
  • Under Forests, 3 new forests for myApp-content and 1 new forest for myApp-modules
  • Under Security/Users, 3 new users, each prefixed with myApp
  • Under Security/Roles, 5 new roles, each prefixed with myApp

Congratulations! You've used ml-gradle to stub out a new project and deploy its application to MarkLogic. You're now ready to start adding more resources and modules to your project. See the links above this tutorial to learn more about using ml-gradle.

ml-gradle's People

Contributors

rjrudin avatar hansenmc avatar dmcassel avatar sastafford avatar ryanjdew avatar divino avatar peetkes avatar jamesagardner avatar akshaysonvane avatar paxtonhare avatar tzejohn avatar freshie avatar derms avatar jkerr5 avatar ajith0888 avatar bradmann avatar luiz-n avatar nikos avatar dependabot[bot] avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.