Skip to content

Commit 731e4f4

Browse files
committed
refactor: from ElasticSearch to OpenSearch
1 parent 00b9747 commit 731e4f4

File tree

35 files changed

+96
-116
lines changed

35 files changed

+96
-116
lines changed

.github/workflows/integration.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ jobs:
3131
matrix:
3232
# TEST_NAME is a dummy variable used to make it easier to read the web interface
3333
include:
34-
- TEST_NAME: "MariaDB 11.4, elasticsearch:7.9.1"
35-
ARGS: MYSQL_VER=mariadb:11.4.3 ES_VER=elasticsearch:7.9.1
34+
- TEST_NAME: "MariaDB 11.4"
35+
ARGS: MYSQL_VER=mariadb:11.4.3
3636
- TEST_NAME: "HTTPS"
3737
ARGS: TEST_HTTPS=Yes
3838
- TEST_NAME: "Force DEncode"
@@ -72,8 +72,8 @@ jobs:
7272
run: ./integration_tests.py test-client || touch client-tests-failed
7373
- name: Pilot tests
7474
run: ./integration_tests.py test-pilot || touch pilot-tests-failed
75-
- name: Elasticsearch logs
76-
run: docker logs elasticsearch
75+
- name: Opensearch logs
76+
run: docker logs opensearch
7777
- name: Check test status
7878
run: |
7979
has_error=0

dashboards/GrafanaDemo/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ A running example of this dashboard can be found on the LHCb grafana organisatio
66
- Production Jobs By Final Minor Status (MySQL)
77
- User Jobs By Final Minor Status (MySQL)
88
- Job CPU Efficiency By Job Type (MySQL)
9-
- User Jobs By Job Type (ElasticSearch)
9+
- User Jobs By Job Type (OpenSearch)
1010
- User Jobs By Final Minor Status (MySQL)
1111
- Pilots By Status (MySQL)
1212

