Skip to content

Commit

Permalink
Build following Kudu documentation, Kudu 1.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinWeindel committed Nov 1, 2018
1 parent da8f926 commit 76ec346
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 28 deletions.
57 changes: 34 additions & 23 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,29 +1,40 @@
FROM centos:7

ARG KUDU_VERSION=1.7.1
ARG KUDU_VERSION=1.8.0
ARG PARALLEL=4
ARG APACHE_MIRROR="http://mirror.netcologne.de/apache.org"

ENV KUDU=apache-kudu-${KUDU_VERSION}
ENV KUDU_URL="http://www.apache.org/closer.cgi?filename=kudu/${KUDU_VERSION}/${KUDU}.tar.gz&action=download"

ADD . /repo

RUN yum install -y autoconf automake cyrus-sasl-devel cyrus-sasl-gssapi \
cyrus-sasl-plain gcc gcc-c++ gdb git krb5-server krb5-workstation libtool \
make openssl-devel patch pkgconfig redhat-lsb-core rsync unzip vim-common \
which flex java-1.8.0-openjdk-devel

ADD $KUDU_URL /tmp/${KUDU}.tar.gz
RUN yum -y install autoconf automake cyrus-sasl-devel cyrus-sasl-gssapi \
cyrus-sasl-plain flex gcc gcc-c++ gdb git java-1.8.0-openjdk-devel \
krb5-server krb5-workstation libtool make openssl-devel patch pkgconfig \
redhat-lsb-core rsync unzip vim-common which

RUN echo "Downloading $KUDU_URL" \
&& cd /tmp \
&& tar xf ${KUDU}.tar.gz \
&& /repo/build-kudu \
&& rm -r /tmp/*


COPY ./entrypoint /

WORKDIR /app
ENV KUDU=apache-kudu-${KUDU_VERSION}
ENV KUDU_URL="${APACHE_MIRROR}/kudu/${KUDU_VERSION}/${KUDU}.tar.gz"

# https://kudu.apache.org/docs/installation.html#build_from_source
RUN cd /tmp &&\
curl $KUDU_URL | tar -xz &&\
cd ${KUDU} &&\
build-support/enable_devtoolset.sh thirdparty/build-if-necessary.sh &&\
mkdir -p build/release &&\
cd build/release &&\
../../build-support/enable_devtoolset.sh \
../../thirdparty/installed/common/bin/cmake \
-DCMAKE_BUILD_TYPE=release \
../.. &&\
make -j${PARALLEL} &&\
mkdir -p /opt/kudu &&\
make DESTDIR=/opt/kudu install &&\
cp bin/kudu /opt/kudu/ &&\
cp bin/kudu-tserver /opt/kudu/ &&\
cp bin/kudu-master /opt/kudu/ &&\
cp -r ../../www /opt/kudu/ &&\
rm -rf /tmp/${KUDU}

WORKDIR /opt/kudu

COPY ./entrypoint /opt/kudu

ENTRYPOINT ["/opt/kudu/entrypoint"]

ENTRYPOINT ["/entrypoint"]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ docker run -d --rm --name apache-kudu -p 7051:7051 -p 7050:7050 -p 8051:8051 -p

```
docker build . -t usuresearch/apache-kudu
docker tag usuresearch/apache-kudu usuresearch/apache-kudu:1.7.1
docker tag usuresearch/apache-kudu usuresearch/apache-kudu:1.8.0
```
8 changes: 4 additions & 4 deletions entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ KUDU_MASTER=localhost
KUDU_MASTER_OPTS="--logtostderr \
--fs_wal_dir=/var/lib/kudu/master \
--fs_data_dirs=/var/lib/kudu/master \
--webserver_doc_root=/app/www \
--webserver_doc_root=/opt/kudu/www \
--use_hybrid_clock=false"
KUDU_TSERVER_OPTS="--logtostderr \
--fs_wal_dir=/var/lib/kudu/tserver \
--fs_data_dirs=/var/lib/kudu/tserver \
--webserver_doc_root=/app/www \
--webserver_doc_root=/opt/kudu/www \
--use_hybrid_clock=false"

/app/kudu-master -fs_wal_dir /var/lib/kudu/master ${KUDU_MASTER_OPTS} &
/opt/kudu/kudu-master -fs_wal_dir /var/lib/kudu/master ${KUDU_MASTER_OPTS} &
sleep 5s
/app/kudu-tserver -fs_wal_dir /var/lib/kudu/tserver \
/opt/kudu/kudu-tserver -fs_wal_dir /var/lib/kudu/tserver \
-tserver_master_addrs ${KUDU_MASTER} ${KUDU_TSERVER_OPTS}

0 comments on commit 76ec346

Please sign in to comment.