add opensearch addons
This commit is contained in:
3
opensearch-dashboards/Dockerfile
Normal file
3
opensearch-dashboards/Dockerfile
Normal file
@@ -0,0 +1,3 @@
|
||||
ARG BASE_IMAGE=opensearchproject/opensearch-dashboards:latest
|
||||
FROM ${BASE_IMAGE}
|
||||
COPY rootfs/ /
|
1
opensearch-dashboards/README.md
Normal file
1
opensearch-dashboards/README.md
Normal file
@@ -0,0 +1 @@
|
||||
OpenSearch Dashboards add-on. Point opensearch_host to coordinator nodes or a load balancer.
|
47
opensearch-dashboards/config.json
Normal file
47
opensearch-dashboards/config.json
Normal file
@@ -0,0 +1,47 @@
|
||||
{
|
||||
"name": "OpenSearch Dashboards",
|
||||
"version": "1.0.0",
|
||||
"slug": "opensearch-dashboards",
|
||||
"description": "OpenSearch Dashboards (Kibana compatible) to visualize OpenSearch data.",
|
||||
"arch": [
|
||||
"amd64",
|
||||
"armv7",
|
||||
"arm64"
|
||||
],
|
||||
"startup": "services",
|
||||
"boot": "auto",
|
||||
"host_network": true,
|
||||
"map": [
|
||||
[
|
||||
"config",
|
||||
"./config",
|
||||
"rw"
|
||||
]
|
||||
],
|
||||
"options": {
|
||||
"opensearch_host": "http://os-coord-1",
|
||||
"opensearch_port": 9203,
|
||||
"dashboards_port": 5601,
|
||||
"opensearch_username": "",
|
||||
"opensearch_password": "",
|
||||
"kibana_index": ".kibana",
|
||||
"plugins": []
|
||||
},
|
||||
"schema": {
|
||||
"opensearch_host": "str",
|
||||
"opensearch_port": "int",
|
||||
"dashboards_port": "int",
|
||||
"opensearch_username": "str",
|
||||
"opensearch_password": "str",
|
||||
"kibana_index": "str",
|
||||
"plugins": [
|
||||
"list",
|
||||
[
|
||||
"str"
|
||||
]
|
||||
]
|
||||
},
|
||||
"ports": {
|
||||
"5601/tcp": 5601
|
||||
}
|
||||
}
|
1
opensearch-dashboards/icon.svg
Normal file
1
opensearch-dashboards/icon.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="128" height="128"><rect width="128" height="128" rx="16" fill="#0A4A6F"/><text x="50%" y="54%" font-size="36" fill="#fff" text-anchor="middle" font-family="Arial">OS</text></svg>
|
After Width: | Height: | Size: 225 B |
1
opensearch-dashboards/logo.png
Normal file
1
opensearch-dashboards/logo.png
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="128" height="128"><rect width="128" height="128" rx="16" fill="#0A4A6F"/><text x="50%" y="54%" font-size="36" fill="#fff" text-anchor="middle" font-family="Arial">OS</text></svg>
|
After Width: | Height: | Size: 225 B |
@@ -0,0 +1,20 @@
|
||||
#!/command/with-contenv bash
|
||||
set -euo pipefail
|
||||
OPTIONS_FILE=/data/options.json
|
||||
if [ ! -f "$OPTIONS_FILE" ]; then
|
||||
echo "[cont-init] No options.json, skipping dashboards plugin install"
|
||||
exit 0
|
||||
fi
|
||||
if ! jq -e '.plugins // [] | length > 0' "$OPTIONS_FILE" >/dev/null 2>&1; then
|
||||
echo "[cont-init] No dashboards plugins configured, skipping"
|
||||
exit 0
|
||||
fi
|
||||
echo "[cont-init] Installing dashboards plugins from options.json"
|
||||
jq -r '.plugins[]' "$OPTIONS_FILE" | while read -r plugin; do
|
||||
echo "[cont-init] Installing dashboards plugin: $plugin"
|
||||
if /usr/share/opensearch-dashboards/bin/opensearch-dashboards-plugin install --allow-root "$plugin"; then
|
||||
echo "[cont-init] Installed dashboards plugin $plugin"
|
||||
else
|
||||
echo "[cont-init] Failed to install dashboards plugin $plugin (continuing)"
|
||||
fi
|
||||
done
|
@@ -0,0 +1,3 @@
|
||||
#!/command/execlineb -S0
|
||||
# Prevent restart loops; allow clean exit
|
||||
exit 0
|
@@ -0,0 +1,8 @@
|
||||
#!/command/with-contenv bash
|
||||
set -euo pipefail
|
||||
OPTIONS_FILE=/data/options.json
|
||||
HOST=$(jq -r '.opensearch_host // "http://localhost"' "$OPTIONS_FILE" 2>/dev/null || echo "http://localhost")
|
||||
PORT=$(jq -r '.opensearch_port // 9200' "$OPTIONS_FILE" 2>/dev/null || echo 9200)
|
||||
OPTS_HOSTS="${HOST}:${PORT}"
|
||||
echo "[s6-run] Starting OpenSearch Dashboards connecting to ${OPTS_HOSTS}"
|
||||
exec /usr/share/opensearch-dashboards/bin/opensearch-dashboards --opensearch.hosts="${OPTS_HOSTS}" --server.host=0.0.0.0
|
@@ -0,0 +1 @@
|
||||
server.host: 0.0.0.0
|
Reference in New Issue
Block a user