The purpose of this sandbox is to make it easy to set up the Elasticsearch and optionally the Kibana, along with the ROR plugin. It's called sandbox because it creates an isolated environment that is completely independent of what you have installed on your system. Additionally, it doesn't change any settings or data on a system it's run on, besides created Docker volumes (which can be easily cleaned using clean.sh script). Because of all these features, it's well suited for tests, experiments with configuration, development and so on.
Here's a list of things that you can do with this sandbox:
- Set up a specific version of Elasticsearch and Kibana with the ROR plugin.
- Set up Elasticsearch and Kibana along with ROR plugin from a custom location.
- Set up Elasticsearch for remote debugging.
- Set up Kibana connected to Elasticsearch executed in IDE for Elasticsearch plugin debugging.
To use this sandbox you will need two things installed on your system: Docker and Docker Compose. Here are links to pages with instructions on how to install them:
Currently, we have two types deployments:
- ES+KBN cluster with ROR (
ror-demo-cluster
) - Local ES+KBN cluster with ROR and remote X-Pack Security cluster in Elastic Cloud (
ror-cluster-elastic-cloud-demo
)
Pick one of types and go to its location. Then run run.sh
script and follow the interactive guides. Make sure that you
clean up after your tests (clean.sh
script).
Here's description of each file under the conf
directory:
ror-demo-cluster/conf/
(orror-cluster-elastic-cloud-demo/conf/
)elasticsearch.yml
- minimal single node Elasticsearch configuration filelog4j2.properties
- log4j properties file which could be used to change log level for Elasticsearchreadonlyrest.yml
- sample ROR configuration file which allows Kibana to access itkibana.yml
- minimal Kibana configuration file
By default, services from sandbox expose these ports:
19200
- Elasticsearch REST19300
- Elasticsearch transport15601
- Kibana5000
- remote debugger port (Elasticsearch)
cd ror-demo-cluster
(OR cd ror-cluster-elastic-cloud-demo
)
$ ./run
Then follow instructions in the interactive script. When you finish your test, clean up:
$ ./clean.sh
Here's description of how to connect remote debugger to running Elasticsearch server which has been started using this sandbox.
- Open the
elasticsearch-readonlyrest-plugin
project in IntelliJ IDEA. - Checkout commit with the same version of ROR code that is running in Elasticsearch you want to connect.
- Open
Edit configurations...
window. It can be done by pressing shift key twice and entering "Edit configurations" or fromRun->Edit configurations...
menu. - If you don't have remote debugger configuration yet add it by clicking "+" icon and choosing
Remote JVM Debug
- New configuration will be automatically selected. You can assign it a custom name like "sandbox remote debugger" on presented screenshot. Host and port should be set exactly as they are on this screenshot. Last marked thing is module classpath. You should choose module corresponding to ES version you are trying to debug with name ending with
.main
. Module selected on screenshot is appropriate for debugging ES 7.2.x. - Click OK to save configuration.
- You should now see name of created configuration in upper right corner of IntelliJ IDEA.
- Click on a bug icon next to it to start debugger.
- After successful connection, window like that should pop up from the bottom