Skip to content

Commit

Permalink
chore: add some more information regarding different scenarios
Browse files Browse the repository at this point in the history
  • Loading branch information
redteampanda-ng committed Apr 8, 2024
1 parent 884a580 commit aecf131
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
7 changes: 5 additions & 2 deletions maintenance/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ You can check elasticsearch status and index distribution on any of the nodes:
root@cockpit4:~# curl -u elastic:$(cat /etc/asgard-analysis-cockpit/elastic.password) http://127.0.0.1:9200/_cat/health
root@cockpit4:~# curl -u elastic:$(cat /etc/asgard-analysis-cockpit/elastic.password) http://127.0.0.1:9200/_cat/nodes
root@cockpit4:~# curl -u elastic:$(cat /etc/asgard-analysis-cockpit/elastic.password) http://127.0.0.1:9200/_cat/shards
root@cockpit4:~# curl -u elastic:$(cat /etc/asgard-analysis-cockpit/elastic.password) http://127.0.0.1:9200/_cluster/health | jq
Removing Elasticsearch nodes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand All @@ -42,7 +43,9 @@ value of "node_to_remove" to the actual node name):

.. code-block:: console
nextron@cockpit4:~$ curl -X PUT "http://127.0.0.1:9200/_cluster/settings" \
nextron@cockpit4:~$ sudo su -
[sudo] password for nextron:
root@cockpit4:~$ curl -X PUT "http://127.0.0.1:9200/_cluster/settings" \
-u elastic:$(cat /etc/asgard-analysis-cockpit/elastic.password) \
-H "Content-Type: application/json" \
-d '{"transient": {"cluster.routing.allocation.exclude._name": "node_to_remove"} }'
Expand All @@ -52,7 +55,7 @@ Then wait until the node has no shards left:

.. code-block:: console
nextron@cockpit4:~$ curl http://127.0.0.1:9200/_cat/shards
nextron@cockpit4:~$ curl -u elastic:$(cat /etc/asgard-analysis-cockpit/elastic.password) http://127.0.0.1:9200/_cat/shards
Once no shards are assigned to the node, it is safe to shut it down. When you have
replicas of each index (number_of_replicas >= 1), the cluster should automatically
Expand Down
1 change: 1 addition & 0 deletions nodes/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ Analysis Cockpit`` requires the following:
- Internet access during installation (see :ref:`nodes/index:connectivity check`)
- All nodes must be able to reach each other by resolving the fully qualified host name.
- TCP port 9300 must be open between all nodes.
- ``clusternode.conf`` generated by the ASGARD Analysis Cockpit (see :ref:`setup/index:cluster node configuration`)

Installation
------------
Expand Down
13 changes: 11 additions & 2 deletions setup/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Elasticsearch Cluster setup requires:
- A fully functional installation of Analysis Cockpit version 4.x
- At least two additional nodes with a similar high-end spec
- High-performance low-latency networking between all nodes
- All the nodes have a FQDN and can resolve each other's FQDNs and the Analysis Cockpit's FQDN

Analysis Cockpit preparation
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand All @@ -34,6 +35,11 @@ The script will configure Elasticsearch in the following way:
- SSL certificates are used for authentication of nodes.
- Any number of data nodes can be added with exactly the same configuration and certificate (as long as they are reachable).

.. hint::
The script will display two errors (``xpack.security.transport.ssl...``)
which can be ignored. These are due to the fact that the script
is setting up the configuration for the cluster node.

Resulting Elasticsearch configuration
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down Expand Up @@ -75,10 +81,13 @@ Cluster Node configuration
In addition to reconfiguring the Analysis Cockpit, ``es-cluster-setup.sh`` will
create a configuration file ``clusternode.conf`` which contains the required
configuration for additional nodes to join the cluster. The file can be found
on your Analysis Cockpit in ``/usr/share/asgard-analysis-cockpit/scripts/clusternode.conf``.
on your Analysis Cockpit in the home directory of the nextron user (``/home/nextron``).

If you executed the script as root user, the file will be located in
``/usr/share/asgard-analysis-cockpit/scripts/clusternode.conf``.

Download this configuration file for further usage in our Nextron
Universal Installer
Universal Installer (:ref:`nodes/index:installation`).

Restarting Elasticsearch
~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down

0 comments on commit aecf131

Please sign in to comment.