Building & Installing Apache Atlas

Building Atlas

git clone atlas
cd atlas
export MAVEN_OPTS="-Xms2g -Xmx2g"
mvn clean -DskipTests install

Packaging Atlas

To create Apache Atlas package for deployment in an environment having functional HBase and Solr instances, build with the following command:

mvn clean -DskipTests package -Pdist

  • NOTES:
    • Remove option '-DskipTests' to run unit and integration tests
    • To build a distribution without minified js,css file, build with skipMinify profile. By default js and css files are minified.

Above will build Atlas for an environment having functional HBase and Solr instances. Atlas needs to be setup with the following to run in this environment:

  • Configure (see "Graph persistence engine - HBase" in the Configuration section).
  • Configure (see "Graph Search Index - Solr" in the Configuration section).
  • Set HBASE_CONF_DIR to point to a valid HBase config directory (see "Graph persistence engine - HBase" in the Configuration section).
  • Create the SOLR indices (see "Graph Search Index - Solr" in the Configuration section).

Packaging Atlas with Embedded HBase & Solr

To create Apache Atlas package that includes HBase and Solr, build with the embedded-hbase-solr profile as shown below:

mvn clean -DskipTests package -Pdist,embedded-hbase-solr

Using the embedded-hbase-solr profile will configure Atlas so that an HBase instance and a Solr instance will be started and stopped along with the Atlas server by default.

Apache Atlas Package

Build will create following files, which are used to install Apache Atlas.


Installing & Running Atlas

Installing Atlas
tar -xzvf apache-atlas-${project.version}-bin.tar.gz

cd atlas-${project.version}
Configuring Atlas

By default config directory used by Atlas is {package dir}/conf. To override this set environment variable ATLAS_CONF to the path of the conf dir.

Environment variables needed to run Atlas can be set in file in the conf directory. This file will be sourced by Atlas scripts before any commands are executed. The following environment variables are available to set.

# The java implementation to use. If JAVA_HOME is not found we expect java and jar to be in path
#export JAVA_HOME=

# any additional java opts you want to set. This will apply to both client and server operations
#export ATLAS_OPTS=

# any additional java opts that you want to set for client only

# java heap size we want to set for the client. Default is 1024MB

# any additional opts you want to set for atlas service.

# java heap size we want to set for the atlas server. Default is 1024MB

# What is is considered as atlas home dir. Default is the base location of the installed software

# Where log files are stored. Defatult is logs directory under the base install location
#export ATLAS_LOG_DIR=

# Where pid files are stored. Defatult is logs directory under the base install location
#export ATLAS_PID_DIR=

# Where do you want to expand the war file. By Default it is in /server/webapp dir under the base install dir.

Settings to support large number of metadata objects

If you plan to store large number of metadata objects, it is recommended that you use values tuned for better GC performance of the JVM.

The following values are common server side options:

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"

The -XX:SoftRefLRUPolicyMSPerMB option was found to be particularly helpful to regulate GC performance for query heavy workloads with many concurrent users.

The following values are recommended for JDK 8:

export ATLAS_SERVER_HEAP="-Xms15360m -Xmx15360m -XX:MaxNewSize=5120m -XX:MetaspaceSize=100M -XX:MaxMetaspaceSize=512m"

NOTE for Mac OS users If you are using a Mac OS, you will need to configure the ATLAS_SERVER_OPTS (explained above).

In {package dir}/conf/ uncomment the following line


and change it to look as below

export ATLAS_SERVER_OPTS="-Djava.awt.headless=true"

HBase as the Storage Backend for the Graph Repository

By default, Atlas uses JanusGraph as the graph repository and is the only graph repository implementation available currently. The HBase versions currently supported are 1.1.x. For configuring ATLAS graph persistence on HBase, please see "Graph persistence engine - HBase" in the Configuration section for more details.

HBase tables used by Atlas can be set using the following configurations:

Configuring SOLR as the Indexing Backend for the Graph Repository

By default, Atlas uses JanusGraph as the graph repository and is the only graph repository implementation available currently. For configuring JanusGraph to work with Solr, please follow the instructions below

  • Start solr in cloud mode.
SolrCloud mode uses a ZooKeeper Service as a highly available, central location for cluster management. For a small cluster, running with an existing ZooKeeper quorum should be fine. For larger clusters, you would want to run separate multiple ZooKeeper quorum with atleast 3 servers. Note: Atlas currently supports solr in "cloud" mode only. "http" mode is not supported. For more information, refer solr documentation -

  • For e.g., to bring up a Solr node listening on port 8983 on a machine, you can use the command:
      $SOLR_HOME/bin/solr start -c -z <zookeeper_host:port> -p 8983

  • Run the following commands from SOLR_BIN (e.g. $SOLR_HOME/bin) directory to create collections in Solr corresponding to the indexes that Atlas uses. In the case that the ATLAS and SOLR instance are on 2 different hosts, first copy the required configuration files from ATLAS_HOME/conf/solr on the ATLAS instance host to the Solr instance host. SOLR_CONF in the below mentioned commands refer to the directory where the solr configuration files have been copied to on Solr host:
  $SOLR_BIN/solr create -c vertex_index -d SOLR_CONF -shards #numShards -replicationFactor #replicationFactor
  $SOLR_BIN/solr create -c edge_index -d SOLR_CONF -shards #numShards -replicationFactor #replicationFactor
  $SOLR_BIN/solr create -c fulltext_index -d SOLR_CONF -shards #numShards -replicationFactor #replicationFactor

