Skip to content

Commit b43f933

Browse files
committed
Removing references to elasticsearch
1 parent 0b65636 commit b43f933

File tree

13 files changed

+5
-79
lines changed

13 files changed

+5
-79
lines changed

.gitignore

-2
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,5 @@ target/
6666
.idea/
6767

6868
# Locally generated certificates for development
69-
elasticsearch-proxy/nginx.crt
70-
elasticsearch-proxy/nginx.key
7169
nginx/localhost.crt
7270
nginx/localhost.key

.inveniorc

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ export INVENIO_POSTGRESQL_DBNAME=cernopendata
1313
export INVENIO_POSTGRESQL_DBUSER=cernopendata
1414
export INVENIO_POSTGRESQL_DBPASS=dbpass123
1515
export INVENIO_REDIS_HOST=192.168.50.12
16-
export INVENIO_ELASTICSEARCH_HOST=192.168.50.13
1716
export INVENIO_RABBITMQ_HOST=192.168.50.14
1817
export INVENIO_WORKER_HOST=192.168.50.15
1918
# sphinxdoc-kickstart-configuration-variables-end

MANIFEST.in

-3
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ include .inveniorc
99
include Dockerfile
1010
include LICENSE
1111
include babel.ini
12-
include elasticsearch-proxy/Dockerfile
13-
include elasticsearch-proxy/nginx.conf
1412
include nginx/Dockerfile
1513
include pytest.ini
1614
include sentry/Dockerfile
@@ -45,4 +43,3 @@ recursive-include sentry *.json
4543
recursive-include sentry *.py
4644
recursive-include sentry *.sh
4745
recursive-include sentry *.yml
48-
recursive-exclude elasticsearch-proxy *

cernopendata/config.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -427,10 +427,8 @@ def _query_parser_and(qstr=None):
427427
CERNOPENDATA_DISABLE_DOWNLOADS = os.environ.get("CERNOPENDATA_DISABLE_DOWNLOADS", False)
428428
# Search
429429
# ======
430-
#: Default Elasticsearch document type.
430+
#: Default OpenSearch document type.
431431
SEARCH_DOC_TYPE_DEFAULT = None
432-
#: Do not map any keywords.
433-
SEARCH_ELASTIC_KEYWORD_MAPPING = {}
434432

435433
# This one can be used to have multiple instances on the same cluster
436434
# SEARCH_INDEX_PREFIX = "opendata-dev-"
@@ -447,7 +445,7 @@ def _query_parser_and(qstr=None):
447445
SEARCH_UI_SEARCH_VIEW = search_legacy
448446
# OAI-PMH
449447
# =======
450-
#: Default Elasticsearch index.
448+
#: Default OpenSearch index.
451449
OAISERVER_RECORD_INDEX = "records"
452450
#: OAI ID prefix.
453451
OAISERVER_ID_PREFIX = "oai:opendata.cern.ch:recid/"

cernopendata/mappings/os-v2/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@
2222
# waive the privileges and immunities granted to it by virtue of its status
2323
# as an Intergovernmental Organization or submit itself to any jurisdiction.
2424

25-
"""CERN Open Data Elasticsearch v7 Mappings."""
25+
"""CERN Open Data OpenSearch v7 Mappings."""

cernopendata/modules/records/serializers/basic_json.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def serialize_search(
5353
"""Serialize a search result.
5454
5555
:param pid_fetcher: Persistent identifier fetcher.
56-
:param search_result: Elasticsearch search result.
56+
:param search_result: OpenSearch search result.
5757
:param links: Dictionary of links to add to response.
5858
"""
5959
total = search_result["hits"]["total"]["value"]

elasticsearch-proxy/.htpasswd

-1
This file was deleted.

elasticsearch-proxy/Dockerfile

-32
This file was deleted.

elasticsearch-proxy/nginx.conf

-19
This file was deleted.

requirements-production.txt

+1-5
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ celery==5.0.4
5050
certifi==2021.5.30
5151
# via
5252
# dulwich
53-
# elasticsearch
5453
# requests
5554
cffi==1.14.5
5655
# via cryptography
@@ -308,7 +307,7 @@ invenio-rest[cors]==1.2.1
308307
# invenio-accounts
309308
# invenio-files-rest
310309
# invenio-records-rest
311-
invenio-search[elasticsearch7]==1.4.1
310+
invenio-search[opensearch2]==1.4.1
312311
# via cernopendata (setup.py)
313312
invenio-search-ui==2.0.1
314313
# via cernopendata (setup.py)
@@ -456,7 +455,6 @@ python-dateutil==2.8.2
456455
# via
457456
# alembic
458457
# arrow
459-
# elasticsearch-dsl
460458
# invenio-records-rest
461459
# jupyter-client
462460
python-editor==1.0.4
@@ -493,7 +491,6 @@ six==1.16.0
493491
# base32-lib
494492
# bleach
495493
# click-repl
496-
# elasticsearch-dsl
497494
# flask-breadcrumbs
498495
# flask-cors
499496
# flask-kvsession-invenio
@@ -555,7 +552,6 @@ uritools==3.0.2
555552
urllib3==1.26.6
556553
# via
557554
# dulwich
558-
# elasticsearch
559555
# requests
560556
uwsgi==2.0.21
561557
# via cernopendata (setup.py)

scripts/generate-localhost-certificate.sh

-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
#!/bin/bash
22
#
33
# Helper script for developers to generate certificates for running CERN Open Data portal locally.
4-
5-
openssl req -x509 -out ./elasticsearch-proxy/nginx.crt -keyout ./elasticsearch-proxy/nginx.key \
6-
-newkey rsa:2048 -nodes -sha256 \
7-
-subj '/CN=localhost' -extensions EXT -config <( \
8-
printf "[dn]\nCN=localhost\n[req]\ndistinguished_name = dn\n[EXT]\nsubjectAltName=DNS:localhost\nkeyUsage=digitalSignature\nextendedKeyUsage=serverAuth")
9-
104
openssl req -x509 -out ./nginx/localhost.crt -keyout ./nginx/localhost.key \
115
-newkey rsa:2048 -nodes -sha256 \
126
-subj '/CN=localhost' -extensions EXT -config <( \

scripts/instance.cfg

-3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,3 @@ ACCOUNTS_SESSION_REDIS_URL='redis://{{ environ('INVENIO_REDIS_HOST') }}:6379/1'
1010
BROKER_URL='amqp://guest:guest@{{ environ('INVENIO_RABBITMQ_HOST') }}:5672/' # Celery 3
1111
CELERY_BROKER_URL='amqp://guest:guest@{{ environ('INVENIO_RABBITMQ_HOST') }}:5672/' # Celery 4
1212
CELERY_RESULT_BACKEND='redis://{{ environ('INVENIO_REDIS_HOST') }}:6379/2'
13-
14-
# Elasticsearch
15-
SEARCH_ELASTIC_HOSTS='{{ environ('INVENIO_ELASTICSEARCH_HOST') }}'

setup.cfg

-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ universal = 1
3535

3636
[check-manifest]
3737
ignore =
38-
elasticsearch-*
3938
.github
4039
.github/*
4140

0 commit comments

Comments
 (0)