下载并编译文件参考官网:
Installing the Solo Server
Follow these steps to get started.
- Clone the repo: run
git clone https://github.com/azkaban/azkaban.git
- Build Azkaban and create an installation: run
cd azkaban; ./gradlew build installDist
到这一步这里编译完成就OK了,如果在编译的过程中出现错误首先检测网络是否畅通,还不行的话尝试跳过检测(-x 的意思是跳过检测,博主就是出了一些检测的问题但是不知道为什么发生的,直接跳过也可以正常使用...怀疑是JDK版本问题)
./gradlew build installDist -x test
配置MySql:
mysql -uroot -p你的密码
CREATE DATABASE azkaban;
# Example database creation command. The user name doesn't need to be 'azkaban'
mysql> CREATE USER 'azkaban'@'%' IDENTIFIED BY 'password';
# 授予权限
# Replace db, username with the ones created by the previous steps.
mysql> GRANT SELECT,INSERT,UPDATE,DELETE ON azkaban.* to 'azkaban'@'%' WITH GRANT OPTION;
mysql>flush privileges;
service mysql restart
安装azkaban的表(必须要先编译好文件):
use azkaban;
source /root/azkaban-3.81.0/azkaban-db/build/install/azkaban-db/create-all-sql-0.1.0-SNAPSHOT.sql
安装Azkaban Web server:
解压~/azkaban-3.81.0/azkaban-web-server/build/distributions/azkaban-web-server-0.1.0-SNAPSHOT.tar.gz到你想要的位置之后
(azkaban-3.81.0是编译后的源目录)
配置SSL:
keytool -keystore keystore -alias jetty -genkey -keylg RSA
然后配置conf/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=America/Los_Angeles
# Azkaban UserManager class
user.manager.class=azkaban.user.XmlUserManager
user.manager.xml.file=conf/azkaban-users.xml
# Loader for projects
executor.global.properties=conf/global.properties
azkaban.project.dir=projects
# Velocity dev mode
velocity.dev.mode=false
# Azkaban Jetty server properties.
# 如果开启ssl连接需要设置为true
jetty.use.ssl=true
jetty.maxThreads=25
jetty.port=8084
jetty.ssl.port=8085
jetty.keystore=/root/keystore # keystore文件的位置
jetty.password=000000
jetty.keypassword=000000
jetty.truststore=/root/keystore
jetty.trustpassword=000000
# Azkaban Executor settings
# mail settings
mail.sender=
mail.host=
# User facing web server configurations used to construct the user facing server URLs. They are useful when there is a reverse proxy between Azkaban web servers and users.
# enduser -> myazkabanhost:443 -> proxy -> localhost:8081
# when this parameters set then these parameters are used to generate email links.
# if these parameters are not set then jetty.hostname, and jetty.port(if ssl configured jetty.ssl.port) are used.
# azkaban.webserver.external_hostname=myazkabanhost.com
# azkaban.webserver.external_ssl_port=443
# azkaban.webserver.external_port=8081
job.failure.email=
job.success.email=
lockdown.create.projects=false
cache.directory=cache
# JMX stats
jetty.connector.stats=true
executor.connector.stats=true
# Azkaban mysql settings by default. Users should configure their own username and password.
# 数据库连接信息
database.type=mysql
mysql.port=3306
mysql.host=localhost
mysql.database=azkaban
mysql.user=azkaban
mysql.password=
mysql.numconnections=100
# Azkaban Executor settings
executor.maxThreads=50
executor.port=12321
executor.flow.threads=30
#Multiple Executor
azkaban.use.multiple.executors=true
azkaban.executorselector.filters=StaticRemainingFlowSize,MinimumFreeMemory,CpuStatus
#这里要注意,如果MinimumFreeMemory在的话,机器内存不能小于6G,否则任务不会执行!!!!!!
azkaban.executorselector.comparator.NumberOfAssignedFlowComparator=1
azkaban.executorselector.comparator.Memory=1
azkaban.executorselector.comparator.LastDispatched=1
azkaban.executorselector.comparator.CpuUsage=1
软后就可以bin/start-web.sh启动了。
容易遇到的问题:
[Azkaban] No active executors found
启动时候 报这个错误.
1 2 3 4 5 6 7 8 9 10 |
|
解决方案: azkaban 数据库里面 有个 executors 表 里 面 port = 12321 的 哪行记录的 active 改为 1 .
update executors set active =1 where port=12321 ;