Skip to content

Commit 5ca40f5

Browse files
zcooLiebing
authored andcommitted
package and build
1 parent a0788b1 commit 5ca40f5

File tree

4 files changed

+139
-2
lines changed

4 files changed

+139
-2
lines changed

docker-inner/Dockerfile

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
#
2+
# Copyright (c) 2024 Alibaba Group Holding Ltd.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
17+
18+
# --------------
19+
# Stream edition
20+
# --------------
21+
FROM registry.cn-hangzhou.aliyuncs.com/alinux/aliyunlinux:aliyun_2_1903_x64_20G_alibase_20200904 AS stream
22+
USER root
23+
RUN echo pwd
24+
25+
RUN set -e
26+
RUN yum install -y tar \
27+
&& cd /etc/ \
28+
&& curl -L http://vvr-daily.oss-cn-hangzhou-zmf.aliyuncs.com/apt.tar.gz -o apt.tar.gz \
29+
&& tar xf apt.tar.gz \
30+
&& rm -rf apt.tar.gz \
31+
&& cd /usr/lib/ \
32+
&& curl -L http://yum.tbsite.net/taobao/8/x86_64/current/ajdk/ajdk-8.20.24-20230608121657.al8.x86_64.rpm -o ajdk-8.20.24-20230608121657.al8.x86_64.rpm \
33+
&& rpm -ivh ajdk-8.20.24-20230608121657.al8.x86_64.rpm \
34+
&& rm -f ajdk-8.20.24-20230608121657.al8.x86_64.rpm \
35+
&& curl -L http://yum.tbsite.net/taobao/7/x86_64/current/ajdk11/ajdk11-11.0.22.22-20240417113200.alios7.x86_64.rpm -o ajdk11-11.0.22.22-20240417113200.alios7.x86_64.rpm \
36+
&& rpm -ivh ajdk11-11.0.22.22-20240417113200.alios7.x86_64.rpm \
37+
&& rm -f ajdk11-11.0.22.22-20240417113200.alios7.x86_64.rpm \
38+
&& curl -L http://yum.tbsite.net/taobao/7/x86_64/current/ajdk17/ajdk17-17.0.5.0.5-20221117161857.alios7.x86_64.rpm -o ajdk17-17.0.5.0.5-20221117161857.alios7.x86_64.rpm \
39+
&& rpm -ivh ajdk17-17.0.5.0.5-20221117161857.alios7.x86_64.rpm \
40+
&& rm -f ajdk17-17.0.5.0.5-20221117161857.alios7.x86_64.rpm \
41+
&& (yum install -y jemalloc-devel || yum install -y jemalloc-devel) \
42+
&& rm -rf /var/cache/yum # retry because the installation of jemalloc-devel may fail
43+
44+
ENV JAVA_HOME=/opt/taobao/install/ajdk_8.20.24/
45+
ENV JAVA_HOME11=/opt/taobao/install/ajdk11_11.0.22.22/
46+
ENV JAVA_HOME17=/opt/taobao/install/ajdk17_17.0.5.0.5/
47+
ENV PATH=${JAVA_HOME17}/bin:$PATH
48+
49+
RUN sed -i "s/\/\/.*deb.debian.org/\/\/mirrors.aliyun.com/g;s/\/\/.*security.debian.org/\/\/mirrors.aliyun.com/g" /etc/apt/sources.list \
50+
&& yum install -y tini \
51+
&& yum install -y glibc-common \
52+
&& yum install -y net-tools \
53+
&& yum install -y telnet \
54+
&& yum install -y wget \
55+
&& yum install -y curl \
56+
&& yum install -y apr-devel openssl-devel \
57+
&& yum install -y procps \
58+
&& yum install -y iputils \
59+
&& yum install -y initscripts \
60+
&& yum install -y crontabs \
61+
&& cd / \
62+
&& yum install -y mpfr-devel perf \
63+
&& cd /opt/ \
64+
&& wget https://native-resource.oss-cn-beijing.aliyuncs.com/native-tools_profiler-fix.tar.gz -O native-tools.tar.gz \
65+
&& tar xf native-tools.tar.gz \
66+
&& rm -rf native-tools.tar.gz \
67+
&& cd /usr/local \
68+
&& wget http://vvr-daily.oss-cn-hangzhou-zmf.aliyuncs.com/gcc.tar.gz \
69+
&& tar xf gcc.tar.gz \
70+
&& printf "/usr/local/gcc/lib64\n" > /etc/ld.so.conf.d/gcc10.conf \
71+
&& ldconfig \
72+
&& rm -rf gcc.tar.gz \
73+
&& printf "\nkernel.perf_event_paranoid = -1\nkernel.yama.ptrace_scope = 0\n" >> /etc/sysctl.conf \
74+
&& rm -rf /usr/lib/locale \
75+
&& rm -rf /var/cache/yum
76+
77+
ENV PATH=/fluss/bin:$PATH
78+
COPY --chown=root:root build-target/ /fluss/
79+
80+
WORKDIR /fluss
81+
USER root
82+
CMD ["bash"]

