Skip to content

Commit 2a56159

Browse files
tuhaiheedespinoantoniopetroleliang8283RyanWei
committed
Initial: squash cloudberry-bootcamp into devops/sandbox
This commit imports only the essential apache/cloudberry-bootcamp repo assets (000-Cloudberry Sandbox) into the current repo under the devops/sandbox/ directory. Non-essential content such as tutorials (101–104), documentation, and large binary assets are excluded from this import to keep the repository lightweight and focused on the Sandbox deployment. This import is squashed into a single commit to provide a clean baseline for subsequent sandbox configuration and cleanup. initial commit: apache/cloudberry-bootcamp@f753193 See: https://lists.apache.org/thread/p6otyrrnosg8fsbyr6ok7hl8wxpx4ss2 Original contributors information are as follows: Co-authored-by: Ed Espino <espino@apache.org> Co-authored-by: Antonio Petrole <antoniopetrole@gmail.com> Co-authored-by: Liang Chen <liang8283@gmail.com> Co-authored-by: Ryan Wei <rainmanwy@gmail.com> Co-authored-by: Fenggang Wang <ginobiliwang@gmail.com> Co-authored-by: TomShawn <tomshawn@apache.org> Co-authored-by: Dianjin Wang <wangdianjin@gmail.com>
1 parent c71271e commit 2a56159

13 files changed

