Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion devops/sandbox/.env
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
# permissions and limitations under the License.
#
# --------------------------------------------------------------------
CODEBASE_VERSION=2.0.0
CODEBASE_VERSION=2.1.0
OS_VERSION=rockylinux9
52 changes: 9 additions & 43 deletions devops/sandbox/Dockerfile.RELEASE.rockylinux9
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -120,58 +121,22 @@ 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" && \
Comment thread
tuhaihe marked this conversation as resolved.
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

# 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
Expand All @@ -192,6 +157,7 @@ RUN dnf -y update && \
krb5-libs \
libevent \
libicu \
liburing \
libuuid \
libxml2 \
libyaml \
Expand Down
4 changes: 2 additions & 2 deletions devops/sandbox/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion devops/sandbox/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 <os_version>] [-c <codebase_version>] [-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)"
Expand Down
Loading