├── conf
├── gremlin
│ ├── run-gremlin-console.sh
│ ├── start-gremlin-server.sh
│ ├── janusgraph-hbase-solr.properties
│ ├── gremlin-server-atlas.yaml
│ └── install-gremlin.sh
├── hbase
│ └── hbase-site.xml.template
└── atlas-env.sh
├── pom.xml.patch
├── atlas_start.py.patch
├── Dockerfile
├── atlas_config.py.patch
├── README.md
└── LICENSE.txt
/conf/gremlin/run-gremlin-console.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | cd /opt/apache-tinkerpop-gremlin-console-3.4.6
4 | ./bin/gremlin.sh
--------------------------------------------------------------------------------
/conf/gremlin/start-gremlin-server.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | cd /opt/apache-tinkerpop-gremlin-server-3.4.6
4 | ./bin/gremlin-server.sh conf/gremlin-server-atlas.yaml
5 |
--------------------------------------------------------------------------------
/pom.xml.patch:
--------------------------------------------------------------------------------
1 | --- pom.xml.orig 2022-12-14 10:46:31.615039877 +0000
2 | +++ pom.xml 2022-12-14 10:33:21.019600529 +0000
3 | @@ -834,6 +834,11 @@
4 | Typesafe Repository
5 | http://repo.typesafe.com/typesafe/releases/
6 |
7 | +
8 | + maven-restlet
9 | + Public online Restlet repository
10 | + https://maven.restlet.talend.com
11 | +
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/conf/gremlin/janusgraph-hbase-solr.properties:
--------------------------------------------------------------------------------
1 | gremlin.graph=org.janusgraph.core.JanusGraphFactory
2 | storage.backend=hbase
3 | storage.hostname=localhost
4 | cache.db-cache = true
5 | cache.db-cache-clean-wait = 20
6 | cache.db-cache-time = 180000
7 | cache.db-cache-size = 0.5
8 | index.search.backend=solr
9 | index.search.solr.mode=http
10 | index.search.solr.http-urls=http://localhost:9838/solr
11 | index.search.solr.zookeeper-url=localhost:2181
12 | index.search.solr.configset=_default
13 | atlas.graph.storage.hbase.table=apache_atlas_janus
14 | storage.hbase.table=apache_atlas_janus
15 |
--------------------------------------------------------------------------------
/conf/gremlin/gremlin-server-atlas.yaml:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | host: localhost
19 | port: 8182
20 | threadPoolWorker: 1
21 | gremlinPool: 8
22 | writeBufferLowWaterMark: 32768
23 | writeBufferHighWaterMark: 65536
24 | graphs: {
25 | graph: conf/janusgraph-hbase-solr.properties}
26 | metrics: {
27 | slf4jReporter: {enabled: true, interval: 180000}}
28 |
--------------------------------------------------------------------------------
/conf/hbase/hbase-site.xml.template:
--------------------------------------------------------------------------------
1 |
2 |
3 |
19 |
20 |
21 | hbase.rootdir
22 | ${url_prefix}${atlas_data}/hbase-root
23 |
24 |
25 | hbase.zookeeper.property.dataDir
26 | ${atlas_data}/hbase-zookeeper-data
27 |
28 |
29 | hbase.master.info.port
30 | 61510
31 |
32 |
33 | hbase.regionserver.info.port
34 | 61530
35 |
36 |
37 | hbase.master.port
38 | 61500
39 |
40 |
41 | hbase.regionserver.port
42 | 61520
43 |
44 |
45 | hbase.unsafe.stream.capability.enforce
46 | false
47 |
48 |
49 |
--------------------------------------------------------------------------------
/conf/gremlin/install-gremlin.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | cd /opt
4 |
5 | SOURCEDIR=$(pwd)
6 | GREMLINVER=3.4.6
7 |
8 | #wget http://mirror.linux-ia64.org/apache/tinkerpop/${GREMLINVER}/apache-tinkerpop-gremlin-server-${GREMLINVER}-bin.zip
9 | wget https://archive.apache.org/dist/tinkerpop/${GREMLINVER}/apache-tinkerpop-gremlin-server-${GREMLINVER}-bin.zip
10 | unzip apache-tinkerpop-gremlin-server-${GREMLINVER}-bin.zip
11 | rm -f apache-tinkerpop-gremlin-server-${GREMLINVER}-bin.zip
12 |
13 | #wget http://mirror.linux-ia64.org/apache/tinkerpop/${GREMLINVER}/apache-tinkerpop-gremlin-console-${GREMLINVER}-bin.zip
14 | wget https://archive.apache.org/dist/tinkerpop/${GREMLINVER}/apache-tinkerpop-gremlin-console-${GREMLINVER}-bin.zip
15 | unzip apache-tinkerpop-gremlin-console-${GREMLINVER}-bin.zip
16 | rm -f apache-tinkerpop-gremlin-console-${GREMLINVER}-bin.zip
17 |
18 | ln -s /opt/apache-atlas-2.1.0/server/webapp/atlas/WEB-INF/lib/*.jar /opt/apache-tinkerpop-gremlin-server-${GREMLINVER}/lib 2>/dev/null
19 | rm -f /opt/apache-tinkerpop-gremlin-server-${GREMLINVER}/lib/atlas-webapp-2.1.0.jar
20 | rm -f /opt/apache-tinkerpop-gremlin-server-${GREMLINVER}/lib/netty-3.10.5.Final.jar
21 | rm -f /opt/apache-tinkerpop-gremlin-server-${GREMLINVER}/lib/netty-all-4.0.52.Final.jar
22 |
23 | ln -s ${SOURCEDIR}/gremlin/gremlin-server-atlas.yaml /opt/apache-tinkerpop-gremlin-server-${GREMLINVER}/conf
24 | ln -s ${SOURCEDIR}/gremlin/janusgraph-hbase-solr.properties /opt/apache-tinkerpop-gremlin-server-${GREMLINVER}/conf
25 |
26 | rm -f /opt/apache-tinkerpop-gremlin-server-${GREMLINVER}/lib/groovy-*.jar
27 | ln -s /opt/apache-atlas-2.1.0/server/webapp/atlas/WEB-INF/lib/groovy-*.jar /opt/apache-tinkerpop-gremlin-server-${GREMLINVER}/lib
28 |
29 | sed -i 's/assistive_technologies=org.GNOME.Accessibility.AtkWrapper/#assistive_technologies=org.GNOME.Accessibility.AtkWrapper/g' /etc/java-8-openjdk/accessibility.properties
30 |
31 | echo "Gremlin Server and Console installed!"
--------------------------------------------------------------------------------
/atlas_start.py.patch:
--------------------------------------------------------------------------------
1 | --- atlas_start.py.orig 2020-01-22 15:10:15.000000000 +0000
2 | +++ atlas_start.py 2022-12-15 19:26:33.306245271 +0000
3 | @@ -18,6 +18,7 @@
4 | import os
5 | import sys
6 | import traceback
7 | +from time import sleep
8 |
9 | import atlas_config as mc
10 |
11 | @@ -117,6 +118,9 @@
12 | mc.run_hbase_action(mc.hbaseBinDir(atlas_home), "start", hbase_conf_dir, logdir)
13 |
14 | print("Local HBase started!")
15 | + if is_setup:
16 | + print ("Sleeping 60s due too setup (init run)...")
17 | + sleep(60)
18 |
19 | #solr setup
20 | if mc.is_solr_local(confdir):
21 | @@ -135,6 +139,9 @@
22 | mc.run_solr(mc.solrBinDir(atlas_home), "start", mc.get_solr_zk_url(confdir), mc.solrPort(), logdir, True, mc.solrHomeDir(atlas_home))
23 |
24 | print("Local Solr started!")
25 | + if is_setup:
26 | + print ("Sleeping 60s due too setup (init run)...")
27 | + sleep(60)
28 |
29 | print("\nCreating Solr collections for Atlas using config: " + mc.solrConfDir(atlas_home))
30 |
31 | @@ -155,8 +162,22 @@
32 | web_app_path = mc.convertCygwinPath(web_app_path)
33 | if not is_setup:
34 | start_atlas_server(atlas_classpath, atlas_pid_file, jvm_logdir, jvm_opts_list, web_app_path)
35 | - mc.wait_for_startup(confdir, 300)
36 | - print("Apache Atlas Server started!!!\n")
37 | +
38 | + mc.wait_for_startup(confdir, 600)
39 | + print ("Apache Atlas Server process started!\n")
40 | +
41 | + atlas_pid_file = mc.pidFile(atlas_home)
42 | + try:
43 | + pf = file(atlas_pid_file, 'r')
44 | + pid = int(pf.read().strip())
45 | + pf.close()
46 | + print("Running Apache Atlas with PID " + str(pid) + "...\n")
47 | + except:
48 | + pid = None
49 | + if not pid:
50 | + sys.stderr.write("No PID file found! Server is not running?\nCheck logs: /apache-atlas/logs/application.log\n\n")
51 | + return
52 | +
53 | else:
54 | process = mc.java("org.apache.atlas.web.setup.AtlasSetup", [], atlas_classpath, jvm_opts_list, jvm_logdir)
55 | return process.wait()
56 |
--------------------------------------------------------------------------------
/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM ubuntu:20.04
2 | LABEL maintainer="vadim@clusterside.com"
3 |
4 | ARG VERSION=2.3.0
5 | ARG DEBIAN_FRONTEND=noninteractive
6 | ENV TZ=Etc/UTC
7 | ENV MAVEN_OPTS="-Xms2g -Xmx2g"
8 | ENV JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64"
9 |
10 | RUN mkdir -p /tmp/atlas-src \
11 | && mkdir -p /apache-atlas \
12 | && mkdir -p /gremlin
13 |
14 | COPY pom.xml.patch /tmp/atlas-src/
15 |
16 | RUN apt-get update \
17 | && apt-get -y upgrade \
18 | && apt-get -y install apt-utils \
19 | && apt-get -y install \
20 | maven \
21 | wget \
22 | python \
23 | openjdk-8-jdk-headless \
24 | patch \
25 | unzip \
26 | && cd /tmp \
27 | && wget https://dlcdn.apache.org/atlas/${VERSION}/apache-atlas-${VERSION}-sources.tar.gz \
28 | && tar --strip 1 -xzvf apache-atlas-${VERSION}-sources.tar.gz -C /tmp/atlas-src \
29 | && rm apache-atlas-${VERSION}-sources.tar.gz \
30 | && cd /tmp/atlas-src \
31 | && sed -i 's/http:\/\/repo1.maven.org\/maven2/https:\/\/repo1.maven.org\/maven2/g' pom.xml \
32 | && patch -b -f < pom.xml.patch \
33 | && mvn clean \
34 | -Dmaven.repo.local=/tmp/atlas-src/.mvn-repo \
35 | -Dhttps.protocols=TLSv1.2 \
36 | -DskipTests \
37 | -Drat.skip=true \
38 | package -Pdist,embedded-hbase-solr \
39 | && tar --strip 1 -xzvf /tmp/atlas-src/distro/target/apache-atlas-${VERSION}-server.tar.gz -C /apache-atlas \
40 | && rm -Rf /tmp/atlas-src \
41 | && rm -Rf /root/.npm \
42 | && apt-get -y --purge remove \
43 | maven \
44 | unzip \
45 | && apt-get -y autoremove \
46 | && apt-get -y clean
47 |
48 | COPY conf/hbase/hbase-site.xml.template /apache-atlas/conf/hbase/hbase-site.xml.template
49 | COPY atlas_start.py.patch atlas_config.py.patch /apache-atlas/bin/
50 | COPY conf/atlas-env.sh /apache-atlas/conf/atlas-env.sh
51 | COPY conf/gremlin /gremlin/
52 |
53 | WORKDIR /apache-atlas/bin
54 | RUN patch -b -f < atlas_start.py.patch \
55 | && patch -b -f < atlas_config.py.patch
56 |
57 | WORKDIR /apache-atlas/conf
58 | RUN sed -i 's/\${atlas.log.dir}/\/apache-atlas\/logs/g' atlas-log4j.xml \
59 | && sed -i 's/\${atlas.log.file}/application.log/g' atlas-log4j.xml
60 |
61 | WORKDIR /apache-atlas/bin
62 | RUN ./atlas_start.py -setup || true
63 | RUN ./atlas_start.py & \
64 | touch /apache-atlas/logs/application.log \
65 | && tail -f /apache-atlas/logs/application.log | sed '/Defaulting to local host name/ q' \
66 | && sleep 10 \
67 | && ./atlas_stop.py \
68 | && truncate -s0 /apache-atlas/logs/application.log
69 |
70 | CMD ["/bin/bash", "-c", "/apache-atlas/bin/atlas_start.py; tail -fF /apache-atlas/logs/application.log"]
71 |
--------------------------------------------------------------------------------
/atlas_config.py.patch:
--------------------------------------------------------------------------------
1 | --- atlas_config.py.orig 2019-05-03 08:22:00.000000000 +0300
2 | +++ atlas_config.py 2020-01-16 02:14:31.660601445 +0300
3 | @@ -500,15 +500,18 @@
4 |
5 | def wait_for_startup(confdir, wait):
6 | count = 0
7 | + started = False
8 | host = get_atlas_url_host(confdir)
9 | port = get_atlas_url_port(confdir)
10 | - while True:
11 | + pid_file = pidFile(atlasDir())
12 | +
13 | + while not started:
14 | try:
15 | s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
16 | s.settimeout(1)
17 | s.connect((host, int(port)))
18 | s.close()
19 | - break
20 | + started = True
21 | except Exception as e:
22 | # Wait for 1 sec before next ping
23 | sys.stdout.write('.')
24 | @@ -516,11 +519,20 @@
25 | sleep(1)
26 |
27 | if count > wait:
28 | - s.close()
29 | - break
30 | + s.close()
31 | + sys.stdout.write('\nAtlas Web-UI startup timed out! But, wait for it...')
32 | + sys.stdout.flush()
33 | + break
34 | +
35 | + if not os.path.exists(pid_file):
36 | + sys.stdout.write('\nApache Atlas startup failed!\nCheck logs: /apache-atlas/logs/application.log')
37 | + sys.stdout.flush()
38 | + exit()
39 | + break
40 |
41 | count = count + 1
42 |
43 | +
44 | sys.stdout.write('\n')
45 |
46 | def run_zookeeper(dir, action, logdir = None, wait=True):
47 | @@ -555,14 +567,14 @@
48 |
49 | if zk_url is None:
50 | if port is None:
51 | - cmd = [os.path.join(dir, solrScript), action]
52 | + cmd = [os.path.join(dir, solrScript), action, '-force']
53 | else:
54 | - cmd = [os.path.join(dir, solrScript), action, '-p', str(port)]
55 | + cmd = [os.path.join(dir, solrScript), action, '-force', '-p', str(port)]
56 | else:
57 | if port is None:
58 | - cmd = [os.path.join(dir, solrScript), action, '-z', zk_url]
59 | + cmd = [os.path.join(dir, solrScript), action, '-force', '-z', zk_url]
60 | else:
61 | - cmd = [os.path.join(dir, solrScript), action, '-z', zk_url, '-p', port]
62 | + cmd = [os.path.join(dir, solrScript), action, '-force', '-z', zk_url, '-p', port]
63 |
64 | return runProcess(cmd, logdir, False, wait)
65 |
66 | @@ -572,7 +584,7 @@
67 | if IS_WINDOWS:
68 | solrScript = "solr.cmd"
69 |
70 | - cmd = [os.path.join(dir, solrScript), 'create', '-c', index, '-d', confdir, '-shards', solrShards(), '-replicationFactor', solrReplicationFactor()]
71 | + cmd = [os.path.join(dir, solrScript), 'create', '-c', index, '-d', confdir, '-shards', solrShards(), '-replicationFactor', solrReplicationFactor(), '-force']
72 |
73 | return runProcess(cmd, logdir, False, wait)
74 |
75 | @@ -691,3 +703,4 @@
76 | windowsPath = subprocess.Popen(cygpathArgs, stdout=subprocess.PIPE).communicate()[0]
77 | windowsPath = windowsPath.strip()
78 | return windowsPath
79 | +
80 |
--------------------------------------------------------------------------------
/conf/atlas-env.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | #
3 | # Licensed to the Apache Software Foundation (ASF) under one
4 | # or more contributor license agreements. See the NOTICE file
5 | # distributed with this work for additional information
6 | # regarding copyright ownership. The ASF licenses this file
7 | # to you under the Apache License, Version 2.0 (the
8 | # "License"); you may not use this file except in compliance
9 | # with the License. You may obtain a copy of the License at
10 | #
11 | # http://www.apache.org/licenses/LICENSE-2.0
12 | #
13 | # Unless required by applicable law or agreed to in writing, software
14 | # distributed under the License is distributed on an "AS IS" BASIS,
15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | # See the License for the specific language governing permissions and
17 | # limitations under the License.
18 | #
19 | # The java implementation to use. If JAVA_HOME is not found we expect java and jar to be in path
20 | export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
21 |
22 | # any additional java opts you want to set. This will apply to both client and server operations
23 | #export ATLAS_OPTS=
24 |
25 | # any additional java opts that you want to set for client only
26 | #export ATLAS_CLIENT_OPTS=
27 |
28 | # java heap size we want to set for the client. Default is 1024MB
29 | #export ATLAS_CLIENT_HEAP=
30 |
31 | # any additional opts you want to set for atlas service.
32 | #export ATLAS_SERVER_OPTS=
33 |
34 | # indicative values for large number of metadata entities (equal or more than 10,000s)
35 | #export ATLAS_SERVER_OPTS="-server -XX:SoftRefLRUPolicyMSPerMB=0 -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:+PrintTenuringDistribution -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=dumps/atlas_server.hprof -Xloggc:logs/gc-worker.log -verbose:gc -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=1m -XX:+PrintGCDetails -XX:+PrintHeapAtGC -XX:+PrintGCTimeStamps"
36 |
37 | # java heap size we want to set for the atlas server. Default is 1024MB
38 | #export ATLAS_SERVER_HEAP=
39 |
40 | # indicative values for large number of metadata entities (equal or more than 10,000s) for JDK 8
41 | #export ATLAS_SERVER_HEAP="-Xms15360m -Xmx15360m -XX:MaxNewSize=5120m -XX:MetaspaceSize=100M -XX:MaxMetaspaceSize=512m"
42 |
43 | # What is is considered as atlas home dir. Default is the base locaion of the installed software
44 | #export ATLAS_HOME_DIR=
45 |
46 | # Where log files are stored. Defatult is logs directory under the base install location
47 | #export ATLAS_LOG_DIR=
48 |
49 | # Where pid files are stored. Defatult is logs directory under the base install location
50 | #export ATLAS_PID_DIR=
51 |
52 | # where the atlas titan db data is stored. Defatult is logs/data directory under the base install location
53 | #export ATLAS_DATA_DIR=
54 |
55 | # Where do you want to expand the war file. By Default it is in /server/webapp dir under the base install dir.
56 | #export ATLAS_EXPANDED_WEBAPP_DIR=
57 |
58 | # indicates whether or not a local instance of HBase should be started for Atlas
59 | export MANAGE_LOCAL_HBASE=true
60 |
61 | # indicates whether or not a local instance of Solr should be started for Atlas
62 | export MANAGE_LOCAL_SOLR=true
63 |
64 | # indicates whether or not cassandra is the embedded backend for Atlas
65 | export MANAGE_EMBEDDED_CASSANDRA=false
66 |
67 | # indicates whether or not a local instance of Elasticsearch should be started for Atlas
68 | export MANAGE_LOCAL_ELASTICSEARCH=false
69 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | [](https://github.com/sburn/docker-apache-atlas)
2 | [](https://hub.docker.com/repository/docker/sburn/apache-atlas)
3 | [](https://www.apache.org/licenses/LICENSE-2.0.html)
4 |
5 | Apache Atlas Docker image
6 | =======================================
7 |
8 | This `Apache Atlas` is built from the 2.3.0-release source tarball and patched to be run in a Docker container.
9 |
10 | Atlas is built with `embedded HBase + Solr` and it is pre-initialized, so you can use it right after image download without additional steps.
11 |
12 | If you want to use external Atlas backends, set them up according to [the documentation](https://atlas.apache.org/#/Configuration).
13 |
14 | N.B. The image many not currently launch correctly if run in [Docker rootless mode](https://docs.docker.com/engine/security/rootless/)
15 |
16 | Basic usage
17 | -----------
18 |
19 | 1. Start Apache Atlas in a container exposing Web-UI port 21000:
20 |
21 | ```bash
22 | docker run -d \
23 | -p 21000:21000 \
24 | --name atlas \
25 | sburn/apache-atlas
26 | ```
27 |
28 | Please, take into account that the first startup of Atlas may take up to few mins depending on host machine performance before web-interface become available at `http://localhost:21000/`
29 |
30 | Web-UI default credentials: `admin / admin`
31 |
32 | Usage options
33 | -------------
34 |
35 | Gracefully stop Atlas:
36 |
37 | ```bash
38 | docker exec -ti atlas /apache-atlas/bin/atlas_stop.py
39 | ```
40 |
41 | Check Atlas startup script output:
42 |
43 | ```bash
44 | docker logs atlas
45 | ```
46 |
47 | Check Atlas application.log (useful at the first run and for debugging during workload):
48 |
49 | ```bash
50 | docker exec -ti atlas tail -f /apache-atlas/logs/application.log
51 | ```
52 |
53 | Run the example (this will add sample types and instances along with traits):
54 |
55 | ```bash
56 | docker exec -ti atlas /apache-atlas/bin/quick_start.py
57 | ```
58 |
59 | Start Atlas overriding settings by environment variables
60 | (to support large number of metadata objects for example):
61 |
62 | ```bash
63 | docker run --detach \
64 | -e "ATLAS_SERVER_OPTS=-server -XX:SoftRefLRUPolicyMSPerMB=0 \
65 | -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC \
66 | -XX:+CMSParallelRemarkEnabled -XX:+PrintTenuringDistribution \
67 | -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=dumps/atlas_server.hprof \
68 | -Xloggc:logs/gc-worker.log -verbose:gc -XX:+UseGCLogFileRotation \
69 | -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=1m -XX:+PrintGCDetails \
70 | -XX:+PrintHeapAtGC -XX:+PrintGCTimeStamps" \
71 | -p 21000:21000 \
72 | --name atlas \
73 | sburn/apache-atlas
74 | ```
75 |
76 | Explore logs: start Atlas exposing logs directory on the host
77 |
78 | ```bash
79 | docker run --detach \
80 | -v ${PWD}/atlas-logs:/apache-atlas/logs \
81 | -p 21000:21000 \
82 | --name atlas \
83 | sburn/apache-atlas
84 | ```
85 |
86 | Custom configuration: start Atlas exposing conf directory on the host
87 |
88 | ```bash
89 | docker run --detach \
90 | -v ${PWD}/pre-conf:/apache-atlas/conf \
91 | -p 21000:21000 \
92 | --name atlas \
93 | sburn/apache-atlas
94 | ```
95 |
96 | Data persistency: start Atlas with data directory mounted on the host
97 |
98 | ```bash
99 | docker run --detach \
100 | -v ${PWD}/data:/apache-atlas/data \
101 | -p 21000:21000 \
102 | --name atlas \
103 | sburn/apache-atlas
104 | ```
105 |
106 | Tinkerpop Gremlin support
107 | -------------------------
108 |
109 | Image contains build-in extras for those who want to play with Janusgraph, and Atlas artifacts using Apache Tinkerpop Gremlin Console (gremlin CLI).
110 |
111 | 1. You need Atlas container up and running as shown above.
112 |
113 | 2. Install `gremlin-server` and `gremlin-console` into the container by running included automation script:
114 | ```bash
115 | docker exec -ti atlas /gremlin/install-gremlin.sh
116 | ```
117 | 3. Start `gremlin-server` in the same container:
118 | ```bash
119 | docker exec -d atlas /gremlin/start-gremlin-server.sh
120 | ```
121 | 4. Finally, run `gremlin-console` interactively:
122 | ```bash
123 | docker exec -ti atlas /gremlin/run-gremlin-console.sh
124 | ```
125 | Gremlin-console usage example:
126 | ```bash
127 | \,,,/
128 | (o o)
129 | -----oOOo-(3)-oOOo-----
130 |
131 | gremlin>:remote connect tinkerpop.server conf/remote.yaml session
132 | ==>Configured localhost/127.0.0.1:8182-[d1b2d9de-da1f-471f-be14-34d8ea769ae8]
133 | gremlin> :remote console
134 | ==>All scripts will now be sent to Gremlin Server - [localhost/127.0.0.1:8182]-[d1b2d9de-da1f-471f-be14-34d8ea769ae8] - type ':remote console' to return to local mode
135 | gremlin> g = graph.traversal()
136 | ==>graphtraversalsource[standardjanusgraph[hbase:[localhost]], standard]
137 | gremlin> g.V().has('__typeName','hdfs_path').count()
138 | ```
139 |
140 | Environment Variables
141 | ---------------------
142 |
143 | The following environment variables are available for configuration:
144 |
145 | | Name | Default | Description |
146 | |------|---------|-------------|
147 | | JAVA_HOME | /usr/lib/jvm/java-8-openjdk-amd64 | The java implementation to use. If JAVA_HOME is not found we expect java and jar to be in path
148 | | ATLAS_OPTS | | any additional java opts you want to set. This will apply to both client and server operations
149 | | ATLAS_CLIENT_OPTS | | any additional java opts that you want to set for client only
150 | | ATLAS_CLIENT_HEAP | | java heap size we want to set for the client. Default is 1024MB
151 | | ATLAS_SERVER_OPTS | | any additional opts you want to set for atlas service.
152 | | ATLAS_SERVER_HEAP | | java heap size we want to set for the atlas server. Default is 1024MB
153 | | ATLAS_HOME_DIR | | What is is considered as atlas home dir. Default is the base location of the installed software
154 | | ATLAS_LOG_DIR | | Where log files are stored. Defatult is logs directory under the base install location
155 | | ATLAS_PID_DIR | | Where pid files are stored. Defatult is logs directory under the base install location
156 | | ATLAS_EXPANDED_WEBAPP_DIR | | Where do you want to expand the war file. By Default it is in /server/webapp dir under the base install dir.
157 |
158 | For additional infomation about configurable options check official Apache Atlas documentation.
159 |
160 | Bug Tracker
161 | -----------
162 |
163 | Bugs are tracked on [GitHub Issues](https://github.com/sburn/docker-apache-atlas/issues).
164 | In case of trouble, please check there to see if your issue has already been reported.
165 | If you spotted it first, help us smash it by providing detailed and welcomed feedback.
166 |
167 | Maintainer
168 | ----------
169 |
170 | This image is maintained by [Vadim Korchagin](mailto:vadim@clusterside.com)
171 |
172 | * https://github.com/sburn/docker-apache-atlas
173 |
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 |
2 | Apache License
3 | Version 2.0, January 2004
4 | http://www.apache.org/licenses/
5 |
6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7 |
8 | 1. Definitions.
9 |
10 | "License" shall mean the terms and conditions for use, reproduction,
11 | and distribution as defined by Sections 1 through 9 of this document.
12 |
13 | "Licensor" shall mean the copyright owner or entity authorized by
14 | the copyright owner that is granting the License.
15 |
16 | "Legal Entity" shall mean the union of the acting entity and all
17 | other entities that control, are controlled by, or are under common
18 | control with that entity. For the purposes of this definition,
19 | "control" means (i) the power, direct or indirect, to cause the
20 | direction or management of such entity, whether by contract or
21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
22 | outstanding shares, or (iii) beneficial ownership of such entity.
23 |
24 | "You" (or "Your") shall mean an individual or Legal Entity
25 | exercising permissions granted by this License.
26 |
27 | "Source" form shall mean the preferred form for making modifications,
28 | including but not limited to software source code, documentation
29 | source, and configuration files.
30 |
31 | "Object" form shall mean any form resulting from mechanical
32 | transformation or translation of a Source form, including but
33 | not limited to compiled object code, generated documentation,
34 | and conversions to other media types.
35 |
36 | "Work" shall mean the work of authorship, whether in Source or
37 | Object form, made available under the License, as indicated by a
38 | copyright notice that is included in or attached to the work
39 | (an example is provided in the Appendix below).
40 |
41 | "Derivative Works" shall mean any work, whether in Source or Object
42 | form, that is based on (or derived from) the Work and for which the
43 | editorial revisions, annotations, elaborations, or other modifications
44 | represent, as a whole, an original work of authorship. For the purposes
45 | of this License, Derivative Works shall not include works that remain
46 | separable from, or merely link (or bind by name) to the interfaces of,
47 | the Work and Derivative Works thereof.
48 |
49 | "Contribution" shall mean any work of authorship, including
50 | the original version of the Work and any modifications or additions
51 | to that Work or Derivative Works thereof, that is intentionally
52 | submitted to Licensor for inclusion in the Work by the copyright owner
53 | or by an individual or Legal Entity authorized to submit on behalf of
54 | the copyright owner. For the purposes of this definition, "submitted"
55 | means any form of electronic, verbal, or written communication sent
56 | to the Licensor or its representatives, including but not limited to
57 | communication on electronic mailing lists, source code control systems,
58 | and issue tracking systems that are managed by, or on behalf of, the
59 | Licensor for the purpose of discussing and improving the Work, but
60 | excluding communication that is conspicuously marked or otherwise
61 | designated in writing by the copyright owner as "Not a Contribution."
62 |
63 | "Contributor" shall mean Licensor and any individual or Legal Entity
64 | on behalf of whom a Contribution has been received by Licensor and
65 | subsequently incorporated within the Work.
66 |
67 | 2. Grant of Copyright License. Subject to the terms and conditions of
68 | this License, each Contributor hereby grants to You a perpetual,
69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70 | copyright license to reproduce, prepare Derivative Works of,
71 | publicly display, publicly perform, sublicense, and distribute the
72 | Work and such Derivative Works in Source or Object form.
73 |
74 | 3. Grant of Patent License. Subject to the terms and conditions of
75 | this License, each Contributor hereby grants to You a perpetual,
76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77 | (except as stated in this section) patent license to make, have made,
78 | use, offer to sell, sell, import, and otherwise transfer the Work,
79 | where such license applies only to those patent claims licensable
80 | by such Contributor that are necessarily infringed by their
81 | Contribution(s) alone or by combination of their Contribution(s)
82 | with the Work to which such Contribution(s) was submitted. If You
83 | institute patent litigation against any entity (including a
84 | cross-claim or counterclaim in a lawsuit) alleging that the Work
85 | or a Contribution incorporated within the Work constitutes direct
86 | or contributory patent infringement, then any patent licenses
87 | granted to You under this License for that Work shall terminate
88 | as of the date such litigation is filed.
89 |
90 | 4. Redistribution. You may reproduce and distribute copies of the
91 | Work or Derivative Works thereof in any medium, with or without
92 | modifications, and in Source or Object form, provided that You
93 | meet the following conditions:
94 |
95 | (a) You must give any other recipients of the Work or
96 | Derivative Works a copy of this License; and
97 |
98 | (b) You must cause any modified files to carry prominent notices
99 | stating that You changed the files; and
100 |
101 | (c) You must retain, in the Source form of any Derivative Works
102 | that You distribute, all copyright, patent, trademark, and
103 | attribution notices from the Source form of the Work,
104 | excluding those notices that do not pertain to any part of
105 | the Derivative Works; and
106 |
107 | (d) If the Work includes a "NOTICE" text file as part of its
108 | distribution, then any Derivative Works that You distribute must
109 | include a readable copy of the attribution notices contained
110 | within such NOTICE file, excluding those notices that do not
111 | pertain to any part of the Derivative Works, in at least one
112 | of the following places: within a NOTICE text file distributed
113 | as part of the Derivative Works; within the Source form or
114 | documentation, if provided along with the Derivative Works; or,
115 | within a display generated by the Derivative Works, if and
116 | wherever such third-party notices normally appear. The contents
117 | of the NOTICE file are for informational purposes only and
118 | do not modify the License. You may add Your own attribution
119 | notices within Derivative Works that You distribute, alongside
120 | or as an addendum to the NOTICE text from the Work, provided
121 | that such additional attribution notices cannot be construed
122 | as modifying the License.
123 |
124 | You may add Your own copyright statement to Your modifications and
125 | may provide additional or different license terms and conditions
126 | for use, reproduction, or distribution of Your modifications, or
127 | for any such Derivative Works as a whole, provided Your use,
128 | reproduction, and distribution of the Work otherwise complies with
129 | the conditions stated in this License.
130 |
131 | 5. Submission of Contributions. Unless You explicitly state otherwise,
132 | any Contribution intentionally submitted for inclusion in the Work
133 | by You to the Licensor shall be under the terms and conditions of
134 | this License, without any additional terms or conditions.
135 | Notwithstanding the above, nothing herein shall supersede or modify
136 | the terms of any separate license agreement you may have executed
137 | with Licensor regarding such Contributions.
138 |
139 | 6. Trademarks. This License does not grant permission to use the trade
140 | names, trademarks, service marks, or product names of the Licensor,
141 | except as required for reasonable and customary use in describing the
142 | origin of the Work and reproducing the content of the NOTICE file.
143 |
144 | 7. Disclaimer of Warranty. Unless required by applicable law or
145 | agreed to in writing, Licensor provides the Work (and each
146 | Contributor provides its Contributions) on an "AS IS" BASIS,
147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148 | implied, including, without limitation, any warranties or conditions
149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150 | PARTICULAR PURPOSE. You are solely responsible for determining the
151 | appropriateness of using or redistributing the Work and assume any
152 | risks associated with Your exercise of permissions under this License.
153 |
154 | 8. Limitation of Liability. In no event and under no legal theory,
155 | whether in tort (including negligence), contract, or otherwise,
156 | unless required by applicable law (such as deliberate and grossly
157 | negligent acts) or agreed to in writing, shall any Contributor be
158 | liable to You for damages, including any direct, indirect, special,
159 | incidental, or consequential damages of any character arising as a
160 | result of this License or out of the use or inability to use the
161 | Work (including but not limited to damages for loss of goodwill,
162 | work stoppage, computer failure or malfunction, or any and all
163 | other commercial damages or losses), even if such Contributor
164 | has been advised of the possibility of such damages.
165 |
166 | 9. Accepting Warranty or Additional Liability. While redistributing
167 | the Work or Derivative Works thereof, You may choose to offer,
168 | and charge a fee for, acceptance of support, warranty, indemnity,
169 | or other liability obligations and/or rights consistent with this
170 | License. However, in accepting such obligations, You may act only
171 | on Your own behalf and on Your sole responsibility, not on behalf
172 | of any other Contributor, and only if You agree to indemnify,
173 | defend, and hold each Contributor harmless for any liability
174 | incurred by, or claims asserted against, such Contributor by reason
175 | of your accepting any such warranty or additional liability.
176 |
177 | END OF TERMS AND CONDITIONS
178 |
179 | APPENDIX: How to apply the Apache License to your work.
180 |
181 | To apply the Apache License to your work, attach the following
182 | boilerplate notice, with the fields enclosed by brackets "[]"
183 | replaced with your own identifying information. (Don't include
184 | the brackets!) The text should be enclosed in the appropriate
185 | comment syntax for the file format. We also recommend that a
186 | file or class name and description of purpose be included on the
187 | same "printed page" as the copyright notice for easier
188 | identification within third-party archives.
189 |
190 | Copyright [yyyy] [name of copyright owner]
191 |
192 | Licensed under the Apache License, Version 2.0 (the "License");
193 | you may not use this file except in compliance with the License.
194 | You may obtain a copy of the License at
195 |
196 | http://www.apache.org/licenses/LICENSE-2.0
197 |
198 | Unless required by applicable law or agreed to in writing, software
199 | distributed under the License is distributed on an "AS IS" BASIS,
200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201 | See the License for the specific language governing permissions and
202 | limitations under the License.
203 |
--------------------------------------------------------------------------------