From 18bda55d96becf1825bbe330e565b6437e417858 Mon Sep 17 00:00:00 2001 From: Dianjin Wang Date: Thu, 11 Sep 2025 14:57:25 +0800 Subject: [PATCH 1/2] Doc: update Cloudberry naming in `devops` dir Update documentation and configuration files to use consistent "Apache Cloudberry" naming instead of "Cloudberry Database". This change affects Docker files, RPM specs, README files, and configuration templates to maintain brand consistency across the project. Main changes include: - Updated Dockerfile comments and descriptions - Modified RPM package summaries and descriptions - Standardized product names in README documentation - Updated gpinitsystem configuration file headers - Reorganized pom.xml excludes for better structure - Update the README.me for a better Cloudberry build guide - Ajust the pom.xml for a better layout This commit are mostly used for improving the PR #1292 . --- deploy/README.md | 21 ----- devops/README.md | 76 ++++++++++++------- .../rpm/apache-cloudberry-db-incubating.spec | 6 +- .../rpm/apache-cloudberry-hll-incubating.spec | 10 +-- ...apache-cloudberry-pgvector-incubating.spec | 8 +- .../packaging/rpm/cloudberry-dev-repo.spec | 10 +-- devops/deploy/docker/build/rocky8/Dockerfile | 2 +- devops/deploy/docker/build/rocky9/Dockerfile | 2 +- devops/deploy/docker/test/rocky8/Dockerfile | 2 +- .../test/rocky8/configs/gpinitsystem.conf | 4 +- devops/deploy/docker/test/rocky9/Dockerfile | 10 +-- .../test/rocky9/configs/gpinitsystem.conf | 4 +- pom.xml | 12 +-- 13 files changed, 83 insertions(+), 84 deletions(-) delete mode 100644 deploy/README.md diff --git a/deploy/README.md b/deploy/README.md deleted file mode 100644 index b8da77a0521..00000000000 --- a/deploy/README.md +++ /dev/null @@ -1,21 +0,0 @@ - - -> [!WARNING] -> The files are still in progress and will be revised in the following months. diff --git a/devops/README.md b/devops/README.md index 14c3468542c..df440a2cc39 100644 --- a/devops/README.md +++ b/devops/README.md @@ -17,72 +17,92 @@ under the License. --> -# Auto-Build Cloudberry Database from Source Code +# Auto-Build Apache Cloudberry from Source Code -You can build Cloudberry Database from source code in two ways: manually or automatically. +You can build Apache Cloudberry from source code in two ways: manually or automatically. For the manual build, you need to manually set up many system configurations and download third-party dependencies, which is quite cumbersome and error-prone. To make the job easier, it is recommended that you use the automated deployment method and scripts provided here. The automation method simplifies the deployment process, reduces time costs, and allows developers to focus more on business code development. -## 1. Setup docker environment +## 1. Setup Docker environment -Nothing special, just follow the [official documentation](https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository) +Nothing special, just follow the [official documentation](https://docs.docker.com/engine/install/) to install Docker on your machine based on your OS. -## 2. Create docker build image +## 2. Create Docker build image -Go to the supported OS directory, for example Rocky Linux 9 +Go to the supported OS directory, for example Rocky Linux 8: -`cd devops/deploy/docker/build/rocky8/` +```bash +cd devops/deploy/docker/build/rocky8/ +``` -And build image +And build image: -`docker build -t cloudberry-db-env . ` +```bash +docker build -t apache-cloudberry-env . +``` The whole process usually takes about 5 minutes. You can use the created base image as many times as you want, just launch a new container for your specific task. ## 3. Launch container -Just run +Launch the container in detached mode with a long-running process: -`docker run -h cdw -it cloudberry-db-env` +```bash +docker run -h cdw -d --name cloudberry-build apache-cloudberry-env bash -c "/tmp/init_system.sh && tail -f /dev/null" +``` + +> [!NOTE] +> The container will be named `cloudberry-build` and run in the background for easy reference in subsequent commands. +> If you need to: +> - access the container interactively, use `docker exec -it cloudberry-build bash` +> - check if the container is running, use `docker ps` ## 4. Checkout git repo inside container The same way you did it on your laptop -`docker exec bash -c "cd /home/gpadmin && git clone --recurse-submodules https://github.com/apache/cloudberry.git"` +```bash +docker exec cloudberry-build bash -c "cd /home/gpadmin && git clone --recurse-submodules --branch main --depth 1 https://github.com/apache/cloudberry.git" +``` -## 5. Set envoronment and configure build container +## 5. Set environment and configure build container -Create direcory for store logs +Create direcory for store logs: -`SRC_DIR=/home/gpadmin/cloudberry && docker exec bash -c "mkdir ${SRC_DIR}/build-logs"` +```bash +SRC_DIR=/home/gpadmin/cloudberry && docker exec cloudberry-build bash -c "mkdir ${SRC_DIR}/build-logs" +``` -Execute configure and check if system is ready for build +Execute configure and check if system is ready for build: -`SRC_DIR=/home/gpadmin/cloudberry && docker exec bash -c "cd ${SRC_DIR} && SRC_DIR=${SRC_DIR} ./devops/build/automation/cloudberry/scripts/configure-cloudberry.sh"` +```bash +SRC_DIR=/home/gpadmin/cloudberry && docker exec cloudberry-build bash -c "cd ${SRC_DIR} && SRC_DIR=${SRC_DIR} ./devops/build/automation/cloudberry/scripts/configure-cloudberry.sh" +``` -## 6. Build binary +## 6. Build and install binary -The building consumes all available CPU resources and can take minutes to complete +The building consumes all available CPU resources and can take minutes to complete: -`SRC_DIR=/home/gpadmin/cloudberry && docker exec bash -c "cd ${SRC_DIR} && SRC_DIR=${SRC_DIR} ./devops/build/automation/cloudberry/scripts/build-cloudberry.sh"` +```bash +SRC_DIR=/home/gpadmin/cloudberry && docker exec cloudberry-build bash -c "cd ${SRC_DIR} && SRC_DIR=${SRC_DIR} ./devops/build/automation/cloudberry/scripts/build-cloudberry.sh" +``` ## 7. Install binary and create demo cluster -By default `make install` copy compiled binary to `/usr/local/cloudberry-db` - -`SRC_DIR=/home/gpadmin/cloudberry && docker exec bash -c "cd ${SRC_DIR} && SRC_DIR=${SRC_DIR} make install"` - -To create demo cluster just launch `create-cloudberry-demo-cluster.sh` +The build script above has already installed the binaries to `/usr/local/cloudberry-db` inside the container. Now create the demo cluster just launch `create-cloudberry-demo-cluster.sh` -`SRC_DIR=/home/gpadmin/cloudberry && docker exec bash -c "cd ${SRC_DIR} && SRC_DIR=${SRC_DIR} ./devops/build/automation/cloudberry/scripts/create-cloudberry-demo-cluster.sh"` +```bash +SRC_DIR=/home/gpadmin/cloudberry && docker exec cloudberry-build bash -c "cd ${SRC_DIR} && SRC_DIR=${SRC_DIR} ./devops/build/automation/cloudberry/scripts/create-cloudberry-demo-cluster.sh" +``` ## 8. Execute test query -Now you could set environment and execute queries +Now you could set environment and execute queries: -`docker exec 7197206b0645 bash -c "source /usr/local/cloudberry-db/cloudberry-env.sh && source /home/gpadmin/cloudberry/gpAux/gpdemo/gpdemo-env.sh && psql -U gpadmin -d postgres -c 'SELECT 42'"` +```bash +docker exec cloudberry-build bash -c "source /usr/local/cloudberry-db/cloudberry-env.sh && source /home/gpadmin/cloudberry/gpAux/gpdemo/gpdemo-env.sh && psql -U gpadmin -d postgres -c 'SELECT 42'" +``` All done! diff --git a/devops/build/packaging/rpm/apache-cloudberry-db-incubating.spec b/devops/build/packaging/rpm/apache-cloudberry-db-incubating.spec index f7ca334a69e..03fa0a34570 100644 --- a/devops/build/packaging/rpm/apache-cloudberry-db-incubating.spec +++ b/devops/build/packaging/rpm/apache-cloudberry-db-incubating.spec @@ -39,7 +39,7 @@ Summary: High-performance, open-source data warehouse based on PostgreSQL License: ASL 2.0 URL: https://cloudberry.apache.org -Vendor: Apache Cloudberry (incubating) +Vendor: Apache Cloudberry (Incubating) Group: Applications/Databases Prefix: %{cloudberry_install_dir} @@ -107,7 +107,7 @@ Requires: xz %description -Apache Cloudberry (incubating) is an advanced, open-source, massively +Apache Cloudberry (Incubating) is an advanced, open-source, massively parallel processing (MPP) data warehouse developed from PostgreSQL and Greenplum. It is designed for high-performance analytics on large-scale data sets, offering powerful analytical capabilities and @@ -125,7 +125,7 @@ Apache Cloudberry supports both batch processing and real-time data warehousing, making it a versatile solution for modern data environments. -Apache Cloudberry (incubating) is an effort undergoing incubation at +Apache Cloudberry (Incubating) is an effort undergoing incubation at the Apache Software Foundation (ASF), sponsored by the Apache Incubator PMC. diff --git a/devops/build/packaging/rpm/apache-cloudberry-hll-incubating.spec b/devops/build/packaging/rpm/apache-cloudberry-hll-incubating.spec index d13c0a7b77a..4d2d6126f74 100644 --- a/devops/build/packaging/rpm/apache-cloudberry-hll-incubating.spec +++ b/devops/build/packaging/rpm/apache-cloudberry-hll-incubating.spec @@ -21,10 +21,10 @@ Name: apache-cloudberry-hll-incubating Version: 2.18.0 Release: %{?release}%{!?release:1} -Summary: HyperLogLog extension for Cloudberry Database %{cloudberry_version} +Summary: HyperLogLog extension for Apache Cloudberry %{cloudberry_version} License: ASL 2.0 URL: https://github.com/citusdata/postgresql-hll -Vendor: Apache Cloudberry (incubating) +Vendor: Apache Cloudberry (Incubating) Group: Applications/Databases BuildArch: x86_64 Requires: apache-cloudberry-db-incubating >= %{cloudberry_version} @@ -32,7 +32,7 @@ Prefix: %{cloudberry_install_dir} %description HLL is an open-source PostgreSQL extension (compatible with Apache -Cloudberry (incubating) %{cloudberry_version}) adding HyperLogLog data +Cloudberry (Incubating) %{cloudberry_version}) adding HyperLogLog data structures as a native data type. HyperLogLog is a fixed-size, set-like structure used for distinct value counting with tunable precision. @@ -59,10 +59,10 @@ cp -R %{cloudberry_install_dir}/share/postgresql/extension/hll* \ %{prefix}/share/postgresql/extension/hll.control %post -echo "HLL extension for Cloudberry Database %{cloudberry_version} has been installed in %{prefix}." +echo "HLL extension for Apache Cloudberry %{cloudberry_version} has been installed in %{prefix}." echo "To enable it in a database, run:" echo " CREATE EXTENSION hll;" %postun -echo "HLL extension for Cloudberry Database %{cloudberry_version} has been removed from %{prefix}." +echo "HLL extension for Apache Cloudberry %{cloudberry_version} has been removed from %{prefix}." echo "You may need to manually clean up any database objects that were using the extension." diff --git a/devops/build/packaging/rpm/apache-cloudberry-pgvector-incubating.spec b/devops/build/packaging/rpm/apache-cloudberry-pgvector-incubating.spec index 6b0cbd517e1..0be44308e07 100644 --- a/devops/build/packaging/rpm/apache-cloudberry-pgvector-incubating.spec +++ b/devops/build/packaging/rpm/apache-cloudberry-pgvector-incubating.spec @@ -22,7 +22,7 @@ Name: cloudberry-pgvector Version: %{pgvector_version} Release: %{?release}%{!?release:1} -Summary: pgvector extension for Cloudberry Database %{cloudberry_version} +Summary: pgvector extension for Apache Cloudberry %{cloudberry_version} License: PostgreSQL URL: https://github.com/pgvector/pgvector Vendor: Cloudberry Open Source @@ -33,7 +33,7 @@ Prefix: %{cloudberry_install_dir} %description pgvector is an open-source vector similarity search extension for -PostgreSQL and Cloudberry Database %{cloudberry_version}. It provides +PostgreSQL and Apache Cloudberry %{cloudberry_version}. It provides vector data types and vector similarity search functions, allowing for efficient similarity search operations on high-dimensional data. @@ -61,10 +61,10 @@ cp -R %{cloudberry_install_dir}/share/postgresql/extension/vector* \ %{prefix}/share/postgresql/extension/vector.control %post -echo "pgvector extension version %{version} for Cloudberry Database %{cloudberry_version} has been installed in %{prefix}." +echo "pgvector extension version %{version} for Apache Cloudberry %{cloudberry_version} has been installed in %{prefix}." echo "To enable it in a database, run:" echo " CREATE EXTENSION vector;" %postun -echo "pgvector extension version %{version} for Cloudberry Database %{cloudberry_version} has been removed from %{prefix}." +echo "pgvector extension version %{version} for Apache Cloudberry %{cloudberry_version} has been removed from %{prefix}." echo "You may need to manually clean up any database objects that were using the extension." diff --git a/devops/build/packaging/rpm/cloudberry-dev-repo.spec b/devops/build/packaging/rpm/cloudberry-dev-repo.spec index d2a06defda7..d91a41cce39 100644 --- a/devops/build/packaging/rpm/cloudberry-dev-repo.spec +++ b/devops/build/packaging/rpm/cloudberry-dev-repo.spec @@ -18,7 +18,7 @@ Name: cloudberry-dev-repo Version: 1.0 Release: 1%{?dist} -Summary: Cloudberry Database Repository Configuration +Summary: Apache Cloudberry Repository Configuration License: ASL 2.0 Group: Applications/Databases URL: https://cloudberrydb.org @@ -26,18 +26,18 @@ Vendor: Cloudberry Open Source BuildArch: noarch %description -This package configures the Cloudberry Database repository on your -system. Cloudberry Database is an open-source project aimed at +This package configures the Apache Cloudberry repository on your +system. Apache Cloudberry is an open-source project aimed at providing a scalable, high-performance SQL database for analytics. This repository provides access to the latest RPM packages -for Cloudberry Database, allowing you to easily install and stay +for Apache Cloudberry, allowing you to easily install and stay up-to-date with the latest developments. %install mkdir -p %{buildroot}%{_sysconfdir}/yum.repos.d/ cat > %{buildroot}%{_sysconfdir}/yum.repos.d/cloudberry-dev.repo <Makefile aclocal.m4 python-dependencies.txt - - - - devops/deploy/docker/build/rocky8/tests/requirements.txt - devops/deploy/docker/build/rocky9/tests/requirements.txt + + devops/deploy/docker/build/rocky8/tests/requirements.txt + devops/deploy/docker/build/rocky9/tests/requirements.txt +