- git
- docker and docker-compose
- the most expensive thing of 'em all (Time & Patience!)
- https://www.elastic.co/guide/index.html
- https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html
- clone the elasticsearch-head plugin : https://github.com/mobz/elasticsearch-head
- clone the project
- go to /es-docker-image and do
docker build . -t es-demo
- important: edit the
etc/sysctl.conf
file and add the following:vm.max_map_count=262144
(without it, ES will refuse to start) - restart the system (simply logging out / back in is insufficient!)
- go back to the main dir and run
docker-compose up
to fire up a 3-node ES cluster, ordocker-compose up es-master-node
to start a stand-alone ES node. - Open the index.html from previously cloned elasticsearch-head in your fav'rite browser (this is a stand-alone web-app)
- type http://localhost:9200 into the box next to the connect button and hit "Connect"
- Optionally, clone ElasticsearchHQ application: https://github.com/royrusso/elasticsearch-HQ This allows for more comprehensive and user-friendly administration of the cluster (compared e.g. to elasticsearch-head)
- Ready to go!
The accompanying elasticsearch-demo-app (available here: https://github.com/abe-frickelbude/elasticsearch-demo-app.git) can be used to create sample content for experimenting with basic ES features.
- maven
- jdk8 (preferrably oracle jdk)
- clone the source
- go into the base directory and do
mvn clean package
- go to
target
dir and dojava -jar elasticsearch-demo-app-1.0.jar
The app will be available at localhost:8080
Available commands are currently:
/cluster_status
- shows cluster health/sample-data/clear
- drops all sample indices/sample-data/fill?num_samples=<n>
- prepares sample indices, n is the desired number of samplessample-data/find/<index>/<id>
- find a dataset by index name and IDsample-data/find/<index>/<type>/<id>
- ditto, but with type information as well
Check out the source code (based on Spring Boot) for more details - it is quite straightforward :)
- The node configuration attempts to be at least partially resource-friendly, default max java heap size per node is 256MB (Can be adjusted in the elasticsearch.yml file via the ES_JAVA_OPTS environment variable)