-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[native] PrestoCpp build from source pipeline #18572
[native] PrestoCpp build from source pipeline #18572
Conversation
3f862d5
to
7d539c2
Compare
@majetideepak what do you think |
CC: @mshang816 @majetideepak Michael, Deepak, would you take a look? |
CC: @raulcd |
CC: @kgpai |
This pipeline builds whole PrestoCpp from source in a container. I almost finished modifying the branch from which it is being build now to be included in this PR. I will finish the Job in 2-3 days from now as there is a freed day tomorrow in Poland :) edit: here is the branch: master...Mionsz:presto:private/mlinkiew/docker_release_build_work |
@mbasmanova I have got first reply from user that managed to build prestoCpp from source using this script - #18497 |
Nice. What did they say? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Mionsz ! Thanks! I tried to build using the README but should we refer on the README to build using the build-images.sh
script or using the Makefile
target directly instead of the docker command manually? I tried to follow the README to build but for example there's no reference on how to build the second image (release-dockerfile/Dockerfile
). I'll give a try to build using the provided Makefile target instead of following the README
.
presto-native-execution/scripts/release-centos-dockerfile/README.md
Outdated
Show resolved
Hide resolved
presto-native-execution/scripts/release-centos-dockerfile/README.md
Outdated
Show resolved
Hide resolved
presto-native-execution/scripts/release-centos-dockerfile/README.md
Outdated
Show resolved
Hide resolved
presto-native-execution/scripts/release-centos-dockerfile/README.md
Outdated
Show resolved
Hide resolved
They have managed to build the prestocpp using make command :) |
96cf333
to
beab4d3
Compare
@raulcd I have dramatically simplified the process - can you take a look? |
63bbf72
to
efac05f
Compare
|
24f3d59
to
048bb77
Compare
I have built successfully using |
presto-native-execution/scripts/release-centos-dockerfile/opt/entrypoint.sh
Outdated
Show resolved
Hide resolved
presto-native-execution/scripts/release-centos-dockerfile/opt/entrypoint.sh
Outdated
Show resolved
Hide resolved
presto-native-execution/scripts/release-centos-dockerfile/opt/entrypoint.sh
Outdated
Show resolved
Hide resolved
presto-native-execution/scripts/release-centos-dockerfile/opt/entrypoint.sh
Outdated
Show resolved
Hide resolved
@mbasmanova @majetideepak @raulcd @kgpai are we considering moving this forward and addressing issues in new PR as this is becoming big and hard to maintain? |
@kesavkolla Try with this build and latest commits as those fixes lots of possible issues |
@Mionsz Thanks, I get another failure now though :
This happens when building presto_native after velox. Recently some changes readded folly to the setup so I believe thats the reason for this failure.
|
Nah, you should fetch the repository and use this commit for building - i have fixed this couple of hours ago. They have reverted the folly build in scripting - so the |
Hi, I've been able to build the current PR on an Ubuntu 22.04.
Executing:
I only had to modify
When running the container using:
I got the following error:
The folder
I am confused because if I check the build logs folly seems to be installed as a system dependency as per log when building velox:
and inside the container I can see:
|
@raulcd Could you try building it now? I have made simple fix. There is a real need of pipeline between Velox and PrestoCpp so that one does not break another, this starts to get annoying as main focus seems like keeping up with and fixing the breaking changes :-/ |
@Mionsz I was able to build the docker image fine with your latest changes. I am going to test the image out. |
I have tried and I can run presto now. I had to limit the |
@raulcd no problem, I am glad it helped :-)! |
@Mionsz yes. I added this to
|
@raulcd check the common.sh and entrypoint.sh now :-). I have added automated way for handling the memory 32 GB constrain. Leaving the ENV variable undefined allows script for probing a valid for runtime machine configuration by trying to lower node memory starting from 32 down to 4. |
Fully automated build process for PrestoCpp and Velox from source. README file added for clarification. Signed-off-by: Linkiewicz, Milosz <milosz.linkiewicz@intel.com>
…andline flags provided nor config file mounted. Fixes referencing reviewers suggestions FBThrift paths issue fix Added python six required dependency for FBThrift Add cache registry parameter for base image. Added MacOS scripting full support GitHub SSH cloned repository origin support Minor improvements Co-authored-by: Raúl Cumplido <raulcumplido@gmail.com> Signed-off-by: Linkiewicz, Milosz <milosz.linkiewicz@intel.com>
Signed-off-by: Linkiewicz, Milosz <milosz.linkiewicz@intel.com>
Due to high requirements for memory from PrestoCpp side script for preflight checking have been introduced. In case of user defined values for memory the constrains are stith For default value script tries to lower 32GB to match hardware Signed-off-by: Linkiewicz, Milosz <milosz.linkiewicz@intel.com>
9cd5d50
to
3d3a92d
Compare
@Mionsz Was able to test this out and works as expected. |
Could you review @kgpai ? |
@Mionsz Can you fix/validate that the other modules failure is unrelated ? |
@kgpai Yes. Let us wait for the build result and In case something failed I will check/fix it. |
@kgpai The only one seems to have an issue is a Maven JAVA test. It is totally unrelated as no changes beyond presto-native-execution were made: Edit: BTW other branches occurs have passed this but still have error, why?: |
@kgpai Notice there is no longer warning/issue with fbthrift present in other builds: https://github.com/prestodb/presto/actions/runs/3566915657/jobs/5993964104#step:8:67 -- Found FBThrift: /usr/local https://github.com/prestodb/presto/actions/runs/3566313044/jobs/5992587501#step:8:66 CMake Warning at CMakeLists.txt:159 (find_package):
By not providing "FindFBTHRIFT.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "FBTHRIFT",
but CMake did not find one.
Could not find a package configuration file provided by "FBTHRIFT" with any
of the following names:
FBTHRIFTConfig.cmake
fbthrift-config.cmake
Add the installation prefix of "FBTHRIFT" to CMAKE_PREFIX_PATH or set
"FBTHRIFT_DIR" to a directory containing one of the above files. If
"FBTHRIFT" provides a separate development package or SDK, be sure it has
been installed. |
@kgpai all other green :-) |
Fully automated build from source process proposal for presto-native-execution (PrestoCpp and Velox).
README file added for clarification. appreciate any and all of the feedback.
Prestissimo - Dockerfile build
Practical Velox implementation using PrestoCpp
Prestissimo, marked in PrestoDB GitHub repository as 'presto-native-execution', is effort of making PrestoDB even better using Velox library as a starting point. Both of mentioned - PrestoCpp and Velox - are mainly written using low level
C
andC++ 17
languages, which makes the build-from-scratch process humongously complicated. To make this process simple, Intel Cloud Native Data Services Team is introducing 3-stage, fully automated Docker build process based on unmodified project GitHub repository.Quick Start
1. Clone this repository
2. (Optional) Define and export Docker registry, image name and image tag variables
Type in you console, changing variables values to meet your needs:
3. Make sure Docker daemon is running
(Ubuntu users) Type in your console:
4. Build Dockerfile repo
Type in your console:
cd prestodb/presto-native-execution make runtime-container
The process is fully automated and require no interaction for user. The process of building images for the first time can take up to couple of hours (~1-2h using 10 processor cores).
5. Run container
Depending on values you have set the container tag is defined as
PRESTO_CPP_TAG="${IMAGE_REGISTRY}${IMAGE_NAME}:${IMAGE_TAG}"
for default values this will be just:
PRESTO_CPP_TAG=presto/prestissimo-avx-centos:latest
to run container build with default tag execute:
to run container interactively, not executing entrypoint file:
docker run -it --entrypoint=/bin/bash "presto/prestissimo-avx-centos:latest"
Container manual build
For manual build outside Intel network or without access to Cloud Native Data Services Poland Docker registry follow the steps bellow.
In you terminal - with the same session that you want to build the images - define and export environment variables:
Where
IMAGE_NAME
andIMAGE_TAG
will be the prestissimo release image name and tag,IMAGE_REGISTRY
will be the registry that the image will be tagged with and witch will be used to download the images from previous stages in case there are no cached images locally. TheCPU_TARGET
will be unchanged for most of the cases, for more info read the Velox documentation. ThePRESTODB_REPOSITORY
andPRESTODB_CHECKOUT
will be used as a build repository and branch inside the container. You can set them manually or as provided using git commands.Then for example to build containers when being behind a proxy server, change dir to and type:
Build process - more info -
prestissimo
(with artifacts ~35 GB, without ~10 GB)Most of runtime and build time dependencies are downloaded, configured and installed in this step. The result from this step is a starting point for both second and third stage. This container will be build 'once per breaking change' in any of repositories. It can be used as starting point for Ci/Cd integrated systems.
This step install Maven, Java 8, Python3-Dev, libboost-dev and lots of other massive frameworks, libraries and applications and ensures that all of steps from 2 stage will run with no errors.
On-top of container from step 1 repository is initialized, Velox and submodules are updated, adapters, connectors and side-dependencies are build and configured. PrestoDB native, full repository build, using Meta wrapper mvnw for Maven is being done. After all of those partial steps, make and build are being run for PrestoCpp and Velox with Parquet, ORC, Hive connector with Thrift with S3-EMRFS filesystem implementation (schema
s3://
) and Hadoop filesystem implementation.Release container build - mostly with only the must-have runtime files, including presto_server build presto executable and some libraries. What will be used in the final released container depends on user needs and can be adjusted.
Prestissimo - runtime configuration and settings
Presto server with all dependencies can be found inside
/opt/presto/
, runtime name ispresto_server
. There are 2 ways of starting PrestoCpp using provided entry point/opt/entrypoint.sh
.1) Quick start - pass parameters to entrypoint
This is valid when running using docker and using kubernetes. It is not advised to use this method. User should prefer mounting configuration files using Kubernetes.
2) Using in Kubernetes environment:
Mount config file inside a container as
/opt/presto/node.properties.template
. Replace each variable with you configuration values or leave it as is:Mount config file inside a container as
/opt/presto/config.properties.template
. Replace each variable with you configuration values:3) Hive-Metastore connector and S3 configuration:
For minimum required configuration just mount file
/opt/presto/catalog/hive.properties
inside container at give path (fillhive.metastore.uri
with you metastore endpoint address):Setting required by S3 connector and Velox query engine, replace with your values, reefer to presto hive connector settings help:
Signed-off-by: Linkiewicz, Milosz milosz.linkiewicz@intel.com