-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add build/debug scripts of native worker docker image
- Loading branch information
1 parent
27855fb
commit 7b8851f
Showing
7 changed files
with
188 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
ARG PRESTO_VERSION | ||
|
||
FROM prestocpp/prestocpp-avx-centos:root-20230613 as Builder | ||
|
||
WORKDIR /app | ||
COPY . . | ||
RUN cd presto-native-execution && \ | ||
make velox-submodule && \ | ||
source /opt/rh/gcc-toolset-9/enable && \ | ||
source velox/scripts/setup-helper-functions.sh && \ | ||
(mkdir -p third_party && cd third_party && github_checkout aws/aws-sdk-cpp 1.9.96 --depth 1 --recurse-submodules --config advice.detachedHead=false && \ | ||
cmake_install -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS:BOOL=OFF -DMINIMIZE_SIZE:BOOL=ON -DENABLE_TESTING:BOOL=OFF -DBUILD_ONLY:STRING="s3;identity-management") && \ | ||
EXTRA_CMAKE_FLAGS=" -DVELOX_ENABLE_INT64_BUILD_PARTITION_BOUND=ON" PRESTO_ENABLE_PARQUET=ON PRESTO_ENABLE_S3=ON PRESTO_ENABLE_TESTING=OFF MAX_HIGH_MEM_JOBS=8 MAX_LINK_JOBS=8 NUM_THREADS=8 TREAT_WARNINGS_AS_ERRORS=0 make release \ | ||
|| tail -n 500 _build/release/CMakeFiles/CMakeError.log | ||
|
||
RUN cd presto-native-execution && \ | ||
mkdir -p prestissimo && \ | ||
cp _build/release/presto_cpp/main/presto_server prestissimo && \ | ||
tar cvf prestissimo.tar entrypoint.sh velox.properties prestissimo | ||
|
||
## | ||
|
||
FROM prestocpp/prestocpp-avx-centos:root-20230613 | ||
ENV PRESTO_HOME="/opt/presto-server" | ||
|
||
RUN dnf update -y && dnf install -y \ | ||
awscli \ | ||
gperf \ | ||
iproute \ | ||
lsof \ | ||
procps \ | ||
python3 \ | ||
sysstat \ | ||
tar \ | ||
vim \ | ||
wget \ | ||
which \ | ||
&& \ | ||
mkdir -p $PRESTO_HOME/etc/catalog && \ | ||
mkdir -p /var/lib/presto/data | ||
|
||
WORKDIR /app | ||
COPY --from=Builder /app/presto-native-execution/prestissimo.tar . | ||
RUN tar xvf prestissimo.tar && \ | ||
mkdir -p /opt/presto-server/etc && \ | ||
mv prestissimo/presto_server /usr/local/bin/ && \ | ||
mv velox.properties /opt/presto-server/etc/ && \ | ||
mv entrypoint.sh /opt/ && \ | ||
touch /opt/presto-native-execution-${PRESTO_VERSION} | ||
|
||
ENTRYPOINT ["/opt/entrypoint.sh"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
ARG PRESTO_VERSION | ||
|
||
FROM prestocpp/prestocpp-avx-centos:root-20230613 as Builder | ||
|
||
WORKDIR /app | ||
COPY . . | ||
RUN cd presto-native-execution && \ | ||
make velox-submodule && \ | ||
source /opt/rh/gcc-toolset-9/enable && \ | ||
source velox/scripts/setup-helper-functions.sh && \ | ||
(mkdir -p third_party && cd third_party && github_checkout aws/aws-sdk-cpp 1.9.96 --depth 1 --recurse-submodules --config advice.detachedHead=false && \ | ||
cmake_install -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS:BOOL=OFF -DMINIMIZE_SIZE:BOOL=ON -DENABLE_TESTING:BOOL=OFF -DBUILD_ONLY:STRING="s3;identity-management") && \ | ||
EXTRA_CMAKE_FLAGS=" -DVELOX_ENABLE_INT64_BUILD_PARTITION_BOUND=ON" PRESTO_ENABLE_PARQUET=ON PRESTO_ENABLE_S3=ON PRESTO_ENABLE_TESTING=OFF MAX_HIGH_MEM_JOBS=4 MAX_LINK_JOBS=4 NUM_THREADS=2 TREAT_WARNINGS_AS_ERRORS=0 make debug \ | ||
|| tail -n 500 _build/debug/CMakeFiles/CMakeError.log | ||
|
||
RUN cd presto-native-execution && \ | ||
mkdir -p prestissimo && \ | ||
cp _build/debug/presto_cpp/main/presto_server prestissimo && \ | ||
tar cvf prestissimo.tar entrypoint.sh velox.properties prestissimo | ||
|
||
## | ||
|
||
FROM prestocpp/prestocpp-avx-centos:root-20230613 | ||
ENV PRESTO_HOME="/opt/presto-server" | ||
|
||
RUN dnf update -y && dnf install -y \ | ||
awscli \ | ||
gperf \ | ||
iproute \ | ||
lsof \ | ||
procps \ | ||
python3 \ | ||
sysstat \ | ||
tar \ | ||
vim \ | ||
wget \ | ||
which \ | ||
&& \ | ||
mkdir -p $PRESTO_HOME/etc/catalog && \ | ||
mkdir -p /var/lib/presto/data | ||
|
||
WORKDIR /app | ||
COPY --from=Builder /app/presto-native-execution/prestissimo.tar . | ||
RUN tar xvf prestissimo.tar && \ | ||
mkdir -p /opt/presto-server/etc && \ | ||
mv prestissimo/presto_server /usr/local/bin/ && \ | ||
mv velox.properties /opt/presto-server/etc/ && \ | ||
mv entrypoint.sh /opt/ && \ | ||
touch /opt/presto-native-execution-${PRESTO_VERSION} | ||
|
||
ENTRYPOINT ["/opt/entrypoint.sh"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
namespace: oss-agent | ||
labels: | ||
containers: dind | ||
namespace: oss-agent | ||
labels: | ||
containers: dind | ||
spec: | ||
nodeSelector: | ||
eks.amazonaws.com/nodegroup: eks-oss-presto-dynamic-managed-ng | ||
serviceAccountName: oss-agent | ||
containers: | ||
- name: dind | ||
image: docker:20.10.16-dind-alpine3.15 | ||
securityContext: | ||
privileged: true | ||
tty: true | ||
resources: | ||
requests: | ||
memory: "4Gi" | ||
cpu: "2000m" | ||
limits: | ||
memory: "4Gi" | ||
cpu: "2000m" | ||
nodeSelector: | ||
eks.amazonaws.com/nodegroup: eks-oss-presto-dynamic-managed-ng | ||
serviceAccountName: oss-agent | ||
containers: | ||
- name: dind | ||
image: docker:20.10.16-dind-alpine3.15 | ||
securityContext: | ||
privileged: true | ||
tty: true | ||
resources: | ||
requests: | ||
memory: "24Gi" | ||
cpu: "7000m" | ||
limits: | ||
memory: "24Gi" | ||
cpu: "7000m" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,27 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
namespace: oss-agent | ||
labels: | ||
containers: maven | ||
namespace: oss-agent | ||
labels: | ||
containers: maven | ||
spec: | ||
nodeSelector: | ||
eks.amazonaws.com/nodegroup: eks-oss-presto-dynamic-managed-ng | ||
serviceAccountName: oss-agent | ||
containers: | ||
- name: maven | ||
image: maven:3.8.6-openjdk-8-slim | ||
env: | ||
- name: MAVEN_OPTS | ||
value: "-Xmx8000m -Xms8000m" | ||
resources: | ||
requests: | ||
memory: "10Gi" | ||
cpu: "4000m" | ||
limits: | ||
memory: "10Gi" | ||
cpu: "4000m" | ||
tty: true | ||
command: | ||
- cat | ||
nodeSelector: | ||
eks.amazonaws.com/nodegroup: eks-oss-presto-dynamic-managed-ng | ||
serviceAccountName: oss-agent | ||
containers: | ||
- name: maven | ||
image: maven:3.8.6-openjdk-8-slim | ||
env: | ||
- name: MAVEN_OPTS | ||
value: "-Xmx8000m -Xms8000m" | ||
resources: | ||
requests: | ||
memory: "10Gi" | ||
cpu: "4000m" | ||
limits: | ||
memory: "10Gi" | ||
cpu: "4000m" | ||
tty: true | ||
command: | ||
- cat | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/sh | ||
# Licensed 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. | ||
|
||
echo "node.id=$HOSTNAME" >> /opt/presto-server/etc/node.properties | ||
|
||
# Check for the reason of setting split_preload_per_driver: | ||
# https://github.com/prestodb/presto/issues/20020#issuecomment-1785083459 | ||
GLOG_logtostderr=1 presto_server \ | ||
--etc-dir=/opt/presto-server/etc \ | ||
2>&1 | tee /var/log/presto-server/console.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
mutable-config=true | ||
expression.eval_simplified=false | ||
max_split_preload_per_driver=0 |