0

Enterprisesearch with elasticsearch in docker container

Enterprisesearch in docker container

Previously, on this post I’ve created a script to deploy the elastic stack using docker containers.

Enterprise search was released as of 7.7.0 and it provides both AppSearch and WorkplaceSearch into a single solution.

deploy-elastic.sh script I’ve added the entsearch mode so that you can deploy the Enterprisesearch and use it for AppSearch and WorkplaceSearch.

Simple run ./deploy-elastic.sh entsearch 7.15.1

  • The script will check to see if your stack is 7.15+ or else it will exit.
  • Enterprisesearch will be stood up using a container named entsearch
  • Enterprisesearch will listen on port 3002 (standard port)
  • Enterprisesearch is terminated wtih SSL and it uses the same ca.crt for your stack which is conviently copied out to your homedir/elasticstack/ca.crt.
  • Even if you’ve deployed the stack using other options you can add Enterprisesearch onto it by running ./deploy-elastic.sh entsearch {version} just make sure that the version matches your current deployment and that it is 7.7+

Once you are done testing again the cleanup is super simple just run ./deploy-elastic.sh cleanup and it will cleanup all the volumes/containers/networks. It will not remove the images so you will need to do that manually

After the stack is deployed you can log into kibana -> Enterprise Search -> Overview

file

file

file

Following is from a clean entsearch deployment

$ ./deploy-elastic.sh entsearch 7.15.1
[DEBUG] Deployment does not exist.  Starting deployment first
********** Deploying elasticsearch & kibana 7.15.1 **********
[DEBUG] docker.elastic.co/elasticsearch/elasticsearch:7.15.1 docker image already exists.. moving forward..
[DEBUG] docker.elastic.co/kibana/kibana:7.15.1 docker image already exists.. moving forward..
[DEBUG] Created elasticsearch.yml
[DEBUG] Setting temp password for elastic as k0cAvb3loLT4HeRPxM94fjQbt
[DEBUG] Created kibana.yml
[DEBUG] Created .env file
[DEBUG] Created instances.yml
[DEBUG] Created create-certs.yml for 7.15.1
[DEBUG] Created stack-compose.yml for 7.15.1
[DEBUG] Create certificates
Creating network "es_default" with the default driver
Creating volume "es_certs" with default driver
Creating es_create_certs_run ... done
Archive:  /certs/bundle.zip
   creating: /certs/ca/
  inflating: /certs/ca/ca.crt
   creating: /certs/es01/
  inflating: /certs/es01/es01.crt
  inflating: /certs/es01/es01.key
   creating: /certs/es02/
  inflating: /certs/es02/es02.crt
  inflating: /certs/es02/es02.key
   creating: /certs/es03/
  inflating: /certs/es03/es03.crt
  inflating: /certs/es03/es03.key
   creating: /certs/kibana/
  inflating: /certs/kibana/kibana.crt
  inflating: /certs/kibana/kibana.key
   creating: /certs/apm/
  inflating: /certs/apm/apm.crt
  inflating: /certs/apm/apm.key
   creating: /certs/entsearch/
  inflating: /certs/entsearch/entsearch.crt
  inflating: /certs/entsearch/entsearch.key
   creating: /certs/minio/
  inflating: /certs/minio/minio.crt
  inflating: /certs/minio/minio.key
   creating: /certs/fleet/
  inflating: /certs/fleet/fleet.crt
  inflating: /certs/fleet/fleet.key
[DEBUG] Starting our deployment
Creating volume "es_data01" with default driver
Creating volume "es_data02" with default driver
Creating volume "es_data03" with default driver
Creating es02   ... done
Creating es01   ... done
Creating kibana ... done
Creating es03   ... done
Creating es_wait_until_ready_1 ... done
[DEBUG] elasticsearch health is GREEN moving forward.
[DEBUG] Setting passwords and storing it in /Users/jlim/elasticstack/notes
Changed password for user apm_system
PASSWORD apm_system = mei0Ir0vuLWhPq4uTeBx

Changed password for user kibana_system
PASSWORD kibana_system = rFXyGkapqQyQwwgWL2NY

Changed password for user kibana
PASSWORD kibana = rFXyGkapqQyQwwgWL2NY

Changed password for user logstash_system
PASSWORD logstash_system = qvl5qAiGoiiPi7eLIksJ

Changed password for user beats_system
PASSWORD beats_system = VL8ADdwje8Wvig7DSB2a

Changed password for user remote_monitoring_user
PASSWORD remote_monitoring_user = eYwXVmJBNusxbXuVJIlf

Changed password for user elastic
PASSWORD elastic = HbiXGH4tCffb4IzFUWJK

[DEBUG] elastic user's password found HbiXGH4tCffb4IzFUWJK
[DEBUG] kibana.yml re-generated with new password and encryption keys
[DEBUG] Restarted kibana to pick up the new elastic password
[DEBUG] Copied the certificate authority into /Users/jlim/elasticstack
[DEBUG] Complete! - stack deployed. 7.15.1

********** Deploying Enterprise Search **********
[DEBUG] elastic user's password found HbiXGH4tCffb4IzFUWJK
[DEBUG] elasticsearch health is GREEN moving forward.
[DEBUG] Pulling docker.elastic.co/enterprise-search/enterprise-search:7.15.1 image... might take a while
7.15.1: Pulling from enterprise-search/enterprise-search
22f1e563f2e0: Already exists
73864b7dd68f: Pull complete
3e5e6e8113a3: Pull complete
099f763c32f0: Pull complete
36f0818e13fe: Pull complete
50a0635297f9: Pull complete
060c87d3fbb7: Pull complete
ed1b43a4561d: Pull complete
605a26e2fe2b: Pull complete
1a240c89d454: Pull complete
c255cb8844ee: Pull complete
Digest: sha256:799af121375fa7179d322470b3a215c17d1fbd14c56556432fed8f4881bb2d6c
Status: Downloaded newer image for docker.elastic.co/enterprise-search/enterprise-search:7.15.1
docker.elastic.co/enterprise-search/enterprise-search:7.15.1
[DEBUG] Restarting es01 for Enterprise Search
[DEBUG] Restarting es02 for Enterprise Search
[DEBUG] Restarting es03 for Enterprise Search
[DEBUG] Restarting kibana for Enterprise Search
[DEBUG] elasticsearch is unhealthy. Checking again in 2 seconds.. if this doesnt finish in ~ 30 seconds something is wrong ctrl-c please.
[DEBUG] elasticsearch is unhealthy. Checking again in 2 seconds.. if this doesnt finish in ~ 30 seconds something is wrong ctrl-c please.
[DEBUG] elasticsearch is unhealthy. Checking again in 2 seconds.. if this doesnt finish in ~ 30 seconds something is wrong ctrl-c please.
[DEBUG] elasticsearch is unhealthy. Checking again in 2 seconds.. if this doesnt finish in ~ 30 seconds something is wrong ctrl-c please.
[DEBUG] elasticsearch is unhealthy. Checking again in 2 seconds.. if this doesnt finish in ~ 30 seconds something is wrong ctrl-c please.
[DEBUG] elasticsearch health is GREEN moving forward.
[DEBUG] Created enterprise-search.yml
[DEBUG] Created entsearch-compose.yml
[DEBUG] Started Enterprise Search.  It takes a WHILE!! to finish install. Please run docker logs -f entsearch to view progress
[DEBUG] For now please browse to http://localhost:3002 and use enterprise_search and HbiXGH4tCffb4IzFUWJK to login or kibana if newer versions

jlim0930

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.