1313
## How to import this dashboard into another Grafana installation?
14-
- Create Grafana data sources for the MySQL database and ElasticSearch cluster (both the DIRAC certification versions).
14+
- Create Grafana data sources for the MySQL database and OpenSearch cluster (both the DIRAC certification versions).
1515
- Create a new dashboard and in 'Dashboard settings' under 'JSON model' replace the JSON representation of the dashboard with this one.
1616
- In the JSON file, replace the datasource uid's with the ones for the data sources in your grafana installation. You can find the UID of a data source:
1717
- with the [API](https://grafana.com/docs/grafana/latest/developers/http_api/data_source/)

docs/source/AdministratorGuide/ExternalsSupport/index.rst

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,13 @@ generic connection details can be applied in CS location below (the shown values
3838
}
3939

4040

41-
ElasticSearch versions
42-
----------------------
41+
OpenSearch versions
42+
-------------------
4343

44-
ElasticSearch is an optional dependency for DIRAC servers installations. Supported versions:
44+
OpenSearch is a non-optional dependency for DIRAC servers installations.
45+
OpenSearch server is not shipped with DIRAC. You are responsible of its administration.
4546

46-
- 7.x up until 7.13
47-
- OpenDistro and OpenSearch releases "compatible" with the above ElasticSearch versions.
48-
49-
ElasticSearch server is not shipped with DIRAC. You are responsible of its administration.
50-
51-
You can run your ES cluster without authentication, or using User name and password, or using certificates. You may add the following parameters:
47+
You can run your OpenSearch cluster without authentication, or using User name and password, or using certificates. You may add the following parameters:
5248

5349
- ``User`` (default:``''``)
5450
- ``Password`` (default:``''``)

docs/source/AdministratorGuide/ServerInstallations/centralizedLogging.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ Logstash and ELK configurations
6262

6363
The suggested logstash configuration (``/etc/logstash/conf.d/configname``) can be found in https://gitlab.cern.ch/ai/it-puppet-module-dirac/-/blob/qa/code/templates/logstash.conf.erb (check the `full documentation <https://opensearch.org/docs/latest/clients/logstash/index/>`_)
6464

65-
The ElasticSearch template ``lhcb-dirac-logs_default`` looks like::
65+
The OpenSearch template ``lhcb-dirac-logs_default`` looks like::
6666

6767
{
6868
"order": 1,

docs/source/AdministratorGuide/ServerInstallations/tornadoComponentsLogs.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ dirac-json.conf (Add all needed components and choose the output you want)::
158158
[SERVICE] where we describe our json parser (from dirac Json log backend)
159159
[INPUT] where we describe dirac components log file and the way it will be parsed (json)
160160
[FILTER] where we apply modifications to parsed data, for example adding a levelname "DEV" whenever logs are not well formatted, typically "print" in code, or adding fields like hostname to know from which host logs are coming, but also more complex treatments like in dirac.lua script (described later)
161-
[OUTPUT] where we describe formatted logs destination, here, we have stdout, files on disks and elasticsearch.
161+
[OUTPUT] where we describe formatted logs destination, here, we have stdout, files on disks and opensearch.
162162

163163
dirac-parsers.conf::
164164

@@ -203,19 +203,19 @@ dirac.lua::
203203
Testing
204204
-------
205205

206-
Before throwing logs to ElasticSearch, config can be tested in Standard output by uncommenting::
206+
Before throwing logs to OpenSearch, config can be tested in Standard output by uncommenting::
207207

208208
[OUTPUT]
209209
name stdout
210210
match *
211211

212-
...and commenting ElasticSearch outputs.
212+
...and commenting OpenSearch outputs.
213213

214214
Then by using command::
215215

216216
/opt/fluent-bit/bin/fluent-bit -c //etc/fluent-bit/fluent-bit.conf
217217

218-
NOTE: When all is OK, uncomment ElasticSearch outputs and comment stdout output
218+
NOTE: When all is OK, uncomment OpenSearch outputs and comment stdout output
219219

220220
Service
221221
-------

docs/source/AdministratorGuide/Systems/Framework/Monitoring/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ The Framework/monitoring service
66

77
The framework system for the monitoring of services and agents has been removed and will no longer be used.
88

9-
It has been replaced by an ElasticSearch-based monitoring system. You can read about it in :ref:`Monitoring <monitoring_system>`
9+
It has been replaced by an OpenSearch-based monitoring system. You can read about it in :ref:`Monitoring <monitoring_system>`

docs/source/AdministratorGuide/Systems/MonitoringSystem/index.rst

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,18 @@ The Monitoring system is used to monitor various components of DIRAC. Currently,
2020
- PilotSubmission Monitoring: for monitoring the DIRAC pilot submission statistics from SiteDirector agents.
2121
- DataOperation Monitoring: for monitoring the DIRAC data operation statistics as well as individual failures from interactive use of ``StorageElement``.
2222

23-
It is based on Elasticsearch (OpenSearch) distributed search and analytics NoSQL database.
24-
If you want to use it, you have to install the Monitoring service, and of course connect to a ElasticSearch instance.
23+
It is based on OpenSearch distributed search and analytics NoSQL database.
24+
If you want to use it, you have to install the Monitoring service, and of course connect to a OpenSearch instance.
2525

26-
Install Elasticsearch/OpenSearch
27-
================================
26+
Install OpenSearch
27+
==================
2828

29-
This is not covered here, as installation and administration of ES are not part of DIRAC guide.
30-
Just a note on the ES versions supported: only ES7+ versions are currently supported, and are later to be replaced by OpenSearch services.
29+
This is not covered here.
3130

3231
Configure the MonitoringSystem
3332
===============================
3433

35-
You can run your Elastic/OpenSearch cluster even without authentication, or using User name and password. You have to add the following parameters:
34+
You can run your OpenSearch cluster even without authentication, or using User name and password. You have to add the following parameters:
3635

3736
- User
3837
- Password
@@ -82,7 +81,7 @@ The given periods above are also the default periods in the code.
8281
Enable the Monitoring System
8382
============================
8483

85-
In order to enable the monitoring of all the following types with an ElasticSearch-based backend, you should add the value `Monitoring` to the flag
84+
In order to enable the monitoring of all the following types with an OpenSearch-based backend, you should add the value `Monitoring` to the flag
8685
`MonitoringBackends/Default` in the Operations section of the CS.
8786
If you want to override this flag for a specific type, say, you want to only have Monitoring (and no Accounting) for WMSHistory, you just create a flag `WMSHistory` set to `Monitoring`.
8887
If, for example, you want both Monitoring and Accounting for WMSHistory (but not for other types), you set `WMSHistory = Accounting, Monitoring`. If no flag is set for `WMSHistory`, the `Default` flag will be used.
@@ -111,7 +110,7 @@ This can be done either via the CS or directly in the web app in the Configurati
111110
WMSHistory & PilotsHistory Monitoring
112111
=====================================
113112

114-
The WorkloadManagement/StatesAccountingAgent creates, every 15 minutes, a snapshot with the contents of JobDB and PilotAgentsDB and sends it to an Elasticsearch-based database.
113+
The WorkloadManagement/StatesAccountingAgent creates, every 15 minutes, a snapshot with the contents of JobDB and PilotAgentsDB and sends it to an OpenSearch-based database.
115114
This same agent can also report the WMSHistory to the MySQL backend used by the Accounting system (which is in fact the default).
116115

117116
Optionally, you can use an MQ system (like ActiveMQ) for failover, even though the agent already has a simple failover mechanism.
@@ -169,12 +168,12 @@ Accessing the Monitoring information
169168

170169
After you installed and configured the Monitoring system, you can use the Monitoring web application for the types WMSHistory and RMS.
171170

172-
However, every type can directly be monitored in Kibana dashboards that can be imported into your Elasticsearch (or Opensearch) instance. You can find and import these dashboards from DIRAC/dashboards as per the following example.
171+
However, every type can directly be monitored in Kibana dashboards that can be imported into your Opensearch instance. You can find and import these dashboards from DIRAC/dashboards as per the following example.
173172
Grafana dashboards are also provided for some of the types.
174173

175174
*Kibana dashboard for WMSHistory*
176175
A dashboard for WMSHistory monitoring ``WMSDashboard`` is available `here <https://github.com/DIRACGrid/DIRAC/tree/integration/dashboards/WMS>`__ for import as a NDJSON (as support for JSON is being removed in the latest versions of Kibana).
177-
The dashboard may not be compatible with older versions of ElasticSearch.
176+
The dashboard may not be compatible with older versions of OpenSearch.
178177
To import it in the Kibana UI, go to Management -> Saved Objects -> Import and import the JSON file.
179178

180179
Note: the JSON file already contains the index patterns needed for the visualizations. You may need to adapt the index patterns to your existing ones.

docs/source/AdministratorGuide/Systems/WorkloadManagement/architecture.rst

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,8 @@ All these agents are necessary for the WMS, and each of them should be installed
7474
You can duplicate some of these agents as long as you provide the correct configuration.
7575
A typical example is the SiteDirector, for which you may want to deploy even 1 for each of the sites managed.
7676

77-
Optional agents are:
78-
79-
StatesAccountingAgent or StatesMonitoringAgent
80-
Use one or the other.
81-
StatesMonitoringAgent is used for producing Monitoring plots through the :ref:`Monitoring System <monitoring_system>`. (so, using ElasticSearch as backend),
82-
while StatesAccountingAgent does the same job but using the Accounting system (so, MySQL as backend).
77+
StatesAccountingAgent.
78+
Used for producing Monitoring plots through the :ref:`Monitoring System <monitoring_system>`, or using the Accounting system (so, MySQL as backend).
8379

8480
A very different type of agent is the *JobAgent*, which is run by the pilot jobs and should NOT be run in a server installation.
8581

docs/source/DeveloperGuide/AddingNewComponents/DevelopingDatabases/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Developing Databases
33
====================
44

55
This is a quick guide about developing classes interacting with MySQL databases.
6-
DIRAC supports also Elasticsearch/OpenSearch NoSQL database, but it is not part of this document.
6+
DIRAC supports also OpenSearch NoSQL database, but it is not part of this document.
77

88
Before starting developing databases, you have to make sure that MySQL is installed, as well as python-mysql,
99
as explained in :ref:`editing_code`, and make sure that MySQL service is on.

docs/source/DeveloperGuide/AddingNewComponents/Utilities/gLogger/Backends/index.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,28 +53,28 @@ Parameters
5353
+-----------+------------------------------------------------------------------+----------------------+
5454

5555

56-
ElasticSearchBackend
56+
OpenSearch Backend
5757
--------------------
5858

5959
Description
6060
~~~~~~~~~~~
61-
Used to emit log records in the an ElasticSearch database.
61+
Used to emit log records in the an OpenSearch database.
6262
The *Backend* acccepts logs from *Debug* to *Always* level.
6363

6464
Parameters
6565
~~~~~~~~~~
6666
+-----------+------------------------------------------------------------------+----------------------+
6767
| Option | Description | Default value |
6868
+===========+==================================================================+======================+
69-
| Host | host machine where the ElasticSearch DB is installed | '' |
69+
| Host | host machine where the OpenSearch DB is installed | '' |
7070
+-----------+------------------------------------------------------------------+----------------------+
71-
| Port | port where the ElasticSearch DB listen | 9203 |
71+
| Port | port where the OpenSearch DB listen | 9203 |
7272
+-----------+------------------------------------------------------------------+----------------------+
73-
| User | username of the ElasticSearch DB (optional) | None |
73+
| User | username of the OpenSearch DB (optional) | None |
7474
+-----------+------------------------------------------------------------------+----------------------+
75-
| Password | password of the ElasticSearch DB (optional) | None |
75+
| Password | password of the OpenSearch DB (optional) | None |
7676
+-----------+------------------------------------------------------------------+----------------------+
77-
| Index | ElasticSearch index | '' |
77+
| Index | OpenSearch index | '' |
7878
+-----------+------------------------------------------------------------------+----------------------+
7979
| BufferSize| maximum size of the buffer before sending | 1000 |
8080
+-----------+------------------------------------------------------------------+----------------------+

0 commit comments

Comments
 (0)