-
Notifications
You must be signed in to change notification settings - Fork 4
[RORDEV-1980] Showcase: Search Profiler & Data Set Quality features with ROR #95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| # Non-interactive configuration for ror-demo-cluster. | ||
| # When this file is present and non-empty, run.sh skips all interactive prompts and uses these values directly. | ||
| # | ||
| # ES/KBN DOCKERFILE options: | ||
| # Dockerfile-use-ror-binaries-from-api - download ROR plugin from API (requires ROR_ES_VERSION / ROR_KBN_VERSION) | ||
| # Dockerfile-use-ror-binaries-from-file - use a local plugin file (requires ES_ROR_FILE / KBN_ROR_FILE) | ||
|
|
||
| ES_VERSION=8.19.11 | ||
| ES_DOCKERFILE=Dockerfile-use-ror-binaries-from-file | ||
| ES_ROR_FILE=readonlyrest-1.69.0-pre01_es8.19.11.zip | ||
|
|
||
| KBN_VERSION=8.19.11 | ||
| KBN_DOCKERFILE=Dockerfile-use-ror-binaries-from-api | ||
| ROR_KBN_VERSION=1.68.0 |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -7,9 +7,92 @@ function pick_randomly() { | |||||||||||||||||||||||||||||||||
| echo "${OPTIONS[$RANDOM_INDEX]}" | ||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| function createIndex() { | ||||||||||||||||||||||||||||||||||
| if [ "$#" -ne 1 ]; then | ||||||||||||||||||||||||||||||||||
| echo "ERROR: One parameter required: 1) index name" | ||||||||||||||||||||||||||||||||||
| return 1 | ||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| if ! [ -v ELASTICSEARCH_ADDRESS ] || [ -z "$ELASTICSEARCH_ADDRESS" ]; then | ||||||||||||||||||||||||||||||||||
| echo "ERROR: required variable ELASTICSEARCH_ADDRESS not set or empty" | ||||||||||||||||||||||||||||||||||
| exit 2 | ||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| if ! [ -v ELASTICSEARCH_USER ] || [ -z "$ELASTICSEARCH_USER" ]; then | ||||||||||||||||||||||||||||||||||
| echo "ERROR: required variable ELASTICSEARCH_USER not set or empty" | ||||||||||||||||||||||||||||||||||
| exit 3 | ||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| if ! [ -v ELASTICSEARCH_PASSWORD ] || [ -z "$ELASTICSEARCH_PASSWORD" ]; then | ||||||||||||||||||||||||||||||||||
| echo "ERROR: required variable ELASTICSEARCH_PASSWORD not set or empty" | ||||||||||||||||||||||||||||||||||
| exit 4 | ||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| INDEX_NAME=$1 | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| response=$(curl -k -s -L -w "\n%{http_code}" -u $ELASTICSEARCH_USER:$ELASTICSEARCH_PASSWORD \ | ||||||||||||||||||||||||||||||||||
| -X PUT "$ELASTICSEARCH_ADDRESS/$INDEX_NAME" \ | ||||||||||||||||||||||||||||||||||
| -H "Content-Type: application/json" | ||||||||||||||||||||||||||||||||||
|
Comment on lines
+33
to
+35
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -e
rg -n --fixed-strings '-u $ELASTICSEARCH_USER:$ELASTICSEARCH_PASSWORD' shared/init-scripts/utils/lib.sh
ELASTICSEARCH_USER='demo'
ELASTICSEARCH_PASSWORD='pa ss'
set -- curl -u $ELASTICSEARCH_USER:$ELASTICSEARCH_PASSWORD
printf 'argc=%s\n' "$#"
printf '[%s]\n' "$@"Repository: beshu-tech/ror-sandbox Length of output: 470 🏁 Script executed: #!/bin/bash
cd shared/init-scripts/utils || exit 1
# Search for the pattern with proper escaping
echo "=== Searching for unquoted credentials pattern ==="
grep -n 'curl.*-u \$ELASTICSEARCH_USER:\$ELASTICSEARCH_PASSWORD' lib.sh || echo "Not found with escaped pattern"
# Also try a simpler pattern
grep -n '\$ELASTICSEARCH_USER:\$ELASTICSEARCH_PASSWORD' lib.sh
echo ""
echo "=== Demonstrating word-splitting vulnerability ==="
ELASTICSEARCH_USER='demo'
ELASTICSEARCH_PASSWORD='pa ss'
set -- curl -u $ELASTICSEARCH_USER:$ELASTICSEARCH_PASSWORD
printf 'argc=%s\n' "$#"
printf '[%s]\n' "$@"Repository: beshu-tech/ror-sandbox Length of output: 798 🏁 Script executed: #!/bin/bash
cd shared/init-scripts/utils || exit 1
echo "=== Context around line 33 ==="
sed -n '25,40p' lib.sh
echo ""
echo "=== Context around line 73 ==="
sed -n '65,80p' lib.sh
echo ""
echo "=== Context around line 129 ==="
sed -n '121,136p' lib.sh
echo ""
echo "=== Checking for any other unquoted credential patterns ==="
grep -n '\$ELASTICSEARCH_USER' lib.sh | grep -v '"'Repository: beshu-tech/ror-sandbox Length of output: 1648 Quote the These calls pass 🔐 Suggested fix- response=$(curl -k -s -L -w "\n%{http_code}" -u $ELASTICSEARCH_USER:$ELASTICSEARCH_PASSWORD \
+ response=$(curl -k -s -L -w "\n%{http_code}" -u "$ELASTICSEARCH_USER:$ELASTICSEARCH_PASSWORD" \
-X PUT "$ELASTICSEARCH_ADDRESS/$INDEX_NAME" \
-H "Content-Type: application/json"
)Also applies to lines 73-75 and 129-131. 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| http_status=$(echo "$response" | tail -n 1) | ||||||||||||||||||||||||||||||||||
| response_body=$(echo "$response" | sed \$d) | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| if [[ "$http_status" != 2* ]]; then | ||||||||||||||||||||||||||||||||||
| echo "ERROR: Cannot create index [$INDEX_NAME]. HTTP status: $http_status, response body: $response_body" | ||||||||||||||||||||||||||||||||||
| return 5 | ||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| return 0 | ||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| function createDataStream() { | ||||||||||||||||||||||||||||||||||
| if [ "$#" -ne 1 ]; then | ||||||||||||||||||||||||||||||||||
| echo "ERROR: One parameter required: 1) data stream name" | ||||||||||||||||||||||||||||||||||
| return 1 | ||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| if ! [ -v ELASTICSEARCH_ADDRESS ] || [ -z "$ELASTICSEARCH_ADDRESS" ]; then | ||||||||||||||||||||||||||||||||||
| echo "ERROR: required variable ELASTICSEARCH_ADDRESS not set or empty" | ||||||||||||||||||||||||||||||||||
| exit 2 | ||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| if ! [ -v ELASTICSEARCH_USER ] || [ -z "$ELASTICSEARCH_USER" ]; then | ||||||||||||||||||||||||||||||||||
| echo "ERROR: required variable ELASTICSEARCH_USER not set or empty" | ||||||||||||||||||||||||||||||||||
| exit 3 | ||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| if ! [ -v ELASTICSEARCH_PASSWORD ] || [ -z "$ELASTICSEARCH_PASSWORD" ]; then | ||||||||||||||||||||||||||||||||||
| echo "ERROR: required variable ELASTICSEARCH_PASSWORD not set or empty" | ||||||||||||||||||||||||||||||||||
| exit 4 | ||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| STREAM_NAME=$1 | ||||||||||||||||||||||||||||||||||
| TEMPLATE_NAME="${STREAM_NAME}-template" | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| response=$(curl -k -s -L -w "\n%{http_code}" -u $ELASTICSEARCH_USER:$ELASTICSEARCH_PASSWORD \ | ||||||||||||||||||||||||||||||||||
| -X PUT "$ELASTICSEARCH_ADDRESS/_index_template/$TEMPLATE_NAME" \ | ||||||||||||||||||||||||||||||||||
| -H "Content-Type: application/json" -d "{ | ||||||||||||||||||||||||||||||||||
| \"index_patterns\": [\"$STREAM_NAME\"], | ||||||||||||||||||||||||||||||||||
| \"data_stream\": {}, | ||||||||||||||||||||||||||||||||||
| \"priority\": 500 | ||||||||||||||||||||||||||||||||||
| }" | ||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| http_status=$(echo "$response" | tail -n 1) | ||||||||||||||||||||||||||||||||||
| response_body=$(echo "$response" | sed \$d) | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| if [[ "$http_status" != 2* ]]; then | ||||||||||||||||||||||||||||||||||
| echo "ERROR: Cannot create index template for data stream [$STREAM_NAME]. HTTP status: $http_status, response body: $response_body" | ||||||||||||||||||||||||||||||||||
| return 5 | ||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| return 0 | ||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| function putDocument() { | ||||||||||||||||||||||||||||||||||
| if [ "$#" -ne 2 ]; then | ||||||||||||||||||||||||||||||||||
| echo "ERROR: Three parameters required: 1) index name, 2) document JSON string" | ||||||||||||||||||||||||||||||||||
| if [ "$#" -lt 1 ] || [ "$#" -gt 2 ]; then | ||||||||||||||||||||||||||||||||||
| echo "ERROR: Required: 1) index name, optionally 2) document JSON string (or via stdin)" | ||||||||||||||||||||||||||||||||||
| return 1 | ||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
|
|
@@ -29,22 +112,50 @@ function putDocument() { | |||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| INDEX_NAME=$1 | ||||||||||||||||||||||||||||||||||
| DOCUMENT_CONTENT=$2 | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| set -x | ||||||||||||||||||||||||||||||||||
| if [ "$#" -eq 2 ]; then | ||||||||||||||||||||||||||||||||||
| putSingleDocument "$INDEX_NAME" "$2" | ||||||||||||||||||||||||||||||||||
| else | ||||||||||||||||||||||||||||||||||
| while IFS= read -r DOCUMENT_CONTENT; do | ||||||||||||||||||||||||||||||||||
| putSingleDocument "$INDEX_NAME" "$DOCUMENT_CONTENT" | ||||||||||||||||||||||||||||||||||
| done | ||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||
|
Comment on lines
+116
to
+123
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -e
putSingleDocument() {
local _index=$1
local doc=$2
[[ "$doc" != "bad" ]]
}
putDocument() {
local index_name=$1
while IFS= read -r document_content; do
putSingleDocument "$index_name" "$document_content"
done
}
if printf '%s\n' bad good | putDocument demo; then
echo "putDocument returned success after an earlier failure"
else
echo "putDocument returned failure"
fiRepository: beshu-tech/ror-sandbox Length of output: 119 🏁 Script executed: cat -n shared/init-scripts/utils/lib.sh | sed -n '110,130p'Repository: beshu-tech/ror-sandbox Length of output: 738 🏁 Script executed: cat -n shared/init-scripts/utils/lib.sh | sed -n '125,155p'Repository: beshu-tech/ror-sandbox Length of output: 1150 Propagate the first failed insert in stdin mode. Line 120 ignores 🧱 Suggested fix if [ "$#" -eq 2 ]; then
putSingleDocument "$INDEX_NAME" "$2"
else
while IFS= read -r DOCUMENT_CONTENT; do
- putSingleDocument "$INDEX_NAME" "$DOCUMENT_CONTENT"
+ putSingleDocument "$INDEX_NAME" "$DOCUMENT_CONTENT" || return $?
done
fi
}📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| respone=$(curl -k -s -L -w "\n%{http_code}" -u $ELASTICSEARCH_USER:$ELASTICSEARCH_PASSWORD \ | ||||||||||||||||||||||||||||||||||
| function putSingleDocument() { | ||||||||||||||||||||||||||||||||||
| INDEX_NAME=$1 | ||||||||||||||||||||||||||||||||||
| DOCUMENT_CONTENT=$2 | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| response=$(curl -k -s -L -w "\n%{http_code}" -u $ELASTICSEARCH_USER:$ELASTICSEARCH_PASSWORD \ | ||||||||||||||||||||||||||||||||||
| -X POST "$ELASTICSEARCH_ADDRESS/$INDEX_NAME/_doc/" \ | ||||||||||||||||||||||||||||||||||
| -H "Content-Type: application/json" -d "$DOCUMENT_CONTENT" | ||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| http_status=$(echo "$respone" | tail -n 1) | ||||||||||||||||||||||||||||||||||
| response_body=$(echo "$respone" | sed \$d) | ||||||||||||||||||||||||||||||||||
| http_status=$(echo "$response" | tail -n 1) | ||||||||||||||||||||||||||||||||||
| response_body=$(echo "$response" | sed \$d) | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| if [[ "$http_status" != 2* ]] ; then | ||||||||||||||||||||||||||||||||||
| echo "ERROR: Cannot add document [$DOCUMENT_CONTENT] to index=[$INDEX_NAME].\nHTTP status: $HTTP_STATUS, response body: $RESPONSE_BODY" | ||||||||||||||||||||||||||||||||||
| echo "ERROR: Cannot add document [$DOCUMENT_CONTENT] to index=[$INDEX_NAME].\nHTTP status: $http_status, response body: $response_body" | ||||||||||||||||||||||||||||||||||
| return 5 | ||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| return 0 | ||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| function generate_log_documents() { | ||||||||||||||||||||||||||||||||||
| if [ "$#" -ne 1 ]; then | ||||||||||||||||||||||||||||||||||
| echo "ERROR: One required: 1) number of documents to generate" | ||||||||||||||||||||||||||||||||||
| return 1 | ||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| N=$1 | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| for ((i = 1; i <= N; i++)); do | ||||||||||||||||||||||||||||||||||
| user_id=$((RANDOM % 10000 + 1)) | ||||||||||||||||||||||||||||||||||
| timestamp=$(date -u +"%Y-%m-%dT%H:%M:%SZ") | ||||||||||||||||||||||||||||||||||
| log_message="User $user_id login successful" | ||||||||||||||||||||||||||||||||||
| level="$(pick_randomly "INFO" "WARN" "ERROR" "DEBUG")" | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| echo "{ \"message\": \"$log_message\", \"level\": \"$level\", \"@timestamp\": \"$timestamp\", \"user_id\": \"$user_id\" }" | ||||||||||||||||||||||||||||||||||
| done | ||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -2,6 +2,30 @@ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "Preparing Elasticsearch & Kibana with ROR environment ..." | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if [[ -s ".env-showcase" ]]; then | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "Found .env-showcase - running in non-interactive mode ..." | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cp .env-showcase .env | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| source .env-showcase | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if [[ "$ES_DOCKERFILE" == *"from-file"* ]]; then | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| es_ror_info="FILE: $ES_ROR_FILE" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| else | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| es_ror_info="API: ROR ES $ROR_ES_VERSION" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if [[ "$KBN_DOCKERFILE" == *"from-file"* ]]; then | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| kbn_ror_info="FILE: $KBN_ROR_FILE" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| else | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| kbn_ror_info="API: ROR KBN $ROR_KBN_VERSION" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo " Elasticsearch $ES_VERSION ($es_ror_info)" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo " Kibana $KBN_VERSION ($kbn_ror_info)" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| exit 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+5
to
+26
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Validate This shortcut copies and prints the config, then returns success without checking that the required variables are present or that any 🛠️ Suggested fail-fast checks if [[ -s ".env-showcase" ]]; then
echo "Found .env-showcase - running in non-interactive mode ..."
cp .env-showcase .env
source .env-showcase
+
+ for required_var in ES_VERSION KBN_VERSION ES_DOCKERFILE KBN_DOCKERFILE; do
+ if [[ -z "${!required_var:-}" ]]; then
+ echo "ERROR: .env-showcase is missing $required_var"
+ exit 1
+ fi
+ done
+
+ if [[ "$ES_DOCKERFILE" == *"from-file"* && ! -f "${ES_ROR_FILE:-}" ]]; then
+ echo "ERROR: ES_ROR_FILE [${ES_ROR_FILE:-}] does not exist"
+ exit 1
+ fi
+ if [[ "$ES_DOCKERFILE" != *"from-file"* && -z "${ROR_ES_VERSION:-}" ]]; then
+ echo "ERROR: ROR_ES_VERSION is required when ES binaries come from API"
+ exit 1
+ fi
+
+ if [[ "$KBN_DOCKERFILE" == *"from-file"* && ! -f "${KBN_ROR_FILE:-}" ]]; then
+ echo "ERROR: KBN_ROR_FILE [${KBN_ROR_FILE:-}] does not exist"
+ exit 1
+ fi
+ if [[ "$KBN_DOCKERFILE" != *"from-file"* && -z "${ROR_KBN_VERSION:-}" ]]; then
+ echo "ERROR: ROR_KBN_VERSION is required when Kibana binaries come from API"
+ exit 1
+ fi📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if ! command -v jq > /dev/null; then | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| $(dirname "$0")/collect-info-about-ror-es-kbn-without-hints.sh | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| else | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,7 +9,7 @@ services: | |
| ports: | ||
| - "29200:9200" | ||
| - "29300:9300" | ||
| - "5005:5005" | ||
| - "5015:5005" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Update debugger documentation to match the new host port ( This change is valid technically, but 🤖 Prompt for AI Agents |
||
| environment: | ||
| - cluster.name=xpack-es-cluster | ||
| - node.name=es-xpack-single | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logs-system-devis seeded but never allowed.shared/init-scripts/init.shnow creates and populateslogs-system-dev, but these updated rules only grantlogs-frontend-devandlogs-business-dev. That leaves one of the new showcase datasets unreachable through ReadonlyREST. Either add it to an intended audience or stop generating it.🤖 Prompt for AI Agents