You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by ma...@apache.org on 2017/08/25 19:11:38 UTC

atlas git commit: ATLAS:2012: Dockerfile to build and run Atlas

Repository: atlas
Updated Branches:
  refs/heads/master 868633398 -> c6155816c


ATLAS:2012: Dockerfile to build and run Atlas

Signed-off-by: Madhan Neethiraj <ma...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/atlas/repo
Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/c6155816
Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/c6155816
Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/c6155816

Branch: refs/heads/master
Commit: c6155816c51ebdbce8bef0069a8bccca1418c7d0
Parents: 8686333
Author: Nigel Jones <ni...@gmail.com>
Authored: Fri Aug 25 12:03:44 2017 -0700
Committer: Madhan Neethiraj <ma...@apache.org>
Committed: Fri Aug 25 12:03:54 2017 -0700

----------------------------------------------------------------------
 dev-support/atlas-docker/Dockerfile | 52 ++++++++++++++++++++++++++++++++
 dev-support/atlas-docker/README.md  | 47 +++++++++++++++++++++++++++++
 2 files changed, 99 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/atlas/blob/c6155816/dev-support/atlas-docker/Dockerfile
----------------------------------------------------------------------
diff --git a/dev-support/atlas-docker/Dockerfile b/dev-support/atlas-docker/Dockerfile
new file mode 100644
index 0000000..4805135
--- /dev/null
+++ b/dev-support/atlas-docker/Dockerfile
@@ -0,0 +1,52 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you 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.
+
+FROM ubuntu:16.04
+
+# Install Git, which is missing from the Ubuntu base images.
+RUN apt-get update && apt-get install -y git python
+
+# Install Java.
+RUN apt-get update && apt-get install -y openjdk-8-jdk
+ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64
+
+# Install Maven.
+
+RUN apt-get update && apt-get install -y maven
+ENV MAVEN_HOME /usr/share/maven
+
+# Add Java and Maven to the path.
+ENV PATH /usr/java/bin:/usr/local/apache-maven/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+
+# Working directory
+WORKDIR /root
+
+# Pull down Atlas and build it into /root/atlas-bin.
+RUN git clone http://git.apache.org/atlas.git -b master
+
+# Remove -DskipTests if unit tests are to be included
+RUN mvn clean install -DskipTests -Pdist,embedded-hbase-solr -f ./atlas/pom.xml
+RUN mkdir -p atlas-bin
+RUN tar xzf /root/atlas/distro/target/*bin.tar.gz --strip-components 1 -C /root/atlas-bin
+
+# Set env variables, add it to the path, and start Atlas.
+ENV MANAGE_LOCAL_SOLR true
+ENV MANAGE_LOCAL_HBASE true
+ENV PATH /root/atlas-bin/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+
+EXPOSE 21000
+
+CMD ["/bin/bash", "-c", "/root/atlas-bin/bin/atlas_start.py; tail -fF /root/atlas-bin/logs/application.log"]

http://git-wip-us.apache.org/repos/asf/atlas/blob/c6155816/dev-support/atlas-docker/README.md
----------------------------------------------------------------------
diff --git a/dev-support/atlas-docker/README.md b/dev-support/atlas-docker/README.md
new file mode 100644
index 0000000..5296f05
--- /dev/null
+++ b/dev-support/atlas-docker/README.md
@@ -0,0 +1,47 @@
+<!---
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you 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.
+-->
+
+# atlas_docker
+
+## Overview
+
+The Dockerfile in this folder can be used to build a Docker image running
+the latest Atlas master branch in standalone mode. It does this by setting
+up necessary dependencies, checking out the master branch of Atlas from
+GitHub, and then building Atlas. By default, this image will start the Atlas
+on port 21000.
+
+## Usage
+
+
+1. Ensure that you have a recent version of Docker installed from
+   [docker.io](http://www.docker.io).
+2. Set this folder as your working directory.
+3. Type `docker build -t atlas_docker .` to build a Docker image called **atlas_docker**.
+   This may take 20 minutes or more the first time you run the command since it will
+   create a Maven repository inside the image as well as checkout the master branch
+   of Atlas. Note that by default unit tests are skipped, to run unit tests within
+   the image remove the '-DskipTests' in the Dockerfile
+4. When this completes successfully, you can run `docker run -it -p 21000:21000 atlas_docker`
+   to access an Atlas server running inside of a container created from the
+   **atlas_docker** image. Alternatively, you can type `docker run -it atlas_docker
+   bash` to start a container without a running Atlas. Within this environment,
+   Atlas is built in /root/atlas-bin.
+5. When you run command `docker run -it -p 21000:21000 atlas_docker` successfully, you can
+   access Atlas UI from a browser at http://localhost:21000.