1. 程式人生 > >Atlas 2.1.0 實踐(2)—— 安裝Atlas

Atlas 2.1.0 實踐(2)—— 安裝Atlas

在完成Atlas編譯以後,就可以進行Atlas的安裝了。Atlas的安裝主要是安裝Atlas的Server端,也就Atlas的管理頁面,並確保Atlas與Kafka Hbase Solr等元件的整合。 Atlas的系統架構如下,在確保 底層儲存與UI介面正常後,之後就可以進行與Hive等元件的整合除錯了。 ![](https://img2020.cnblogs.com/blog/1089984/202012/1089984-20201230104311785-1672753721.png) ## 一、環境準備 安裝之前 先要準備好 **JDK1.8** **Zookeeper** **Kafka** **Hbase** **Solr** 在啟動Atlas時會配置這些環境變數的地址,所以一定要確保以上元件正常執行。 由於在編譯時可以選擇內部整合,所以這些Atlas是可以自帶的,但是JDK一定要安裝好。 在安裝Altas中,需要Solr 預先建立好collection ``` bin/solr create -c vertex_index -shards 3 -replicationFactor 2 bin/solr create -c edge_index -shards 3 -replicationFactor 2 bin/solr create -c fulltext_index -shards 3 -replicationFactor 2 ``` 在solr中驗證建立成功。 ## 二、安裝Atlas 到編譯好的包的路徑下 apache-atlas-sources-2.1.0/distro/target 將生成好的安裝包 apache-atlas-2.1.0-server.tar.gz 拷貝到目標路徑下。 解壓: ``` tar -zxvf apache-atlas-2.1.0-server.tar.gz ``` ## 三、修改配置 進入conf目錄下: ``` vi atlas-env.sh ``` 在此指定JAVA_HOME和是否要用內嵌啟動 ``` export JAVA_HOME=/opt/jdk1.8.0_191/ export MANAGE_LOCAL_HBASE=true export MANAGE_LOCAL_SOLR=true ``` 如果使用內嵌,那麼配置結束,直接去 **啟動Atlas** 但是大部分時候,需要使用已經有的元件進行整合,所以設定為false。 ``` export JAVA_HOME=/opt/jdk1.8.0_191/ export MANAGE_LOCAL_HBASE=false export MANAGE_LOCAL_SOLR=false #注意修改Hbase配置檔案路徑 export HBASE_CONF_DIR=/opt/hbase/conf ``` 修改其他配置 ``` vim atlas-application.properties ``` 這裡就是設定Hbase Solr等配置 ``` #Hbase地址 就是Hbase配置的zookeeper地址 atlas.graph.storage.hostname=slave01:2181,slave02:2181,slave03:2181 atlas.audit.hbase.zookeeper.quorum=slave01:2181,slave02:2181,slave03:2181 #solr伺服器地址 atlas.graph.index.search.solr.http-urls=http://slave01:8984/solr #kafka地址 atlas.notification.embedded=false atlas.kafka.zookeeper.connect=slave01:2181,slave02:2181,slave03:2181 atlas.kafka.bootstrap.servers=slave01:9092,slave02:9092,slave03:9092 #atlas地址 atlas.rest.address=http://slave01:21000 ``` ## 四、啟動Atlas ``` bin/atlas_start.py ``` 啟動成功後訪問: http://slave01:21000 admin/admin登入 ![](https://img2020.cnblogs.com/blog/1089984/202012/1089984-20201230104323494-1028201178.png) 成功!! # 踩坑全紀錄 ##### HBase: apache.zookeeper.KeeperException$NoNodeException: KeeperErrorCode = NoNode for /hbase/hbaseid hbase的問題 我的是因為沒有指定對hbase的配置檔案 hbase配置檔案的 zookeeper.znode.parent 並不是 /hbase/hbaseid ##### could not instantiate implementation: org.janusgraph.diskstorage.solr.Solr6Index ##### cannot connect to cluster at ... cluster not found /not ready 提示無法找到solr,在填寫atlas.graph.index.search.solr.zookeeper-url時需要新增znode,如2181/solr 具體是什麼去solr配置檔案裡,或者頁面上找 ##### ##### could not register new index field with index backend Solr有問題,檢查Solr 確保Solr正常啟動了 ##### Can not find the specified config set: vertex_index solr需要先建 三個索引 `vertex_index`, `edge_index`, `fulltext_index` 瞭解大資料實時計算 感受資料流動之美 歡迎關注 實時流式計算 ![](https://img2020.cnblogs.com/blog/1089984/202005/1089984-20200511083216576-14373893