various templates improvements (#12500)

This commit is contained in:
Harrison Chase
2023-10-28 22:13:22 -07:00
committed by GitHub
parent d85d4d7822
commit 9e0ae56287
50 changed files with 462 additions and 282 deletions

View File

@@ -1,14 +1,18 @@
import os
from elasticsearch import Elasticsearch
es_host = os.environ["ELASTIC_SEARCH_SERVER"]
es_password = os.environ["ELASTIC_PASSWORD"]
# Setup Elasticsearch
# This shows how to set it up for a cloud hosted version
# Password for the 'elastic' user generated by Elasticsearch
ELASTIC_PASSWORD = "..."
# Found in the 'Manage Deployment' page
CLOUD_ID = "..."
# Create the client instance
db = Elasticsearch(
es_host,
http_auth=('elastic', es_password),
ca_certs='http_ca.crt' # Replace with your actual path
cloud_id=CLOUD_ID,
basic_auth=("elastic", ELASTIC_PASSWORD)
)
customers = [