Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Support Password Access for ElasticSearch #1072

Merged
merged 1 commit into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions conf/service_conf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ minio:
host: 'minio:9000'
es:
hosts: 'http://es01:9200'
username: 'elastic'
password: 'infini_rag_flow'
redis:
db: 1
password: 'infini_rag_flow'
Expand Down
5 changes: 3 additions & 2 deletions docker/.env
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# Version of Elastic products
STACK_VERSION=8.11.3

# Set the cluster name
CLUSTER_NAME=rag_flow

# Port to expose Elasticsearch HTTP API to the host
ES_PORT=1200

# Set the Elasticsearch password
ELASTIC_PASSWORD=infini_rag_flow

# Port to expose Kibana to the host
KIBANA_PORT=6601

Expand Down
8 changes: 4 additions & 4 deletions docker/docker-compose-base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ services:
- ${ES_PORT}:9200
environment:
- node.name=es01
- cluster.name=${CLUSTER_NAME}
- cluster.initial_master_nodes=es01
- ELASTIC_PASSWORD=${ELASTIC_PASSWORD}
- bootstrap.memory_lock=false
- xpack.security.enabled=false
- cluster.max_shards_per_node=4096
- discovery.type=single-node
- xpack.security.enabled=true
- xpack.security.http.ssl.enabled=false
- xpack.security.transport.ssl.enabled=false
- TZ=${TIMEZONE}
mem_limit: ${MEM_LIMIT}
ulimits:
Expand Down
2 changes: 2 additions & 0 deletions docker/service_conf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ minio:
host: 'minio:9000'
es:
hosts: 'http://es01:9200'
username: 'elastic'
password: 'infini_rag_flow'
redis:
db: 1
password: 'infini_rag_flow'
Expand Down
2 changes: 2 additions & 0 deletions rag/utils/es_conn.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ def conn(self):
try:
self.es = Elasticsearch(
settings.ES["hosts"].split(","),
basic_auth=(settings.ES["username"], settings.ES["password"]) if "username" in settings.ES and "password" in settings.ES else None,
verify_certs=False,
timeout=600
)
if self.es:
Expand Down