# ES custom plugin testing

**URL:** <https://discuss.elastic.co/t/es-custom-plugin-testing/131989>\
**Category:** Elasticsearch\
**Tags:** rally\
**Created:** [May 15, 2018, 7:17pm UTC](https://discuss.elastic.co/t/es-custom-plugin-testing/131989 "2018-05-15T19:17:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![SergeiPetrov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sergeipetrov/32/27127_2.png) [@SergeiPetrov](https://discuss.elastic.co/u/SergeiPetrov)\
**Post date:** [May 15, 2018, 7:17pm UTC](https://discuss.elastic.co/t/es-custom-plugin-testing/131989/1 "2018-05-15T19:17:42Z")

</div>

Hi,

I want to test my custom plugin for ES and I found Rally. It's a really cool tool for testing ES. I also found an article about the plugins inside the Rally documentation. But I couldn't add my custom plugin for testing. In my case I need to install 4 plugins. 3 of them are the default plugins from ES and they are easily installed when I use --elasticsearch-plugins="discovery-ec2,repository-s3,analysis-icu", but I don't know how to add my custom plugin.

Firstly, I tried to download the repository with my plugin and specify three mandatory parameters inside the ~/.rally/rally.ini:

- plugin.my-plugin.src.subdir
- plugin.my-plugin.build.command
- plugin.my-plugin.build.artifact.subdir

But it doesn't help me. It says that I haven't this plugin.

Secondly, I would like to try to test with optional parameter (plugin.my-plugin.remote.repo.url) when we can add the url to the repository in GitHub, but I have a private repository. I also found in the Rally documentation that you supported a privated repository and I need to setup my credentials, but I didn't find where I need to setup it.

For the current moment, it sound for me like a challenge 🙂. Maybe Rally has a way to install a plugin from the .zip file as ES. (bin/elasticsearch-plugin install repository-s3). But I also didn't find any information about that.

Could you please help me with this issue? Maybe you have some ideas how to easily add my custom plugin inside the test?

---

<div class="post-metadata">

**Author:** ![danielmitterdorfer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/danielmitterdorfer/32/110510_2.png) [@danielmitterdorfer](https://discuss.elastic.co/u/danielmitterdorfer)\
**Post date:** [May 16, 2018, 6:05am UTC](https://discuss.elastic.co/t/es-custom-plugin-testing/131989/2 "2018-05-16T06:05:55Z")

</div>

Hi,

> [@SergeiPetrov](#):
>
> Firstly, I tried to download the repository with my plugin and specify three mandatory parameters inside the ~/.rally/rally.ini:
> 
> plugin.my-plugin.src.subdir  
> plugin.my-plugin.build.command  
> plugin.my-plugin.build.artifact.subdir
> 
> But it doesn't help me. It says that I haven't this plugin.

To which local path did you clone your plugin? Rally expects that `plugin.my-plugin.src.subdir` is below `src.root.dir`. Ideally, you have Rally clone the repo by specifying `plugin.my-plugin.remote.repo.url` (which brings us to your next question).

> [@SergeiPetrov](#):
>
> Secondly, I would like to try to test with optional parameter (plugin.my-plugin.remote.repo.url) when we can add the url to the repository in GitHub, but I have a private repository.

Rally assumes that your machine is setup for passwordless access to private repos. If you use the SSH URL (e.g. `git@github.com:example-org/my-plugin.git`) instead of the HTTPS URL (e.g. `https://github.com/example-org/my-plugin.git`), git uses your private key to authenticate.

> [@SergeiPetrov](#):
>
> For the current moment, it sound for me like a challenge 🙂

Using plugins is definitely not a feature that we use everyday ourselves so I am sure there is room for improvement and I'm glad about your feedback.

> [@SergeiPetrov](#):
>
> Maybe Rally has a way to install a plugin from the .zip file as ES. (bin/elasticsearch-plugin install repository-s3). But I also didn't find any information about that.

This is not directly possible; Rally does this itself after it has build your plugin. There are three supported scenarios:

1. You build your plugin alongside Elasticsearch from sources (see [docs](http://esrally.readthedocs.io/en/stable/elasticsearch_plugins.html#plugins-built-alongside-elasticsearch))
2. Your build your plugin but it is based on a released version of Elasticsearch (see [docs](http://esrally.readthedocs.io/en/stable/elasticsearch_plugins.html#plugins-based-on-a-released-elasticsearch-version))
3. You have published a released plugin artifact. Then you can add the download URL in `rally.ini` (see [docs](http://esrally.readthedocs.io/en/stable/elasticsearch_plugins.html#simple-plugins))

If all that does not work for you, there is always the possibility to setup Elasticsearch including all plugins outside the control of Rally and use Rally only as a load generator by using the pipeline [`benchmark-only`](http://esrally.readthedocs.io/en/stable/pipelines.html#benchmark-only).

I hope that helps.

Daniel

---

<div class="post-metadata">

**Author:** ![SergeiPetrov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sergeipetrov/32/27127_2.png) [@SergeiPetrov](https://discuss.elastic.co/u/SergeiPetrov)\
**Post date:** [May 16, 2018, 6:53am UTC](https://discuss.elastic.co/t/es-custom-plugin-testing/131989/3 "2018-05-16T06:53:33Z")

</div>

Thank you very much. Yes, I think creating a separate ES cluster and using Rally only for benchmark is a good idea. I will try this approach.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 13, 2018, 6:53am UTC](https://discuss.elastic.co/t/es-custom-plugin-testing/131989/4 "2018-06-13T06:53:42Z")

</div>

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