From 96e1e9f769ade5ed36fcd101deaed578034678cb Mon Sep 17 00:00:00 2001 From: Dianjin Wang Date: Wed, 22 Apr 2026 17:27:13 +0800 Subject: [PATCH] Sandbox: add Cloudberry 2.1.0 release support Main changes: - Update default CODEBASE_VERSION from 2.0.0 to 2.1.0 in .env - Update documentation examples to use version 2.1.0 in README.md - Update help message example version in run.sh - Switch to Apache mirror system for downloading release tarball using closer.lua for better download reliability and speed - Replace wget with curl for source download in Dockerfile This change ensures the sandbox environment defaults to the latest Apache Cloudberry 2.1.0 release and uses the recommended Apache mirror download method. --- devops/sandbox/.env | 2 +- devops/sandbox/Dockerfile.RELEASE.rockylinux9 | 52 ++++--------------- devops/sandbox/README.md | 4 +- devops/sandbox/run.sh | 2 +- 4 files changed, 13 insertions(+), 47 deletions(-) diff --git a/devops/sandbox/.env b/devops/sandbox/.env index 233d7c5b1b5..1ceec2e5fb7 100644 --- a/devops/sandbox/.env +++ b/devops/sandbox/.env @@ -17,5 +17,5 @@ # permissions and limitations under the License. # # -------------------------------------------------------------------- -CODEBASE_VERSION=2.0.0 +CODEBASE_VERSION=2.1.0 OS_VERSION=rockylinux9 diff --git a/devops/sandbox/Dockerfile.RELEASE.rockylinux9 b/devops/sandbox/Dockerfile.RELEASE.rockylinux9 index ac394c6cb60..215c32f452d 100644 --- a/devops/sandbox/Dockerfile.RELEASE.rockylinux9 +++ b/devops/sandbox/Dockerfile.RELEASE.rockylinux9 @@ -94,6 +94,7 @@ RUN dnf makecache && \ readline-devel \ zlib-devel && \ dnf install -y --enablerepo=crb \ + liburing-devel \ libuv-devel \ libyaml-devel \ perl-IPC-Run \ @@ -120,10 +121,12 @@ USER gpadmin WORKDIR /home/gpadmin # Release version to build (Apache official tarball) -ARG CB_RELEASE_VERSION=2.0.0-incubating +ARG CB_RELEASE_VERSION=2.1.0-incubating # Download and extract the specified release version from Apache -RUN wget -nv "https://downloads.apache.org/incubator/cloudberry/${CB_RELEASE_VERSION}/apache-cloudberry-${CB_RELEASE_VERSION}-src.tar.gz" -O /home/gpadmin/apache-cloudberry-${CB_RELEASE_VERSION}-src.tar.gz && \ +# Using Apache mirror system for better download reliability and speed +RUN curl -L -o /home/gpadmin/apache-cloudberry-${CB_RELEASE_VERSION}-src.tar.gz \ + "https://www.apache.org/dyn/closer.lua/incubator/cloudberry/${CB_RELEASE_VERSION}/apache-cloudberry-${CB_RELEASE_VERSION}-src.tar.gz?action=download" && \ tar -xzf /home/gpadmin/apache-cloudberry-${CB_RELEASE_VERSION}-src.tar.gz -C /home/gpadmin && \ rm -f /home/gpadmin/apache-cloudberry-${CB_RELEASE_VERSION}-src.tar.gz && \ mv /home/gpadmin/apache-cloudberry-${CB_RELEASE_VERSION} /home/gpadmin/cloudberry @@ -131,47 +134,9 @@ RUN wget -nv "https://downloads.apache.org/incubator/cloudberry/${CB_RELEASE_VER # Build Cloudberry using the official build scripts RUN cd /home/gpadmin/cloudberry && \ export SRC_DIR=/home/gpadmin/cloudberry && \ - mkdir -p "${SRC_DIR}/build-logs" && \ - # Ensure Cloudberry lib dir exists and has Xerces libs available - sudo rm -rf /usr/local/cloudberry-db && \ - sudo mkdir -p /usr/local/cloudberry-db/lib && \ - sudo cp -v /usr/local/xerces-c/lib/libxerces-c.so \ - /usr/local/xerces-c/lib/libxerces-c-3.*.so \ - /usr/local/cloudberry-db/lib/ && \ - sudo chown -R gpadmin:gpadmin /usr/local/cloudberry-db && \ - # Configure with required features and paths - export LD_LIBRARY_PATH=/usr/local/cloudberry-db/lib:$LD_LIBRARY_PATH && \ - ./configure --prefix=/usr/local/cloudberry-db \ - --disable-external-fts \ - --enable-debug \ - --enable-cassert \ - --enable-debug-extensions \ - --enable-gpcloud \ - --enable-ic-proxy \ - --enable-mapreduce \ - --enable-orafce \ - --enable-orca \ - --enable-pax \ - --disable-pxf \ - --enable-tap-tests \ - --with-gssapi \ - --with-ldap \ - --with-libxml \ - --with-lz4 \ - --with-pam \ - --with-perl \ - --with-pgport=5432 \ - --with-python \ - --with-pythonsrc-ext \ - --with-ssl=openssl \ - --with-uuid=e2fs \ - --with-includes=/usr/local/xerces-c/include \ - --with-libraries=/usr/local/cloudberry-db/lib && \ - # Build and install - make -j$(nproc) --directory ${SRC_DIR} && \ - make -j$(nproc) --directory ${SRC_DIR}/contrib && \ - make install --directory ${SRC_DIR} && \ - make install --directory "${SRC_DIR}/contrib" + mkdir -p ${SRC_DIR}/build-logs && \ + ./devops/build/automation/cloudberry/scripts/configure-cloudberry.sh && \ + ./devops/build/automation/cloudberry/scripts/build-cloudberry.sh # -------------------------------------------------------------------- # Runtime stage: Rocky Linux 9 runtime with required dependencies @@ -192,6 +157,7 @@ RUN dnf -y update && \ krb5-libs \ libevent \ libicu \ + liburing \ libuuid \ libxml2 \ libyaml \ diff --git a/devops/sandbox/README.md b/devops/sandbox/README.md index 9f475977835..fb6a5ef80c3 100644 --- a/devops/sandbox/README.md +++ b/devops/sandbox/README.md @@ -92,14 +92,14 @@ Build and deploy steps: ```shell cd cloudberry/devops/sandbox - ./run.sh -c 2.0.0 + ./run.sh -c 2.1.0 ``` - For latest Apache Cloudberry release running across multiple containers ```shell cd cloudberry/devops/sandbox - ./run.sh -c 2.0.0 -m + ./run.sh -c 2.1.0 -m ``` - For latest main branch running on a single container diff --git a/devops/sandbox/run.sh b/devops/sandbox/run.sh index 7c266b8f64c..705442d98e1 100755 --- a/devops/sandbox/run.sh +++ b/devops/sandbox/run.sh @@ -38,7 +38,7 @@ PIP_INDEX_URL_VAR="${PIP_INDEX_URL_VAR:-$DEFAULT_PIP_INDEX_URL_VAR}" # Function to display help message function usage() { echo "Usage: $0 [-o ] [-c ] [-b] [-m]" - echo " -c Codebase version (valid values: main, local, or other available version like 2.0.0)" + echo " -c Codebase version (valid values: main, local, or other available version like 2.1.0)" echo " -t Timezone (default: America/Los_Angeles, or set via TIMEZONE_VAR environment variable)" echo " -p Python Package Index (PyPI) (default: https://pypi.org/simple, or set via PIP_INDEX_URL_VAR environment variable)" echo " -b Build only, do not run the container (default: false, or set via BUILD_ONLY environment variable)"