Docker Container Build and Run setup with foundations for adding docker integration tests. Docker images built with Hadoop 2.8.4 Hive 2.3.3 and Spark 2.3.1 and published to docker-hub
Look at quickstart document for how to setup docker and run demo
This commit is contained in:
committed by
vinoth chandar
parent
9710b5a3a6
commit
f3418e4718
14
docker/hoodie/hadoop/datanode/Dockerfile
Normal file
14
docker/hoodie/hadoop/datanode/Dockerfile
Normal file
@@ -0,0 +1,14 @@
|
||||
ARG HADOOP_VERSION=2.8.4
|
||||
ARG HADOOP_DN_PORT=50075
|
||||
FROM varadarb/hudi-hadoop_${HADOOP_VERSION}-base:latest
|
||||
|
||||
ENV HADOOP_DN_PORT ${HADOOP_DN_PORT}
|
||||
|
||||
ENV HDFS_CONF_dfs_datanode_data_dir=file:///hadoop/dfs/data
|
||||
RUN mkdir -p /hadoop/dfs/data
|
||||
VOLUME /hadoop/dfs/data
|
||||
|
||||
ADD run_dn.sh /run_dn.sh
|
||||
RUN chmod a+x /run_dn.sh
|
||||
|
||||
CMD ["/run_dn.sh"]
|
||||
89
docker/hoodie/hadoop/datanode/pom.xml
Normal file
89
docker/hoodie/hadoop/datanode/pom.xml
Normal file
@@ -0,0 +1,89 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
~ Copyright (c) 2016 Uber Technologies, Inc. (hoodie-dev-group@uber.com)
|
||||
~
|
||||
~ Licensed 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.
|
||||
-->
|
||||
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>hoodie-hadoop-docker</artifactId>
|
||||
<groupId>com.uber.hoodie</groupId>
|
||||
<version>0.4.5-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<packaging>pom</packaging>
|
||||
<artifactId>hoodie-hadoop-datanode-docker</artifactId>
|
||||
|
||||
<description>Base Docker Image with Hoodie</description>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<checkstyle.skip>true</checkstyle.skip>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.uber.hoodie</groupId>
|
||||
<artifactId>hoodie-hadoop-base-docker</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<!-- Build Docker image -->
|
||||
<plugin>
|
||||
<groupId>com.spotify</groupId>
|
||||
<artifactId>dockerfile-maven-plugin</artifactId>
|
||||
<version>${dockerfile.maven.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>tag-latest</id>
|
||||
<phase>pre-integration-test</phase>
|
||||
<goals>
|
||||
<goal>build</goal>
|
||||
<goal>tag</goal>
|
||||
<!-- <goal>push</goal> -->
|
||||
</goals>
|
||||
<configuration>
|
||||
<skip>${docker.build.skip}</skip>
|
||||
<pullNewerImage>false</pullNewerImage>
|
||||
<repository>varadarb/hudi-hadoop_${docker.hadoop.version}-datanode</repository>
|
||||
<forceTags>true</forceTags>
|
||||
<tag>latest</tag>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>tag-version</id>
|
||||
<phase>pre-integration-test</phase>
|
||||
<goals>
|
||||
<goal>build</goal>
|
||||
<goal>tag</goal>
|
||||
<!-- <goal>push</goal> -->
|
||||
</goals>
|
||||
<configuration>
|
||||
<skip>${docker.build.skip}</skip>
|
||||
<pullNewerImage>false</pullNewerImage>
|
||||
<repository>varadarb/hudi-hadoop_${docker.hadoop.version}-datanode</repository>
|
||||
<forceTags>true</forceTags>
|
||||
<tag>${project.version}</tag>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
9
docker/hoodie/hadoop/datanode/run_dn.sh
Normal file
9
docker/hoodie/hadoop/datanode/run_dn.sh
Normal file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
datadir=`echo $HDFS_CONF_dfs_datanode_data_dir | perl -pe 's#file://##'`
|
||||
if [ ! -d $datadir ]; then
|
||||
echo "Datanode data directory not found: $datadir"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
$HADOOP_PREFIX/bin/hdfs --config $HADOOP_CONF_DIR datanode
|
||||
Reference in New Issue
Block a user