Skip to content

Written guide for elasticsearch local #3881

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jun 7, 2018

Conversation

irkartik
Copy link
Contributor

With reference to #3803 and in replacement of #3852 .

I have created a new PR because of following reasons:

  1. I had pushed the changes to master branch previously.
  2. In order to sync the master branch of forked repo to the RTD repo, I had git pushed hard (i know that is not a good practice but that was the only way I could think of). This automatically closed the previous PR.
  3. Unintentional files edited by other users were reflected to the previous PR (i've no idea how)


$ ps -p 1

**Running Elasticsearch with SysV init**
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd leave how to run Elasticsearch to users for several reasons:

  1. There are multiple init systems and it would be nice to not maintain these commands in our documentation.

  2. People may want to add their choice of init system to the documentation and that would also increase the maintenance work.

  3. They also can use it without using any init systems and package managers:

    $ wget https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-1.3.8.tar.gz
    $ tar xf elasticsearch-1.3.8.tar.gz
    $ cd elasticsearch-1.3.8/
    $ ./bin/elasticsearch

    I wonder if we should document this method instead since it makes installing and running Elasticsearch without having to deal with different init systems, package managers, and distros.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First I thought of writing exactly the same as mentioned by you (i.e directly downloading the tar file), it was previously covered in #3852 . As the said method has an advantage of not having to maintain the init systems, we have a disadvantage of having to start the elasticsearch server each time we need to run our RTD server locally.

4. Index the data available at RTD database
-------------------------------------------

In order to search through the RTD database, you need to index it into the elasticsearch index.::
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[...] index.::

will be converted to HTML as

[...] index.:

I'd drop the "." character.


After installing java, verify the installation by,::

$ java -version
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style nit: Please don't use tab characters.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you mean $ sign?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I wasn't clear in my earlier comment. I meant don't use the \t character to indent code. See the following comparison:

# With using tab:
	$ java -version

# Without tabs, used four spaces instead:
    $ java -version

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed as mentioned 👍

1. Installing Java
------------------

Elasticsearch requires JAVA 8 or later. Use `Oracle official documentation <http://www.oracle.com/technetwork/java/javase/downloads/index.html>`_.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style nit: I don't know which one is correct (Java vs. JAVA) but please use the same style in the documentation.

Enabling Elasticsearch on the local server
==========================================

Read the Docs has been using Elasticsearch which is a platform for distributed search and analysis of data in real time. To enable the search feature on your local installation, you need to install the elasticsearch locally and run the Elastic server.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style nit: Please wrap lines at 80 characters.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rajujha373 @berkerpeksag actually, rtd doesn't use that style of wrapping all lines to 80 characters, here are the guidelines for writing docs https://docs.readthedocs.io/en/latest/docs.html#content. Note that this was recently added.

Enabling Elasticsearch on the local server
==========================================

Read the Docs has been using Elasticsearch which is a platform for distributed search and analysis of data in real time. To enable the search feature on your local installation, you need to install the elasticsearch locally and run the Elastic server.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"the elasticsearch" -> can "the" be dropped here?

2. Downloading and installing Elasticsearch
-------------------------------------------

Elasticsearch can be downloaded directly from elastic.co in zip, tar.gz, deb, or rpm packages. For Ubuntu, it's best to use the deb (Debian) package which will install everything you need to run Elasticsearch.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd drop the "in zip, tar.gz, deb, or rpm packages" part to make it brief.

Elasticsearch can be downloaded directly from elastic.co in zip, tar.gz, deb, or rpm packages. For Ubuntu, it's best to use the deb (Debian) package which will install everything you need to run Elasticsearch.

RTD currently uses elasticsearch 1.x which can be easily downloaded and installed from the `Official Website
<https://www.elastic.co/downloads/>`_.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from the Official Website -> from elastic.co

RTD currently uses elasticsearch 1.x which can be easily downloaded and installed from the `Official Website
<https://www.elastic.co/downloads/>`_.

1. First download the deb package version 1.3.8 from this `Link <https://www.elastic.co/downloads/past-releases/elasticsearch-1-3-8>`_.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd merge the first item with the paragraph above. Since we need to install a specific version of Elasticsearch, we don't need to mention the generic downloads page. We can just link to the download page of 1.3.8.

1. First download the deb package version 1.3.8 from this `Link <https://www.elastic.co/downloads/past-releases/elasticsearch-1-3-8>`_.

2. Install the downloaded package by following command
``$ sudo apt install .{path-to-downloaded-file}/elasticsearch-1.3.8.deb``
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can use a code block instead of ``...``:

2. [...] command::

   $ sudo apt install .{path-to-downloaded-file}/elasticsearch-1.3.8.deb

@berkerpeksag
Copy link
Member

Oh, I forgot to mention that this new document should be linked in http://docs.readthedocs.io/en/latest/install.html (see the fourth note)

@irkartik
Copy link
Contributor Author

that sounds really motivating @berkerpeksag thank you :)

@irkartik
Copy link
Contributor Author

Hi @berkerpeksag is there anything more to be done in this PR?

@berkerpeksag
Copy link
Member

@rajujha373 did you address all reviews comments or am I seeing an outdated version of your PR for some reason? For example, the new document didn't linked in install.rst and @stsewd comment in #3881 (comment) didn't seem to be addressed.

@@ -1,3 +1,5 @@
.. _running-elasticsearch-locally:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no need to add this if you use the doc role :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yes, I was checking out how to link the files ... Forgot to delete it .. 😀

@safwanrahman
Copy link
Member

Hi @rajujha373, Thanks for the writeup.
Can you please add instruction about installing the elasticsearch-analysis-icu plugin and creating the indexes?
You can see the example here

@ericholscher
Copy link
Member

This is a good change. I'm going to merge it to get the data published, and it can be improved over time.

@ericholscher ericholscher merged commit a5c86fe into readthedocs:master Jun 7, 2018
ericholscher added a commit that referenced this pull request Jun 7, 2018
Build on top of #3881 and put docs in custom_installs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants