zhouyifan279 commented on code in PR #7182: URL: https://github.com/apache/kyuubi/pull/7182#discussion_r2328533552
########## build/Dockerfile.HBase: ########## @@ -0,0 +1,355 @@ +# +# 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. +# + +# This Dockerfile is for building a HBase Cluster used in testing + +# Usage: +# Run the docker command below +# docker build \ +# --build-arg APACHE_MIRROR="https://archive.apache.org/dist" \ +# --build-arg HBASE_VERSION="2.5.12" \ +# --build-arg ZK_VERSION="3.8.4" \ +# --file build/Dockerfile.HBase \ +# --tag nekyuubi/kyuubi-hbase-cluster:<tag> \ +# . +# Options: +# -f, --file this docker file +# -t, --tag the target repo and tag name +# more options can be found with -h, --help + +FROM eclipse-temurin:8-jdk-focal + +ENV DEBIAN_FRONTEND=noninteractive + +ARG HBASE_VERSION=2.5.12 +ARG APACHE_MIRROR=https://archive.apache.org/dist +ARG ZK_VERSION=3.8.1 + +ENV HBASE_HOME=/opt/hbase +ENV ZK_HOME=/opt/zookeeper +ENV JAVA_HOME=/opt/java/openjdk +ENV PATH=$PATH:$HBASE_HOME/bin + +RUN apt-get update && apt-get install -y \ + krb5-kdc \ + krb5-admin-server \ + openjdk-8-jdk \ + wget \ + supervisor \ Review Comment: Supervisor should be removed if it is not used. ########## build/Dockerfile.HBase: ########## @@ -0,0 +1,355 @@ +# +# 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. +# + +# This Dockerfile is for building a HBase Cluster used in testing + +# Usage: +# Run the docker command below +# docker build \ +# --build-arg APACHE_MIRROR="https://archive.apache.org/dist" \ +# --build-arg HBASE_VERSION="2.5.12" \ +# --build-arg ZK_VERSION="3.8.4" \ +# --file build/Dockerfile.HBase \ +# --tag nekyuubi/kyuubi-hbase-cluster:<tag> \ +# . +# Options: +# -f, --file this docker file +# -t, --tag the target repo and tag name +# more options can be found with -h, --help + +FROM eclipse-temurin:8-jdk-focal + +ENV DEBIAN_FRONTEND=noninteractive + +ARG HBASE_VERSION=2.5.12 +ARG APACHE_MIRROR=https://archive.apache.org/dist +ARG ZK_VERSION=3.8.1 + +ENV HBASE_HOME=/opt/hbase +ENV ZK_HOME=/opt/zookeeper +ENV JAVA_HOME=/opt/java/openjdk +ENV PATH=$PATH:$HBASE_HOME/bin + +RUN apt-get update && apt-get install -y \ + krb5-kdc \ + krb5-admin-server \ + openjdk-8-jdk \ + wget \ + supervisor \ + busybox \ + && mkdir /opt/busybox && \ + busybox --install /opt/busybox + +# download hbase +RUN wget -q ${APACHE_MIRROR}/hbase/${HBASE_VERSION}/hbase-${HBASE_VERSION}-bin.tar.gz && \ + tar -xzf hbase-${HBASE_VERSION}-bin.tar.gz -C /opt && \ + mv /opt/hbase-${HBASE_VERSION} ${HBASE_HOME} && \ + rm hbase-${HBASE_VERSION}-bin.tar.gz + +# download zookeeper +RUN wget -q ${APACHE_MIRROR}/zookeeper/zookeeper-${ZK_VERSION}/apache-zookeeper-${ZK_VERSION}-bin.tar.gz && \ + tar -xzf apache-zookeeper-${ZK_VERSION}-bin.tar.gz -C /opt && \ + mv /opt/apache-zookeeper-${ZK_VERSION}-bin ${ZK_HOME} && \ + rm apache-zookeeper-${ZK_VERSION}-bin.tar.gz + +# add config files +COPY <<"EOF" /etc/krb5.conf + +[libdefaults] + default_realm = TEST.ORG + dns_lookup_realm = false + dns_lookup_kdc = false + +[realms] + TEST.ORG = { + kdc = localhost:88 + } + +EOF + +COPY <<"EOF" ${HBASE_HOME}/conf/hbase-site.xml + +<configuration> + <property> + <name>hbase.cluster.distributed</name> + <value>true</value> + </property> + + <property> + <name>hbase.rootdir</name> + <value>file:///tmp/hbase-data</value> + </property> + <property> + <name>hbase.security.authentication</name> + <value>kerberos</value> + </property> + <property> + <name>hbase.master.kerberos.principal</name> + <value>hbase/localh...@test.org</value> + </property> + <property> + <name>hbase.master.keytab.file</name> + <value>/opt/hbase/conf/hbase.keytab</value> + </property> + <property> + <name>hbase.regionserver.kerberos.principal</name> + <value>hbase/localh...@test.org</value> + </property> + <property> + <name>hbase.regionserver.keytab.file</name> + <value>/opt/hbase/conf/hbase.keytab</value> + </property> + + <property> + <name>hbase.security.authorization</name> + <value>true</value> + </property> + + <property> + <name>hadoop.security.authentication</name> + <value>kerberos</value> + </property> + + <property> + <name>hbase.master.hostname</name> + <value>localhost</value> + </property> + + <property> + <name>hbase.regionserver.hostname</name> + <value>localhost</value> + </property> + + <property> + <name>hbase.unsafe.regionserver.hostname</name> + <value>localhost</value> + </property> + + <property> + <name>hbase.regionserver.ipc.address</name> + <value>0.0.0.0</value> + </property> + + <property> + <name>hbase.master.ipc.address</name> + <value>0.0.0.0</value> + </property> + + <property> + <name>hbase.zookeeper.quorum</name> + <value>localhost</value> + </property> + <property> + <name>hbase.zookeeper.property.clientPort</name> + <value>2181</value> + </property> + + <property> + <name>hbase.zookeeper.client.keytab.file</name> + <value>/opt/hbase/conf/hbase.keytab</value> + </property> + + <property> + <name>hbase.zookeeper.client.kerberos.principal</name> + <value>hbase/localh...@test.org</value> + </property> + + <property> + <name>hbase.unsafe.stream.capability.enforce</name> + <value>false</value> + </property> + + <property> + <name>hbase.coprocessor.region.classes</name> + <value>org.apache.hadoop.hbase.security.token.TokenProvider,org.apache.hadoop.hbase.security.access.AccessController</value> + </property> + + <property> + <name>hbase.coprocessor.master.classes</name> + <value>org.apache.hadoop.hbase.security.access.AccessController</value> + </property> +</configuration> + +EOF + +COPY <<"EOF" ${HBASE_HOME}/conf/core-site.xml + +<configuration> + <property> + <name>hadoop.security.authentication</name> + <value>kerberos</value> + </property> + + <property> + <name>fs.defaultFS</name> + <value>hdfs://localhost:9000</value> Review Comment: HDFS is not used. Better to remove this property to avoid confusion. ########## build/Dockerfile.HBase: ########## @@ -0,0 +1,355 @@ +# +# 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. +# + +# This Dockerfile is for building a HBase Cluster used in testing + +# Usage: +# Run the docker command below +# docker build \ +# --build-arg APACHE_MIRROR="https://archive.apache.org/dist" \ +# --build-arg HBASE_VERSION="2.5.12" \ +# --build-arg ZK_VERSION="3.8.4" \ +# --file build/Dockerfile.HBase \ +# --tag nekyuubi/kyuubi-hbase-cluster:<tag> \ +# . +# Options: +# -f, --file this docker file +# -t, --tag the target repo and tag name +# more options can be found with -h, --help + +FROM eclipse-temurin:8-jdk-focal + +ENV DEBIAN_FRONTEND=noninteractive + +ARG HBASE_VERSION=2.5.12 +ARG APACHE_MIRROR=https://archive.apache.org/dist +ARG ZK_VERSION=3.8.1 + +ENV HBASE_HOME=/opt/hbase +ENV ZK_HOME=/opt/zookeeper +ENV JAVA_HOME=/opt/java/openjdk +ENV PATH=$PATH:$HBASE_HOME/bin + +RUN apt-get update && apt-get install -y \ + krb5-kdc \ + krb5-admin-server \ + openjdk-8-jdk \ Review Comment: Base image already has a JDK 8 installed. Why install another one? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@kyuubi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@kyuubi.apache.org For additional commands, e-mail: notifications-h...@kyuubi.apache.org