This project is a patcher for elasticsearch x-pack-core plugin. It is a simple script that patches the x-pack-core plugin to remove the license check. By decompressing the x-pack-core plugin, patching the license check, and then compressing it again, the patched plugin is created.
- Enter into docker shell
make shell
- Run the
build.sh <VERSION>
with the version of elasticsearch you want to patch. - If you want docker image with the patch run
docker.sh <VERSION>
to create docker file and build image
Whan to pach a new version of elasticsearch you need to create a new patch file. To do this you need to decompile the x-pack-core plugin folow the steps below.
- Enter into docker shell
make shell
- Run the
decompile.sh <VERSION>
with the version of elasticsearch you want to patch. (this will auto download the version and decompile the x-pack-core plugin) - Edit the java file ending with
patched.java
in the tmp/-decompiled folder as you like. - Run
make_patch.sh <VERSION>
with the version of elasticsearch to generate the patch file. - Run
build.sh <VERSION>
with the version of elasticsearch to patch the x-pack-core plugin. (requires the patch file) - Run
docker.sh <VERSION>
to create a docker image with the patched x-pack-core plugin. - Run
test.sh <VERSION>
to test the patched x-pack in docker container. (you will need to create a license file and execute the test.sh outside the docker container)
- Get a license from license.elastic.co
- Customize the license.json as you like.
- Change the license type to platinum.
- Change the expiry_date_in_millis to a date in the future.
- Change the max_nodes to the number of nodes you want to use.
- Change the issued_to to the name you want to use.
- Install the license.
Note: between version url for license different please docs for version (example for v8)
curl -XPUT -u elastic 'https://<server>:9200/_license' -H "Content-Type: application/json" -d @license.json --insecure
based on elasticsearch7.0 Cluster Setup and x-pack crack by Hassankarimi118 totally rewritten by me to help the creation of patches for new versions of elasticsearch.