two-server模式部署(azkaban二)

(2)解压web‐server和exec‐server

#web-server
[root@node1 ~]# tar -zxvf /root/azkaban-3.42.0/azkaban-web-server/build/distributions/azkaban-web-server-0.1.0-SNAPSHOT.tar.gz -C .
#exec‐server
[root@node1 ~]# tar -zxvf /root/azkaban-3.42.0/azkaban-exec-server/build/distributions/azkaban-exec-server-0.1.0-SNAPSHOT.tar.gz -C .

(3)将Azkaban源码中的create-all-sql脚本拷贝到Mysql所在节点node2

[root@node1 ~]# scp /root/azkaban-3.42.0/azkaban-db/build/install/azkaban-db/create-all-sql-0.1.0-SNAPSHOT.sql root@node2:~

(4)Mysql上创建对应的库、增加权限、创建表

mysql> CREATE DATABASE azkaban_two_server; #创建数据库
mysql> use azkaban_two_server;
mysql> CREATE USER 'azkaban'@'%' IDENTIFIED BY 'azkaban';#创建用户
mysql> GRANT SELECT,INSERT,UPDATE,DELETE ON azkaban_two_server.* to 'azkaban'@'%' WITH GRANT OPTION;#给用户授权
mysql> source create-all-sql-0.1.0-SNAPSHOT.sql;#创建表

(5)生成ssl

[root@node1 ~]# keytool -keystore keystore -alias jetty -genkey -keyalg RSA
注:密码和最后确认需要输入,其他默认即可。

(6)设置web‐server

拷贝conf目录和log4j.properties

[root@node1 ~]# cp -r /root/azkaban-solo-server-0.1.0-SNAPSHOT/conf /root/azkaban-web-server-0.1.0-SNAPSHOT/
[root@node1 ~]# find azkaban-3.42.0 -name 'log4j*'
[root@node1 ~]# cp azkaban-3.42.0/azkaban-web-server/src/test/resources/log4j.properties azkaban-web-server-0.1.0-SNAPSHOT/conf/
[root@node1 ~]# vim azkaban-web-server-0.1.0-SNAPSHOT/conf/azkaban.properties
#需要修改的地方
default.timezone.id=Asia/Shanghai
#database.type=h2
#h2.path=./h2
#h2.create.tables=true
database.type=mysql
mysql.port=3306
mysql.host=node2
mysql.database=azkaban_two_server
mysql.user=azkaban
mysql.password=azkaban
mysql.numconnections=100
jetty.keystore=/root/keystore #keytool生成的keystore路径
jetty.password=1234567 #keytool中设置的密码
jetty.keypassword=1234567
jetty.truststore=/root/keystore
jetty.trustpassword=1234567

添加azkaban.native.lib=false 和 execute.as.user=false属性

[root@node1 azkaban-web-server-0.1.0-SNAPSHOT]# mkdir -p plugins/jobtypes
[root@node1 jobtypes]# cat commonprivate.properties 
    azkaban.native.lib=false
    execute.as.user=false

(7)启动web-serrver并验证

[root@node1 ~]# cd azkaban-web-server-0.1.0-SNAPSHOT/
[root@node1 azkaban-web-server-0.1.0-SNAPSHOT]# bin/azkaban-web-start.sh
验证:
    jps=>AzkabanWebServer
    webUI=>http://node1:8081/index

(8)从web-server拷贝conf目录、plugins目录并启动executor‐server

[root@node1 ~]# cd azkaban-exec-server-0.1.0-SNAPSHOT/
[root@node1 azkaban-exec-server-0.1.0-SNAPSHOT]# cp -r ../azkaban-web-server-0.1.0-SNAPSHOT/conf/ .
[root@node1 azkaban-exec-server-0.1.0-SNAPSHOT]# cp -r /root/azkaban-web-server-0.1.0-SNAPSHOT/plugins/ .
[root@node1 azkaban-exec-server-0.1.0-SNAPSHOT]# bin/azkaban-executor-start.sh

原文:https://blog.csdn.net/wangpei1949/article/details/79521722

你可能感兴趣的:(azkaban)