mirror of
https://github.com/newnius/Dockerfiles.git
synced 2025-06-06 08:11:54 +00:00
update hbase to seperate hadoop
This commit is contained in:
parent
db2c73876f
commit
b350b8ac16
@ -1,9 +1,27 @@
|
||||
FROM newnius/hadoop:2.7.4
|
||||
FROM alpine:3.6
|
||||
|
||||
MAINTAINER Newnius <newnius.cn@gmail.com>
|
||||
|
||||
USER root
|
||||
|
||||
# Prerequisites
|
||||
RUN apk add --no-cache openssh openssl openjdk8-jre rsync bash procps
|
||||
|
||||
ENV JAVA_HOME /usr/lib/jvm/java-1.8-openjdk
|
||||
ENV PATH $PATH:$JAVA_HOME/bin
|
||||
|
||||
# Passwordless SSH
|
||||
RUN ssh-keygen -q -N "" -t dsa -f /etc/ssh/ssh_host_dsa_key
|
||||
RUN ssh-keygen -q -N "" -t rsa -f /etc/ssh/ssh_host_rsa_key
|
||||
RUN ssh-keygen -q -N "" -t rsa -f /root/.ssh/id_rsa
|
||||
RUN cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys
|
||||
|
||||
ADD ssh_config /root/.ssh/config
|
||||
RUN chmod 600 /root/.ssh/config
|
||||
RUN chown root:root /root/.ssh/config
|
||||
|
||||
RUN echo "Port 2122" >> /etc/ssh/sshd_config
|
||||
|
||||
# Install Apche HBase
|
||||
RUN wget -O apache-hbase.tar.gz http://mirrors.ocf.berkeley.edu/apache/hbase/1.2.6/hbase-1.2.6-bin.tar.gz && \
|
||||
tar xzvf apache-hbase.tar.gz -C /usr/local/ && rm apache-hbase.tar.gz
|
||||
|
@ -6,9 +6,9 @@ Run Aapache HBase with Docker
|
||||
|
||||
```bash
|
||||
docker service create \
|
||||
--name hadoop-master \
|
||||
--name hbase-master \
|
||||
--network swarm-net \
|
||||
--hostname hadoop-master \
|
||||
--hostname hbase-master \
|
||||
--replicas 1 \
|
||||
--detach=true \
|
||||
--mount type=bind,source=/etc/localtime,target=/etc/localtime \
|
||||
@ -18,9 +18,9 @@ newnius/hbase:1.2.6
|
||||
|
||||
```bash
|
||||
docker service create \
|
||||
--name hadoop-slave1 \
|
||||
--name hbase-slave1 \
|
||||
--network swarm-net \
|
||||
--hostname hadoop-slave1 \
|
||||
--hostname hbase-slave1 \
|
||||
--replicas 1 \
|
||||
--detach=true \
|
||||
--mount type=bind,source=/etc/localtime,target=/etc/localtime \
|
||||
@ -30,9 +30,9 @@ newnius/hbase:1.2.6
|
||||
|
||||
```bash
|
||||
docker service create \
|
||||
--name hadoop-slave2 \
|
||||
--name hbase-slave2 \
|
||||
--network swarm-net \
|
||||
--hostname hadoop-slave2 \
|
||||
--hostname hbase-slave2 \
|
||||
--replicas 1 \
|
||||
--detach=true \
|
||||
--mount type=bind,source=/etc/localtime,target=/etc/localtime \
|
||||
@ -42,9 +42,9 @@ newnius/hbase:1.2.6
|
||||
|
||||
```bash
|
||||
docker service create \
|
||||
--name hadoop-slave3 \
|
||||
--name hbase-slave3 \
|
||||
--network swarm-net \
|
||||
--hostname hadoop-slave3 \
|
||||
--hostname hbase-slave3 \
|
||||
--replicas 1 \
|
||||
--detach=true \
|
||||
--mount type=bind,source=/etc/localtime,target=/etc/localtime \
|
||||
|
@ -1 +1 @@
|
||||
hadoop-slave1
|
||||
hbase-slave1
|
||||
|
@ -31,7 +31,7 @@
|
||||
</property>
|
||||
<property>
|
||||
<name>hbase.master</name>
|
||||
<value>hadoop-master:60000</value>
|
||||
<value>hbase-master:60000</value>
|
||||
</property>
|
||||
<property>
|
||||
<name>hbase.zookeeper.quorum</name>
|
||||
|
@ -1,3 +1,3 @@
|
||||
hadoop-slave1
|
||||
hadoop-slave2
|
||||
hadoop-slave3
|
||||
hbase-slave1
|
||||
hbase-slave2
|
||||
hbase-slave3
|
||||
|
Loading…
Reference in New Issue
Block a user