Open Distro for Elasticsearch build
This repo contains the scripts for building Open Distro for Elasticsearch Docker images in the directory docker/ and Linux distributions (RPM & DEB) in the directory linux_distributions/.
The default version to build is set in version.json for both Docker and Linux distributions.
git clone https://github.com/opendistro-for-elasticsearch/opendistro-build.git
Change directory to make sure you're in the right directory either elasticsearch/docker or elasticsearch/linux_distributions.
The docker build scripts are based on elastic/elasticsearch-docker
The image is built on CentOS 7.
Supported Docker versions
The images have been tested on Docker 18.09.2.
A full build and test requires the dependencies listed below. The build scripts have been tested on Ubuntu 18.04 and Mac OS X. The following installation instructions assume Ubuntu 18.04.
sudo apt-get update sudo apt-get install docker.io sudo usermod -a -G docker $USER
Then log out and back in again.
Python 3.5 with
sudo apt install python3-pip
sudo apt-get install python-virtualenv
Running a build
Make sure you are in the directory elasticsearch/docker.
to build an image based on the versions set in version.json
To build an image with a different version of Open Distro for Elasticsearch, either change version.json or run Make while specifying the exact version of Open Distro for Elasticsearch AND Elasticsearch.
OPENDISTRO_VERSION=0.8.0 ELASTIC_VERSION=6.6.2 make build
For running builds with a different repository name, run the following
OPENDISTRO_REPOSITORY=<repo_name> make build
To run a elasticsearch cluster with the docker images you just build, run the following
OPENDISTRO_VERSION=0.8.0 ELASTIC_VERSION=6.6.2 make run-cluster OPENDISTRO_VERSION=0.8.0 ELASTIC_VERSION=6.6.2 make run-single
Build a docker image with local artifacts
If you are interested in building a image with local artifacts,
- Download the artifacts under
- Ensure that the relative path of the plugin zips to this folder is same as the ones mentioned in
PLUGIN_URL_PATHS. (e.g. the path for sql zip should be
ARTIFACTS_DIR=downloads. Any other path of the zip won't work. Other way is to override the plugin url path itself.)
ARTIFACTS_DIR=<new_folder> make ARTIFACTS_DIR=<new_folder> PLUGIN_URL_PATHS=<opendistrozip path relative to <new_folder>/elasticsearch-plugins> make
Testing the image
Make sure you are in the directory elasticsearch/linux_distributions folder and have Java installed (assume you are using Ubuntu 18.04).
sudo add-apt-repository ppa:openjdk-r/ppa sudo apt-get update sudo apt install openjdk-11-jdk
To build the rpm package
./gradlew buildRpm --console=plain -Dbuild.snapshot=false -b build.gradle
To build the deb package
./gradlew buildDeb --console=plain -Dbuild.snapshot=false -b build.gradle
To build rpm & deb packages
./gradlew buildPackages --console=plain -Dbuild.snapshot=false -b build.gradle
Open Distro for Elasticsearch is and will remain 100% open source under the Apache 2.0 license. As the project grows, we invite you to join the project and contribute. We want to make it easy for you to get started and remove friction — no lengthy Contributor License Agreement — so you can focus on writing great code.
If you have any questions, please join our community forum here.
File any issues here.