diff --git a/distro/.gitignore b/distro/.gitignore new file mode 100755 index 000000000..2a8ea815f --- /dev/null +++ b/distro/.gitignore @@ -0,0 +1,20 @@ +# 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. + +# Maven +elasticsearch +hbase +zk diff --git a/distro/pom.xml b/distro/pom.xml index b92bd3548..db1f23acd 100644 --- a/distro/pom.xml +++ b/distro/pom.xml @@ -150,6 +150,102 @@ atlas.graph.index.search.solr.wait-searcher=true + + + berkeley-solr + + false + + + berkeleyje + #Berkeley +atlas.graph.storage.directory=${sys:atlas.home}/data/berkeley +atlas.graph.storage.lock.clean-expired=true +atlas.graph.storage.lock.expiry-time=500 +atlas.graph.storage.lock.wait-time=300 + + solr + #Solr +#Solr cloud mode properties +atlas.graph.index.search.solr.mode=cloud +atlas.graph.index.search.solr.zookeeper-url=localhost:2181 +atlas.graph.index.search.solr.zookeeper-connect-timeout=60000 +atlas.graph.index.search.solr.zookeeper-session-timeout=60000 +atlas.graph.index.search.solr.wait-searcher=true + +#Solr http mode properties +#atlas.graph.index.search.solr.mode=http +#atlas.graph.index.search.solr.http-urls=http://localhost:8983/solr + + atlas.EntityAuditRepository.impl=org.apache.atlas.repository.audit.NoopEntityAuditRepository + + false + false + true + + ${project.build.directory}/solr + https://archive.apache.org/dist/lucene/solr/${solr.version}/solr-${solr.version}.tgz + solr-${solr.version} + + ${project.build.directory}/zk + https://archive.apache.org/dist/zookeeper/zookeeper-${zookeeper.version}/zookeeper-${zookeeper.version}.tar.gz + zookeeper-${zookeeper.version} + + + + + org.apache.maven.plugins + maven-antrun-plugin + 1.7 + + + + solr + generate-resources + + run + + + + + + + + + + + + + + + + + + zk + generate-resources + + run + + + + + + + + + + + + + + + + + + + + + berkeley-elasticsearch diff --git a/distro/src/bin/atlas_config.py b/distro/src/bin/atlas_config.py index 2d6143331..bda8e2a10 100755 --- a/distro/src/bin/atlas_config.py +++ b/distro/src/bin/atlas_config.py @@ -406,6 +406,13 @@ def wait_for_shutdown(pid, msg, wait): sys.stdout.write('\n') +def is_berkelydb(confdir): + confFile = os.path.join(confdir, CONF_FILE) + storageBackEnd = getConfig(confFile, STORAGE_BACKEND_CONF) + if storageBackEnd is not None: + storageBackEnd = storageBackEnd.strip() + return storageBackEnd is not None and storageBackEnd == 'berkeleyje' + def is_hbase(confdir): confFile = os.path.join(confdir, CONF_FILE) storageBackEnd = getConfig(confFile, STORAGE_BACKEND_CONF) @@ -470,6 +477,9 @@ def is_elasticsearch_local(): return True +def is_zookeeper_local(confdir): + return is_berkelydb(confdir) or is_cassandra_local(confdir) + def get_solr_zk_url(confdir): confdir = os.path.join(confdir, CONF_FILE) return getConfig(confdir, SOLR_INDEX_ZK_URL) diff --git a/distro/src/bin/atlas_start.py b/distro/src/bin/atlas_start.py index 963faf402..54fd2bd47 100755 --- a/distro/src/bin/atlas_start.py +++ b/distro/src/bin/atlas_start.py @@ -122,6 +122,8 @@ def main(): if mc.is_cassandra_local(confdir): print "Cassandra embedded configured." mc.configure_cassandra(atlas_home) + + if mc.is_zookeeper_local(confdir): mc.configure_zookeeper(atlas_home) mc.run_zookeeper(mc.zookeeperBinDir(atlas_home), "start", logdir) print "zookeeper started." diff --git a/distro/src/bin/atlas_stop.py b/distro/src/bin/atlas_stop.py index 2e15c0f3f..400a7d23d 100755 --- a/distro/src/bin/atlas_stop.py +++ b/distro/src/bin/atlas_stop.py @@ -68,10 +68,9 @@ def main(): # stop solr if mc.is_solr_local(confdir): - mc.run_solr(mc.solrBinDir(atlas_home), "stop", None, mc.solrPort(), None, True) - if mc.is_cassandra_local(confdir): + if mc.is_zookeeper_local(confdir): mc.run_zookeeper(mc.zookeeperBinDir(atlas_home), "stop") # stop elasticsearch diff --git a/docs/src/documents/Setup/BuildInstruction.md b/docs/src/documents/Setup/BuildInstruction.md index 05f98fb9b..b067676cd 100644 --- a/docs/src/documents/Setup/BuildInstruction.md +++ b/docs/src/documents/Setup/BuildInstruction.md @@ -55,6 +55,17 @@ Using the embedded-hbase-solr profile will configure Apache Atlas so that an Apa >NOTE: This distribution profile is only intended to be used for single node development not in production. +### Packaging Apache Atlas with BerkeleyDB & Apache Solr +To create Apache Atlas package that includes BerkeleyDB and Apache Solr, build with the berkeley-solr profile as shown below: + + +{`mvn clean -DskipTests package -Pdist,berkeley-solr`} + + +Using the berkeley-solr profile will configure Apache Atlas so that instances of Apache Solr and Apache Zookeeper will be started and stopped along with the Apache Atlas server. + +>NOTE: This distribution profile is only intended to be used for single node development not in production. + ### Packaging Apache Atlas with embedded Apache Cassandra & Apache Solr To create Apache Atlas package that includes Apache Cassandra and Apache Solr, build with the embedded-cassandra-solr profile as shown below: diff --git a/docs/src/documents/Setup/InstallationInstruction.md b/docs/src/documents/Setup/InstallationInstruction.md index fdff3a57e..89ecdc533 100644 --- a/docs/src/documents/Setup/InstallationInstruction.md +++ b/docs/src/documents/Setup/InstallationInstruction.md @@ -30,6 +30,14 @@ export MANAGE_LOCAL_SOLR=true bin/atlas_start.py`} +#### Running Apache Atlas with BerkeleyDB & Apache Solr +To run Apache Atlas with BerkeleyDB, and local instances of Apache Solr and Apache Zookeeper, run following commands: + + +{`export MANAGE_LOCAL_SOLR=true +bin/atlas_start.py`} + + #### Using Apache Atlas * To verify if Apache Atlas server is up and running, run curl command as shown below: diff --git a/webapp/pom.xml b/webapp/pom.xml index 792b16445..ffc3d37ef 100755 --- a/webapp/pom.xml +++ b/webapp/pom.xml @@ -58,6 +58,16 @@ + + berkeley-solr + + false + + + WEB-INF/lib/dom4j-*.jar + + + Windows