Docs: Made current version, branch and jdk into asciidoc attributes

This commit is contained in:
Clinton Gormley 2014-07-23 11:54:53 +02:00
parent 15ccd787a5
commit 3f9aea883f
6 changed files with 84 additions and 80 deletions

View File

@ -3,23 +3,23 @@
The `nodes` command shows the cluster topology.
[source,shell]
["source","sh",subs="attributes,callouts"]
--------------------------------------------------
% curl 192.168.56.10:9200/_cat/nodes
SP4H 4727 192.168.56.30 9300 1.0.1 1.6.0_27 72.1gb 35.4 93.9mb 79 239.1mb 0.45 3.4h d m Boneyard
_uhJ 5134 192.168.56.10 9300 1.0.1 1.6.0_27 72.1gb 33.3 93.9mb 85 239.1mb 0.06 3.4h d * Athena
HfDp 4562 192.168.56.20 9300 1.0.1 1.6.0_27 72.2gb 74.5 93.9mb 83 239.1mb 0.12 3.4h d m Zarek
SP4H 4727 192.168.56.30 9300 {version} {jdk} 72.1gb 35.4 93.9mb 79 239.1mb 0.45 3.4h d m Boneyard
_uhJ 5134 192.168.56.10 9300 {version} {jdk} 72.1gb 33.3 93.9mb 85 239.1mb 0.06 3.4h d * Athena
HfDp 4562 192.168.56.20 9300 {version} {jdk} 72.2gb 74.5 93.9mb 83 239.1mb 0.12 3.4h d m Zarek
--------------------------------------------------
The first few columns tell you where your nodes live. For sanity it
also tells you what version of ES and the JVM each one runs.
[source,shell]
["source","sh",subs="attributes,callouts"]
--------------------------------------------------
nodeId pid ip port version jdk
u2PZ 4234 192.168.56.30 9300 1.0.1 1.6.0_27
URzf 5443 192.168.56.10 9300 1.0.1 1.6.0_27
ActN 3806 192.168.56.20 9300 1.0.1 1.6.0_27
u2PZ 4234 192.168.56.30 9300 {version} {jdk}
URzf 5443 192.168.56.10 9300 {version} {jdk}
ActN 3806 192.168.56.20 9300 {version} {jdk}
--------------------------------------------------
@ -65,20 +65,20 @@ by default. To have the headers appear in the output, use verbose
mode (`v`). The header name will match the supplied value (e.g.,
`pid` versus `p`). For example:
[source,shell]
["source","sh",subs="attributes,callouts"]
--------------------------------------------------
% curl 192.168.56.10:9200/_cat/nodes?v\&h=id,ip,port,v,m
id ip port version m
pLSN 192.168.56.30 9300 1.0.1 m
k0zy 192.168.56.10 9300 1.0.1 m
6Tyi 192.168.56.20 9300 1.0.1 *
pLSN 192.168.56.30 9300 {version} m
k0zy 192.168.56.10 9300 {version} m
6Tyi 192.168.56.20 9300 {version} *
% curl 192.168.56.10:9200/_cat/nodes?h=id,ip,port,v,m
pLSN 192.168.56.30 9300 1.0.1 m
k0zy 192.168.56.10 9300 1.0.1 m
6Tyi 192.168.56.20 9300 1.0.1 *
pLSN 192.168.56.30 9300 {version} m
k0zy 192.168.56.10 9300 {version} m
6Tyi 192.168.56.20 9300 {version} *
--------------------------------------------------
[cols="<,<,<,<,<",options="header",]
[cols="<,<,<,<,<",options="header",subs="normal"]
|=======================================================================
|Header |Alias |Appear by Default |Description |Example
|`id` |`nodeId` |No |Unique node ID |k0zy
@ -86,7 +86,7 @@ k0zy 192.168.56.10 9300 1.0.1 m
|`host` |`h` |Yes |Host name |n1
|`ip` |`i` |Yes |IP address |127.0.1.1
|`port` |`po` |No |Bound transport port |9300
|`version` |`v` |No |Elasticsearch version |1.0.1
|`version` |`v` |No |Elasticsearch version |{version}
|`build` |`b` |No |Elasticsearch Build hash |5c03844
|`jdk` |`j` |No |Running Java version |1.8.0
|`disk.avail` |`d`, `disk`, `diskAvail` |No |Available disk space |1.8gb

View File

