From 2ddae04bc8098e235e6148acedcbbb7f1ee6182c Mon Sep 17 00:00:00 2001 From: cwJohnPark Date: Sun, 13 Sep 2020 15:58:36 +0900 Subject: [PATCH] [#84] Fix pinpoint-hbase connection configurations --- pinpoint-hbase/Dockerfile_standalone | 32 ++++++++++++++++++ pinpoint-hbase/docker-compose.yml | 18 +++++++--- pinpoint-hbase/hbase-site-standalone.xml | 42 ++++++++++++++++++++++++ 3 files changed, 87 insertions(+), 5 deletions(-) create mode 100644 pinpoint-hbase/Dockerfile_standalone create mode 100644 pinpoint-hbase/hbase-site-standalone.xml diff --git a/pinpoint-hbase/Dockerfile_standalone b/pinpoint-hbase/Dockerfile_standalone new file mode 100644 index 0000000..6886730 --- /dev/null +++ b/pinpoint-hbase/Dockerfile_standalone @@ -0,0 +1,32 @@ +FROM java:8-jdk + +LABEL maintainer="Roy Kim " + +ARG PINPOINT_VERSION=${PINPOINT_VERSION:-2.1.0} + +ENV HBASE_REPOSITORY=http://apache.mirrors.pair.com/hbase +ENV HBASE_SUB_REPOSITORY=http://archive.apache.org/dist/hbase + +ENV HBASE_VERSION=1.2.6 +ENV BASE_DIR=/opt/hbase +ENV HBASE_HOME=${BASE_DIR}/hbase-${HBASE_VERSION} + + +COPY hbase-site-standalone.xml hbase-site.xml +COPY hbase-env.sh hbase-env.sh +COPY /build/scripts/initialize-hbase.sh /usr/local/bin/ +COPY /build/scripts/check-table.sh /usr/local/bin/ + +RUN chmod a+x /usr/local/bin/initialize-hbase.sh \ + && chmod a+x /usr/local/bin/check-table.sh \ + && mkdir -p ${BASE_DIR} \ + && cd ${BASE_DIR} \ + && curl -fSL "${HBASE_REPOSITORY}/${HBASE_VERSION}/hbase-${HBASE_VERSION}-bin.tar.gz" -o hbase.tar.gz || curl -fSL "${HBASE_SUB_REPOSITORY}/${HBASE_VERSION}/hbase-${HBASE_VERSION}-bin.tar.gz" -o hbase.tar.gz \ + && tar xfvz hbase.tar.gz \ + && mv ../../hbase-site.xml ../../${HBASE_HOME}/conf/hbase-site.xml \ + && mv ../../hbase-env.sh ../../${HBASE_HOME}/conf/hbase-env.sh \ + && curl -SL "https://raw.githubusercontent.com/naver/pinpoint/v${PINPOINT_VERSION}/hbase/scripts/hbase-create.hbase" -o ${BASE_DIR}/hbase-create.hbase + +VOLUME ["/home/pinpoint/hbase", "/home/pinpoint/zookeeper"] + +CMD /usr/local/bin/initialize-hbase.sh && tail -f $HBASE_HOME/logs/* diff --git a/pinpoint-hbase/docker-compose.yml b/pinpoint-hbase/docker-compose.yml index c6e3a0b..f31cc78 100644 --- a/pinpoint-hbase/docker-compose.yml +++ b/pinpoint-hbase/docker-compose.yml @@ -4,7 +4,7 @@ services: pinpoint-hbase: build: context: . - dockerfile: Dockerfile + dockerfile: Dockerfile_standalone args: - PINPOINT_VERSION=${PINPOINT_VERSION} @@ -15,20 +15,28 @@ services: - /home/pinpoint/hbase - /home/pinpoint/zookeeper expose: -# # zookeeper -# - "2181" # HBase Master API port - "60000" # HBase Master Web UI - "16010" # Regionserver API port - - "60020" + - "16201" # HBase Regionserver web UI - "16030" + # Regionserver web UI port + - "16301" ports: - "${EXTERNAL_HBASE_PORT:-2181}:2181" - "60000:60000" - "16010:16010" - - "60020:60020" - "16030:16030" + - "16301:16301" + - "16201:16201" restart: always + networks: + - pinpoint + +networks: + pinpoint: + external: + name: pinpoint-zookeeper_pinpoint diff --git a/pinpoint-hbase/hbase-site-standalone.xml b/pinpoint-hbase/hbase-site-standalone.xml new file mode 100644 index 0000000..ea3658b --- /dev/null +++ b/pinpoint-hbase/hbase-site-standalone.xml @@ -0,0 +1,42 @@ + + + hbase.rootdir + file:///home/pinpoint/hbase + + + hbase.cluster.distributed + true + + + zookeeper.znode.parent + /hbase + + + hbase.zookeeper.quorum + zoo1,zoo2,zoo3 + + + hbase.zookeeper.property.clientPort + 2181 + + + hbase.master.port + 60000 + + + hbase.regionserver.port + 16201 + + + hbase.regionserver.hostname + localhost + + + hbase.regionserver.ipc.address + 0.0.0.0 + + + hbase.master.ipc.address + 0.0.0.0 + +