forked from trinodb/trino
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request trinodb#11 from operator-framework/metering-master…
…-315 Update Metering master to presto 315
- Loading branch information
Showing
608 changed files
with
12,550 additions
and
5,647 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
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# | ||
# 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. | ||
# | ||
FROM centos:centos7 | ||
LABEL maintainer="Presto community <https://prestosql.io/community.html>" | ||
|
||
ENV JAVA_HOME /usr/lib/jvm/java-11 | ||
RUN \ | ||
set -xeu && \ | ||
yum -y -q update && \ | ||
yum -y -q install java-11-openjdk-devel less && \ | ||
yum -q clean all && \ | ||
rm -rf /var/cache/yum && \ | ||
rm -rf /tmp/* /var/tmp/* && \ | ||
groupadd presto --gid 1000 && \ | ||
useradd presto --uid 1000 --gid 1000 && \ | ||
mkdir -p /usr/lib/presto /data/presto && \ | ||
chown -R "presto:presto" /usr/lib/presto /data/presto | ||
|
||
ARG PRESTO_VERSION | ||
ARG CLIENT_VERSION=${PRESTO_VERSION} | ||
COPY presto-cli-${CLIENT_VERSION}-executable.jar /usr/bin/presto | ||
COPY --chown=presto:presto presto-server-${PRESTO_VERSION} /usr/lib/presto | ||
|
||
EXPOSE 8080 | ||
USER presto:presto | ||
CMD ["/usr/lib/presto/bin/run-presto"] |
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
File renamed without changes.
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,29 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euxo pipefail | ||
|
||
# Retrieve the script directory. | ||
SCRIPT_DIR="${BASH_SOURCE%/*}" | ||
cd ${SCRIPT_DIR} | ||
|
||
# Move to the root directory to run maven for current version. | ||
pushd .. | ||
PRESTO_VERSION=$(./mvnw --quiet help:evaluate -Dexpression=project.version -DforceStdout) | ||
popd | ||
|
||
WORK_DIR="$(mktemp -d)" | ||
cp ../presto-server/target/presto-server-${PRESTO_VERSION}.tar.gz ${WORK_DIR} | ||
tar -C ${WORK_DIR} -xzf ${WORK_DIR}/presto-server-${PRESTO_VERSION}.tar.gz | ||
rm ${WORK_DIR}/presto-server-${PRESTO_VERSION}.tar.gz | ||
cp -R bin default ${WORK_DIR}/presto-server-${PRESTO_VERSION} | ||
|
||
cp ../presto-cli/target/presto-cli-${PRESTO_VERSION}-executable.jar ${WORK_DIR} | ||
|
||
docker build ${WORK_DIR} -f Dockerfile --build-arg "PRESTO_VERSION=${PRESTO_VERSION}" -t "presto:${PRESTO_VERSION}" | ||
|
||
rm -r ${WORK_DIR} | ||
|
||
# Source common testing functions | ||
. container-test.sh | ||
|
||
test_container "presto:${PRESTO_VERSION}" |
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,35 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euxo pipefail | ||
|
||
# Retrieve the script directory. | ||
SCRIPT_DIR="${BASH_SOURCE%/*}" | ||
cd ${SCRIPT_DIR} | ||
|
||
if [[ $# -lt 1 ]]; then | ||
echo "Usage: $0 PRESTO_VERSION" | ||
echo "Missing PRESTO_VERSION" | ||
exit 1 | ||
fi | ||
|
||
PRESTO_VERSION=$1 | ||
PRESTO_LOCATION="https://repo1.maven.org/maven2/io/prestosql/presto-server/${PRESTO_VERSION}/presto-server-${PRESTO_VERSION}.tar.gz" | ||
CLIENT_LOCATION="https://repo1.maven.org/maven2/io/prestosql/presto-cli/${PRESTO_VERSION}/presto-cli-${PRESTO_VERSION}-executable.jar" | ||
|
||
WORK_DIR="$(mktemp -d)" | ||
curl -o ${WORK_DIR}/presto-server-${PRESTO_VERSION}.tar.gz ${PRESTO_LOCATION} | ||
tar -C ${WORK_DIR} -xzf ${WORK_DIR}/presto-server-${PRESTO_VERSION}.tar.gz | ||
rm ${WORK_DIR}/presto-server-${PRESTO_VERSION}.tar.gz | ||
cp -R bin default ${WORK_DIR}/presto-server-${PRESTO_VERSION} | ||
|
||
curl -o ${WORK_DIR}/presto-cli-${PRESTO_VERSION}-executable.jar ${CLIENT_LOCATION} | ||
chmod +x ${WORK_DIR}/presto-cli-${PRESTO_VERSION}-executable.jar | ||
|
||
docker build ${WORK_DIR} -f Dockerfile -t "presto:${PRESTO_VERSION}" --build-arg "PRESTO_VERSION=${PRESTO_VERSION}" | ||
|
||
rm -r ${WORK_DIR} | ||
|
||
# Source common testing functions | ||
. container-test.sh | ||
|
||
test_container "presto:${PRESTO_VERSION}" |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
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
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
Oops, something went wrong.