/
Dockerfile
71 lines (55 loc) · 2.07 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
FROM centos:centos6
MAINTAINER Dan Burkert <dan@danburkert.com>
RUN yum clean all
# Install Java 7 and Yum utils (needed for the `yum-config-manager` tool)
RUN yum install -y java-1.7.0-openjdk.x86_64 yum-utils python-setuptools
# Add the Cloudera CDH5 Yum repository
RUN yum-config-manager --add-repo http://archive.cloudera.com/cdh5/redhat/6/x86_64/cdh/5.0.3/
RUN yum-config-manager --add-repo http://rpm.datastax.com/community
RUN yum install -y --nogpgcheck \
zookeeper-server \
hadoop-hdfs-namenode \
hadoop-hdfs-datanode \
hadoop-yarn-resourcemanager \
hadoop-yarn-nodemanager \
hadoop-yarn-proxyserver \
hadoop-mapreduce \
hadoop-mapreduce-historyserver \
hbase-master \
hbase-regionserver \
jna \
dsc20 \
opscenter \
datastax-agent
# Install Hadoop configuration
ADD hadoop-conf /etc/hadoop/conf.bento
RUN alternatives --verbose --install /etc/hadoop/conf hadoop-conf /etc/hadoop/conf.bento 50
RUN alternatives --set hadoop-conf /etc/hadoop/conf.bento
# Install ZooKeeper configuration
ADD zookeeper-conf /etc/zookeeper/conf.bento
RUN alternatives --verbose --install /etc/zookeeper/conf zookeeper-conf /etc/zookeeper/conf.bento 50
RUN alternatives --set zookeeper-conf /etc/zookeeper/conf.bento
# Install HBase configuration
ADD hbase-conf /etc/hbase/conf.bento
RUN alternatives --verbose --install /etc/hbase/conf hbase-conf /etc/hbase/conf.bento 50
RUN alternatives --set hbase-conf /etc/hbase/conf.bento
# Install Cassandra configuration
ADD cassandra-conf /etc/cassandra/conf.bento
RUN alternatives --verbose --install /etc/cassandra/conf cassandra-conf /etc/cassandra/conf.bento 50
RUN alternatives --set cassandra-conf /etc/cassandra/conf.bento
# Install supervisord and configuration
RUN /usr/bin/easy_install supervisor
ADD supervisord.conf /etc/supervisor/supervisord.conf
# Format namenode
USER hdfs
RUN /usr/bin/hdfs namenode -format
# Initialize ZooKeeper
USER zookeeper
RUN /usr/bin/zookeeper-server-initialize
# Initialize HBase
ADD hbase-init /hbase-init
# Initialize mapreduce
ADD mapreduce-init /mapreduce-init
USER root
ADD start /start
CMD ["/start"]