From aecf1318d6c594b02b21ca45767d605292df6062 Mon Sep 17 00:00:00 2001 From: redteampanda-ng <31235211+redteampanda-ng@users.noreply.github.com> Date: Mon, 8 Apr 2024 09:20:37 +0200 Subject: [PATCH] chore: add some more information regarding different scenarios --- maintenance/index.rst | 7 +++++-- nodes/index.rst | 1 + setup/index.rst | 13 +++++++++++-- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/maintenance/index.rst b/maintenance/index.rst index 872ac6a..1d219f6 100644 --- a/maintenance/index.rst +++ b/maintenance/index.rst @@ -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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -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"} }' @@ -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 diff --git a/nodes/index.rst b/nodes/index.rst index 7e3f7a8..7300c65 100644 --- a/nodes/index.rst +++ b/nodes/index.rst @@ -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 ------------ diff --git a/setup/index.rst b/setup/index.rst index dbe0a39..2f6b485 100644 --- a/setup/index.rst +++ b/setup/index.rst @@ -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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -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 ~~~~~~~~~~~~~~~~~~~~~~~~