@ -12,7 +12,7 @@ curl -XGET 'http://localhost:9200/_cluster/stats?human&pretty'
--------------------------------------------------
Will return, for example:
[source,js]
["source","js",subs="attributes,callouts"]
--------------------------------------------------
{
"cluster_name": "elasticsearch",
@ -82,7 +82,7 @@ Will return, for example:
"client": 0
},
"versions": [
"0.90.8"
"{version}"
],
"os": {
"available_processors": 4,

View File

@ -93,7 +93,7 @@ With that out of the way, let's get started with the fun part...
== Installation
Elasticsearch requires Java 7. Specifically as of this writing, it is recommended that you use the Oracle JDK version 1.7.0_55. Java installation varies from platform to platform so we won't go into those details here. Suffice to say, before you install Elasticsearch, please check your Java version first by running (and then install/upgrade accordingly if needed):
Elasticsearch requires Java 7. Specifically as of this writing, it is recommended that you use the Oracle JDK version {jdk}. Java installation varies from platform to platform so we won't go into those details here. Suffice to say, before you install Elasticsearch, please check your Java version first by running (and then install/upgrade accordingly if needed):
[source,sh]
--------------------------------------------------
@ -103,25 +103,25 @@ echo $JAVA_HOME
Once we have Java set up, we can then download and run Elasticsearch. The binaries are available from http://www.elasticsearch.org/download[`www.elasticsearch.org/download`] along with all the releases that have been made in the past. For each release, you have a choice among a zip, tar, DEB, or RPM package. For simplicity, let's use the tar package.
Let's download the Elasticsearch 1.1.1 tar as follows (Windows users should download the zip package):
Let's download the Elasticsearch {version} tar as follows (Windows users should download the zip package):
[source,sh]
["source","sh",subs="attributes,callouts"]
--------------------------------------------------
curl -L -O https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.1.1.tar.gz
curl -L -O https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-{version}.tar.gz
--------------------------------------------------
Then extract it as follows (Windows users should unzip the zip package):
[source,sh]
["source","sh",subs="attributes,callouts"]
--------------------------------------------------
tar -xvf elasticsearch-1.1.1.tar.gz
tar -xvf elasticsearch-{version}.tar.gz
--------------------------------------------------
It will then create a bunch of files and folders in your current directory. We then go into the bin directory as follows:
[source,sh]
["source","sh",subs="attributes,callouts"]
--------------------------------------------------
cd elasticsearch-1.1.1/bin
cd elasticsearch-{version}/bin
--------------------------------------------------
And now we are ready to start our node and single cluster (Windows users should run the elasticsearch.bat file):
@ -133,10 +133,10 @@ And now we are ready to start our node and single cluster (Windows users should
If everything goes well, you should see a bunch of messages that look like below:
[source,sh]
["source","sh",subs="attributes,callouts"]
--------------------------------------------------
./elasticsearch
[2014-03-13 13:42:17,218][INFO ][node ] [New Goblin] version[1.1.1], pid[2085], build[5c03844/2014-02-25T15:52:53Z]
[2014-03-13 13:42:17,218][INFO ][node ] [New Goblin] version[{version}], pid[2085], build[5c03844/2014-02-25T15:52:53Z]
[2014-03-13 13:42:17,219][INFO ][node ] [New Goblin] initializing ...
[2014-03-13 13:42:17,223][INFO ][plugins ] [New Goblin] loaded [], sites []
[2014-03-13 13:42:19,831][INFO ][node ] [New Goblin] initialized

View File

@ -1,6 +1,10 @@
[[elasticsearch-reference]]
= Reference
:version: 1.2.0
:branch: 1.2
:jdk: 1.7.0_60
include::getting-started.asciidoc[]
include::setup.asciidoc[]

View File

@ -6,9 +6,9 @@ at startup without any user interaction.
This can be achieved through `service.bat` script under `bin/` folder which allows one to install,
remove, manage or configure the service and potentially start and stop the service, all from the command-line.
[source,sh]
["source","sh",subs="attributes,callouts"]
--------------------------------------------------
c:\elasticsearch-0.90.5\bin>service
c:\elasticsearch-{version}\bin>service
Usage: service.bat install|remove|start|stop|manager [SERVICE_ID]
--------------------------------------------------
@ -36,9 +36,9 @@ the service is reinstalled.
Based on the architecture of the available JDK/JRE (set through `JAVA_HOME`), the appropriate 64-bit(x64) or 32-bit(x86)
service will be installed. This information is made available during install:
[source,sh]
["source","sh",subs="attributes,callouts"]
--------------------------------------------------
c:\elasticsearch-0.90.5\bin>service install
c:\elasticsearch-{version}\bin>service install
Installing service : "elasticsearch-service-x64"
Using JAVA_HOME (64-bit): "c:\jvm\jdk1.7"
The service 'elasticsearch-service-x64' has been installed.

View File

@ -18,9 +18,9 @@ wget -qO - http://packages.elasticsearch.org/GPG-KEY-elasticsearch | sudo apt-ke
Add the following to your /etc/apt/sources.list to enable the repository
[source,sh]
["source","sh",subs="attributes,callouts"]
--------------------------------------------------
deb http://packages.elasticsearch.org/elasticsearch/1.2/debian stable main
deb http://packages.elasticsearch.org/elasticsearch/{branch}/debian stable main
--------------------------------------------------
Run apt-get update and the repository is ready for use. You can install it with :
@ -45,11 +45,11 @@ rpm --import http://packages.elasticsearch.org/GPG-KEY-elasticsearch
Add the following in your `/etc/yum.repos.d/` directory
in a file named (for example) `elasticsearch.repo`
[source,sh]
["source","sh",subs="attributes,callouts"]
--------------------------------------------------
[elasticsearch-1.2]
name=Elasticsearch repository for 1.2.x packages
baseurl=http://packages.elasticsearch.org/elasticsearch/1.2/centos
[elasticsearch-{branch}]
name=Elasticsearch repository for {branch}.x packages
baseurl=http://packages.elasticsearch.org/elasticsearch/{branch}/centos
gpgcheck=1
gpgkey=http://packages.elasticsearch.org/GPG-KEY-elasticsearch
enabled=1