docker-inner/docker-entrypoint.sh

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#!/bin/bash
2+
#
3+
# Copyright (c) 2024 Alibaba Group Holding Ltd.
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
18+
CONF_FILE="${FLUSS_HOME}/conf/server.yaml"
19+
20+
prepare_configuration() {
21+
if [ -n "${FLUSS_PROPERTIES}" ]; then
22+
echo "${FLUSS_PROPERTIES}" >> "${CONF_FILE}"
23+
fi
24+
envsubst < "${CONF_FILE}" > "${CONF_FILE}.tmp" && mv "${CONF_FILE}.tmp" "${CONF_FILE}"
25+
}
26+
27+
prepare_configuration
28+
29+
args=("$@")
30+
31+
if [ "$1" = "help" ]; then
32+
printf "Usage: $(basename "$0") (coordinatorServer|tabletServer)\n"
33+
printf " Or $(basename "$0") help\n\n"
34+
exit 0
35+
elif [ "$1" = "coordinatorServer" ]; then
36+
args=("${args[@]:1}")
37+
echo "Starting Coordinator Server"
38+
exec "$FLUSS_HOME/bin/coordinator-server.sh" start-foreground "${args[@]}"
39+
elif [ "$1" = "tabletServer" ]; then
40+
args=("${args[@]:1}")
41+
echo "Starting Tablet Server"
42+
exec "$FLUSS_HOME/bin/tablet-server.sh" start-foreground "${args[@]}"
43+
fi
44+
45+
args=("${args[@]}")
46+
47+
## Running command in pass-through mode
48+
exec "${args[@]}"

fluss-dist/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,9 @@
186186
<goal>exec</goal>
187187
</goals>
188188
<configuration>
189-
<executable>ln</executable>
189+
<executable>cp</executable>
190190
<arguments>
191-
<argument>-sfn</argument>
191+
<argument>-rf</argument>
192192
<argument>
193193
${project.basedir}/target/fluss-${project.version}-bin/fluss-${project.version}
194194
</argument>

fluss-dist/src/main/assemblies/plugins.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,13 @@
7979
<fileMode>0644</fileMode>
8080
</file>
8181

82+
<file>
83+
<source>../docker-inner/fluss-fs-pangu-${project.version}.jar</source>
84+
<outputDirectory>plugins/dfs/</outputDirectory>
85+
<destName>fluss-fs-pangu-${project.version}.jar</destName>
86+
<fileMode>0644</fileMode>
87+
</file>
88+
8289
<!-- metrics -->
8390
<file>
8491
<source>../fluss-metrics/fluss-metrics-prometheus/target/fluss-metrics-prometheus-${project.version}.jar</source>

0 commit comments

Comments
 (0)