Note: If numShards and replicationFactor are not specified, they default to 1 which suffices if you are trying out solr with ATLAS on a single node instance. Otherwise specify numShards according to the number of hosts that are in the Solr cluster and the maxShardsPerNode configuration. The number of shards cannot exceed the total number of Solr nodes in your !SolrCloud cluster.

The number of replicas (replicationFactor) can be set according to the redundancy required.

Also note that solr will automatically be called to create the indexes when the Atlas server is started if the SOLR_BIN and SOLR_CONF environment variables are set and the search indexing backend is set to 'solr5'.

  • Change ATLAS configuration to point to the Solr instance setup. Please make sure the following configurations are set to the below values in ATLAS_HOME/conf/<the ZK quorum setup for solr as comma separated value> eg:,<SolrCloud Zookeeper Connection Timeout>. Default value is 60000 ms<SolrCloud Zookeeper Session Timeout>. Default value is 60000 ms

  • Restart Atlas

For more information on JanusGraph solr configuration , please refer

Pre-requisites for running Solr in cloud mode * Memory - Solr is both memory and CPU intensive. Make sure the server running Solr has adequate memory, CPU and disk. Solr works well with 32GB RAM. Plan to provide as much memory as possible to Solr process * Disk - If the number of entities that need to be stored are large, plan to have at least 500 GB free space in the volume where Solr is going to store the index data * SolrCloud has support for replication and sharding. It is highly recommended to use SolrCloud with at least two Solr nodes running on different servers with replication enabled. If using SolrCloud, then you also need ZooKeeper installed and configured with 3 or 5 ZooKeeper nodes

Configuring Kafka Topics

Atlas uses Kafka to ingest metadata from other components at runtime. This is described in the Architecture page in more detail. Depending on the configuration of Kafka, sometimes you might need to setup the topics explicitly before using Atlas. To do so, Atlas provides a script bin/ which can be run from the Atlas server. In some environments, the hooks might start getting used first before Atlas server itself is setup. In such cases, the topics can be run on the hosts where hooks are installed using a similar script hook-bin/ Both these use configuration in for setting up the topics. Please refer to the Configuration page for these details.

Setting up Atlas

There are a few steps that setup dependencies of Atlas. One such example is setting up the JanusGraph schema in the storage backend of choice. In a simple single server setup, these are automatically setup with default configuration when the server first accesses these dependencies.

However, there are scenarios when we may want to run setup steps explicitly as one time operations. For example, in a multiple server scenario using High Availability, it is preferable to run setup steps from one of the server instances the first time, and then start the services.

To run these steps one time, execute the command bin/ -setup from a single Atlas server instance.

However, the Atlas server does take care of parallel executions of the setup steps. Also, running the setup steps multiple times is idempotent. Therefore, if one chooses to run the setup steps as part of server startup, for convenience, then they should enable the configuration option by defining it with the value true in the file.

Starting Atlas Server
bin/ [-port <port>]

Using Atlas

  • Verify if the server is up and running
  curl -v -u username:password http://localhost:21000/api/atlas/admin/version

  • Run quick start to load sample model and data
  bin/ [<atlas endpoint>]

  • List the types in the repository
  curl -v -u username:password http://localhost:21000/api/atlas/v2/types/typedefs/headers
  [ {"guid":"fa421be8-c21b-4cf8-a226-fdde559ad598","name":"Referenceable","category":"ENTITY"},

  • List the instances for a given type
  curl -v -u username:password http://localhost:21000/api/atlas/v2/search/basic?typeName=hive_db
          "description":"Default Hive database"

  • Search for entities
  curl -v -u username:password http://localhost:21000/api/atlas/v2/search/dsl?query=hive_db%20where%20name='default'
      "queryText":"hive_db where name='default'",
            "Default Hive database"

Stopping Atlas Server



Setup issues

If the setup of Atlas service fails due to any reason, the next run of setup (either by an explicit invocation of -setup or by enabling the configuration option will fail with a message such as A previous setup run may not have completed cleanly.. In such cases, you would need to manually ensure the setup can run and delete the Zookeeper node at /apache_atlas/setup_in_progress before attempting to run setup again.

If the setup failed due to HBase JanusGraph schema setup errors, it may be necessary to repair the HBase schema. If no data has been stored, one can also disable and drop the HBase tables used by Atlas and run setup again.