Refactor: OpenObserve (#10279)

This commit is contained in:
Slaviša Arežina
2025-12-25 15:22:24 +01:00
committed by GitHub
parent 97211b41b7
commit e6ee6e66bf
2 changed files with 15 additions and 10 deletions

View File

@@ -15,15 +15,17 @@ update_os
msg_info "Installing OpenObserve"
mkdir -p /opt/openobserve/data
LATEST=$(curl -fsSL https://api.github.com/repos/openobserve/openobserve/releases/latest | grep '"tag_name":' | cut -d'"' -f4)
$STD tar zxvf <(curl -fsSL https://downloads.openobserve.ai/releases/openobserve/$LATEST/openobserve-$LATEST-linux-amd64.tar.gz) -C /opt/openobserve
RELEASE=$(get_latest_github_release "openobserve/openobserve")
tar zxf <(curl -fsSL https://downloads.openobserve.ai/releases/openobserve/v$RELEASE/openobserve-v$RELEASE-linux-amd64.tar.gz) -C /opt/openobserve
ROOT_PASS=$(openssl rand -base64 18 | cut -c1-13)
cat <<EOF >/opt/openobserve/data/.env
ZO_ROOT_USER_EMAIL = "admin@example.com"
ZO_ROOT_USER_PASSWORD = "$(openssl rand -base64 18 | cut -c1-13)"
ZO_ROOT_USER_PASSWORD = "${ROOT_PASS}"
ZO_DATA_DIR = "/opt/openobserve/data"
ZO_HTTP_PORT = "5080"
EOF
echo "${RELEASE}" >>~/.openobserve
msg_ok "Installed OpenObserve"
msg_info "Creating Service"