如何配置elasticsearch.yml和enterprise-search.yml时,不托管在本地计算机上

wlsrxk51  于 2021-06-10  发布在  ElasticSearch
关注(0)|答案(0)|浏览(430)

我想在aws服务器上托管elasticsearch和enterprise search。我到底要如何配置 .yml 文件以便它工作?我需要做什么不同的事吗?文件对此并不清楚。
编辑:
向您展示当前配置可能会有所帮助:
对于elasticsearch.yml:


# ======================== Elasticsearch Configuration =========================

# 

# NOTE: Elasticsearch comes with reasonable defaults for most settings.

# Before you set out to tweak and tune the configuration, make sure you

# understand what are you trying to accomplish and the consequences.

# 

# The primary way of configuring a node is via this file. This template lists

# the most important settings you may want to configure for a production cluster.

# 

# Please consult the documentation for further information on configuration options:

# https://www.elastic.co/guide/en/elasticsearch/reference/index.html

# 

# ---------------------------------- Cluster -----------------------------------

# 

# Use a descriptive name for your cluster:

# 

# cluster.name: my-application

# 

# ------------------------------------ Node ------------------------------------

# 

# Use a descriptive name for the node:

# 

# node.name: node-1

# 

# Add custom attributes to the node:

# 

# node.attr.rack: r1

# 

# ----------------------------------- Paths ------------------------------------

# 

# Path to directory where to store the data (separate multiple locations by comma):

# 

# path.data: /path/to/data

# 

# Path to log files:

# 

# path.logs: /path/to/logs

# 

# ----------------------------------- Memory -----------------------------------

# 

# Lock the memory on startup:

# 

# bootstrap.memory_lock: true

# 

# Make sure that the heap size is set to about half the memory available

# on the system and that the owner of the process is allowed to use this

# limit.

# 

# Elasticsearch performs poorly when the system is swapping the memory.

# 

# ---------------------------------- Network -----------------------------------

# 

# Set the bind address to a specific IP (IPv4 or IPv6):

# 

# network.host: 192.168.0.1

# 

# Set a custom port for HTTP:

# 

# http.port: 9200

# 

# For more information, consult the network module documentation.

# 

# --------------------------------- Discovery ----------------------------------

# 

# Pass an initial list of hosts to perform discovery when this node is started:

# The default list of hosts is ["127.0.0.1", "[::1]"]

# 

# discovery.seed_hosts: ["host1", "host2"]

# 

# Bootstrap the cluster using an initial set of master-eligible nodes:

# 

# cluster.initial_master_nodes: ["node-1", "node-2"]

# 

# For more information, consult the discovery and cluster formation module documentation.

# 

# ---------------------------------- Gateway -----------------------------------

# 

# Block initial recovery after a full cluster restart until N nodes are started:

# 

# gateway.recover_after_nodes: 3

# 

# For more information, consult the gateway module documentation.

# 

# ---------------------------------- Various -----------------------------------

# 

# Require explicit names when deleting indices:

# 

# action.destructive_requires_name: true

# 

xpack.security.enabled: true

discovery.type: single-node

cluster.routing.allocation.disk.threshold_enabled: true
cluster.routing.allocation.disk.watermark.flood_stage: 200mb
cluster.routing.allocation.disk.watermark.low: 500mb
cluster.routing.allocation.disk.watermark.high: 300mb

xpack.security.authc.api_key.enabled: true

对于enterprise-search.yml:


## ================= Elastic Enterprise Search Configuration ==================

# 

# NOTE: Elastic Enterprise Search comes with reasonable defaults.

# Before adjusting the configuration, make sure you understand what you

# are trying to accomplish and the consequences.

# 

# NOTE: For passwords, the use of environment variables is encouraged

# to keep values from being written to disk, e.g.

# elasticsearch.password: ${ELASTICSEARCH_PASSWORD:changeme}

# 

# ---------------------------------- Secrets ----------------------------------

# 

# Encryption keys to protect your application secrets. This field is required.

# 

secret_management.encryption_keys: [5322b64cf4260f9d94751a471e5921829f3b83cda9fcc9999346671c590430eb]

