-
Notifications
You must be signed in to change notification settings - Fork 266
docker image for elasticsearch #39
base: master
Are you sure you want to change the base?
Changes from all commits
afc6ff8
959e808
d47eb5c
7f334ec
d0a5229
8c0df47
4fd9705
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,7 +57,12 @@ $ git clone https://github.com/IBM/elasticsearch-spark-recommender.git | |
|
||
### 2. Set up Elasticsearch | ||
|
||
This Code Pattern currently depends on Elasticsearch 5.3.0. Go to the [downloads page](https://www.elastic.co/downloads/past-releases/elasticsearch-5-3-0) and download the appropriate package for your system. | ||
This Code Pattern currently depends on Elasticsearch 5.3.0. | ||
|
||
#### 2.1 Install Elasticsearch on your machine | ||
(You can skip this if you want to use prepared docker image see: ./docker/elasticsearch/README.md) | ||
|
||
Go to the [downloads page](https://www.elastic.co/downloads/past-releases/elasticsearch-5-3-0) and download the appropriate package for your system. | ||
|
||
For example on Linux / Mac you can download the [TAR archive](https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.3.0.tar.gz) and unzip it using the commands: | ||
|
||
|
@@ -94,7 +99,7 @@ $ ./bin/elasticsearch | |
[2017-09-08T15:58:20,676][INFO ][o.e.n.Node ] initialized | ||
... | ||
``` | ||
|
||
#### 2.2 Elasticsearch python install | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "Install the Elasticsearch Python client" |
||
Finally, you will need to install the Elasticsearch Python client. You can do this by running the following command (you should do this in a separate terminal window to the one running Elasticsearch): | ||
|
||
``` | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
FROM docker.elastic.co/elasticsearch/elasticsearch:5.3.0 | ||
|
||
RUN /usr/share/elasticsearch/bin/elasticsearch-plugin install https://github.com/MLnick/elasticsearch-vector-scoring/releases/download/v5.3.0/elasticsearch-vector-scoring-5.3.0.zip | ||
RUN \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this required? Is it a licensing issue? |
||
mv /usr/share/elasticsearch/plugins/x-pack /usr/share/elasticsearch/plugins/.removing-x-pack && \ | ||
mv /usr/share/elasticsearch/plugins/.removing-x-pack /usr/share/elasticsearch/plugins/x-pack && \ | ||
/usr/share/elasticsearch/bin/elasticsearch-plugin remove x-pack |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#### 2.0 Start Elasticsearch with docker | ||
If you familier with docker you can use the [elasticsearch docker image](https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html) with installed elasticsearch-vector-scoring plugin. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. familier -> familiar There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "... with the |
||
Just go to docker/elasticsearch/ directory where you can find the ```Dockerfile``` and build the image with | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Perhaps use single backticks for |
||
```docker build -t es-with-vector-scoring .``` command. | ||
Check that the image is successfully built: | ||
``` | ||
$ docker build -t es-with-vector-scoring . | ||
Sending build context to Docker daemon 5.12kB | ||
Step 1/3 : FROM docker.elastic.co/elasticsearch/elasticsearch:5.3.0 | ||
... | ||
Successfully built 53ee57082cb8 | ||
Successfully tagged es-with-vector-scoring:latest | ||
``` | ||
|
||
|
||
If builds ended you can start the image with ```docker run -p 9200:9200 -p 9300:9300 es-with-vector-scoring``` command. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "Once the image has been built, run the image using the following command:" |
||
Check that the `elasticsearch-vector-scoring-plugin` is successfully loaded and elasticsearch is started: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Perhaps put "Elasticsearch is started" first, i.e. "Check that Elasticsearch has started and the ... " |
||
|
||
``` | ||
$ docker run -p 9200:9200 -p 9300:9300 es-with-vector-scoring | ||
[2018-05-09T18:58:24,901][INFO ][o.e.n.Node ] [] initializing ... | ||
... | ||
[2018-05-09T18:58:29,089][INFO ][o.e.p.PluginsService ] [Zs-WKd8] loaded plugin [elasticsearch-vector-scoring] | ||
... | ||
[2018-05-09T18:58:36,108][INFO ][o.e.n.Node ] [Zs-WKd8] started | ||
... | ||
``` | ||
|
||
Now that you've got Elasticsearch up and running, you can go back to step 2.2. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Provide a link back to the relevant section of the main |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"use the prepared"