Lines changed: 1089 additions & 0 deletions
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
CODEBASE_VERSION=1.6.0
2+
OS_VERSION=rockylinux9
Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
FROM rockylinux/rockylinux:9
2+
3+
ARG CODEBASE_VERSION_VAR=${CODEBASE_VERSION_VAR}
4+
ARG TIMEZONE_VAR="Asia/Shanghai"
5+
6+
ENV container=docker
7+
ENV MULTINODE=false
8+
9+
RUN dnf update -y && \
10+
dnf install -y systemd \
11+
systemd-libs && \
12+
dnf clean all
13+
14+
# Clean up unnecessary systemd units
15+
RUN [ -d /lib/systemd/system/sysinit.target.wants ] && find /lib/systemd/system/sysinit.target.wants/ -type l -not -name 'systemd-tmpfiles-setup.service' -delete || echo "Directory /lib/systemd/system/sysinit.target.wants does not exist" && \
16+
[ -d /lib/systemd/system/multi-user.target.wants ] && find /lib/systemd/system/multi-user.target.wants/ -type l -delete || echo "Directory /lib/systemd/system/multi-user.target.wants does not exist" && \
17+
find /etc/systemd/system/*.wants/ -type l -delete || echo "Directory /etc/systemd/system/*.wants does not exist" && \
18+
[ -d /lib/systemd/system/local-fs.target.wants ] && find /lib/systemd/system/local-fs.target.wants/ -type l -delete || echo "Directory /lib/systemd/system/local-fs.target.wants does not exist" && \
19+
[ -d /lib/systemd/system/sockets.target.wants ] && find /lib/systemd/system/sockets.target.wants/ -type l -not -name '*udev*' -delete || echo "Directory /lib/systemd/system/sockets.target.wants does not exist" && \
20+
[ -d /lib/systemd/system/basic.target.wants ] && find /lib/systemd/system/basic.target.wants/ -type l -delete || echo "Directory /lib/systemd/system/basic.target.wants does not exist" && \
21+
[ -d /lib/systemd/system/anaconda.target.wants ] && find /lib/systemd/system/anaconda.target.wants/ -type l -delete || echo "Directory /lib/systemd/system/anaconda.target.wants does not exist"
22+
23+
COPY ./configs/* /tmp/
24+
25+
RUN echo root:cbdb@123 | chpasswd && \
26+
dnf makecache && \
27+
dnf install -y yum-utils \
28+
epel-release \
29+
git && \
30+
yum-config-manager --disable epel-cisco-openh264 && \
31+
dnf makecache && \
32+
yum-config-manager --disable epel && \
33+
dnf install -y --enablerepo=epel \
34+
the_silver_searcher \
35+
bat \
36+
htop && \
37+
dnf install -y bison \
38+
cmake3 \
39+
ed \
40+
flex \
41+
gcc \
42+
gcc-c++ \
43+
glibc-langpack-en \
44+
go \
45+
initscripts \
46+
iproute \
47+
less \
48+
m4 \
49+
net-tools \
50+
openssh-clients \
51+
openssh-server \
52+
passwd \
53+
perl \
54+
rsync \
55+
sudo \
56+
tar \
57+
unzip \
58+
util-linux-ng \
59+
wget \
60+
sshpass \
61+
which && \
62+
dnf install -y apr-devel \
63+
bzip2-devel \
64+
krb5-devel \
65+
libcurl-devel \
66+
libevent-devel \
67+
libxml2-devel \
68+
libzstd-devel \
69+
openldap-devel \
70+
openssl-devel \
71+
pam-devel \
72+
perl-ExtUtils-Embed \
73+
perl-Test-Simple \
74+
perl-core \
75+
python3-devel \
76+
readline-devel \
77+
zlib-devel && \
78+
dnf install -y --enablerepo=crb \
79+
libuv-devel \
80+
libyaml-devel \
81+
perl-IPC-Run && \
82+
dnf install -y --enablerepo=epel \
83+
xerces-c-devel
84+
85+
RUN cp /tmp/90-cbdb-sysctl.conf /etc/sysctl.conf && \
86+
cp /tmp/90-cbdb-limits.conf /etc/security/limits.d/90-cbdb-limits.conf && \
87+
cat /usr/share/zoneinfo/${TIMEZONE_VAR} > /etc/localtime && \
88+
echo "cdw" > /tmp/gpdb-hosts && \
89+
echo "/usr/local/lib" >> /etc/ld.so.conf && \
90+
echo "/usr/local/lib64" >> /etc/ld.so.conf && \
91+
ldconfig && \
92+
chmod 777 /tmp/gpinitsystem_singlenode && \
93+
chmod 777 /tmp/init_system.sh && \
94+
hostname > ~/orig_hostname && \
95+
/usr/sbin/groupadd gpadmin && \
96+
/usr/sbin/useradd gpadmin -g gpadmin -G wheel && \
97+
setcap cap_net_raw+ep /usr/bin/ping && \
98+
echo "cbdb@123"|passwd --stdin gpadmin && \
99+
echo "gpadmin ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \
100+
echo "root ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \
101+
echo "export COORDINATOR_DATA_DIRECTORY=/data0/database/coordinator/gpseg-1" >> /home/gpadmin/.bashrc && \
102+
echo "source /usr/local/cloudberry-db/greenplum_path.sh" >> /home/gpadmin/.bashrc && \
103+
mkdir -p /data0/database/coordinator /data0/database/primary /data0/database/mirror && \
104+
chown -R gpadmin:gpadmin /data0 && \
105+
ssh-keygen -A && \
106+
echo "PasswordAuthentication yes" >> /etc/ssh/sshd_config
107+
108+
RUN cd /tmp/ && \
109+
unzip -d /tmp /tmp/cloudberrydb-${CODEBASE_VERSION_VAR}.zip && \
110+
mv /tmp/cloudberrydb-${CODEBASE_VERSION_VAR} /tmp/cloudberry
111+
112+
RUN cd /tmp/cloudberry && \
113+
./configure --prefix=/usr/local/cloudberry-db \
114+
--enable-cassert \
115+
--enable-debug-extensions \
116+
--enable-ic-proxy \
117+
--enable-mapreduce \
118+
--enable-orafce \
119+
--enable-orca \
120+
--enable-pxf \
121+
--enable-tap-tests \
122+
--with-gssapi \
123+
--with-ldap \
124+
--with-libxml \
125+
--with-openssl \
126+
--with-pam \
127+
--with-perl \
128+
--with-pgport=5432 \
129+
--with-python \
130+
--with-pythonsrc-ext
131+
132+
RUN cd /tmp/cloudberry && \
133+
make -j$(nproc) && \
134+
make install
135+
136+
RUN cd /tmp/cloudberry/contrib && \
137+
make -j$(nproc) && \
138+
make install
139+
140+
# ----------------------------------------------------------------------
141+
# Set the Default User and Command
142+
# ----------------------------------------------------------------------
143+
# The default user is set to 'gpadmin', and the container starts by
144+
# running the init_system.sh script. This container serves as a base
145+
# environment, and the Apache Cloudberry RPM can be installed for
146+
# testing and functional verification.
147+
# ----------------------------------------------------------------------
148+
USER gpadmin
149+
ENV USER=gpadmin
150+
WORKDIR /home/gpadmin
151+
152+
EXPOSE 5432 22
153+
154+
VOLUME [ "/sys/fs/cgroup" ]
155+
CMD ["bash","-c","/tmp/init_system.sh"]
Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
FROM rockylinux/rockylinux:9
2+
3+
# Argument for configuring the timezone
4+
ARG TIMEZONE_VAR="America/Los_Angeles"
5+
6+
# Environment variables
7+
ENV container=docker
8+
ENV MULTINODE=false
9+
10+
RUN dnf update -y && \
11+
dnf install -y systemd \
12+
systemd-libs && \
13+
dnf clean all
14+
15+
# Clean up unnecessary systemd units
16+
RUN [ -d /lib/systemd/system/sysinit.target.wants ] && find /lib/systemd/system/sysinit.target.wants/ -type l -not -name 'systemd-tmpfiles-setup.service' -delete || echo "Directory /lib/systemd/system/sysinit.target.wants does not exist" && \
17+
[ -d /lib/systemd/system/multi-user.target.wants ] && find /lib/systemd/system/multi-user.target.wants/ -type l -delete || echo "Directory /lib/systemd/system/multi-user.target.wants does not exist" && \
18+
find /etc/systemd/system/*.wants/ -type l -delete || echo "Directory /etc/systemd/system/*.wants does not exist" && \
19+
[ -d /lib/systemd/system/local-fs.target.wants ] && find /lib/systemd/system/local-fs.target.wants/ -type l -delete || echo "Directory /lib/systemd/system/local-fs.target.wants does not exist" && \
20+
[ -d /lib/systemd/system/sockets.target.wants ] && find /lib/systemd/system/sockets.target.wants/ -type l -not -name '*udev*' -delete || echo "Directory /lib/systemd/system/sockets.target.wants does not exist" && \
21+
[ -d /lib/systemd/system/basic.target.wants ] && find /lib/systemd/system/basic.target.wants/ -type l -delete || echo "Directory /lib/systemd/system/basic.target.wants does not exist" && \
22+
[ -d /lib/systemd/system/anaconda.target.wants ] && find /lib/systemd/system/anaconda.target.wants/ -type l -delete || echo "Directory /lib/systemd/system/anaconda.target.wants does not exist"
23+
24+
COPY ./configs/* /tmp/
25+
26+
RUN dnf makecache && \
27+
dnf install -y yum-utils \
28+
epel-release \
29+
git && \
30+
yum-config-manager --disable epel-cisco-openh264 && \
31+
dnf makecache && \
32+
yum-config-manager --disable epel && \
33+
dnf install -y --enablerepo=epel \
34+
the_silver_searcher \
35+
bat \
36+
htop && \
37+
dnf install -y bison \
38+
cmake3 \
39+
ed \
40+
flex \
41+
gcc \
42+
gcc-c++ \
43+
glibc-langpack-en \
44+
go \
45+
initscripts \
46+
iproute \
47+
less \
48+
m4 \
49+
net-tools \
50+
openssh-clients \
51+
openssh-server \
52+
passwd \
53+
perl \
54+
rsync \
55+
sudo \
56+
tar \
57+
unzip \
58+
util-linux-ng \
59+
wget \
60+
sshpass \
61+
which && \
62+
dnf install -y apr-devel \
63+
bzip2-devel \
64+
krb5-devel \
65+
libcurl-devel \
66+
libevent-devel \
67+
libxml2-devel \
68+
libuuid-devel \
69+
libzstd-devel \
70+
lz4-devel \
71+
openldap-devel \
72+
openssl-devel \
73+
pam-devel \
74+
perl-ExtUtils-Embed \
75+
perl-Test-Simple \
76+
perl-core \
77+
python3-devel \
78+
readline-devel \
79+
zlib-devel && \
80+
dnf install -y --enablerepo=crb \
81+
libuv-devel \
82+
libyaml-devel \
83+
protobuf-devel \
84+
perl-IPC-Run && \
85+
dnf install -y --enablerepo=epel \
86+
xerces-c-devel
87+
88+
RUN cp /tmp/90-cbdb-sysctl.conf /etc/sysctl.conf && \
89+
cp /tmp/90-cbdb-limits.conf /etc/security/limits.d/90-cbdb-limits.conf && \
90+
cat /usr/share/zoneinfo/${TIMEZONE_VAR} > /etc/localtime && \
91+
echo "cdw" > /tmp/gpdb-hosts && \
92+
echo "/usr/local/lib" >> /etc/ld.so.conf && \
93+
echo "/usr/local/lib64" >> /etc/ld.so.conf && \
94+
ldconfig && \
95+
chmod 777 /tmp/gpinitsystem_singlenode && \
96+
chmod 777 /tmp/init_system.sh && \
97+
hostname > ~/orig_hostname && \
98+
/usr/sbin/groupadd gpadmin && \
99+
/usr/sbin/useradd gpadmin -g gpadmin -G wheel && \
100+
setcap cap_net_raw+ep /usr/bin/ping && \
101+
echo "cbdb@123"|passwd --stdin gpadmin && \
102+
echo "gpadmin ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \
103+
echo "root ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \
104+
echo "export COORDINATOR_DATA_DIRECTORY=/data0/database/coordinator/gpseg-1" >> /home/gpadmin/.bashrc && \
105+
echo "source /usr/local/cloudberry-db/greenplum_path.sh" >> /home/gpadmin/.bashrc && \
106+
mkdir -p /data0/database/coordinator /data0/database/primary /data0/database/mirror && \
107+
chown -R gpadmin:gpadmin /data0 && \
108+
ssh-keygen -A && \
109+
echo "PasswordAuthentication yes" >> /etc/ssh/sshd_config
110+
111+
RUN cd /tmp/ && \
112+
git clone --recurse-submodules --branch main --single-branch --depth=1 https://github.com/apache/cloudberry.git
113+
114+
RUN cd /tmp/cloudberry && \
115+
./configure --prefix=/usr/local/cloudberry-db \
116+
--enable-cassert \
117+
--enable-debug-extensions \
118+
--enable-gpcloud \
119+
--enable-ic-proxy \
120+
--enable-mapreduce \
121+
--enable-orafce \
122+
--enable-orca \
123+
--enable-pax \
124+
--enable-pxf \
125+
--enable-tap-tests \
126+
--with-gssapi \
127+
--with-ldap \
128+
--with-libxml \
129+
--with-lz4 \
130+
--with-openssl \
131+
--with-pam \
132+
--with-perl \
133+
--with-pgport=5432 \
134+
--with-python \
135+
--with-pythonsrc-ext
136+
137+
RUN cd /tmp/cloudberry && \
138+
make -j$(nproc) && \
139+
make install
140+
141+
RUN cd /tmp/cloudberry/contrib && \
142+
make -j$(nproc) && \
143+
make install
144+
145+
# ----------------------------------------------------------------------
146+
# Set the Default User and Command
147+
# ----------------------------------------------------------------------
148+
# The default user is set to 'gpadmin', and the container starts by
149+
# running the init_system.sh script. This container serves as a base
150+
# environment, and the Apache Cloudberry RPM can be installed for
151+
# testing and functional verification.
152+
# ----------------------------------------------------------------------
153+
USER gpadmin
154+
ENV USER=gpadmin
155+
WORKDIR /home/gpadmin
156+
157+
EXPOSE 5432 22
158+
159+
VOLUME [ "/sys/fs/cgroup" ]
160+
CMD ["bash","-c","/tmp/init_system.sh"]

0 commit comments

Comments
 (0)