# 

# ------------------------------- Elasticsearch -------------------------------

# 

# Enterprise Search needs one-time permission to alter Elasticsearch settings.

# Ensure the Elasticsearch settings are correct, then set the following to

# true. Or, adjust Elasticsearch's config/elasticsearch.yml instead.

# See README.md for more details.

# 

allow_es_settings_modification: true

# 

# Elasticsearch full cluster URL:

# 

# elasticsearch.host: http://127.0.0.1:9200

# 

# Elasticsearch credentials:

# 

elasticsearch.username: elastic
elasticsearch.password: 5gJDLZPSnl1ut8OrtUla

# 

# Elasticsearch custom HTTP headers to add to each request:

# 

# elasticsearch.headers:

# X-My-Header: Contents of the header

# 

# Elasticsearch SSL settings:

# 

# elasticsearch.ssl.enabled: false

# elasticsearch.ssl.certificate:

# elasticsearch.ssl.certificate_authority:

# elasticsearch.ssl.key:

# elasticsearch.ssl.key_passphrase:

# elasticsearch.ssl.verify: true

# 

# Elasticsearch startup retry:

# 

# elasticsearch.startup_retry.enabled: true

# elasticsearch.startup_retry.interval: 5 # seconds

# elasticsearch.startup_retry.fail_after: 200 # seconds

# 

# ------------------------------- Hosting & Network ---------------------------

# 

# Define the exposed URL at which users will reach Enterprise Search.

# Defaults to localhost:3002 for testing purposes.

# Most cases will use one of:

# 

# * An IP: http://255.255.255.255

# * A FQDN: http://example.com

# * Shortname defined via /etc/hosts: http://ent-search.search

# 

# ent_search.external_url: http://localhost:3002

# 

# Web application listen_host and listen_port.

# Your application will run on this host and port.

# 

# * ent_search.listen_host: Must be a valid IPv4 or IPv6 address.

# * ent_search.listen_port: Must be a valid port number (1-65535).

# 

# ent_search.listen_host: 127.0.0.1

# ent_search.listen_port: 3002

# 

# ------------------------------ Authentication -------------------------------

# 

# The origin of authenticated Enterprise Search users.

# Options are standard, elasticsearch-native, and elasticsearch-saml.

# 

# Docs: https://www.elastic.co/guide/en/workplace-search/current/workplace-search-security.html

# 

# * standard: Users are created within the Enterprise Search dashboard.

# * elasticsearch-native: Users are managed via the Elasticsearch native realm.

# * elasticsearch-saml: Users are managed via the Elasticsearch SAML realm.

# 

ent_search.auth.source: standard

# 

# (SAML only) Name of the realm within the Elasticsearch realm chain.

# 

# ent_search.auth.name:

# 

# ---------------------------------- Limits -----------------------------------

# 

# Configurable limits for Enterprise Search.

# NOTE: Overriding the default limits can impact performance negatively.

# Also, changing a limit here does not actually guarantee that

# Enterprise Search will work as expected as related Elasticsearch limits

# can be exceeded.

# 

#### Workplace Search

# 

# Configure the maximum allowed document size for Custom API Sources.

# 

# workplace_search.custom_api_source.document_size.limit: 100kb

# 

# Configure how many fields a Custom API Source can have.

# NOTE: The Elasticsearch/Lucene setting `indices.query.bool.max_clause_count`

# might also need to be adjusted if "Max clause count exceeded" errors start

# occurring. See more here: https://www.elastic.co/guide/en/elasticsearch/reference/current/search-settings.html

# 

# workplace_search.custom_api_source.total_fields.limit: 64

# 

#### App Search

# 

# Configure the maximum allowed document size.

# 

# app_search.engine.document_size.limit: 100kb

# 

# Configure how many fields an engine can have.

# NOTE: The Elasticsearch/Lucene setting `indices.query.bool.max_clause_count`

# might also need to be adjusted if "Max clause count exceeded" errors start

# occurring. See more here: https://www.elastic.co/guide/en/elasticsearch/reference/current/search-settings.html

# 

