Plugins development workflow

Recently, we started to create custom plugins for ES6 and I wonder what should be a good development method.
During debugging steps, the iterative packaging/deployment of the plugin to an ES external server instance is quite slow. I would like to stay in Idea all the time.

So I'm actually trying to develop our plugins in a ES6 project checkouted in Idea.
I use the :distribution:run#start gradle task to start the server and it's fine.

To load my own custom data in the running cluster I've configured the :distribution/build.gradle task like that

task run(type: RunTask) {
   distribution = 'zip'
   dataDir = {'/path/to/my/data'}
   clusterName = 'softbridge'
   debug = true
}

Now I would like to load a plugin at startup time. For now I test with one of the bundled plugin

task run(type: RunTask) {
   distribution = 'zip'
   dataDir = {'/path/to/my/data'}
   clusterName = 'softbridge'
   debug = true
   plugin(':plugins:ingest-attachment')
}

But during start, I have have the following error

"> Task [run#copyPlugins] cannot add plugin [:plugins:ingest-attachment] with version [6.2.0-SNAPSHOT] to project's [:distribution] dependencies: the plugin is not an esplugin or es_meta_plugin"

Its strange because the plugin gradle project actually has the esplugin gradle plugin

What is the good method ?

Thanks to this post : Building a plugin with Gradle and Elasticsearch 5.0, I'm now able to debug an ES cluster with my plugin deployed in it.

buildscript {
    dependencies {
        classpath "org.elasticsearch.gradle:build-tools:6.2.0"
    }
}
apply plugin: 'elasticsearch.esplugin'
esplugin {
    licenseFile rootProject.file('LICENSE.txt')
    noticeFile rootProject.file('NOTICE.txt')
    name 'reverse-children-agg'
    version rootProject.version
    description 'ElasticSearch reverse chidren aggregation plugin'
    classname 'com.softbridge.elasticsearch.join.ReverseChildrenAggPlugin'
    hasClientJar = true
}
run {
    distribution = 'zip'
    dataDir = {'/path/to/my/data'}
    clusterName = 'softbridge'
    debug = true
}

I keep curious of how I can deploy one of the shipped :plugins: when I start (with gradle:run) the Cluster from the ES core project

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.