Basic ElasticSearch hands-on workshop
-
Make sure the following items have been installed on your machine:
- Java 7 or 8
- Git (if you like a pretty interface to deal with git, try SourceTree)
- Maven
-
Install Oracle VirtualBox https://www.virtualbox.org/wiki/Downloads
-
Install Vagrant https://www.vagrantup.com/downloads.html (on Mac and Windows the installer will make sure that vagrant command is known in the command prompt)
-
Clone this repository into your workspace
-
Open a command prompt, go to the elasticsearchworkshop folder and run
vagrant up
This will start up the vagrant box. The first time will take a while as it has to download the OS image, elasticsearch and other dependencies.
Shutting down the vagrant box can be done by typing
vagrant halt
You can restore the environment back to a clean, working state (in case things go south) by typing
vagrant provision
You can SSH into the virtual environment with
vagrant ssh
And when you're done playing around, you can remove all traces of it with
vagrant destroy
-
Import the maven projects into IDE of your choice
-
Run the tests of wes-core module to verify everything has been setup correctly by typing
cd wes-core mvn clean install
If the tests pass, you are ready to start with the exercises.
All the exercises are located in the wes-exercises module.
- Basic exercises are located in the following package:
be.ordina.wes.exercises.basics
- Advanced search exercises:
be.ordina.wes.exercises.advanced_search
- Language exercises:
be.ordina.wes.exercises.language
- Aggregations:
be.ordina.wes.exercises.aggregations
Solutions are located on the solutions branch
You can access the ElasticHQ plugin at http://localhost.:9200/_plugin/HQ (for checking server state etc.)
or the Marvel plugin at http://localhost.:9200/_plugin/marvel (free only for development)
-
IntelliJ users: In some rare cases you might need to set the working directory in the running configurations to $MODULE_DIR$
-
Windows users: If you're running a 64bit Vagrant box, you may need to enable hardware virtualization (VT-x) in your BIOS. To avoid this issue, we'll be using a 32bit box for this workshop.