# app_search.engine.total_fields.limit: 64

# 

# Configure how many source engines a meta engine can have.

# 

# app_search.engine.source_engines_per_meta_engine.limit: 15

# 

# Configure how many facet values can be returned by a search.

# 

# app_search.engine.total_facet_values_returned.limit: 250

# 

# Configure how big full-text queries are allowed.

# NOTE: The Elasticsearch/Lucene setting `indices.query.bool.max_clause_count`

# might also need to be adjusted if "Max clause count exceeded" errors start

# occurring. See more here: https://www.elastic.co/guide/en/elasticsearch/reference/current/search-settings.html

# 

# app_search.engine.query.limit: 128

# 

# Configure total number of synonym sets an engine can have.

# 

# app_search.engine.synonyms.sets.limit: 256

# 

# Configure total number of terms a synonym set can have.

# 

# app_search.engine.synonyms.terms_per_set.limit: 32

# 

# Configure how many analytics tags can be associated with a single query or clickthrough.

# 

# app_search.engine.analytics.total_tags.limit: 16

# 

# ---------------------------------- Workers ----------------------------------

# 

# Configure the number of worker threads.

# 

# worker.threads: 4

# 

# ----------------------------------- APIs ------------------------------------

# 

# Set to true hide product version information from API responses.

# 

# hide_version_info: false

# 

# ---------------------------------- Mailer -----------------------------------

# 

# Connect Enterprise Search to a mailer.

# Docs: https://www.elastic.co/guide/en/workplace-search/current/workplace-search-smtp-mailer.html

# 

# email.account.enabled: false

# email.account.smtp.auth: plain

# email.account.smtp.starttls.enable: false

# email.account.smtp.host: 127.0.0.1

# email.account.smtp.port: 25

# email.account.smtp.user:

# email.account.smtp.password:

# email.account.email_defaults.from:

# 

# ---------------------------------- Logging ----------------------------------

# 

# Choose your log export path.

# 

# log_directory: log

# 

# Log level can be: debug, info, warn, error, fatal, or unknown.

# 

# log_level: info

# 

# Log format can be: default, json

# 

# log_format: default

# 

# Choose your Filebeat logs export path.

# 

# filebeat_log_directory: log

# 

# Enable logging app logs to stdout (enabled by default).

# 

# enable_stdout_app_logging: true

# 

# The number of files to keep on disk when rotating logs. When set to 0, no

# rotation will take place.

# 

# log_rotation.keep_files: 7

# 

# The maximum file size in bytes before rotating the log file. If

# log_rotation.keep_files is set to 0, no rotation will take place and there

# will be no size limit for the singular log file.

# 

# log_rotation.rotate_every_bytes: 1048576 # 1 MiB

# 

# ---------------------------------- TLS/SSL ----------------------------------

# 

# Configure TLS/SSL encryption.

# 

# ent_search.ssl.enabled: false

# ent_search.ssl.keystore.path:

# ent_search.ssl.keystore.password:

# ent_search.ssl.keystore.key_password:

# ent_search.ssl.redirect_http_from_port:

# 

# ---------------------------------- Session ----------------------------------

# 

# Set a session key to persist user sessions through process restarts.

# 

# secret_session_key:

# 

# --------------------------------- Telemetry ---------------------------------

# 

# Reporting your basic feature usage statistics helps us improve your user

# experience. Your data is never shared with anyone.

# 

# Set to false to disable telemetry capabilities entirely. You can alternatively

# opt out through the Settings page.

# 

# telemetry.enabled: true

# 

# If false, collection of telemetry data is disabled; however, it can be

# enabled via the Settings page if telemetry.allow_changing_opt_in_status is

# true.

# 

# telemetry.opt_in: true

# 

# If true, users are able to change the telemetry setting at a later time

# through the Settings page. If false, the value of telemetry.opt_in determines

# whether to send telemetry data or not.

# 

# telemetry.allow_changing_opt_in_status: true

# 

# ----------------------------- Diagnostics report ----------------------------

# 

# Path where diagnostic reports will be generated.

# 

# diagnostic_report_directory: diagnostics

# 

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题