add opensearch addons

This commit is contained in:
ai-dev
2025-09-21 16:25:15 +02:00
parent f8ce15efbd
commit ae63025087
71 changed files with 1060 additions and 0 deletions

View File

@@ -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 plugin install"
exit 0
fi
if ! jq -e '.plugins // [] | length > 0' "$OPTIONS_FILE" >/dev/null 2>&1; then
echo "[cont-init] No plugins configured, skipping"
exit 0
fi
echo "[cont-init] Installing plugins from options.json"
jq -r '.plugins[]' "$OPTIONS_FILE" | while read -r plugin; do
echo "[cont-init] Installing plugin: $plugin"
if /usr/share/opensearch/bin/opensearch-plugin install --batch "$plugin"; then
echo "[cont-init] Installed $plugin"
else
echo "[cont-init] Failed to install $plugin (continuing)"
fi
done