-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
116 additions
and
104 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,87 @@ | ||
FROM scratch | ||
FROM ubuntu:18.04 | ||
FROM ubuntu:20.04 as build | ||
LABEL maintainer="[email protected]" | ||
ARG VERSION=2.1.0 | ||
|
||
ARG VERSION=2.2.0 | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
ENV TZ=Etc/UTC | ||
ENV MAVEN_OPTS="-Xms2g -Xmx2g" | ||
ENV JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64" | ||
|
||
RUN mkdir -p /tmp/atlas-src \ | ||
&& mkdir -p /apache-atlas \ | ||
&& mkdir -p /gremlin | ||
|
||
COPY pom.xml.patch /tmp/atlas-src/ | ||
|
||
RUN apt-get update \ | ||
&& apt-get -y upgrade \ | ||
&& apt-get -y install apt-utils \ | ||
&& apt-get -y install \ | ||
maven \ | ||
wget \ | ||
git \ | ||
python \ | ||
openjdk-8-jdk-headless \ | ||
patch \ | ||
unzip \ | ||
unzip \ | ||
&& cd /tmp \ | ||
&& wget http://mirror.linux-ia64.org/apache/atlas/${VERSION}/apache-atlas-${VERSION}-sources.tar.gz \ | ||
&& mkdir -p /opt/gremlin \ | ||
&& mkdir -p /tmp/atlas-src \ | ||
&& wget https://archive.apache.org/dist/atlas/${VERSION}/apache-atlas-${VERSION}-sources.tar.gz \ | ||
&& tar --strip 1 -xzvf apache-atlas-${VERSION}-sources.tar.gz -C /tmp/atlas-src \ | ||
&& rm apache-atlas-${VERSION}-sources.tar.gz \ | ||
&& cd /tmp/atlas-src \ | ||
&& sed -i 's/http:\/\/repo1.maven.org\/maven2/https:\/\/repo1.maven.org\/maven2/g' pom.xml \ | ||
&& export MAVEN_OPTS="-Xms2g -Xmx2g" \ | ||
&& export JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64" \ | ||
&& mvn clean -Dmaven.repo.local=/tmp/.mvn-repo -Dhttps.protocols=TLSv1.2 -DskipTests package -Pdist,embedded-hbase-solr \ | ||
&& tar -xzvf /tmp/atlas-src/distro/target/apache-atlas-${VERSION}-server.tar.gz -C /opt \ | ||
&& patch -b -f < pom.xml.patch \ | ||
&& mvn clean \ | ||
-Dmaven.repo.local=/tmp/atlas-src/.mvn-repo \ | ||
-Dhttps.protocols=TLSv1.2 \ | ||
-DskipTests \ | ||
-Drat.skip=true \ | ||
package -Pdist,embedded-hbase-solr \ | ||
&& tar --strip 1 -xzvf /tmp/atlas-src/distro/target/apache-atlas-${VERSION}-server.tar.gz -C /apache-atlas \ | ||
&& rm -Rf /tmp/atlas-src \ | ||
&& rm -Rf /tmp/.mvn-repo \ | ||
&& apt-get -y --purge remove \ | ||
maven \ | ||
git \ | ||
&& apt-get -y remove openjdk-11-jre-headless \ | ||
unzip \ | ||
&& apt-get -y autoremove \ | ||
&& apt-get -y clean | ||
|
||
VOLUME ["/opt/apache-atlas-${VERSION}/conf", "/opt/apache-atlas-${VERSION}/logs"] | ||
FROM ubuntu:20.04 | ||
LABEL maintainer="[email protected]" | ||
ARG VERSION=2.2.0 | ||
ENV JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64" | ||
|
||
COPY atlas_start.py.patch atlas_config.py.patch /opt/apache-atlas-${VERSION}/bin/ | ||
COPY --from=build /apache-atlas /apache-atlas | ||
|
||
RUN cd /opt/apache-atlas-${VERSION}/bin \ | ||
&& patch -b -f < atlas_start.py.patch \ | ||
&& patch -b -f < atlas_config.py.patch | ||
RUN apt-get update \ | ||
&& apt-get -y upgrade \ | ||
&& apt-get -y install apt-utils \ | ||
&& apt-get -y install \ | ||
maven \ | ||
wget \ | ||
python \ | ||
openjdk-8-jdk-headless \ | ||
patch | ||
|
||
COPY conf/hbase/hbase-site.xml.template /opt/apache-atlas-${VERSION}/conf/hbase/hbase-site.xml.template | ||
COPY conf/atlas-env.sh /opt/apache-atlas-${VERSION}/conf/atlas-env.sh | ||
COPY conf/hbase/hbase-site.xml.template /apache-atlas/conf/hbase/hbase-site.xml.template | ||
COPY atlas_start.py.patch atlas_config.py.patch /apache-atlas/bin/ | ||
COPY conf/atlas-env.sh /apache-atlas/conf/atlas-env.sh | ||
COPY conf/gremlin /gremlin/ | ||
|
||
COPY conf/gremlin /opt/gremlin/ | ||
WORKDIR /apache-atlas/bin | ||
RUN patch -b -f < atlas_start.py.patch \ | ||
&& patch -b -f < atlas_config.py.patch | ||
|
||
RUN cd /opt/apache-atlas-${VERSION} \ | ||
&& ./bin/atlas_start.py -setup || true | ||
WORKDIR /apache-atlas/conf | ||
RUN sed -i 's/\${atlas.log.dir}/\/apache-atlas\/logs/g' atlas-log4j.xml \ | ||
&& sed -i 's/\${atlas.log.file}/application.log/g' atlas-log4j.xml | ||
|
||
RUN cd /opt/apache-atlas-${VERSION} \ | ||
&& ./bin/atlas_start.py & \ | ||
touch /opt/apache-atlas-${VERSION}/logs/application.log \ | ||
&& tail -f /opt/apache-atlas-${VERSION}/logs/application.log | sed '/AtlasAuthenticationFilter.init(filterConfig=null)/ q' \ | ||
WORKDIR /apache-atlas/bin | ||
RUN ./atlas_start.py -setup || true | ||
RUN ./atlas_start.py & \ | ||
touch /apache-atlas/logs/application.log \ | ||
&& tail -f /apache-atlas/logs/application.log | sed '/Defaulting to local host name/ q' \ | ||
&& sleep 10 \ | ||
&& /opt/apache-atlas-${VERSION}/bin/atlas_stop.py | ||
&& ./atlas_stop.py \ | ||
&& truncate -s0 /apache-atlas/logs/application.log | ||
|
||
ENTRYPOINT ["/bin/bash", "-c", "/apache-atlas/bin/atlas_start.py; tail -fF /apache-atlas/logs/application.log"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- pom.xml.orig 2022-12-14 10:46:31.615039877 +0000 | ||
+++ pom.xml 2022-12-14 10:33:21.019600529 +0000 | ||
@@ -834,6 +834,11 @@ | ||
<name>Typesafe Repository</name> | ||
<url>http://repo.typesafe.com/typesafe/releases/</url> | ||
</repository> | ||
+ <repository> | ||
+ <id>maven-restlet</id> | ||
+ <name>Public online Restlet repository</name> | ||
+ <url>https://maven.restlet.talend.com</url> | ||
+ </repository> | ||
</repositories> | ||
|
||
<dependencyManagement> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#!/bin/sh | ||
|
||
docker exec -ti atlas /opt/apache-atlas-2.1.0/bin/atlas_stop.py | ||
docker exec -ti atlas /apache-atlas/bin/atlas_stop.py |