下载源代码:
git clone https://github.com/azkaban/azkaban.git
编译安装:
./gradlew build installDist
报错:
> Task :azkaban-common:test
azkaban.trigger.BasicTimeCheckerTest > testPDTtoPSTdst1 FAILED
java.lang.AssertionError
at org.junit.Assert.fail(Assert.java:86)
at org.junit.Assert.assertTrue(Assert.java:41)
at org.junit.Assert.assertTrue(Assert.java:52)
at azkaban.trigger.BasicTimeCheckerTest.testPDTtoPSTdst1(BasicTimeCheckerTest.java:185)
azkaban.trigger.BasicTimeCheckerTest > testPDTtoPSTdst2 FAILED
java.lang.AssertionError
at org.junit.Assert.fail(Assert.java:86)
at org.junit.Assert.assertTrue(Assert.java:41)
at org.junit.Assert.assertTrue(Assert.java:52)
at azkaban.trigger.BasicTimeCheckerTest.testPDTtoPSTdst2(BasicTimeCheckerTest.java:227)
azkaban.trigger.BasicTimeCheckerTest > testPDTtoPSTdst3 FAILED
java.lang.AssertionError
at org.junit.Assert.fail(Assert.java:86)
at org.junit.Assert.assertTrue(Assert.java:41)
at org.junit.Assert.assertTrue(Assert.java:52)
at azkaban.trigger.BasicTimeCheckerTest.testPDTtoPSTdst3(BasicTimeCheckerTest.java:264)
azkaban.trigger.BasicTimeCheckerTest > testPSTtoPDTunderUTC FAILED
java.lang.AssertionError
at org.junit.Assert.fail(Assert.java:86)
at org.junit.Assert.assertTrue(Assert.java:41)
at org.junit.Assert.assertTrue(Assert.java:52)
at azkaban.trigger.BasicTimeCheckerTest.testPSTtoPDTunderUTC(BasicTimeCheckerTest.java:122)
azkaban.trigger.BasicTimeCheckerTest > testPSTtoPDTdst2 FAILED
java.lang.AssertionError
at org.junit.Assert.fail(Assert.java:86)
at org.junit.Assert.assertTrue(Assert.java:41)
at org.junit.Assert.assertTrue(Assert.java:52)
at azkaban.trigger.BasicTimeCheckerTest.testPSTtoPDTdst2(BasicTimeCheckerTest.java:150)
清除:
./gradlew clean
去掉测试重新编译:
./gradlew build installDist -x test
安装python依赖,python版本必须是python3以上
pip install -r requirements.txt
创建数据库
mysql> CREATE DATABASE azkaban;
创建用户并赋权
mysql> CREATE USER 'azkaban'@'%' IDENTIFIED BY 'password';
# 赋予用户 INSERT, SELECT, UPDATE, DELETE 等权限给azkaban用户
mysql> GRANT SELECT,INSERT,UPDATE,DELETE ON azkaban.* to 'azkaban'@'%' WITH GRANT OPTION;
# 刷新权限
mysql> flush privileges;
导入表结构和数据,在编译完成后,$AZKABAN_HOME/azkaban-db/build/install/azkaban-db目录下会有相关的sql脚本,我们使用create-all-sql-<version>-SNAPSHOT.sql就可以
mysql> source /home/azkaban/azkaban/azkaban-db/build/install/azkaban-db/create-all-sql-0.1.0-SNAPSHOT.sql
修改数据库配置
cd azkaban-exec-server/build/install/azkaban-exec-server
vim conf/azkaban.properties
# mysql 配置
mysql.user=<username>
mysql.password=<password>
启动服务
./bin/start-exec.sh
配置前端服务
cd azkaban-web-server/build/install/azkaban-web-server
vim conf/azkaban.properties
# mysql 配置
mysql.user=<username>
mysql.password=<password>
启动服务
./bin/start-web.sh
访问页面, 默认端口为8081,账号密码都是azkaban