Implementation:4paradigm OpenMLDB setup openmldb sh
| Knowledge Sources | |
|---|---|
| Domains | Deployment, DevOps |
| Last Updated | 2026-10-12 12:00 GMT |
Overview
Shell script for downloading and installing OpenMLDB, ZooKeeper, and Spark dependencies from release archives.
Description
The setup_openmldb.sh script automates the provisioning of an OpenMLDB development or demo environment. It downloads three packages — OpenMLDB server, ZooKeeper 3.4.14, and OpenMLDB-Spark 3.2.1 — extracts them into /work, strips debugging symbols from the OpenMLDB binary, removes the sync tool (not needed in demo Docker), and creates convenience symlinks. The script supports a skip_download mode for environments where packages are pre-staged.
Usage
Use this script when setting up a fresh OpenMLDB environment from binary releases — either for demo scenarios (Docker Compose) or for local development. It is the first step before initializing a cluster or running demos.
Code Reference
Source Location
- Repository: OpenMLDB
- File: demo/setup_openmldb.sh
Signature
# Usage: setup_openmldb.sh [VERSION] [skip_download]
# VERSION: OpenMLDB release version (default: 0.8.2)
# skip_download: if set to "skip_download", uses pre-staged packages
setup_openmldb.sh [VERSION] [skip_download]
Import
# Run directly as a shell script
bash setup_openmldb.sh
# Or with arguments
bash setup_openmldb.sh 0.8.2 skip_download
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| VERSION | string | No | OpenMLDB release version (default: 0.8.2)
|
| skip_download | string | No | If "skip_download", uses pre-staged tarballs in current directory
|
| Network access | resource | Yes (unless skip_download) | Access to archive.apache.org and github.com/4paradigm releases |
Outputs
| Name | Type | Description |
|---|---|---|
| /work/openmldb | directory | OpenMLDB binary at bin/openmldb, Spark at spark/ symlink
|
| /work/zookeeper-3.4.14 | directory | ZooKeeper installation with conf/zoo.cfg configured
|
| /work/openmldb/spark | symlink → spark-3.2.1-bin-openmldbspark | Convenience symlink for Spark |
| /work/openmldb/zookeeper | symlink → /work/zookeeper-3.4.14 | Convenience symlink for ZooKeeper |
Usage Examples
Standard Download and Install
# Download and install OpenMLDB 0.8.2 with all dependencies
cd demo
bash setup_openmldb.sh
# Results in:
# /work/openmldb/bin/openmldb (stripped binary)
# /work/zookeeper-3.4.14 (with conf/zoo.cfg)
# /work/openmldb/spark (symlink to spark-3.2.1-bin-openmldbspark)
Skip Download (Pre-staged Packages)
# Pre-stage the three tarballs, then run with skip_download
# Required files: zookeeper-3.4.14.tar.gz, openmldb-0.8.2-linux.tar.gz,
# spark-3.2.1-bin-openmldbspark.tgz
bash setup_openmldb.sh 0.8.2 skip_download