Skip to content

Commit

Permalink
update doop to hdp-2.3, add hadoop builder
Browse files Browse the repository at this point in the history
  • Loading branch information
sroegner committed Sep 4, 2015
1 parent 9035d53 commit c20154d
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 1 deletion.
24 changes: 24 additions & 0 deletions apache-hadoop-build/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM centos:7
MAINTAINER Steffen Roegner "steffen.roegner@gmail.com"
USER root

ENV JAVA_HOME=/usr
ENV REFRESHED_AT 2015-09-03
ENV M2_HOME=/usr/local

RUN rpm -ivh http://epel.mirror.constant.com/7/x86_64/e/epel-release-7-5.noarch.rpm; \
yum -y -q upgrade; \
yum -y install python-pip snappy lzo rsync which tar bind-utils java-1.7.0-openjdk-devel unzip bzip2; \
yum clean all

RUN yum -y install gcc automake zlib-devel openssl-devel autoreconf
RUN cd /usr/local && curl -L http://www.us.apache.org/dist/maven/maven-3/3.3.3/binaries/apache-maven-3.3.3-bin.tar.gz | tar xz --strip-components=1
RUN mkdir /protoc && cd /protoc && curl -L https://github.com/google/protobuf/archive/v2.5.0.tar.gz | tar xz --strip-components=1 && \
./autogen.sh; ./configure --prefix=/usr; make; make install;
protoc --version
RUN cd /protoc/java && /usr/local/bin/mvn install


ADD build_hadoop.sh /

RUN chmod 755 /build_hadoop.sh
5 changes: 5 additions & 0 deletions apache-hadoop-build/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include ../shared/Makefile.vars
include ../shared/Makefile

hadoop:
$(DOCKER_CMD) run ${tag} /build_hadoop.sh 2.7.1
13 changes: 13 additions & 0 deletions apache-hadoop-build/build_hadoop.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

VERSION=${1:-2.7.1}
BUILD_DIR=/hadoop_build
HADOOP_URL=http://apache.osuosl.org/hadoop/common/hadoop-${VERSION}/hadoop-${VERSION}-src.tar.gz

rm -rf $BUILD_DIR
mkdir -p $BUILD_DIR
cd $BUILD_DIR
curl -L $HADOOP_URL | tar xz --strip-components=1
ls -l
/usr/local/bin/mvn package -Pdist,native -DskipTests -Dmaven.test.skip -Dtar

2 changes: 1 addition & 1 deletion doop/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ RUN rpm -ivh http://epel.mirror.constant.com/7/x86_64/e/epel-release-7-5.noarch.
yum clean all; \
pip install supervisor

RUN curl -L http://public-repo-1.hortonworks.com/HDP/centos6/2.x/updates/2.2.4.2/hdp.repo -o /etc/yum.repos.d/hdp.repo; \
RUN curl -L http://public-repo-1.hortonworks.com/HDP/centos6/2.x/updates/2.3.0.0/hdp.repo -o /etc/yum.repos.d/hdp.repo; \
yum -y install hadoop hadoop-hdfs hadoop-libhdfs hadoop-yarn hadoop-mapreduce hadoop-client zookeeper

RUN mkdir -p /data1/hdfs /data1/mapred /data1/yarn /var/log/hadoop /var/log/hadoop-yarn /var/log/supervisor /var/log/consul /var/lib/consul/data /var/lib/consul/ui /etc/consul /etc/consul-leader /var/lib/zookeeper; \
Expand Down

0 comments on commit c20154d

Please sign in to comment.