Docker-compose elastic setup
This guide is based on docker-compose setup from elasticsearch. https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html
Add the Elastic IP
Add the IP and DNS from docker host to Gitlab.
|
|
|
|
Add Elastic CA certificate
Add the CA certificate to /etc/gitlab/trusted-certs (give it a logical name)
This CA file can be found on the docker host in the mapped data location.
Run Gitlab reconfigure
The reconfigure will add the CA to gitlab internally.
|
|
This will make a specific hash symlink in another gitlab folder.
|
|
This will show if openssl can make a connection to the Elasticsearch cluster
|
|
With the symlink in place we can configure through the GUI the connection to Elasticsearch cluster with https://test0.internal:9200 with username and password.
Rate Limiting change
The default rate limit is set to 30, when using advanced search the rate limit will be triggerd per minute. Through the following change we set the new default to 1000. This can be set through following path in UI: admin portal > settings > Network > Search rate limits
Indexing shard sizing
Through the GUI we can setup our Shard sizing, after testing 1 shard and 1 replica is more then enough for our needs.
Indexing
Input parameters for connection; url: https://test0.internal:9200 Username: elastic Password: Configured Password
Enable setting “Elasticsearch indexing”, Press the blue button on top off the page to start the indexing from all the projects. Progress can be found throughout the CLI commands below;
Enabling Advance Search
Enable setting “Search with Elasticsearch enabled”
Nice to know commands
Create and recreate index for Elastic through gitlab-rake
|
|
Index information
|
|
Gitlab Elastic main overview
|
|