Skip to content
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

Use presto-oss to tag/commit on deploy #52

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,8 @@ install: make ${IMAGE_TO_BUILD}
script: make test IMAGE_TO_TEST=${IMAGE_TO_TEST}

before_deploy:
# decrypt the github deploy key
- openssl aes-256-cbc -K $encrypted_cd2beb64619c_key -iv $encrypted_cd2beb64619c_iv
-in .travis/github_tags_push_deploy_key.enc -out .travis/github_tags_push_deploy_key -d
- chmod 600 .travis/github_tags_push_deploy_key
- eval "$(ssh-agent -s)"
- ssh-add .travis/github_tags_push_deploy_key
- git config --global user.email "[email protected]" && git config --global user.name "Presto Bot"
- echo "machine github.com login presto-oss password ${PRESTOOSS_PAT} > ~/.netrc
- docker login --username=${DOCKERHUB_LOGIN} --password=${DOCKERHUB_PASSWORD}

# Publish snapshots to Dockerhub for commits tagged `latest-snapshot-*`
Expand Down
Binary file removed .travis/github_tags_push_deploy_key.enc
Binary file not shown.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ ORGDIR=prestodb
# indirectly from this one, and you should pass those variables to the
# Dockerfiles using ARG and --build-arg.
#
JDK_URL := http://download.oracle.com/otn-pub/java/jdk/8u181-b13/96a7b8442fe848ef90c96a2fad6ed6d1/jdk-8u181-linux-x64.rpm
JDK_PATH := /usr/java/jdk1.8.0_181-amd64
JDK_URL := https://cdn.azul.com/zulu/bin/zulu8.52.0.23-ca-jdk8.0.282-linux_x64.tar.gz
JDK_PATH := /usr/java/zulu8.52.0.23-ca-jdk8.0.282-linux_x64
JDK_PATH_BUILD_ARGS := \
--build-arg JDK_PATH=$(JDK_PATH)

Expand Down
2 changes: 1 addition & 1 deletion prestodb/cdh5.12-hive/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ MAINTAINER Presto community <https://prestodb.io/community.html>
RUN ln -snf "/usr/share/zoneinfo/Asia/Kathmandu" /etc/localtime && echo "Asia/Kathmandu" > /etc/timezone

# Setup CDH repo, pin the CDH distribution to a concrete version
RUN wget -nv https://archive.cloudera.com/cdh5/redhat/6/x86_64/cdh/cloudera-cdh5.repo -P /etc/yum.repos.d \
RUN wget -v https://archive.cloudera.com/cdh5/redhat/6/x86_64/cdh/cloudera-cdh5.repo -P /etc/yum.repos.d \
&& rpm --import https://archive.cloudera.com/cdh5/redhat/6/x86_64/cdh/RPM-GPG-KEY-cloudera \
&& sed -i '/^baseurl=/c\baseurl=https://archive.cloudera.com/cdh5/redhat/6/x86_64/cdh/5.12.2/' /etc/yum.repos.d/cloudera-cdh5.repo

Expand Down
25 changes: 25 additions & 0 deletions prestodb/centos6-oj8/CentOS-Base.repo
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[base]
name=CentOS-$releasever - Base
# mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
# baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
baseurl=https://vault.centos.org/6.10/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

# released updates
[updates]
name=CentOS-$releasever - Updates
# mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
# baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
baseurl=https://vault.centos.org/6.10/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

# additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
# mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
# baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
baseurl=https://vault.centos.org/6.10/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
33 changes: 9 additions & 24 deletions prestodb/centos6-oj8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,36 +16,21 @@ MAINTAINER Presto community <https://prestodb.io/community.html>
ARG JDK_URL
ARG JDK_PATH

COPY CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo

# Install Oracle Java and presto-admin dependences (already has python 2.6)
RUN \
set -xeu && \
yum install -y wget && \
# install and trim Oracle JDK
wget -nv --header "Cookie: oraclelicense=accept-securebackup-cookie" $JDK_URL -O jdk.rpm && \
rpm -ivh jdk.rpm && rm jdk.rpm && \
rm -r $JDK_PATH/*src.zip \
$JDK_PATH/lib/missioncontrol \
$JDK_PATH/lib/visualvm \
$JDK_PATH/lib/*javafx* \
$JDK_PATH/jre/lib/plugin.jar \
$JDK_PATH/jre/lib/ext/jfxrt.jar \
$JDK_PATH/jre/bin/javaws \
$JDK_PATH/jre/lib/javaws.jar \
$JDK_PATH/jre/lib/desktop \
$JDK_PATH/jre/plugin \
$JDK_PATH/jre/lib/deploy* \
$JDK_PATH/jre/lib/*javafx* \
$JDK_PATH/jre/lib/*jfx* \
$JDK_PATH/jre/lib/amd64/libdecora_sse.so \
$JDK_PATH/jre/lib/amd64/libprism_*.so \
$JDK_PATH/jre/lib/amd64/libfxplugins.so \
$JDK_PATH/jre/lib/amd64/libglass.so \
$JDK_PATH/jre/lib/amd64/libgstreamer-lite.so \
$JDK_PATH/jre/lib/amd64/libjavafx*.so \
$JDK_PATH/jre/lib/amd64/libjfx*.so && \
\
wget -nv $JDK_URL -O jdk.tgz && \
mkdir -p $JDK_PATH && \
tar xvfz jdk.tgz -C $JDK_PATH --strip-components=1 && \
$JDK_PATH/bin/java -version && \
# make java fixed (so further layers don't accidentally override it)
update-alternatives --set java $JDK_PATH/jre/bin/java && \
update-alternatives --help && \
alternatives --help && \
update-alternatives --install /usr/local/bin/java java $JDK_PATH/jre/bin/java 0 && \
\
# install supervisor
yum install -y setuptools epel-release && \
Expand Down