tuhaihe commented on code in PR #13:
URL:
https://github.com/apache/cloudberry-devops-release/pull/13#discussion_r2015411195
##########
build_automation/cloudberry/scripts/configure-cloudberry.sh:
##########
@@ -96,22 +96,23 @@ export LOG_DIR="${SRC_DIR}/build-logs"
CONFIGURE_LOG="${LOG_DIR}/configure.log"
# Initialize environment
-init_environment "Cloudberry Configure Script" "${CONFIGURE_LOG}"
+init_environment "Cloudberry Configure Script" "${CONFIGURE_LOG}"
"${BUILD_DESTINATION}"
# Initial setup
log_section "Initial Setup"
-execute_cmd sudo rm -rf /usr/local/cloudberry-db || exit 2
+execute_cmd sudo rm -rf ${BUILD_DESTINATION}/* || exit 2
execute_cmd sudo chmod a+w /usr/local || exit 2
-execute_cmd mkdir -p /usr/local/cloudberry-db/lib || exit 2
+execute_cmd sudo mkdir -p ${BUILD_DESTINATION}/lib || exit 2
+execute_cmd sudo chown -R gpadmin:gpadmin ${BUILD_DESTINATION} || exit 2
Review Comment:
Is line 106 the same as line 110?
##########
.github/workflows/docker-cbdb-build-containers.yml:
##########
@@ -76,7 +76,7 @@ jobs:
# Matrix strategy to build for both Rocky Linux 8 and 9
strategy:
matrix:
- platform: ['rocky8', 'rocky9']
+ platform: ['rocky8', 'rocky9', 'jammy']
Review Comment:
It would be clearer to change the `jammy` to `ubuntu22.04`.
##########
packaging/deb/jammy/debian/control:
##########
@@ -0,0 +1,101 @@
+Source: apache-cloudberry-db-incubating
+Maintainer: open-gpdb dev team https://github.com/open-gpdb/gpdb
Review Comment:
```suggestion
Maintainer: Apache Cloudberry (Incubating) https://cloudberry.apache.org
```
##########
packaging/deb/jammy/debian/rules:
##########
@@ -0,0 +1,49 @@
+#!/usr/bin/make -f
+
+DH_VERBOSE = 1
+DPKG_EXPORT_BUILDFLAGS = 1
+
+GPDB_BIN_PATH := /usr/local/cloudberry-db
Review Comment:
```suggestion
CBDB_BIN_PATH := /usr/local/cloudberry-db
```
##########
images/docker/cbdb/build/jammy/Dockerfile:
##########
@@ -0,0 +1,204 @@
+# --------------------------------------------------------------------
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed
+# with this work for additional information regarding copyright
+# ownership. The ASF licenses this file to You under the Apache
+# License, Version 2.0 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of the
+# License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied. See the License for the specific language governing
+# permissions and limitations under the License.
+#
+# --------------------------------------------------------------------
+#
+# Apache Cloudberry (incubating) is an effort undergoing incubation at
+# the Apache Software Foundation (ASF), sponsored by the Apache
+# Incubator PMC.
+#
+# Incubation is required of all newly accepted projects until a
+# further review indicates that the infrastructure, communications,
+# and decision making process have stabilized in a manner consistent
+# with other successful ASF projects.
+#
+# While incubation status is not necessarily a reflection of the
+# completeness or stability of the code, it does indicate that the
+# project has yet to be fully endorsed by the ASF.
+#
+# --------------------------------------------------------------------
+# Dockerfile for Cloudberry Database Base Environment
Review Comment:
```suggestion
# Dockerfile for Apache Cloudberry Base Environment
```
##########
images/docker/cbdb/build/jammy/Dockerfile:
##########
@@ -0,0 +1,204 @@
+# --------------------------------------------------------------------
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed
+# with this work for additional information regarding copyright
+# ownership. The ASF licenses this file to You under the Apache
+# License, Version 2.0 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of the
+# License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied. See the License for the specific language governing
+# permissions and limitations under the License.
+#
+# --------------------------------------------------------------------
+#
+# Apache Cloudberry (incubating) is an effort undergoing incubation at
+# the Apache Software Foundation (ASF), sponsored by the Apache
+# Incubator PMC.
+#
+# Incubation is required of all newly accepted projects until a
+# further review indicates that the infrastructure, communications,
+# and decision making process have stabilized in a manner consistent
+# with other successful ASF projects.
+#
+# While incubation status is not necessarily a reflection of the
+# completeness or stability of the code, it does indicate that the
+# project has yet to be fully endorsed by the ASF.
+#
+# --------------------------------------------------------------------
+# Dockerfile for Cloudberry Database Base Environment
+# --------------------------------------------------------------------
+# This Dockerfile sets up a Ubuntu jammy 22.04 -based container to serve as
+# a base environment for evaluating the Cloudberry Database. It installs
Review Comment:
```suggestion
# a base environment for evaluating the Apache Cloudberry. It installs
```
##########
packaging/deb/jammy/debian/rules:
##########
@@ -0,0 +1,49 @@
+#!/usr/bin/make -f
+
+DH_VERBOSE = 1
+DPKG_EXPORT_BUILDFLAGS = 1
+
+GPDB_BIN_PATH := /usr/local/cloudberry-db
+DEBIAN_DESTINATION := $(shell pwd)/debian/build
+
+# assumes that CWD is root of gpdb source
+GPDB_PKG_VERSION := $(GPDB_PKG_VERSION)
+PACKAGE_GPDB := $(shell cat debian/control | egrep "^Package: " | cut -d " "
-f 2)
+PATH := ${DEBIAN_DESTINATION}/bin:${PATH}
+
+.PHONY: gpinstall
+
+include /usr/share/dpkg/default.mk
+
+%:
+ dh $@ --parallel
+
+gpinstall:
+ make install
+
+override_dh_auto_install: gpinstall
+ # the staging directory for creating a debian is NOT the right GPHOME.
+ # change GPHOME to point to the post-install target install directory.
+ sed -i "s#GPHOME=.*#GPHOME=${GPDB_BIN_PATH}#g"
${DEBIAN_DESTINATION}/greenplum_path.sh
+
+override_dh_auto_build:
+ echo "Skipping build"
+
+override_dh_auto_clean:
+ echo "Skipping clean"
+
+override_dh_auto_configure:
+ echo "Skipping configure"
+
+override_dh_auto_test:
+ echo "Skipping auto test"
+
+override_dh_gencontrol:
+ echo "using version ${GPDB_PKG_VERSION} for binary GPDB"
Review Comment:
```suggestion
echo "using version ${GPDB_PKG_VERSION} for binary Cloudberry"
```
##########
images/docker/cbdb/build/jammy/Dockerfile:
##########
@@ -0,0 +1,204 @@
+# --------------------------------------------------------------------
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed
+# with this work for additional information regarding copyright
+# ownership. The ASF licenses this file to You under the Apache
+# License, Version 2.0 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of the
+# License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied. See the License for the specific language governing
+# permissions and limitations under the License.
+#
+# --------------------------------------------------------------------
+#
+# Apache Cloudberry (incubating) is an effort undergoing incubation at
+# the Apache Software Foundation (ASF), sponsored by the Apache
+# Incubator PMC.
+#
+# Incubation is required of all newly accepted projects until a
+# further review indicates that the infrastructure, communications,
+# and decision making process have stabilized in a manner consistent
+# with other successful ASF projects.
+#
+# While incubation status is not necessarily a reflection of the
+# completeness or stability of the code, it does indicate that the
+# project has yet to be fully endorsed by the ASF.
+#
+# --------------------------------------------------------------------
+# Dockerfile for Cloudberry Database Base Environment
+# --------------------------------------------------------------------
+# This Dockerfile sets up a Ubuntu jammy 22.04 -based container to serve as
+# a base environment for evaluating the Cloudberry Database. It installs
+# necessary system utilities, configures the environment for SSH access,
+# and sets up a 'gpadmin' user with sudo privileges. The Cloudberry
+# Database DEB can be installed into this container for testing and
+# functional verification.
+#
+# Key Features:
+# - Locale setup for en_US.UTF-8
+# - SSH daemon setup for remote access
+# - Essential system utilities installation
+# - Separate user creation and configuration steps
+#
+# Security Considerations:
+# - This Dockerfile prioritizes ease of use for functional testing and
+# evaluation. It includes configurations such as passwordless sudo access
+# for the 'gpadmin' user and SSH access with password authentication.
+# - These configurations are suitable for testing and development but
+# should NOT be used in a production environment due to potential security
+# risks.
+#
+# Usage:
+# docker build -t cloudberry-db-base-env .
+# docker run -h cdw -it cloudberry-db-base-env
+# --------------------------------------------------------------------
+
+FROM ubuntu:jammy
+
+ARG accessKeyId
+ARG secretAccessKey
+ARG bucketName
+
+# Argument for configuring the timezone
+ARG TIMEZONE_VAR="Europe/London"
+
+
+SHELL ["/bin/bash", "-o", "pipefail", "-c"]
+ENV DEBIAN_FRONTEND=noninteractive
+
+RUN stat -fc %T /sys/fs/cgroup/
+
+RUN ln -snf /usr/share/zoneinfo/Europe/London /etc/localtime && echo
$TIMEZONE_VAR > /etc/timezone
+
+# --------------------------------------------------------------------
+# Install Development Tools and Utilities
+# --------------------------------------------------------------------
+RUN apt-get update -o Acquire::AllowInsecureRepositories=true && apt-get
install -y --no-install-recommends --allow-unauthenticated \
+ build-essential \
+ libssl-dev \
+ gnupg \
+ openssl \
+ debhelper \
+ libfakeroot \
+ debootstrap \
+ devscripts \
+ make \
+ equivs \
+ bison \
+ ca-certificates-java \
+ ca-certificates \
+ cmake \
+ curl \
+ cgroup-tools \
+ flex \
+ gcc-11 \
+ g++-11 \
+ g++-11-multilib \
+ git \
+ krb5-multidev \
+ libapr1-dev \
+ libbz2-dev \
+ libcurl4-gnutls-dev \
+ libpstreams-dev \
+ libxerces-c-dev \
+ libsystemd-dev \
+ libevent-dev \
+ libkrb5-dev \
+ libldap2-dev \
+ libperl-dev \
+ libreadline-dev \
+ libssl-dev \
+ libxml2-dev \
+ libyaml-dev \
+ libzstd-dev \
+ libaprutil1-dev \
+ libpam0g-dev \
+ libpam0g \
+ libcgroup1 \
+ libyaml-0-2 \
+ libldap-2.5-0 \
+ libssl3 \
+ ninja-build \
+ python-setuptools \
+ python3-setuptools \
+ quilt \
+ unzip \
+ wget \
+ zlib1g-dev \
+ libuv1-dev \
+ libgpgme-dev \
+ libgpgme11 \
+ python2.7 \
+ python2.7-dev \
+ pkg-config \
+ python3.10 \
+ python3.10-dev \
+ python3-distutils \
+ sudo
+
+RUN apt-get install -y locales \
+&& locale-gen "en_US.UTF-8" \
+&& update-locale LC_ALL="en_US.UTF-8"
+
+RUN cd \
+&& XERCES_LATEST_RELEASE=3.3.0 \
+&& wget -nv
"https://archive.apache.org/dist/xerces/c/3/sources/xerces-c-${XERCES_LATEST_RELEASE}.tar.gz"
\
+&& echo "$(curl -sL
https://archive.apache.org/dist/xerces/c/3/sources/xerces-c-${XERCES_LATEST_RELEASE}.tar.gz.sha256)"
| sha256sum -c - \
+&& tar xf "xerces-c-${XERCES_LATEST_RELEASE}.tar.gz"; rm
"xerces-c-${XERCES_LATEST_RELEASE}.tar.gz" \
+&& cd xerces-c-${XERCES_LATEST_RELEASE} \
+&& ./configure --prefix=/usr/local/xerces-c \
+&& make -j \
Review Comment:
`make -j$(nproc)` will be more efficent.
##########
images/docker/cbdb/build/jammy/Dockerfile:
##########
@@ -0,0 +1,204 @@
+# --------------------------------------------------------------------
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed
+# with this work for additional information regarding copyright
+# ownership. The ASF licenses this file to You under the Apache
+# License, Version 2.0 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of the
+# License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied. See the License for the specific language governing
+# permissions and limitations under the License.
+#
+# --------------------------------------------------------------------
+#
+# Apache Cloudberry (incubating) is an effort undergoing incubation at
+# the Apache Software Foundation (ASF), sponsored by the Apache
+# Incubator PMC.
+#
+# Incubation is required of all newly accepted projects until a
+# further review indicates that the infrastructure, communications,
+# and decision making process have stabilized in a manner consistent
+# with other successful ASF projects.
+#
+# While incubation status is not necessarily a reflection of the
+# completeness or stability of the code, it does indicate that the
+# project has yet to be fully endorsed by the ASF.
+#
+# --------------------------------------------------------------------
+# Dockerfile for Cloudberry Database Base Environment
+# --------------------------------------------------------------------
+# This Dockerfile sets up a Ubuntu jammy 22.04 -based container to serve as
+# a base environment for evaluating the Cloudberry Database. It installs
+# necessary system utilities, configures the environment for SSH access,
+# and sets up a 'gpadmin' user with sudo privileges. The Cloudberry
+# Database DEB can be installed into this container for testing and
+# functional verification.
+#
+# Key Features:
+# - Locale setup for en_US.UTF-8
+# - SSH daemon setup for remote access
+# - Essential system utilities installation
+# - Separate user creation and configuration steps
+#
+# Security Considerations:
+# - This Dockerfile prioritizes ease of use for functional testing and
+# evaluation. It includes configurations such as passwordless sudo access
+# for the 'gpadmin' user and SSH access with password authentication.
+# - These configurations are suitable for testing and development but
+# should NOT be used in a production environment due to potential security
+# risks.
+#
+# Usage:
+# docker build -t cloudberry-db-base-env .
+# docker run -h cdw -it cloudberry-db-base-env
+# --------------------------------------------------------------------
+
+FROM ubuntu:jammy
+
+ARG accessKeyId
+ARG secretAccessKey
+ARG bucketName
+
+# Argument for configuring the timezone
+ARG TIMEZONE_VAR="Europe/London"
+
+
+SHELL ["/bin/bash", "-o", "pipefail", "-c"]
+ENV DEBIAN_FRONTEND=noninteractive
+
+RUN stat -fc %T /sys/fs/cgroup/
+
+RUN ln -snf /usr/share/zoneinfo/Europe/London /etc/localtime && echo
$TIMEZONE_VAR > /etc/timezone
+
+# --------------------------------------------------------------------
+# Install Development Tools and Utilities
+# --------------------------------------------------------------------
+RUN apt-get update -o Acquire::AllowInsecureRepositories=true && apt-get
install -y --no-install-recommends --allow-unauthenticated \
+ build-essential \
+ libssl-dev \
+ gnupg \
+ openssl \
+ debhelper \
+ libfakeroot \
+ debootstrap \
+ devscripts \
+ make \
+ equivs \
+ bison \
+ ca-certificates-java \
+ ca-certificates \
+ cmake \
+ curl \
+ cgroup-tools \
+ flex \
+ gcc-11 \
+ g++-11 \
+ g++-11-multilib \
+ git \
+ krb5-multidev \
+ libapr1-dev \
+ libbz2-dev \
+ libcurl4-gnutls-dev \
+ libpstreams-dev \
+ libxerces-c-dev \
+ libsystemd-dev \
+ libevent-dev \
+ libkrb5-dev \
+ libldap2-dev \
+ libperl-dev \
+ libreadline-dev \
+ libssl-dev \
+ libxml2-dev \
+ libyaml-dev \
+ libzstd-dev \
+ libaprutil1-dev \
+ libpam0g-dev \
+ libpam0g \
+ libcgroup1 \
+ libyaml-0-2 \
+ libldap-2.5-0 \
+ libssl3 \
+ ninja-build \
+ python-setuptools \
+ python3-setuptools \
+ quilt \
+ unzip \
+ wget \
+ zlib1g-dev \
+ libuv1-dev \
+ libgpgme-dev \
+ libgpgme11 \
+ python2.7 \
+ python2.7-dev \
+ pkg-config \
+ python3.10 \
+ python3.10-dev \
+ python3-distutils \
+ sudo
+
+RUN apt-get install -y locales \
+&& locale-gen "en_US.UTF-8" \
Review Comment:
IMO, we can place `&&` at the end of the command line, which will be easier
for human reading. FYI.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]