This repository has been archived by the owner on Aug 13, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Getting elasticsearch batchable up and running
- Loading branch information
Joel Klinger
committed
Oct 26, 2018
1 parent
605acd9
commit 166795d
Showing
11 changed files
with
136 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
.. include:: ../../nesta/production/elasticsearch/README.rst | ||
.. include:: ../../nesta/production/README-elasticsearch.rst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
#!/bin/bash | ||
|
||
pipreqs --force --ignore docs/ . | ||
pip freeze | grep "PyMySQL" >> requirements.txt | ||
pip freeze | grep "elasticsearch" >> requirements.txt | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
Elasticsearch | ||
============= | ||
|
||
The following steps will take you through setting up elasticsearch on an EC2 | ||
instance. | ||
|
||
Launch the EC2 instance and ssh in so the following can be installed: | ||
|
||
docker | ||
------ | ||
:code:`sudo yum install docker -y` | ||
|
||
docker-compose | ||
-------------- | ||
``curl -L https://github.com/docker/compose/releases/download/1.22.0/docker-compose-`uname -s` - `uname -m` -o /usr/local/bin/docker-compose`` | ||
:code:`chmod +x /usr/local/bin/docker-compose` | ||
:code:`sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose' | ||
more info: https://github.com/docker/compose/releases | ||
docker permissions | ||
------------------ | ||
:code:`sudo usermod -a -G docker $USER` | ||
|
||
more info: https://techoverflow.net/2017/03/01/solving-docker-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket/ | ||
|
||
vm.max_map_count | ||
---------------- | ||
set permanantly in */etc/sysctl.conf* by adding the following line: | ||
:code:`vm.max_map_count=262144` | ||
|
||
more info: https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html | ||
|
||
python 3.6 | ||
---------- | ||
:code:`sudo yum install python36 -y` | ||
|
||
*The machine now needs to be rebooted* | ||
:code:`sudo reboot now` | ||
|
||
Docker | ||
------ | ||
- max file descriptors | ||
- docker-compose | ||
|
||
Reindexing data from a remote cluster | ||
------------------------------------- | ||
- reindex permissions need to be set in the new cluster's *elasticsearch.yml* | ||
- if the existing cluster is AWS hosted ES the ip address needs to be added to | ||
the security settings | ||
- follow this guide: https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html#reindex-from-remote | ||
- *index* and *query* do not need to be supplied | ||
- if reindexing from AWS ES the port should be 443 for https. This is mandatory in the json sent to the reindexing api | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters