美文网首页
Kylo集群安装详解

Kylo集群安装详解

作者: WFitz | 来源:发表于2019-02-26 17:51 被阅读0次

说明

  • 集群由dpnode05和dpnode08两个节点组成

>>>下面在dpnode05上操作

创建kylo安装目录

  • mkdir /opt/kylo

将装装包解压到安装目录

  • tar xvf /home/wcm/sources/kylo-0.10.0.tar -C /opt/kylo

安装前执行预处理脚本, 这里以root用户安装

  • /opt/kylo/setup/install/post-install.sh /opt/kylo root root

PS: 三个参数依次为: kylo安装目录, 安装程序的用户, 安装程序的用户组

修改配置文件

  • vim /opt/kylo/kylo-services/conf/application.properties
    spring.datasource.url=jdbc:mysql://dpnode05:3306/kylo
    spring.datasource.username=root
    spring.datasource.password=123456
    spring.datasource.driverClassName=com.mysql.jdbc.Driver
    

复制Mysql驱动

  • cp /home/wcm/mysql-connector-java-8.0.15.jar /opt/kylo/kylo-services/lib/

生成sql脚本

  • cd /opt/kylo/setup/sql/mysql
  • ./setup-mysql.sh dpnode05 root 123456
  • cd /opt/kylo/setup/sql
  • ./generate-update-ql.sh
    # 生成的两个脚本文件
    kylo-db-update-script.sql
    kylo-db-update-script.sql.bac
    

连接Mysql客户端执行Kylo sql脚本

use kylo;
source kylo-db-update-script.sql;

下载Quartz

集群配置

  • ModeShape配置

    # vim /opt/kylo/kylo-services/conf/metadata-repository.json
    # 在最后一个追加如下内容
    
    ,"clustering": {
        "clusterName":"kylo-modeshape-cluster",
        "configuration":"modeshape-jgroups-config.xml",
        "locking":"db"
    }
    
  • Kylo配置

    # vim  /opt/kylo/kylo-services/conf/application.properties
    # 最后添加如下内容
    
    kylo.cluster.jgroupsConfigFile=kylo-cluster-jgroups-config.xml
    kylo.cluster.nodeCount=2
    
    # 修改activemq jms连接
    jms.activemq.broker.url=tcp://dpnode05:61616
    
    # 修改elasticsearch jms连接
    config.elasticsearch.jms.url=tcp://dpnode05:61616
    
    # 修改nifi配置
    nifi.rest.host=dpnode05
    nifi.rest.port=8079
    
  • Elasticsearch配置

    # vim /opt/kylo/kylo-services/conf/elasticsearch-rest.properties
    # 修改连接配置
    search.rest.host=dpnode05
    search.rest.port=9200
    
  • Quartz配置

    # cp /opt/kylo/setup/config/kylo-cluster/quartz-cluster-example.properties /opt/kylo/kylo-services/conf/quartz.properties
    
  • kylo-cluster-jgroups-config

    # cp /opt/kylo/setup/config/kylo-cluster/kylo-cluster-jgroups-config-example.xml /opt/kylo/kylo-services/conf/kylo-cluster-jgroups-config.xml
    # vim /opt/kylo/kylo-services/conf/kylo-cluster-jgroups-config.xml
    <TCP bind_port="7900"
       bind_addr="dpnode05"
    ....
     <TCPPING timeout="3000" async_discovery="true" num_initial_members="2"
           initial_hosts="dpnode05[7900],dpnode08[7900]"
    ....
    
  • modeshape-jgroups-config

    # cp /opt/kylo/setup/config/kylo-cluster/modeshape-local-test-jgroups-config.xml /opt/kylo/kylo-services/conf/modeshape-jgroups-config.xml
    # vim modeshape-jgroups-config.xml
    <TCP bind_port="7800"
       bind_addr="dpnode05"
    ....
    <TCPPING timeout="3000" async_discovery="true" num_initial_members="2"
           initial_hosts="dpnode05[7800],dpnode08[7800]"
    ....
    
  • 启动脚本配置

    # vim /opt/kylo/kylo-services/bin/run-kylo-services.sh
    # 添加启动参数 -Djava.net.preferIPv4Stack=true
    java -Djava.net.preferIPv4Stack=true -Dorg.springframework.boot.logging.LoggingSystem=none $KYLO_SERVICES_OPTS $KYLO_SPRING_PROFILES_OPTS -cp /opt/kylo/kylo-services/conf:$HADOOP_CONF_DIR:/opt/kylo/kylo-services/lib/*:/opt/kylo/kylo-services/lib/${KYLO_NIFI_PROFILE}/*:/opt/kylo/kylo-services/plugin/* com.thinkbiganalytics.server.KyloServerApplication --pgrep-marker=kylo-services-pgrep-marker > /var/log/kylo-services/std.out 2>/var/log/kylo-services/std.err &
    

添加集群服务监控依赖插件

  • cp /opt/kylo/setup/plugins/kylo-service-monitor-kylo-cluster-0.10.0.jar /opt/kylo/kylo-services/plugin/

通信测试(可省略)

  • dpnode05 上执行, 阻塞并接受消息
    java -Djava.net.preferIP4Stack=true -cp  /opt/kylo/kylo-services/conf:/opt/kylo/kylo-services/lib/*:/opt/kylo/kylo-services/plugin/* org.jgroups.tests.McastReceiverTest -bind_addr dpnode05 -port 7900
    
  • dpnode08 上执行, 发送消息
    java -Djava.net.preferIP4Stack=true -cp  /opt/kylo/kylo-services/conf:/opt/kylo/kylo-services/lib/*:/opt/kylo/kylo-services/plugin/* org.jgroups.tests.McastSenderTest -bind_addr dpnode08 -port 7900
    

PS: dpnode05能收到消息则正常

复制节点

  • cd /opt
  • scp -r /opt dpnode08://$PWD

>>>下面在dpnode08上操作

执行预处理脚本, 这里以root用户安装

  • /opt/kylo/setup/install/post-install.sh /opt/kylo root root

集群配置

  • 启动脚本配置

    # vim /opt/kylo/kylo-services/bin/run-kylo-services.sh
    # 添加启动参数 -Djava.net.preferIPv4Stack=true
    java -Djava.net.preferIPv4Stack=true -Dorg.springframework.boot.logging.LoggingSystem=none $KYLO_SERVICES_OPTS $KYLO_SPRING_PROFILES_OPTS -cp /opt/kylo/kylo-services/conf:$HADOOP_CONF_DIR:/opt/kylo/kylo-services/lib/*:/opt/kylo/kylo-services/lib/${KYLO_NIFI_PROFILE}/*:/opt/kylo/kylo-services/plugin/* com.thinkbiganalytics.server.KyloServerApplication --pgrep-marker=kylo-services-pgrep-marker > /var/log/kylo-services/std.out 2>/var/log/kylo-services/std.err &
    
  • kylo-cluster-jgroups-config

    # cp /opt/kylo/setup/config/kylo-cluster/kylo-cluster-jgroups-config-example.xml /opt/kylo/kylo-services/conf/kylo-cluster-jgroups-config.xml
    # vim /opt/kylo/kylo-services/conf/kylo-cluster-jgroups-config.xml
    <TCP bind_port="7900"
       bind_addr="dpnode08"
    ....
     <TCPPING timeout="3000" async_discovery="true" num_initial_members="2"
           initial_hosts="dpnode05[7900],dpnode08[7900]"
    ....
    
  • modeshape-jgroups-config

    # cp /opt/kylo/setup/config/kylo-cluster/modeshape-local-test-jgroups-config.xml /opt/kylo/kylo-services/conf/modeshape-jgroups-config.xml
    # vim modeshape-jgroups-config.xml
    <TCP bind_port="7800"
       bind_addr="dpnode08"
    ....
    <TCPPING timeout="3000" async_discovery="true" num_initial_members="2"
           initial_hosts="dpnode05[7800],dpnode08[7800]"
    ....
    

>>>下面操作分别在两个节点上执行

启动服务

  • kylo-services start

在浏览器访问kylo-ui

参考文章:

问题

  • Admin -> Connectors -> Hive/JDBC/... 访问不了
    • 原因: kylo 访问控制分为两层, service-level(kylo-wide) 和 entity-level, entity-level层权限控制默认是关闭的! 而这个UI选项就属于entity层权限,所以访问不了
    • 解决方法
      • 修改 /opt/kylo/kylo-services/conf/application.properties
      • 修改属性 security.entity.access.controlled=true
      • 重启服务即可

集群原理

Modeshape uses jgroups internally for Kylo Cluster management.

Modeshape Replicated with a shared database. Modeshape Cluster

This is the only clustering model which will be supported by ModeShape 5.

A cluster in this model can have any number of members each with it's own in-memory cache but all using a shared database for persisting and reading the content. Binary stores and Indexes can be configured to be either local to each member or shared across all members, depending on the chosen implementation.

Updates in the cluster are sent to each of the members in the form of JGroups messages representing the various events that caused that data to mutate. Each cluster member will update their own local state in response to these events.

This works great for small- to medium-sized repositories, even when the available memory on each process is not large enough to hold all of the nodes and binary values at one time.

相关文章

  • Kylo集群安装详解

    说明 集群由dpnode05和dpnode08两个节点组成 >>>下面在dpnode05上操作 创建kylo安装目...

  • kylo集群+nifi集群搭建

    kylo集群搭建教程 kylo文档中 Clustering Kylo 介绍的比较模糊,但是大概步骤都讲到了。 ky...

  • Kylo单机安装详解

    创建需要的用户和分组 useradd -r -m -s /bin/bash nifi && useradd -r ...

  • # kylo安装教程

    kylo安装脚本 脚本使用视频 首先确认安装资源情况如下,根据实际情况配置修改all_config.propert...

  • kylo问题

    原文链接 编辑application.properties文件: $ vim /opt/kylo/kylo-ser...

  • Hadoop集群安装部署详解

    本文主要介绍Hadoop的一些基本信息及完全分布式安装,每一步都是笔者亲自操作所记录下来的,现分享出来希望能帮助到...

  • zookeeper单机-集群安装详解

    本篇讲述zookeeper单机及集群部署,笔者觉得还是比较详细,希望能帮助到急需补充该方面知识的朋友,如发现有问题...

  • CentOS7 - Nginx安装目录与编译参数详解

    Nginx 安装目录详解 安装编译参数详解

  • Kafka安装

    集群安装 kafka集依赖于zookeeer,所以安装kafka 集群时,先确保zookeeper集群已经安装启动...

  • Elasticsearch 集群管理1 - 配置详解

    ES集群管理 1、elasticsearch.yml配置详解 #集群名字cluster.name#节点名字no...

网友评论

      本文标题:Kylo集群安装详解

      本文链接:https://www.haomeiwen.com/subject/fplzyqtx.html