Skip to content

Commit

Permalink
Merge pull request #16 from bolkedebruin/use_atlas_20
Browse files Browse the repository at this point in the history
Use Atlas 2.0 for integration with Amundsen
  • Loading branch information
kr7ysztof authored May 6, 2019
2 parents 6c347eb + 36db8e3 commit bfc60bf
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 11 deletions.
28 changes: 19 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,32 +1,42 @@
FROM maven:3.5.4-jdk-8 AS stage-atlas

ENV ATLAS_REPO https://www-eu.apache.org/dist/atlas/1.1.0/apache-atlas-1.1.0-sources.tar.gz
ENV ATLAS_VERSION 2.0.0
ENV TARBALL apache-atlas-${ATLAS_VERSION}-sources.tar.gz
ENV ATLAS_REPO https://dist.apache.org/repos/dist/dev/atlas/${ATLAS_VERSION}-rc0/${TARBALL}
ENV MAVEN_OPTS "-Xms2g -Xmx2g"

RUN curl ${ATLAS_REPO} -o apache-atlas-1.1.0-sources.tar.gz \
&& tar xzf apache-atlas-1.1.0-sources.tar.gz \
&& cd apache-atlas-sources-1.1.0 \
RUN curl ${ATLAS_REPO} -o ${TARBALL} \
&& tar xzf ${TARBALL} \
&& cd apache-atlas-sources-${ATLAS_VERSION} \
&& mvn clean -DskipTests package -Pdist,embedded-hbase-solr \
&& mv distro/target/apache-atlas-*-bin.tar.gz /apache-atlas.tar.gz

FROM centos:7

COPY --from=stage-atlas /apache-atlas.tar.gz /apache-atlas.tar.gz

ADD resources/entrypoint.sh /entrypoint.sh

RUN yum update -y \
&& yum install java-1.8.0-openjdk java-1.8.0-openjdk-devel python net-tools -y \
&& yum clean all
RUN groupadd hadoop && \
useradd -m -d /opt/atlas -g hadoop atlas

USER atlas

RUN cd /opt \
&& tar xzf /apache-atlas.tar.gz \
&& rm -rf /apache-atlas.tar.gz
&& tar xzf /apache-atlas.tar.gz -C /opt/atlas --strip-components=1

COPY model /tmp/model
COPY resources/atlas-setup.sh /tmp
COPY resources/credentials /tmp

COPY resources/atlas-application.properties /opt/apache-atlas-1.1.0/conf/
COPY resources/atlas-application.properties /opt/atlas/conf/

USER root
ADD resources/entrypoint.sh /entrypoint.sh
RUN rm -rf /apache-atlas.tar.gz

USER atlas

ENTRYPOINT ["sh", "-c", "/entrypoint.sh"]

Expand Down
2 changes: 1 addition & 1 deletion resources/atlas-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ if [ "$start_timeout_exceeded" = "false" ]; then

if [ ! -z "${ATLAS_PROVISION_EXAMPLES}" ]; then
# Need faketty as otherwise we cannot supply credentials
faketty /opt/apache-atlas-1.1.0/bin/quick_start.py http://localhost:21000 < /tmp/credentials
faketty /opt/atlas/bin/quick_start.py http://localhost:21000 < /tmp/credentials
echo "Done provisioning example data"
fi
else
Expand Down
2 changes: 1 addition & 1 deletion resources/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export MANAGE_LOCAL_HBASE=true
export MANAGE_LOCAL_SOLR=true
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk

opt/apache-atlas-1.1.0/bin/atlas_start.py
/opt/atlas/bin/atlas_start.py
sh /tmp/atlas-setup.sh

tail -f /dev/null

0 comments on commit bfc60bf

Please sign in to comment.