You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by bh...@apache.org on 2020/06/15 16:22:48 UTC

[hbase-native-client] branch master updated: HBASE-24540: Leverage DOWNLOAD_DEPENDENCIES in docker build system (#5)

This is an automated email from the ASF dual-hosted git repository.

bharathv pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase-native-client.git


The following commit(s) were added to refs/heads/master by this push:
     new 575a3c4  HBASE-24540: Leverage DOWNLOAD_DEPENDENCIES in docker build system (#5)
575a3c4 is described below

commit 575a3c49df74f40e6e0204d2432899262fa7c53a
Author: Marc <ph...@apache.org>
AuthorDate: Mon Jun 15 12:22:40 2020 -0400

    HBASE-24540: Leverage DOWNLOAD_DEPENDENCIES in docker build system (#5)
    
    Signed-off-by: Bharath Vissapragada <bh...@apache.org>
---
 bin/copy-protobuf.sh    | 24 ---------------
 bin/copy-version.sh     | 25 ----------------
 bin/start-docker.sh     |  2 --
 docker-files/Dockerfile | 78 +++++++++----------------------------------------
 4 files changed, 14 insertions(+), 115 deletions(-)

diff --git a/bin/copy-protobuf.sh b/bin/copy-protobuf.sh
deleted file mode 100755
index 2e2a241..0000000
--- a/bin/copy-protobuf.sh
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/usr/bin/env bash
-##
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you 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.
-set -euo pipefail
-IFS=$'\n\t'
-
-BIN_DIR=$(dirname "$0")
-PB_SOURCE_DIR="${BIN_DIR}/../../hbase-protocol-shaded/src/main/protobuf/"
-PB_DEST_DIR="${BIN_DIR}/../src/hbase/if/"
-rsync -r "${PB_SOURCE_DIR}" "${PB_DEST_DIR}"
diff --git a/bin/copy-version.sh b/bin/copy-version.sh
deleted file mode 100755
index e2b707f..0000000
--- a/bin/copy-version.sh
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/usr/bin/env bash
-##
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you 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.
-set -euo pipefail
-IFS=$'\n\t'
-
-# Copy the version.h generated from hbase-common/src/saveVersion.sh script via the mvn build
-BIN_DIR=$(dirname "$0")
-VERSION_SOURCE_DIR="${BIN_DIR}/../../hbase-common/target/generated-sources/native/utils/"
-VERSION_DEST_DIR="${BIN_DIR}/../include/hbase/utils/"
-cp $VERSION_SOURCE_DIR/* $VERSION_DEST_DIR/
diff --git a/bin/start-docker.sh b/bin/start-docker.sh
index f6899a0..20db789 100755
--- a/bin/start-docker.sh
+++ b/bin/start-docker.sh
@@ -26,8 +26,6 @@ eval "$(docker-machine env dinghy)"
 BIN_DIR=$(pushd `dirname "$0"` 2>&1 > /dev/null && pwd && popd  2>&1 > /dev/null)
 BASE_DIR=$(pushd "${BIN_DIR}/../" 2>&1 > /dev/null && pwd && popd  2>&1 > /dev/null)
 
-${BIN_DIR}/copy-protobuf.sh
-${BIN_DIR}/copy-version.sh
 
 # Go into the base dir. This just makes things cleaner.
 pushd ${BASE_DIR}
diff --git a/docker-files/Dockerfile b/docker-files/Dockerfile
index 84868a9..0a735b4 100644
--- a/docker-files/Dockerfile
+++ b/docker-files/Dockerfile
@@ -27,14 +27,14 @@ ENV JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64/"
 RUN apt-get update && \
     apt-get install -y vim maven inetutils-ping python-pip doxygen graphviz clang-format valgrind \
         wget libgflags-dev libgoogle-glog-dev dh-autoreconf pkg-config libssl-dev build-essential \
-        libboost-all-dev libevent-dev libdouble-conversion-dev cmake libkrb5-dev git openjdk-8-jdk curl unzip && \
+        libboost-all-dev libevent-dev cmake libkrb5-dev git openjdk-8-jdk curl unzip google-mock libsodium-dev libdouble-conversion-dev && \
     pip install yapf && \
     apt-get -qq clean && \
     apt-get -y -qq autoremove && \
     rm -rf /var/lib/{apt,dpkg,cache,log}/ && \
     rm -rf /tmp/*
 
-RUN wget https://www.cyrusimap.org/releases/cyrus-sasl-2.1.26.tar.gz ; \
+RUN wget https://github.com/cyrusimap/cyrus-sasl/releases/download/cyrus-sasl-2.1.26/cyrus-sasl-2.1.26.tar.gz ; \
     tar zxf cyrus-sasl-2.1.26.tar.gz ; \
     cd cyrus-sasl-2.1.26 ; \
     ./configure ; \
@@ -42,6 +42,16 @@ RUN wget https://www.cyrusimap.org/releases/cyrus-sasl-2.1.26.tar.gz ; \
     make install ;\
     cp /usr/local/lib/sasl2/* /usr/lib/sasl2/
 
+## Install Google Test to support 
+RUN wget https://github.com/google/googletest/archive/release-1.8.0.tar.gz && \
+  	tar zxf release-1.8.0.tar.gz && \
+  	rm -f release-1.8.0.tar.gz && \
+  	mv googletest-release-1.8.0 gtest && \
+  	cd gtest && \
+  	cmake . && \
+  	make -j4 && \
+ 	make install
+
 RUN apt-get update && \
     apt-get install -y debconf-utils && \
     echo "krb5-config krb5-config/kerberos_servers string localhost" | debconf-set-selections ; \
@@ -57,72 +67,12 @@ RUN apt-get update && \
     echo "admin" >> /tmp/krb-princ.pass ; \
     kadmin.local < /tmp/krb-princ.pass ; \
     echo 'addprinc hbase/securecluster' > /tmp/krb-princ.pass; echo 'admin' >> /tmp/krb-princ.pass ; \
-    rm hbase-host.keytab ; echo 'admin' >> /tmp/krb-princ.pass ; \
+    rm -f hbase-host.keytab ; echo 'admin' >> /tmp/krb-princ.pass ; \
     echo 'xst -k hbase-host.keytab hbase/securecluster@EXAMPLE.COM' >> /tmp/krb-princ.pass ; \
     kadmin.local < /tmp/krb-princ.pass ;
+ 
 COPY docker-files/krb5.conf /etc
 
-RUN git clone https://github.com/google/protobuf.git /usr/src/protobuf && \
-  cd /usr/src/protobuf/ && \
-  git checkout 3.5.1.1 && \
-  mkdir gmock && \
-  ldconfig && \
-  ./autogen.sh && \
-  ./configure && \
-  make -j4 && \
-  make install && \ 
-  make clean && \
-  rm -rf .git* && \
-  cd /usr/src && \
-  wget https://archive.apache.org/dist/zookeeper/zookeeper-3.4.8/zookeeper-3.4.8.tar.gz && \
-  tar zxf zookeeper-3.4.8.tar.gz && \ 
-  rm -rf zookeeper-3.4.8.tar.gz && \
-  cd zookeeper-3.4.8 && \
-  cd src/c && \
-  ldconfig && \
-  ./configure && \
-  make -j4 && \
-  make install && \
-  make clean && \
-  ldconfig
-
-# Update folly. `make check` removed due to a failing test, explicitly installing gtest ourselves
-RUN cd /usr/src/ && \
-  ver=2017.09.04.00 && \
-  wget https://github.com/facebook/folly/archive/v$ver.tar.gz -O folly-$ver.tar.gz && \
-  tar zxf folly-$ver.tar.gz && \
-  rm -rf folly-$ver.tar.gz && \
-  cd folly-$ver/folly/test && \
-  wget https://github.com/google/googletest/archive/release-1.8.0.tar.gz && \
-  tar zxf release-1.8.0.tar.gz && \
-  rm -f release-1.8.0.tar.gz && \
-  mv googletest-release-1.8.0 gtest && \
-  cd gtest && \
-  cmake . && \
-  make -j4 && \
-  make install && \
-  cd ../.. && \
-  ldconfig && \
-  autoreconf -ivf && \
-  ./configure && \
-  make -j4 && \
-  make install && \
-  make clean
-
-# Update wangle
-RUN cd /usr/src/ && \
-  ver=2017.09.04.00 && \
-  wget https://github.com/facebook/wangle/archive/v$ver.tar.gz -O wangle-$ver.tar.gz && \
-  tar zxf wangle-$ver.tar.gz && \
-  rm -rf wangle-$ver.tar.gz && \
-  cd wangle-$ver/wangle && \
-  ldconfig && \
-  cmake . -DBUILD_TESTS=OFF  && \
-  make -j4 && \
-  ctest && \
-  make install && \
-  make clean
-
 RUN echo "enabled=1" >> /etc/default/apport
 
 ENTRYPOINT /usr/sbin/krb5kdc -P /var/run/krb5kdc.pid && echo "/tmp/core.%h.%e.%t" >> /proc/sys/kernel/core_pattern && sysctl -p && ulimit -c unlimited && /bin/bash