Azkaban 安装
准备
azkaban-web-server-2.5.0.tar.gz
azkaban-executor-server-2.5.0.tar.gz
azkaban-sql-script-2.5.0.tar.gz
其中默认带的是mysql5的jar包,如果安装的是8.0的mysql,还要准备一个8的jar包
MySQL部分
create database azkaban;
use azkaban;
使用模板创建表
source /usr/local/azkaban250/azkaban-2.5.0/create-all-sql-2.5.0.sql;
+------------------------+
| Tables_in_azkaban |
+------------------------+
| active_executing_flows |
| active_sla |
| execution_flows |
| execution_jobs |
| execution_logs |
| project_events |
| project_files |
| project_flows |
| project_permissions |
| project_properties |
| project_versions |
| projects |
| properties |
| schedules |
| triggers |
+------------------------+
配置SSL
1.执行命令keytool -keystore keystore -alias jetty -genkey -keyalg RSA会在当前目录生成一个keystore证书文件,当然执行该命令需要你填写一些信息,比如你的姓名+工作单位等。按照提示填写即可。
2.然后把 keystore 考贝到 azkaban web服务器bin目录中
3.配置时区
[root@node1 azkaban]# tzselect
Please identify a location so that time zone rules can be set correctly.
Please select a continent or ocean.
1) Africa
2) Americas
3) Antarctica
4) Arctic Ocean
5) Asia
6) Atlantic Ocean
7) Australia
8) Europe
9) Indian Ocean
10) Pacific Ocean
11) none - I want to specify the time zone using the Posix TZ format.
#? 5
Please select a country.
1) Afghanistan 18) Israel 35) Palestine
2) Armenia 19) Japan 36) Philippines
3) Azerbaijan 20) Jordan 37) Qatar
4) Bahrain 21) Kazakhstan 38) Russia
5) Bangladesh 22) Korea (North) 39) Saudi Arabia
6) Bhutan 23) Korea (South) 40) Singapore
7) Brunei 24) Kuwait 41) Sri Lanka
8) Cambodia 25) Kyrgyzstan 42) Syria
9) China 26) Laos 43) Taiwan
10) Cyprus 27) Lebanon 44) Tajikistan
11) East Timor 28) Macau 45) Thailand
12) Georgia 29) Malaysia 46) Turkmenistan
13) Hong Kong 30) Mongolia 47) United Arab Emirates
14) India 31) Myanmar (Burma) 48) Uzbekistan
15) Indonesia 32) Nepal 49) Vietnam
16) Iran 33) Oman 50) Yemen
17) Iraq 34) Pakistan
#? 9
Please select one of the following time zone regions.
1) Beijing Time
2) Xinjiang Time
#? 1
The following information has been given:
China
Beijing Time
Therefore TZ='Asia/Shanghai' will be used.
Local time is now: Sat Jul 28 18:29:58 CST 2018.
Universal Time is now: Sat Jul 28 10:29:58 UTC 2018.
Is the above information OK?
1) Yes
2) No
#? 1
You can make this change permanent for yourself by appending the line
TZ='Asia/Shanghai'; export TZ
to the file '.profile' in your home directory; then log out and log in again.
Here is that TZ value again, this time on standard output so that you
can use the /usr/bin/tzselect command in shell scripts:
Asia/Shanghai
这个配置需要给集群的每个主机设置,因为任务调度离不开准确的时间。我们也可以直接把相关文件拷贝到别的主机作覆盖。
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
scp /usr/share/zoneinfo/Asia/Shanghai root@node2:/etc/localtime
Shanghai
配置文件修改
在解压的web文件下,修改azkaban.properties
#Azkaban Personalization Settings
azkaban.name=Test
azkaban.label=My Local Azkaban
azkaban.color=#FF3601
azkaban.default.servlet.path=/index
web.resource.dir=web/
##需要修改
default.timezone.id=Asia/Shanghai
#Azkaban UserManager class
user.manager.class=azkaban.user.XmlUserManager
##使用绝对路径 防止后期找不到文件
user.manager.xml.file=/usr/local/azkaban250/azkaban-web-2.5.0/conf/azkaban-users.xml
#Loader for projects
##使用绝对路径 防止后期找不到文件
executor.global.properties=/usr/local/azkaban250/azkaban-executor-2.5.0/conf/global.properties
azkaban.project.dir=projects
database.type=mysql
mysql.port=3306
mysql.host=安装了MySQL的ip
mysql.database=azkaban
mysql.user=数据库的用户名
mysql.password=用户名密码
mysql.numconnections=100
# Velocity dev mode
velocity.dev.mode=false
# Azkaban Jetty server properties.
jetty.maxThreads=25
jetty.ssl.port=8443
jetty.port=8081
jetty.keystore=/usr/local/azkaban250/azkaban-web-2.5.0/bin/keystore
jetty.password=配置SSL第一步设置的密码
jetty.keypassword=配置SSL第一步设置的密码
#如果没有移动到bin下 就使用绝对路径
jetty.truststore=/usr/local/azkaban250/azkaban-web-2.5.0/bin/keystore
jetty.trustpassword=配置SSL第一步设置的密码
# Azkaban Executor settings
executor.port=12321
修改/conf/目录下的azkaban-users.xml
#后期用来登陆 <role name="admin" permissions="ADMIN" />
<role name="metrics" permissions="METRICS"/>
修改azkaban-executor-server-2.5.0/conf目录下的azkaban.properties
#Azkaban
default.timezone.id=Asia/Shanghai
# Azkaban JobTypes Plugins
azkaban.jobtype.plugin.dir=plugins/jobtypes
#Loader for projects
executor.global.properties=/usr/local/azkaban250/azkaban-executor-2.5.0/conf/global.properties
azkaban.project.dir=projects
database.type=mysql
mysql.port=3306
mysql.host=192.168.136.133
mysql.database=azkaban
mysql.user=root
mysql.password=aaaa
mysql.numconnections=100
# Azkaban Executor settings
executor.maxThreads=50
executor.port=12321
executor.flow.threads=30
执行
先使用 bin/azkaban-web-start.sh 检查是否有错。
确保没有错误 杀掉进程 执行 nohup bin/azkaban-web-start.sh 1>/tmp/azstd.out 2>/tmp/azerr.out &
在执行 bin/azkaban-web-start.sh
执行一定不要在bin目录下会丢失css文件
然后就可以通过ip+8443访问网页