mirror of
https://github.com/deviantony/docker-elk.git
synced 2026-04-12 20:23:15 +02:00
Update to v9.0.0
List of changes impacting docker-elk: - [kibana]: Several features now require an encryption key for saved objects. Such key must be set via the configuration option `xpack.encryptedSavedObjects.encryptionKey`. Ref: https://www.elastic.co/guide/en/kibana/8.18/xpack-security-secure-saved-objects.html - [enterprise-search]: Discontinued in 9.x versions. Refs: - https://www.elastic.co/guide/en/enterprise-search/8.18/upgrading-to-9-x.html - https://www.elastic.co/blog/app-search-to-elasticsearch
This commit is contained in:
@@ -1,53 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eu
|
||||
set -o pipefail
|
||||
|
||||
|
||||
source "${BASH_SOURCE[0]%/*}"/lib/testing.sh
|
||||
|
||||
|
||||
cid_es="$(container_id elasticsearch)"
|
||||
cid_en="$(container_id enterprise-search)"
|
||||
|
||||
ip_es="$(service_ip elasticsearch)"
|
||||
ip_en="$(service_ip enterprise-search)"
|
||||
|
||||
grouplog 'Wait for readiness of Elasticsearch'
|
||||
poll_ready "$cid_es" 'http://elasticsearch:9200/' --resolve "elasticsearch:9200:${ip_es}" -u 'elastic:testpasswd'
|
||||
endgroup
|
||||
|
||||
grouplog 'Wait for readiness of Enterprise Search'
|
||||
poll_ready "$cid_en" 'http://enterprise-search:3002/api/ent/v1/internal/health' --resolve "enterprise-search:3002:${ip_en}" -u 'elastic:testpasswd'
|
||||
endgroup
|
||||
|
||||
log 'Ensuring that App Search API keys were created in Elasticsearch'
|
||||
|
||||
query=$( (IFS= read -r -d '' data || echo "$data" | jq -c) <<EOD
|
||||
{
|
||||
"query": {
|
||||
"terms": {
|
||||
"name": [ "search-key", "private-key" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
EOD
|
||||
)
|
||||
|
||||
declare -a search_args=( '-s' '-u' 'elastic:testpasswd'
|
||||
'http://elasticsearch:9200/.ent-search-actastic-app_search_api_tokens_v3/_search?pretty'
|
||||
'--resolve' "elasticsearch:9200:${ip_es}"
|
||||
'-H' 'Content-Type: application/json'
|
||||
'-d' "${query}"
|
||||
)
|
||||
|
||||
echo "curl arguments: ${search_args[*]}"
|
||||
|
||||
response="$(curl "${search_args[@]}")"
|
||||
echo "$response"
|
||||
declare -i count
|
||||
count="$(jq -rn --argjson data "${response}" '$data.hits.total.value')"
|
||||
if (( count != 2)); then
|
||||
echo "Expected search and private keys, got ${count} result(s)"
|
||||
exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user