40
loading...
This website collects cookies to deliver better user experience
💡 Note: This is only meant for local development. Consider their cloud offering for production use.
.env
file. You can run openssl rand -hex 32
to generate values for ENCRYPTION_KEYS
variable.docker-compose up
http://localhost:3002
and login as enterprise_search
and the password you set in the above step.version: "3"
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.13.4
environment:
- "node.name=es-node"
- "discovery.type=single-node"
- "cluster.name=enterprise-search-docker-cluster"
- "bootstrap.memory_lock=true"
- "xpack.security.enabled=true"
- "xpack.security.authc.api_key.enabled=true"
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
memlock:
soft: -1
hard: -1
enterprisesearch:
image: docker.elastic.co/enterprise-search/enterprise-search:7.13.4
environment:
- "elasticsearch.host=http://elasticsearch:9200"
- "ent_search.auth.default.source=standard"
- "elasticsearch.username=elastic"
- "elasticsearch.password=password"
- "secret_management.encryption_keys=[changeme Eg: ddc8XXXXXXXXXXXXXXXXXXXXc1157]"
- "allow_es_settings_modification=true"
- "JAVA_OPTS=-Xms2g -Xmx2g"
- "ENT_SEARCH_DEFAULT_PASSWORD=changeme"
ports:
- 3002:3002
depends_on: ['elasticsearch']
elasticsearch
service to the host, but feel free to do so by adding ports
section under the service definition.ENT_SEARCH_DEFAULT_PASSWORD
to something you can remember. This will be the default password to be able to login in to the Enterprise Search instance.secret_management.encryption_keys
use the following command to generate a secure key. Note that should be at least one value in that list.openssl rand -hex 32
elasticsearch.password
for now as we will be setting it up in a later step.enterprisesearch
container now, you’ll see that it’s failing to authenticate against our elasticsearch
instance. Don’t worry about it for now. We are going to set it in the below step.elasticsearch
container. The easiest way would be to do that from the Docker Desktop interface, or you could use your shell-fu as well 🤺bin/elasticsearch-setup-passwords auto
Changed password for user apm_system
PASSWORD apm_system = XXXXXXXXXXXXXXXXXXXX
Changed password for user kibana_system
PASSWORD kibana_system = XXXXXXXXXXXXXXXXXXXX
Changed password for user kibana
PASSWORD kibana = XXXXXXXXXXXXXXXXXXXX
Changed password for user logstash_system
PASSWORD logstash_system = XXXXXXXXXXXXXXXXXXXX
Changed password for user beats_system
PASSWORD beats_system = XXXXXXXXXXXXXXXXXXXX
Changed password for user remote_monitoring_user
PASSWORD remote_monitoring_user = XXXXXXXXXXXXXXXXXXXX
Changed password for user elastic
PASSWORD elastic = XXXXXXXXXXXXXXXXXXXX
elastic
as we will be using that to configure the enterprisesearch
instance.elastic
user.bin/elasticsearch-setup-passwords auto -b | grep "PASSWORD elastic =" | cut -d '=' -f2 | xargs
enterprisesearch
container and update the elasticsearch.password
environment variable.vi config/enterprise-search.yml
CHANGE_THIS
with the password you received for elastic
user in the above step. Make sure to restart the container once that’s done and navigate to localhost:3002
You should be able to see the following welcome screen.enterprise_search
and the password that you set for ENT_SEARCH_DEFAULT_PASSWORD
in the docker-compose-yml
file.#########################################################
***Default user credentials have been setup. These are only printed once, so please ensure they are recorded.***
username: enterprise_search
password: XXXXXXXXXXXXXXXXXXXX
#########################################################
curl -X POST http://localhost:3002/api/ws/v1/sources/<put the source id here>/documents/bulk_create \
-H "Authorization: Bearer <put the access token here>" \
-H "Content-Type: application/json" \
-d '[
{
"id" : 1234,
"title" : "The Meaning of Time",
"body" : "Not much. It is a made up thing.",
"url" : "https://example.com/meaning/of/time",
"created_at": "2019-06-01T12:00:00+00:00",
"type": "list"
},
{
"id" : 1235,
"title" : "The Meaning of Sleep",
"body" : "Rest, recharge, and connect to the Ether.",
"url" : "https://example.com/meaning/of/sleep",
"created_at": "2019-06-01T12:00:00+00:00",
"type": "list"
},
{
"id" : 1236,
"title" : "The Meaning of Life",
"body" : "Be excellent to each other.",
"url" : "https://example.com/meaning/of/life",
"created_at": "2019-06-01T12:00:00+00:00",
"type": "list"
}
]'
<put the source id here>
and <put the access token here>
in the above. You can get those values from the Credentials section of the custom source.